docs(requirements): add the hub requirements 072 to 084
Queue controls tab and override, running tasks on the board, stale task prune, release cut, greyed card stamp, commit-tree diff, VS Code path links, expired cards, Match refresh hourglass, field attachments, self-tuning queue admission and the limits board. 🎯 Fix: 95 % 💥 Break: 1 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 94 🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 % Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
83a0ab504b
commit
c4975d8246
14 files changed
+987
No files matched your search
@@ -0,0 +1,79 @@
|
|||||||
|
# 072 - Queue Controls Tab
|
||||||
|
|
||||||
|
## User Story
|
||||||
|
|
||||||
|
As the operator, I want the queue's learnings and settings in the hub,
|
||||||
|
editable with my passkey, so that I tune budgets and caps without editing
|
||||||
|
the queue's config file by hand.
|
||||||
|
|
||||||
|
## Decisions (operator-confirmed 2026-11-27; do not re-litigate)
|
||||||
|
|
||||||
|
1. **Own tab** (operator): a Controls tab "Queue" beside Rules and
|
||||||
|
Schedules. Rejected: a section in the Rules page (the page grows long).
|
||||||
|
2. **Learnings read-only**: per kind runs, RAM and CPU share, slot limit,
|
||||||
|
light flag and caps; per signature the learned rows; the last 20 history
|
||||||
|
rows. `queue.py learned --json` delivers them and the hub runs it
|
||||||
|
read-only.
|
||||||
|
3. **Settings editable** (operator: with passkey): `budget_percent`,
|
||||||
|
`ram_cap_percent` per kind, `slots` and `load_limits`. Changes are
|
||||||
|
staged; one passkey assertion signs the batch; the host runner runs
|
||||||
|
`queue.py config set <key> <value>` by argv, and queue.py checks every
|
||||||
|
value as its config check already does. Rejected: the hub writes the
|
||||||
|
config file itself (it runs in a container without host write access);
|
||||||
|
read-only only (operator wants to edit).
|
||||||
|
4. **No CPU cap per kind**: the operator picked the override (073) for a
|
||||||
|
job the CPU budget holds. Rejected: `cpu_cap_percent`; throttling jobs
|
||||||
|
through systemd scopes; booking CPU softly.
|
||||||
|
|
||||||
|
## Approach
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
subgraph P["🧭 0 · Preparation"]
|
||||||
|
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
|
||||||
|
P2 -- "✏️ corrections" --> P1
|
||||||
|
end
|
||||||
|
P2 -- "🤖 yes" --> A1
|
||||||
|
subgraph A["🧮 A · queue.py"]
|
||||||
|
A1["📤 learned --json"] --> A2["✏️ config set with the config check"]
|
||||||
|
A2 --> A3{"🧪 Unit tests green?"}
|
||||||
|
A3 -- "🔴 no: fix" --> A1
|
||||||
|
end
|
||||||
|
A3 -- "🟢 yes" --> B1
|
||||||
|
subgraph B["🗂️ B · Hub tab"]
|
||||||
|
B1["📊 Learnings table"] --> B2["🔏 Staged settings, one signature"]
|
||||||
|
B2 --> B3{"🧪 Integration and E2E green?"}
|
||||||
|
B3 -- "🔴 no: fix" --> B1
|
||||||
|
B3 -- "🟢 yes" --> BF{"💬 Operator feedback on screenshots?"}
|
||||||
|
BF -- "✏️ changes" --> B1
|
||||||
|
end
|
||||||
|
BF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
### queue.py
|
||||||
|
|
||||||
|
- [ ] `queue.py learned --json` prints kinds, signatures, budget, caps,
|
||||||
|
load limits, slots and the last 20 history rows, and writes nothing.
|
||||||
|
- [ ] `queue.py config set <key> <value>` refuses a bad value with exit 2
|
||||||
|
and leaves the config file byte-identical; a good value changes only
|
||||||
|
its key.
|
||||||
|
|
||||||
|
### Hub
|
||||||
|
|
||||||
|
- [ ] The Queue tab shows the learnings table and the current settings.
|
||||||
|
- [ ] Staging two changes asks for one passkey assertion; the runner applies
|
||||||
|
both by argv; the tab shows the new values after the next poll.
|
||||||
|
- [ ] The hub never writes the config file itself.
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
- Unit:
|
||||||
|
- [ ] `learned --json` and `config set` over fixture histories and
|
||||||
|
configs.
|
||||||
|
- Integration:
|
||||||
|
- [ ] The signed queue job through the HTTP handler and the runner's argv.
|
||||||
|
- E2E:
|
||||||
|
- [ ] `tests/e2e/test_queue_tab_e2e.py`: table, staging, one signature,
|
||||||
|
screenshots at 1920, 1366 and 390.
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
# 073 - Queue Override
|
||||||
|
|
||||||
|
## User Story
|
||||||
|
|
||||||
|
As the operator, I want to start one waiting queue job at once from the
|
||||||
|
hub, so that a gate does not wait on a budget I accept to exceed.
|
||||||
|
|
||||||
|
## Decisions (operator-confirmed 2026-11-27; do not re-litigate)
|
||||||
|
|
||||||
|
1. **Budget only** (operator): the override skips `budget_percent`, slot
|
||||||
|
limits, reservations and rank; the live guard (`load_limits` CPU and
|
||||||
|
memory) and the free-disk check stay. Rejected: skipping everything (out
|
||||||
|
of memory, full disk); a warning step before the start (one more click).
|
||||||
|
2. **One job, one signature**: a "Start now" button on every waiting job in
|
||||||
|
the Queue tab (072) and on its Kanban card; the passkey signs the job
|
||||||
|
id; the host runner runs `queue.py override <id>` by argv.
|
||||||
|
3. **Honest learning**: `queue.py override <id>` marks the entry
|
||||||
|
`{"override": {"ts": <epoch>}}`; the next grant pass grants it ahead of
|
||||||
|
rank while the live guard allows; its history row records
|
||||||
|
`override: true`.
|
||||||
|
|
||||||
|
## Approach
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
subgraph P["🧭 0 · Preparation"]
|
||||||
|
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
|
||||||
|
P2 -- "✏️ corrections" --> P1
|
||||||
|
end
|
||||||
|
P2 -- "🤖 yes" --> A1
|
||||||
|
subgraph A["⏩ A · queue.py"]
|
||||||
|
A1["🏷️ override marks the entry"] --> A2["🚦 Grant pass skips budget, keeps live guard"]
|
||||||
|
A2 --> A3{"🧪 Unit tests green?"}
|
||||||
|
A3 -- "🔴 no: fix" --> A1
|
||||||
|
end
|
||||||
|
A3 -- "🟢 yes" --> B1
|
||||||
|
subgraph B["🖱️ B · Hub"]
|
||||||
|
B1["🔏 Start now, signed"] --> B2{"🧪 Integration and E2E green?"}
|
||||||
|
B2 -- "🔴 no: fix" --> B1
|
||||||
|
B2 -- "🟢 yes" --> BF{"💬 Operator feedback?"}
|
||||||
|
BF -- "✏️ changes" --> B1
|
||||||
|
end
|
||||||
|
BF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
### Queue
|
||||||
|
|
||||||
|
- [ ] An overridden queued entry is granted on the next pass although the
|
||||||
|
budget would hold it.
|
||||||
|
- [ ] With CPU busy at or above `load_limits.cpu_percent` it still waits,
|
||||||
|
and its reason names the live guard.
|
||||||
|
- [ ] `queue.py override` of an unknown or running id exits 2 and changes
|
||||||
|
nothing.
|
||||||
|
- [ ] The job's history row carries `override: true`.
|
||||||
|
|
||||||
|
### Hub
|
||||||
|
|
||||||
|
- [ ] "Start now" signs once; the card shows the job granted within one
|
||||||
|
poll.
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
- Unit:
|
||||||
|
- [ ] The grant pass with and without override, and the live guard.
|
||||||
|
- Integration:
|
||||||
|
- [ ] The signed override job through the HTTP handler and the runner's
|
||||||
|
argv.
|
||||||
|
- E2E:
|
||||||
|
- [ ] `tests/e2e/test_queue_override_e2e.py`: "Start now" on a waiting
|
||||||
|
fixture job, screenshots at 1920, 1366 and 390.
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
# 074 - Running on the Board
|
||||||
|
|
||||||
|
## User Story
|
||||||
|
|
||||||
|
As the operator, I want to see at a glance on the Kanban board what runs
|
||||||
|
right now and what kind of work it is.
|
||||||
|
|
||||||
|
## Decisions (operator-confirmed 2026-11-27; do not re-litigate)
|
||||||
|
|
||||||
|
1. **Three marks, all shown, told apart** (operator):
|
||||||
|
- queue job active: icon `bi-cpu`, accent tone, job kind and runtime;
|
||||||
|
- agent working: icon `bi-person-workspace`, ok tone, agent and since
|
||||||
|
when;
|
||||||
|
- hub job running: icon `bi-terminal`, info tone, the command's head.
|
||||||
|
|
||||||
|
Sources: the active entries of `queue.json`, the presence heartbeats of
|
||||||
|
the task's R or worker within the last 5 minutes, and `runner-job.json`.
|
||||||
|
2. **Card look** (operator: highlighted, gently pulsing, not intrusive): a
|
||||||
|
2 px border in the mark's tone and a slow glow pulse of 3 s that
|
||||||
|
animates opacity only, never size; several marks show several chips and
|
||||||
|
the border takes the first in the order above; with
|
||||||
|
`prefers-reduced-motion` the border stays static.
|
||||||
|
3. **Filter**: a board chip "Running" shows only marked cards.
|
||||||
|
|
||||||
|
## Approach
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
subgraph P["🧭 0 · Preparation"]
|
||||||
|
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
|
||||||
|
P2 -- "✏️ corrections" --> P1
|
||||||
|
end
|
||||||
|
P2 -- "🤖 yes" --> A1
|
||||||
|
subgraph A["🟢 A · Marks"]
|
||||||
|
A1["🧮 Kanban.marks from queue, presence, runner"] --> A2["🎨 Border, chips, glow"]
|
||||||
|
A2 --> A3{"🧪 Unit and E2E green?"}
|
||||||
|
A3 -- "🔴 no: fix" --> A1
|
||||||
|
A3 -- "🟢 yes" --> AF{"💬 Operator feedback on screenshots?"}
|
||||||
|
AF -- "✏️ changes" --> A2
|
||||||
|
end
|
||||||
|
AF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
### Marks
|
||||||
|
|
||||||
|
- [ ] A task with an active queue job shows the cpu chip with kind and
|
||||||
|
runtime and the accent border.
|
||||||
|
- [ ] A task whose worker beat 2 minutes ago shows the agent chip; one that
|
||||||
|
beat 10 minutes ago shows none.
|
||||||
|
- [ ] `runner-job.json` naming the task's row shows the terminal chip.
|
||||||
|
- [ ] The "Running" chip hides every unmarked card.
|
||||||
|
|
||||||
|
### Motion
|
||||||
|
|
||||||
|
- [ ] The glow animates only `opacity` over 3 s; `prefers-reduced-motion`
|
||||||
|
stops it.
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
- Unit:
|
||||||
|
- [ ] `Kanban.marks` over fixtures of all three sources.
|
||||||
|
- Integration:
|
||||||
|
- [ ] The state payload carries the presence and runner sources the board
|
||||||
|
reads.
|
||||||
|
- E2E:
|
||||||
|
- [ ] `tests/e2e/test_board_running_e2e.py`: chips, border, filter,
|
||||||
|
screenshots at 1920, 1366 and 390.
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
# 075 - Stale Task Prune
|
||||||
|
|
||||||
|
## User Story
|
||||||
|
|
||||||
|
As the operator, I want to prune stale tasks in one step, with the agents
|
||||||
|
able to object, so that the board stays clean.
|
||||||
|
|
||||||
|
## Decisions (operator-confirmed 2026-11-27; do not re-litigate)
|
||||||
|
|
||||||
|
1. **Stale** = an open task without a register change for N days and
|
||||||
|
without a running mark (074); N starts at `Plan.STALE_DAYS` (3) and is
|
||||||
|
set in the dialog (operator).
|
||||||
|
2. **Prune dialog** (operator): a checklist of the stale tasks, the days
|
||||||
|
field and the answer deadline on the analog dial, 10 minutes to start
|
||||||
|
with. The undo dial of `page-dial.js` is refactored into one dial
|
||||||
|
component that both use.
|
||||||
|
3. **Announcement** (operator): on Prune one passkey assertion signs the
|
||||||
|
list and the deadline, and the hub sends a Sécurité radio message to all
|
||||||
|
that names every task and the deadline.
|
||||||
|
4. **Objection**: an agent keeps a task before the deadline with
|
||||||
|
`rasci.py keep <task>`; any register change of the task counts as
|
||||||
|
keeping it.
|
||||||
|
5. **Prune to stopped** (operator: option 1): at the deadline the runner
|
||||||
|
sets every task nobody kept to stopped
|
||||||
|
(`rasci.py set <task> --status stopped`); the register archive takes it
|
||||||
|
after 7 days. Rejected: `rasci.py rm` (deleted for good).
|
||||||
|
|
||||||
|
## Approach
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
subgraph P["🧭 0 · Preparation"]
|
||||||
|
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
|
||||||
|
P2 -- "✏️ corrections" --> P1
|
||||||
|
end
|
||||||
|
P2 -- "🤖 yes" --> A1
|
||||||
|
subgraph A["🕰️ A · Dial"]
|
||||||
|
A1["♻️ One dial component for undo and prune"] --> A2{"🧪 Undo tests still green?"}
|
||||||
|
A2 -- "🔴 no: fix" --> A1
|
||||||
|
end
|
||||||
|
A2 -- "🟢 yes" --> B1
|
||||||
|
subgraph B["🧹 B · Prune"]
|
||||||
|
B1["📋 Dialog, signed list and deadline"] --> B2["📢 Sécurité message"]
|
||||||
|
B2 --> B3["⏱️ Deadline: stop the unkept tasks"]
|
||||||
|
B3 --> B4{"🧪 Unit, integration and E2E green?"}
|
||||||
|
B4 -- "🔴 no: fix" --> B1
|
||||||
|
B4 -- "🟢 yes" --> BF{"💬 Operator feedback on screenshots?"}
|
||||||
|
BF -- "✏️ changes" --> B1
|
||||||
|
end
|
||||||
|
BF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
### Dialog
|
||||||
|
|
||||||
|
- [ ] The dialog lists exactly the stale tasks for the chosen N.
|
||||||
|
- [ ] The deadline sits on the analog dial, and the dial counts down until
|
||||||
|
it.
|
||||||
|
|
||||||
|
### Prune
|
||||||
|
|
||||||
|
- [ ] The Sécurité row names every task and the deadline.
|
||||||
|
- [ ] A task kept before the deadline stays open; every other listed task
|
||||||
|
is stopped at the deadline.
|
||||||
|
- [ ] A task that was not in the signed list is never changed.
|
||||||
|
|
||||||
|
### Dial
|
||||||
|
|
||||||
|
- [ ] The undo dial and the prune dial are one component, and the undo
|
||||||
|
tests pass unchanged.
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
- Unit:
|
||||||
|
- [ ] Stale selection, `rasci.py keep` and the deadline apply.
|
||||||
|
- Integration:
|
||||||
|
- [ ] The signed prune job through the HTTP handler and the runner's
|
||||||
|
argv.
|
||||||
|
- E2E:
|
||||||
|
- [ ] `tests/e2e/test_stale_prune_e2e.py`: dialog, dial, countdown,
|
||||||
|
screenshots at 1920, 1366 and 390.
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
# 076 - Release Cut
|
||||||
|
|
||||||
|
## User Story
|
||||||
|
|
||||||
|
As the operator, I want one skill that audits a release range, writes the
|
||||||
|
changelog and hands me the signed release, so that nothing ships unaudited
|
||||||
|
and a release costs me one passkey click.
|
||||||
|
|
||||||
|
## Decisions (operator-confirmed 2026-11-27; do not re-litigate)
|
||||||
|
|
||||||
|
1. **Name and reach** (operator): `kvb-release-cut`, beside `kvb-release`
|
||||||
|
(the announcement), `kvb-release-changelog` and the other `kvb-release-*`
|
||||||
|
skills; it goes through to the signed release row. Rejected:
|
||||||
|
`kvb-code-release` (a release is no code edit and would split the
|
||||||
|
family); stopping at the message.
|
||||||
|
2. **Audit lives in Quality** (operator): the deep audit is Quality's
|
||||||
|
`kvb-quality-audit` (Quality requirement 011), which pins Cloudflare's
|
||||||
|
`security-audit` skill (MIT) at a commit, since upstream has no tags,
|
||||||
|
keeps its output outside the repository's tracked tree and runs target
|
||||||
|
code only sandboxed. This skill only orchestrates. Rejected: the
|
||||||
|
audit in this repository (022: analysis lives once in Quality); release
|
||||||
|
orchestration in Quality (it drives the register, operator rows and the
|
||||||
|
hub).
|
||||||
|
3. **Before every release** (operator): the audit covers the range from the
|
||||||
|
newest `vX.Y.Z` tag to HEAD. Pushes keep the cheaper 064 review.
|
||||||
|
Rejected: on every push (a multi-agent audit per push); on demand only
|
||||||
|
(no gate).
|
||||||
|
4. **MEDUSA seeds, the audit verifies** (operator): the MEDUSA scan of the
|
||||||
|
range runs first and hands its findings to the audit's validation phase
|
||||||
|
as candidates. A `rejected` verdict with its source trace becomes the
|
||||||
|
acceptance row of `kvb-check-security`, so false positives need no
|
||||||
|
manual skeptic round. The audit hunts its own logic and trust holes in
|
||||||
|
parallel. Rejected: both side by side (the manual round stays); the
|
||||||
|
audit replacing MEDUSA (loses its secret and CVE rules).
|
||||||
|
5. **Attestation**: the result is stored for the exact HEAD tree, as the
|
||||||
|
064 stamp is. The skill calls Quality's
|
||||||
|
`audit --repo <root> --range <tag>..HEAD --out <untracked dir> --budget <n>
|
||||||
|
[--profile quick|standard|deep]` and reads
|
||||||
|
`<out>/attestation-<tree id>.json`; a release needs its verdict `pass` (or
|
||||||
|
`skipped` for a documentation-only range) for the HEAD tree. Exit 1
|
||||||
|
(`blocked`) stops the skill. A `needs_validation` critical or high finding
|
||||||
|
blocks like a confirmed one (operator pick in Quality requirement 011:
|
||||||
|
fail closed).
|
||||||
|
6. **Cost first** (operator: as cheap and efficient as possible):
|
||||||
|
- only files the range changes, plus the trust-boundary neighbours the
|
||||||
|
audit's reconnaissance names;
|
||||||
|
- MEDUSA from its per-file cache (010) and the 064 review memory, so
|
||||||
|
reviewed blobs are not scanned again;
|
||||||
|
- an unchanged tree reuses its attestation; a range of documentation
|
||||||
|
only skips the audit and says so;
|
||||||
|
- subagent models per `kvb-org-perform`; heavy phases through
|
||||||
|
`queue.py hold`;
|
||||||
|
- the run reports its tokens and minutes (`kvb-check-efficiency`).
|
||||||
|
7. **Release row** (operator): after a green attestation the skill runs
|
||||||
|
`kvb-release-changelog` for the message and bump and adds one hub row
|
||||||
|
`pkgmgr release <bump> -m <message>` with `--dir` set to the checkout to
|
||||||
|
release, for the operator's passkey; the host runner runs it where GPG
|
||||||
|
is. Then it offers `kvb-release` for the announcement.
|
||||||
|
8. **pkgmgr guards the tree** (PKGMGR, fix/release-cwd in package-manager):
|
||||||
|
pkgmgr releases the git top level of its working directory and refuses
|
||||||
|
before touching a file when that checkout has tracked changes. The skill
|
||||||
|
requires a pkgmgr version with that fix and runs no zero-change check of
|
||||||
|
its own. Rejected: a `kvb-pkgmgr-release` wrapper (the trap belongs fixed
|
||||||
|
where it lives).
|
||||||
|
|
||||||
|
## Approach
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
subgraph P["🧭 0 · Preparation"]
|
||||||
|
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
|
||||||
|
P2 -- "✏️ corrections" --> P1
|
||||||
|
end
|
||||||
|
P2 -- "🤖 yes" --> A1
|
||||||
|
subgraph A["🛡️ A · Audit attestation"]
|
||||||
|
A1["🔎 MEDUSA seeds over the range"] --> A2["🧪 kvb-quality-audit verifies and hunts"]
|
||||||
|
A2 --> A3{"✅ 0 confirmed critical or high?"}
|
||||||
|
A3 -- "🔴 no: fix, commit, rerun" --> A1
|
||||||
|
end
|
||||||
|
A3 -- "🟢 yes" --> B1
|
||||||
|
subgraph B["🏷️ B · Release"]
|
||||||
|
B1["📝 kvb-release-changelog message and bump"] --> B2{"🧹 pkgmgr has the tree guard?"}
|
||||||
|
B2 -- "🔴 no: update pkgmgr" --> B1
|
||||||
|
B2 -- "🟢 yes" --> B3["🔏 Hub row pkgmgr release, passkey"]
|
||||||
|
B3 --> BF{"💬 Operator signs?"}
|
||||||
|
end
|
||||||
|
BF -- "👍 signed" --> D1["📣 Offer kvb-release, hand-over"]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
### Attestation
|
||||||
|
|
||||||
|
- [ ] Without a green attestation for the HEAD tree the skill adds no
|
||||||
|
release row and names the missing piece.
|
||||||
|
- [ ] A MEDUSA finding the audit rejects lands as an acceptance row with the
|
||||||
|
audit's source trace; a confirmed one blocks the release.
|
||||||
|
- [ ] An unchanged tree reuses its attestation without a new audit run.
|
||||||
|
- [ ] A range of documentation only skips the audit and says so.
|
||||||
|
|
||||||
|
### Release
|
||||||
|
|
||||||
|
- [ ] Against a pkgmgr without the fix/release-cwd change the skill stops
|
||||||
|
before the row and names the missing version.
|
||||||
|
- [ ] The row carries `--dir <checkout>`, `pkgmgr release <bump> -m
|
||||||
|
<message>` with the message from `kvb-release-changelog`, and the
|
||||||
|
attested tree hash.
|
||||||
|
- [ ] The run prints its tokens and minutes.
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
- Unit:
|
||||||
|
- [ ] Attestation lookup, reuse, the documentation-only skip and the
|
||||||
|
zero-change check over fixture repositories.
|
||||||
|
- Integration:
|
||||||
|
- [ ] A fake audit and a fake MEDUSA through the skill's script: rejected
|
||||||
|
findings become acceptance rows; a confirmed one blocks.
|
||||||
|
- E2E:
|
||||||
|
- n/a: the release row is an operator row; the hub's row E2E covers it.
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
# 077 - Stamp on Greyed Cards
|
||||||
|
|
||||||
|
## User Story
|
||||||
|
|
||||||
|
As the operator, I want every greyed Match card to carry a fixed stamp that
|
||||||
|
names why it is greyed, so that I see the reason without hovering.
|
||||||
|
|
||||||
|
## Decisions (operator-confirmed 2026-11-27; do not re-litigate)
|
||||||
|
|
||||||
|
1. **One stamp per reason** (operator): `RUNNING` in the info tone while the
|
||||||
|
hub runner runs the row, `QUEUED` in the warn tone while it waits in the
|
||||||
|
runner, `STALE` in the muted tone for a stale card. The hub sends
|
||||||
|
`blocked_kind` (`running` or `queued`) next to the `blocked` text of
|
||||||
|
`blocked_reasons()` in `kvb_orchestrator/jobs.py`, so the page never
|
||||||
|
parses prose.
|
||||||
|
2. **Look** (operator: like the later and accept stamps, only fixed): the
|
||||||
|
stamp of `style-match.css` for `ACCEPT`, `REJECT` and `LATER` (4 px
|
||||||
|
border, rounded, bold caps, slight rotation), fixed in the card's centre,
|
||||||
|
always at full opacity, never following a swipe. The stamp keeps its
|
||||||
|
colour while the card stays greyscale: the `grayscale` filter moves from
|
||||||
|
the card to its children. The tooltip and the hourglass line stay.
|
||||||
|
3. **Scope**: the front card of Match. Peek tabs keep their tooltip.
|
||||||
|
Rejected: Inbox and Stream rows (rows, not cards).
|
||||||
|
|
||||||
|
## Approach
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
subgraph P["🧭 0 · Preparation"]
|
||||||
|
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
|
||||||
|
P2 -- "✏️ corrections" --> P1
|
||||||
|
end
|
||||||
|
P2 -- "🤖 yes" --> A1
|
||||||
|
subgraph A["🏷️ A · Stamp"]
|
||||||
|
A1["🧮 blocked_kind in the payload"] --> A2["🎨 data-stamp and CSS stamp"]
|
||||||
|
A2 --> A3{"🧪 Unit, integration and E2E green?"}
|
||||||
|
A3 -- "🔴 no: fix" --> A1
|
||||||
|
A3 -- "🟢 yes" --> AF{"💬 Operator feedback on screenshots?"}
|
||||||
|
AF -- "✏️ changes" --> A2
|
||||||
|
end
|
||||||
|
AF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
### Stamp
|
||||||
|
|
||||||
|
- [ ] A front card whose row the runner runs shows `RUNNING`, a queued one
|
||||||
|
`QUEUED`, a stale one `STALE`.
|
||||||
|
- [ ] The stamp's computed colour is not grey and its opacity is 1.
|
||||||
|
- [ ] A swipe gesture on a greyed card neither moves nor hides the stamp.
|
||||||
|
- [ ] A card that is not greyed shows no fixed stamp.
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
- Unit:
|
||||||
|
- [ ] `blocked_reasons` returns the kind for a running and a queued job.
|
||||||
|
- Integration:
|
||||||
|
- [ ] The Match state payload carries `blocked_kind` for a blocked card.
|
||||||
|
- E2E:
|
||||||
|
- [ ] `tests/e2e/test_match_stamp_e2e.py`: all three stamps, colour and
|
||||||
|
opacity probe, screenshots at 1920, 1366 and 390.
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
# 078 - Diff on Commit-Tree Cards
|
||||||
|
|
||||||
|
## User Story
|
||||||
|
|
||||||
|
As the operator, I want an ask card for `git commit-tree` to show the diff
|
||||||
|
from its parent to its tree, so that I never approve a commit blind.
|
||||||
|
|
||||||
|
## Decisions (operator-confirmed 2026-11-27; do not re-litigate)
|
||||||
|
|
||||||
|
1. **Source**: the runner's existing preview, which already computes diffs
|
||||||
|
for merge rows, also covers `git commit-tree <tree> -p <parent>` asks. It
|
||||||
|
runs `git diff <parent> <tree>` read-only in the ask's working directory.
|
||||||
|
Rejected: the hub reading the repository itself (the container has no
|
||||||
|
access to host repositories).
|
||||||
|
2. **Look** (operator: hide and show again): the same collapsible code box
|
||||||
|
with the eye toggle as on commit cards, open by default.
|
||||||
|
|
||||||
|
## Approach
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
subgraph P["🧭 0 · Preparation"]
|
||||||
|
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
|
||||||
|
P2 -- "✏️ corrections" --> P1
|
||||||
|
end
|
||||||
|
P2 -- "🤖 yes" --> A1
|
||||||
|
subgraph A["🌳 A · Commit-tree diff"]
|
||||||
|
A1["🔎 Parse commit-tree argv"] --> A2["🧮 Runner preview: diff parent..tree"]
|
||||||
|
A2 --> A3["🎨 Collapsible code box on the card"]
|
||||||
|
A3 --> A4{"🧪 Unit, integration and E2E green?"}
|
||||||
|
A4 -- "🔴 no: fix" --> A1
|
||||||
|
A4 -- "🟢 yes" --> AF{"💬 Operator feedback on screenshots?"}
|
||||||
|
AF -- "✏️ changes" --> A3
|
||||||
|
end
|
||||||
|
AF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
### Diff
|
||||||
|
|
||||||
|
- [ ] A commit-tree ask with a resolvable parent and tree shows every changed
|
||||||
|
file with its hunks.
|
||||||
|
- [ ] The eye toggle hides and shows the diff; it starts open.
|
||||||
|
- [ ] An unresolvable tree or parent shows its git error line instead of the
|
||||||
|
diff.
|
||||||
|
- [ ] The preview runs no git command that writes (no `commit-tree`, no
|
||||||
|
`update-ref`).
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
- Unit:
|
||||||
|
- [ ] Parsing a commit-tree argv yields tree and parent; an argv without
|
||||||
|
`-p` yields none.
|
||||||
|
- Integration:
|
||||||
|
- [ ] The runner preview delivers the files of a commit-tree ask in a
|
||||||
|
scratch repository.
|
||||||
|
- E2E:
|
||||||
|
- [ ] `tests/e2e/test_commit_tree_diff_e2e.py`: diff shown, toggle, error
|
||||||
|
line, screenshots at 1920, 1366 and 390.
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
# 079 - Paths Open in VS Code
|
||||||
|
|
||||||
|
## User Story
|
||||||
|
|
||||||
|
As the operator, I want to click folder and file names on cards and have them
|
||||||
|
open in VS Code, so that I inspect a change without typing its path.
|
||||||
|
|
||||||
|
## Decisions (operator-confirmed 2026-11-27; do not re-litigate)
|
||||||
|
|
||||||
|
1. **`vscode://file/<absolute path>`** (operator): a file opens in VS Code, a
|
||||||
|
folder opens as a window. Rejected: a file viewer in the hub (new trust
|
||||||
|
boundary, the container would read host files); a browser extension
|
||||||
|
(effort); a runner `xdg-open` (a signature per click).
|
||||||
|
2. **Where**: the folder chip, the worktree chip, and the file head of every
|
||||||
|
diff (worktree plus relative path).
|
||||||
|
3. **Copy**: right-click copies the full path, as left-click does today.
|
||||||
|
|
||||||
|
## Approach
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
subgraph P["🧭 0 · Preparation"]
|
||||||
|
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
|
||||||
|
P2 -- "✏️ corrections" --> P1
|
||||||
|
end
|
||||||
|
P2 -- "🤖 yes" --> A1
|
||||||
|
subgraph A["🔗 A · Path links"]
|
||||||
|
A1["🧩 Link builder"] --> A2["🏷️ Chips and diff heads as links"]
|
||||||
|
A2 --> A3["📋 Right-click copies"]
|
||||||
|
A3 --> A4{"🧪 Unit and E2E green?"}
|
||||||
|
A4 -- "🔴 no: fix" --> A1
|
||||||
|
A4 -- "🟢 yes" --> AF{"💬 Operator feedback on screenshots?"}
|
||||||
|
AF -- "✏️ changes" --> A2
|
||||||
|
end
|
||||||
|
AF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
### Links
|
||||||
|
|
||||||
|
- [ ] The `href` of the folder chip is exactly `vscode://file/<absolute path>`.
|
||||||
|
- [ ] The worktree chip links the same way to its worktree.
|
||||||
|
- [ ] A diff file head links to `<worktree>/<path>`.
|
||||||
|
- [ ] Right-click on a link copies the full path and opens no context menu.
|
||||||
|
- [ ] A relative or empty path renders as text without a link.
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
- Unit:
|
||||||
|
- [ ] The link builder (node): absolute path, characters needing encoding,
|
||||||
|
relative and empty path.
|
||||||
|
- Integration:
|
||||||
|
- n/a: page only, no hub or runner change.
|
||||||
|
- E2E:
|
||||||
|
- [ ] `tests/e2e/test_path_links_e2e.py`: hrefs and right-click copy,
|
||||||
|
screenshots at 1920, 1366 and 390.
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
# 080 - Expired Cards Stay
|
||||||
|
|
||||||
|
## User Story
|
||||||
|
|
||||||
|
As the operator, I want expired asks and decisions to stay greyed out with a
|
||||||
|
stamp, so that I see what went unanswered and can still answer it.
|
||||||
|
|
||||||
|
## Decisions (operator-confirmed 2026-11-27; do not re-litigate)
|
||||||
|
|
||||||
|
1. **Kept**: an expired ask or decision stays a Match card until the operator
|
||||||
|
denies it, greyed out, with the `EXPIRED` stamp of 077. Hovering the stamp
|
||||||
|
shows a tooltip naming since when the card is expired (operator).
|
||||||
|
2. **Only Deny**: Accept is disabled, because the tool call has already gone
|
||||||
|
back to the terminal. Deny goes through the release card like every
|
||||||
|
rejection. The agent gets "expired before the operator decided" by radio,
|
||||||
|
plus the operator's feedback text.
|
||||||
|
3. **Only unrun asks, 24 h** (operator): the hub keys each ask by session,
|
||||||
|
tool and a digest of the tool input (the PermissionRequest hook input
|
||||||
|
carries no `tool_use_id`); an async PostToolUse hook reports each call
|
||||||
|
that ran, and a matching pending ask created before it closes as answered
|
||||||
|
in the terminal and leaves Match. Only an
|
||||||
|
expired ask whose call never ran stays, at most 24 h after its expiry.
|
||||||
|
Rejected: a fixed 1 h window (shows asks already answered in the
|
||||||
|
terminal); every expired ask until denied (2239 undecided asks on
|
||||||
|
2026-11-27 would flood the deck).
|
||||||
|
|
||||||
|
## Approach
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
subgraph P["🧭 0 · Preparation"]
|
||||||
|
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
|
||||||
|
P2 -- "✏️ corrections" --> P1
|
||||||
|
end
|
||||||
|
P2 -- "🤖 yes" --> A1
|
||||||
|
subgraph A["⌛ A · Expired cards"]
|
||||||
|
A1["🗂️ Keep expired asks in /api/match"] --> A2["🏷️ EXPIRED stamp with since-when tooltip"]
|
||||||
|
A2 --> A3["🚫 Accept off, Deny via release card"]
|
||||||
|
A3 --> A4["📻 Radio note plus feedback"]
|
||||||
|
A4 --> A5{"🧪 Unit, integration and E2E green?"}
|
||||||
|
A5 -- "🔴 no: fix" --> A1
|
||||||
|
A5 -- "🟢 yes" --> AF{"💬 Operator feedback on screenshots?"}
|
||||||
|
AF -- "✏️ changes" --> A2
|
||||||
|
end
|
||||||
|
AF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
### Card
|
||||||
|
|
||||||
|
- [ ] An ask or decision past its `expires` is still in `/api/match` with
|
||||||
|
`blocked_kind: "expired"` and its `expires` time.
|
||||||
|
- [ ] The card shows the `EXPIRED` stamp; hovering it shows a tooltip with
|
||||||
|
the expiry time and how long ago it was.
|
||||||
|
- [ ] Accept is disabled on the card; Reject works.
|
||||||
|
- [ ] An expired ask whose call ran afterwards (same session, tool and input
|
||||||
|
digest) is closed as answered in the terminal and is not in
|
||||||
|
`/api/match`.
|
||||||
|
- [ ] An expired ask more than 24 h past its `expires` is not in
|
||||||
|
`/api/match`.
|
||||||
|
|
||||||
|
### Release
|
||||||
|
|
||||||
|
- [ ] After the release, the agent's radio holds "expired before the
|
||||||
|
operator decided" and the feedback text.
|
||||||
|
- [ ] After the release, the card is gone from `/api/match`.
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
- Unit:
|
||||||
|
- [ ] The expired filter keeps an expired ask with `blocked_kind:
|
||||||
|
"expired"` and drops a decided one.
|
||||||
|
- Integration:
|
||||||
|
- [ ] A denied expired card goes through the release and posts the radio
|
||||||
|
note.
|
||||||
|
- E2E:
|
||||||
|
- [ ] `tests/e2e/test_match_expired_e2e.py`: stamp, tooltip text, Accept
|
||||||
|
disabled, Deny, screenshots at 1920, 1366 and 390.
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
# 081 - Match Refresh Hourglass
|
||||||
|
|
||||||
|
## User Story
|
||||||
|
|
||||||
|
As the operator, I want to see when Match fetches its cards next, so that I
|
||||||
|
know whether an empty deck is current.
|
||||||
|
|
||||||
|
## Decisions (operator-confirmed 2026-11-27; do not re-litigate)
|
||||||
|
|
||||||
|
1. **Interval stays 2 s** (operator): it costs no tokens, only a request from
|
||||||
|
the browser to the hub.
|
||||||
|
2. **Hourglass** (operator): small in the Match head, large in the empty
|
||||||
|
deck. It flips fast after every fetch, and small sand grains run during
|
||||||
|
the interval. Rejected: an analog clock that jumps.
|
||||||
|
3. **Clicks**: right-click sets the interval with the generic dial of 075 (1
|
||||||
|
to 60 s, stored in the hub settings); left-click fetches at once.
|
||||||
|
4. **Reduced motion**: `prefers-reduced-motion` shows a still hourglass.
|
||||||
|
|
||||||
|
## Approach
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
subgraph P["🧭 0 · Preparation"]
|
||||||
|
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
|
||||||
|
P2 -- "✏️ corrections" --> P1
|
||||||
|
end
|
||||||
|
P2 -- "🤖 yes" --> A1
|
||||||
|
subgraph A["⏳ A · Hourglass"]
|
||||||
|
A1["⏱️ Refresh timer with interval setting"] --> A2["⏳ Hourglass flip and sand grains"]
|
||||||
|
A2 --> A3["🖱️ Left-click fetch, right-click dial"]
|
||||||
|
A3 --> A4{"🧪 Unit, integration and E2E green?"}
|
||||||
|
A4 -- "🔴 no: fix" --> A1
|
||||||
|
A4 -- "🟢 yes" --> AF{"💬 Operator feedback on screenshots?"}
|
||||||
|
AF -- "✏️ changes" --> A2
|
||||||
|
end
|
||||||
|
AF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
### Refresh
|
||||||
|
|
||||||
|
- [ ] With the default, Match fetches `/api/match` once every 2 s ±0.3 s.
|
||||||
|
- [ ] A left-click on the hourglass fetches at once and restarts the cycle.
|
||||||
|
- [ ] An interval of 10 s set by right-click survives a reload.
|
||||||
|
|
||||||
|
### Look
|
||||||
|
|
||||||
|
- [ ] After a fetch, the hourglass has flipped within 1 s.
|
||||||
|
- [ ] The empty deck shows the large hourglass, the head the small one.
|
||||||
|
- [ ] Under `prefers-reduced-motion: reduce` no animation runs.
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
- Unit:
|
||||||
|
- [ ] The timer arithmetic (node): next fetch time, restart on click,
|
||||||
|
interval bounds 1 and 60 s.
|
||||||
|
- Integration:
|
||||||
|
- [ ] The interval is stored in and read from the hub settings.
|
||||||
|
- E2E:
|
||||||
|
- [ ] `tests/e2e/test_match_hourglass_e2e.py`: fetch rate, left-click,
|
||||||
|
right-click dial, reduced motion, screenshots at 1920, 1366 and 390.
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
# 082 - Attachments in Every Text Field
|
||||||
|
|
||||||
|
## User Story
|
||||||
|
|
||||||
|
As the operator, I want to attach files in every hub text field, by pasting a
|
||||||
|
screenshot with Ctrl+V, dropping a file or clicking a paperclip, so that
|
||||||
|
agents get my screenshots without a detour.
|
||||||
|
|
||||||
|
## Decisions (operator-confirmed 2026-11-27; do not re-litigate)
|
||||||
|
|
||||||
|
1. **Path line in the text** (operator): the file goes through
|
||||||
|
`/api/uploads`, and the line `📎 <host path>` lands at the cursor. The
|
||||||
|
signed text carries the path; the signature format stays. Rejected: a
|
||||||
|
list of uploads in the signed radio message (changes
|
||||||
|
`signing.message_item` and every message consumer).
|
||||||
|
2. **One hook**: the `micFrame` sweep of `page-mic.js` already frames every
|
||||||
|
text field; it also wires paste and drop there. A textarea additionally
|
||||||
|
gets a 📎 button in its footer next to the mic and one chip per
|
||||||
|
attachment: a thumbnail for an image, a file icon otherwise, and ✕
|
||||||
|
removes chip and line.
|
||||||
|
3. **Placeholder**: `📎 uploading <name>…` stands at the cursor until the
|
||||||
|
upload answers; then it becomes the path line, or the error text on a
|
||||||
|
failure (over 50 MiB, hub unreachable). A pasted image without a name is
|
||||||
|
named `paste-<timestamp>.png`.
|
||||||
|
4. **Plain text stays plain**: Ctrl+V of text pastes as before; only files
|
||||||
|
upload.
|
||||||
|
|
||||||
|
## Approach
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
subgraph P["🧭 0 · Preparation"]
|
||||||
|
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
|
||||||
|
P2 -- "✏️ corrections" --> P1
|
||||||
|
end
|
||||||
|
P2 -- "🤖 yes" --> A1
|
||||||
|
subgraph A["📎 A · Attachments"]
|
||||||
|
A1["📋 Paste and drop hook in the mic sweep"] --> A2["📎 Paperclip button and chips"]
|
||||||
|
A2 --> A3["⏳ Placeholder and errors"]
|
||||||
|
A3 --> A4{"🧪 Unit, integration and E2E green?"}
|
||||||
|
A4 -- "🔴 no: fix" --> A1
|
||||||
|
A4 -- "🟢 yes" --> AF{"💬 Operator feedback on screenshots?"}
|
||||||
|
AF -- "✏️ changes" --> A2
|
||||||
|
end
|
||||||
|
AF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
### Attach
|
||||||
|
|
||||||
|
- [ ] Ctrl+V of an image in the reject feedback inserts
|
||||||
|
`📎 <host path>/paste-<timestamp>.png`, and the file exists below
|
||||||
|
`uploads/<id>/`.
|
||||||
|
- [ ] Dropping a file on the composer, the accept notes or a decision's
|
||||||
|
Other field inserts its path line.
|
||||||
|
- [ ] The 📎 button opens the file picker; the chosen file's line lands at
|
||||||
|
the cursor.
|
||||||
|
- [ ] Ctrl+V of plain text uploads nothing.
|
||||||
|
|
||||||
|
### Chips and errors
|
||||||
|
|
||||||
|
- [ ] Every attachment of a textarea shows a chip: a thumbnail for an image,
|
||||||
|
a file icon otherwise.
|
||||||
|
- [ ] ✕ on a chip removes the chip and its line from the text.
|
||||||
|
- [ ] A failed upload replaces the placeholder with the error text and
|
||||||
|
inserts no path.
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
- Unit:
|
||||||
|
- [ ] Path line, name of a pasted image and placeholder swap (node).
|
||||||
|
- Integration:
|
||||||
|
- [ ] `/api/uploads` stores a PNG body and returns the host path the line
|
||||||
|
names.
|
||||||
|
- E2E:
|
||||||
|
- [ ] `tests/e2e/test_field_attachments_e2e.py`: synthetic paste, drop and
|
||||||
|
picker in the reject feedback and the composer, chip ✕, an upload
|
||||||
|
over the limit, screenshots at 1920, 1366 and 390.
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
# 083 - Self-Tuning Queue Admission
|
||||||
|
|
||||||
|
## User Story
|
||||||
|
|
||||||
|
As the operator, I want the queue to keep the average CPU and RAM load
|
||||||
|
between its lower and upper limit on its own, so that no job waits while the
|
||||||
|
host idles and no job tips the host over.
|
||||||
|
|
||||||
|
## Decisions (operator-confirmed 2026-11-27; do not re-litigate)
|
||||||
|
|
||||||
|
1. **Static band as the base**: a job is granted while the load sits below
|
||||||
|
the lower limit and its learned footprint keeps the load at or below the
|
||||||
|
upper limit; smaller jobs backfill around a waiting head job without
|
||||||
|
starving it. It lands first.
|
||||||
|
2. **AIMD target** (operator): a target between the lower and the upper
|
||||||
|
limit. Plus 2 points per poll while the 10-minute average stays below the
|
||||||
|
lower limit and no memory pressure (PSI) shows; on a load above the upper
|
||||||
|
limit, rising PSI or swap-out it drops at once to the middle between the
|
||||||
|
lower limit and its value. One grant per settle window (one load sample
|
||||||
|
window).
|
||||||
|
3. **Learned sizes** (operator): per command the p95 peak RAM footprint
|
||||||
|
instead of the mean, times a margin learned from the error of past
|
||||||
|
predictions. CPU keeps the median (operator 2026-11-27): a neighbour's
|
||||||
|
CPU spike must not lift a booking, and CPU overload only slows.
|
||||||
|
4. **One limits file**: lower and upper limit, STOP and MAYDAY per CPU, RAM,
|
||||||
|
swap, disk and PSI in one file in the council directory; queue, watch and
|
||||||
|
hub read it, the live target sits next to it. Per metric lower < upper <
|
||||||
|
STOP < MAYDAY.
|
||||||
|
5. **Rejected**: a forecasting scheduler (high effort for little over AIMD);
|
||||||
|
hard cgroup memory caps per job (a job above its cap is killed).
|
||||||
|
|
||||||
|
## Approach
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
subgraph P["🧭 0 · Preparation"]
|
||||||
|
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
|
||||||
|
P2 -- "✏️ corrections" --> P1
|
||||||
|
end
|
||||||
|
P2 -- "🤖 yes" --> A1
|
||||||
|
subgraph A["📏 A · Static band"]
|
||||||
|
A1["🧮 Band admission and backfill"] --> A2{"🧪 Tests green?"}
|
||||||
|
A2 -- "🔴 no: fix" --> A1
|
||||||
|
end
|
||||||
|
A2 -- "🟢 yes" --> B1
|
||||||
|
subgraph B["🎛️ B · Self-tuning"]
|
||||||
|
B1["🗂️ Limits file for queue, watch and hub"] --> B2["📈 AIMD target with PSI back-off"]
|
||||||
|
B2 --> B3["📐 p95 sizes with learned margin"]
|
||||||
|
B3 --> B4{"🧪 Tests green?"}
|
||||||
|
B4 -- "🔴 no: fix" --> B1
|
||||||
|
B4 -- "🟢 yes" --> BF{"💬 Operator feedback on queue list output?"}
|
||||||
|
BF -- "✏️ changes" --> B2
|
||||||
|
end
|
||||||
|
BF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
### Admission
|
||||||
|
|
||||||
|
- [ ] Over a simulated load series the target rises by 2 per poll below the
|
||||||
|
lower limit and falls to the middle after one poll above the upper
|
||||||
|
limit or with rising PSI.
|
||||||
|
- [ ] At most one grant per settle window.
|
||||||
|
- [ ] A grant is refused when used plus the job's p95 footprint times its
|
||||||
|
margin would exceed the target.
|
||||||
|
- [ ] The margin grows after a job used more than predicted and shrinks
|
||||||
|
after one used less.
|
||||||
|
- [ ] `queue.py list` names the target and each waiting job's reason.
|
||||||
|
|
||||||
|
### Limits file
|
||||||
|
|
||||||
|
- [ ] Queue and watch read their limits from the limits file.
|
||||||
|
- [ ] A file that breaks lower < upper < STOP < MAYDAY is refused and the
|
||||||
|
previous limits stay in force.
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
- Unit:
|
||||||
|
- [ ] Target steps, margin update and order check.
|
||||||
|
- Integration:
|
||||||
|
- [ ] One queue pass over a load series grants and refuses as above.
|
||||||
|
- E2E:
|
||||||
|
- n/a: no page; the board side is requirement 084.
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
# 084 - Limits on the Resources Board
|
||||||
|
|
||||||
|
## User Story
|
||||||
|
|
||||||
|
As the operator, I want to see and set the load limits right on the hardware
|
||||||
|
charts, so that I steer the queue and the alarms without config files.
|
||||||
|
|
||||||
|
## Decisions (operator-confirmed 2026-11-27; do not re-litigate)
|
||||||
|
|
||||||
|
1. **Lines** (operator): every hardware chart (CPU, RAM, swap, disk, PSI)
|
||||||
|
shows labelled lines for the lower and upper limit, STOP and MAYDAY from
|
||||||
|
the limits file of 083, plus a thin line for the live target. Rejected:
|
||||||
|
dragging the lines (accidental moves, poor on touch).
|
||||||
|
2. **Click a line, get a dial**: a click opens the generic dial of 075 for
|
||||||
|
exactly that value.
|
||||||
|
3. **Profiles**: a switch Calm (band 50 to 70), Balanced (70 to 90) and Max
|
||||||
|
(80 to 95) sets all limits at once; a Limits sheet lists every value in
|
||||||
|
one table, each with its dial.
|
||||||
|
4. **Passkey to loosen** (operator): a tighter value applies at once; a
|
||||||
|
looser one (higher upper limit, STOP or MAYDAY, or a looser profile)
|
||||||
|
needs the passkey signature.
|
||||||
|
|
||||||
|
## Approach
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
subgraph P["🧭 0 · Preparation"]
|
||||||
|
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
|
||||||
|
P2 -- "✏️ corrections" --> P1
|
||||||
|
end
|
||||||
|
P2 -- "🤖 yes" --> A1
|
||||||
|
subgraph A["📊 A · Limits board"]
|
||||||
|
A1["📏 Lines and live target on the charts"] --> A2["🎚️ Click a line, dial"]
|
||||||
|
A2 --> A3["🗂️ Profiles and Limits sheet"]
|
||||||
|
A3 --> A4["🔑 Passkey to loosen"]
|
||||||
|
A4 --> A5{"🧪 Unit, integration and E2E green?"}
|
||||||
|
A5 -- "🔴 no: fix" --> A1
|
||||||
|
A5 -- "🟢 yes" --> AF{"💬 Operator feedback on screenshots?"}
|
||||||
|
AF -- "✏️ changes" --> A1
|
||||||
|
end
|
||||||
|
AF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
### Lines and dial
|
||||||
|
|
||||||
|
- [ ] Every hardware chart shows its four limit lines and the target line,
|
||||||
|
each with a label and a tooltip carrying its value.
|
||||||
|
- [ ] A click on a line opens the dial; a tighter value is saved without a
|
||||||
|
signature and lands in the limits file of 083.
|
||||||
|
- [ ] A value that breaks lower < upper < STOP < MAYDAY shows an error and
|
||||||
|
is not saved.
|
||||||
|
|
||||||
|
### Profiles and passkey
|
||||||
|
|
||||||
|
- [ ] A profile switch moves every line.
|
||||||
|
- [ ] A looser value or profile asks for the passkey; a cancel keeps the old
|
||||||
|
value.
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
- Unit:
|
||||||
|
- [ ] Order check and the tighter-or-looser classification (node).
|
||||||
|
- Integration:
|
||||||
|
- [ ] The hub endpoint refuses a looser value without a passkey proof and
|
||||||
|
accepts it with one.
|
||||||
|
- E2E:
|
||||||
|
- [ ] `tests/e2e/test_resource_limits_e2e.py`: lines, dial, profile switch,
|
||||||
|
passkey path, screenshots at 1920, 1366 and 390.
|
||||||
@@ -75,3 +75,16 @@ skill defines the format.
|
|||||||
- [069 - Account Usage Bar](069-account-usage-bar.md)
|
- [069 - Account Usage Bar](069-account-usage-bar.md)
|
||||||
- [070 - Usage Explorer](070-usage-explorer.md)
|
- [070 - Usage Explorer](070-usage-explorer.md)
|
||||||
- [071 - Token and Velocity Diet](071-token-velocity-diet.md)
|
- [071 - Token and Velocity Diet](071-token-velocity-diet.md)
|
||||||
|
- [072 - Queue Controls Tab](072-queue-controls-tab.md)
|
||||||
|
- [073 - Queue Override](073-queue-override.md)
|
||||||
|
- [074 - Running on the Board](074-running-on-the-board.md)
|
||||||
|
- [075 - Stale Task Prune](075-stale-task-prune.md)
|
||||||
|
- [076 - Release Cut](076-release-cut.md)
|
||||||
|
- [077 - Stamp on Greyed Cards](077-greyed-card-stamp.md)
|
||||||
|
- [078 - Diff on Commit-Tree Cards](078-commit-tree-diff.md)
|
||||||
|
- [079 - Paths Open in VS Code](079-paths-open-in-vscode.md)
|
||||||
|
- [080 - Expired Cards Stay](080-expired-cards-stay.md)
|
||||||
|
- [081 - Match Refresh Hourglass](081-match-refresh-hourglass.md)
|
||||||
|
- [082 - Attachments in Every Text Field](082-field-attachments.md)
|
||||||
|
- [083 - Self-Tuning Queue Admission](083-self-tuning-queue.md)
|
||||||
|
- [084 - Limits on the Resources Board](084-resource-limits-board.md)
|
||||||
Reference in new issue
Block a user