Skip to content

feat(ui): the console sends ETags back and patches lease renewals in place - #927

Merged
V3RON merged 24 commits into
task/915from
task/916
Oct 23, 2026
Merged

V3RON merged 24 commits into
task/915from
task/916

Conversation

@V3RON

@V3RON V3RON commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Closes #916

Status

Implement: done (3/3 green) Review: round 2 + fix-check passed, 2 fixed Hardware: n/a Gate: waiting for the stack

Done when

  • pnpm vitest run ui/src passes with the new tests. Delivered by ui/src/data/api.test.ts (a read with a tag), ui/src/state/queries.test.ts (a route's ETag, a lease renewal, two tests) over ui/src/data/api.ts, ui/src/data/live/connection.ts, ui/src/state/queries.ts, ui/src/model/renewal.ts; 49 files, 482 tests pass.
  • The console browser lane passes with the stubs of F9 dropping If-None-Match. Delivered by e2e/console/full-fetch.ts (fetchFull) used by every stub that called route.fetch(); the stubbed specs (update, long-lists, activity, workers-gateway-stops-mid-fetch) pass in Chromium; the whole lane is CI's.

Assumptions

  • Assumption: base — the branch holds origin/task/914 and origin/task/915 merged in, because the spec's query layer and inbox live there.
  • Assumption: @tanstack/react-query in Fallow's ignoreDependencies — it is a bundled console library kept as a dev dependency, like its siblings in that list.
  • Assumption: a requester-named lease whose list entry is not cached falls back to the prefixed id, so its page is not marked stale until the lease list is cached; this is the smallest change.

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 2 blocking, 2 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 1 notes.
Rounds: 2. Tokens: 22.1M.
Runs: 14. Cost USD: 5.4613. Agent seconds: 3723.
Assessment: complete

Written by an agent.

@V3RON

V3RON commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Decision taken

Question. #916's renewal line marks the ending Inbox item and an observed ['lease', id] stale. That needs #914's event map and burst window and #915's inbox, but #916's Depends on named only #919 and #913. Build a stand-in now, or wait?

Options.

Taken: A. No throwaway code, and nothing is decided that #914 or #915 might change. Folded into #916's Depends on, marked pending the maintainer.

To revert: drop the two lines from Depends on and run the build on this branch as it is.

Written by an agent.

@V3RON
V3RON changed the base branch from task/913 to task/915 October 23, 2026 13:34
@V3RON
V3RON added this pull request to stack #921 October 23, 2026 13:34
@V3RON

V3RON commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: f49b192
Round 2: 03ec8e2
Round fix-check: 0e82b04

R1 reopened in round 2 (matched renewals still rescheduled the polls), fixed at the fix-check, verified by coordinator.

Runs: 14. Cost USD: 5.4613. Agent seconds: 3723.
Tokens input 532, output 147007, cache read 13013152, cache write 752697.
- build implementer: claude-sonnet-5-5 675 s $1.0844
- fix implementer: claude-sonnet-5-5 872 s $0.5969
- build implementer: claude-sonnet-5-5 151 s $0.2454
- audit implementer: claude-sonnet-5-5 479 s $0.4622
- review 1 reviewer: claude-sonnet-5-5 340 s $0.3082
- review 1 spec: claude-sonnet-5-5 23 s $0.1956
- review 1 code both: claude-opus-5-5 255 s $1.0878
- review 1 claims: claude-sonnet-5-5 46 s $0.1747
- fix 1 implementer: claude-sonnet-5-5 87 s $0.1732
- review 2 reviewer: claude-sonnet-5-5 206 s $0.1712
- review 2 code-reviewer both: claude-opus-5-5 132 s $0.5262
- review 2 claims-reviewer claims: claude-sonnet-5-5 25 s $0.0892
- fix 2 implementer: claude-sonnet-5-5 355 s $0.2045
- review fix-check reviewer: claude-sonnet-5-5 77 s $0.1418
Finding outcomes: {"fixed":2}. Classes: {"every renewal reschedules the polls it patches":1,"gateway caller-chosen lease id gets wrong key":1}.
{"findings":[
{"id":"R1","role":"code","class":"every renewal reschedules the polls it patches","outcome":"fixed","path":"ui/src/state/queries.ts","round":"1","fix":"0e82b04e6a557b01b38c420bf9c0a1a131172bd1"},
{"id":"R2","role":"code","class":"gateway caller-chosen lease id gets wrong key","outcome":"fixed","path":"ui/src/model/renewal.ts","round":"1","fix":"03ec8e21f9b432bf9dd97a98f03cff537d3f7159"}
]}

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review October 23, 2026 14:26
@V3RON

V3RON commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Review notes

Not blocking, not verified. Each is one reviewer's claim.

  • claims: ui/src/model/renewal.ts:32 the comment named only the <worker>.<id> form; a requester-chosen bare id also exists (since reworded in 0e82b04).

Written by an agent.

…ion's menu waits for the frozen clock to show the answer it needs (#916)
@V3RON

V3RON commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

CI fix after review: e2e/console/actions.spec.ts:538 (toast test) hung under load because it froze the clock before the Fleet table rendered; 1638a8d waits for the row before freezing and retries the menu item. Test file outside this PR's diff, so no fix-check (deliver skill, step 2 item 6).

Written by an agent.

@V3RON
V3RON merged commit d8447b0 into main Oct 23, 2026
30 checks passed
@V3RON
V3RON deleted the task/916 branch October 23, 2026 16:59
V3RON added a commit that referenced this pull request Oct 23, 2026
…quests a minute (#918) (#940)

Closes #918

### Status
Implement: done (1/1 green) Review: round 1 passed, no blocking findings
Hardware: n/a Gate: waiting for the stack

- [x] The console browser lane passes with `big-fleet.spec.ts`: audit
ran it with `long-lists.spec.ts` on Chromium, 24 green; CI console lane.
- [x] Setting the intervals in `ui/src/state/queries.ts` back to 1 s
makes it fail: audit set all six to 1 s, every page failed the ceiling
(Overview 295, Queue 237, Activity 239, Leases 182, Inbox 120, Fleet
118, Usage 120 in 60 s).

#905 Completion conditions:

- [x] Idle tab ≤ 40 `/v1` requests in 60 s on each of the seven pages,
50 workers / 500 devices: `big-fleet.spec.ts` (this PR).
- [x] A lease granted through the gateway shows on Leases within about a
second: event map and burst window, #926 (#914)
`ui/src/state/queries.test.ts`.
- [x] Leaving a page stops its reads; coming back within a minute shows
kept data: #926 (#914) polling and drop tests.
- [x] A second read of an unchanged list answers 304: #920 (#919)
`src/http/app.test.ts`; the console sends the tag, #927 (#916).
- [x] Sidebar count reads only `GET /v1/inbox`; Inbox and Needs you read
it plus `/v1/workers`: #937 (#915) `e2e/console/shell.spec.ts` and
`ui/src/model/overview.test.ts`.

## Assumptions
- Assumption: the stub builder is typed by `WorkerView`, derived in
`big-fleet.spec.ts` as `z.infer<typeof workerViewSchema>` from the
contract's exported schema; `src/contract/` is unchanged.
- Assumption: `leases` and `pad` builders moved to `stub-answers.ts`
with `answer`, so both specs share them.

## Review

Spec review: 0 blocking, 0 fixed, 1 notes. Code review: 0 blocking, 0
fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 1. Tokens: 23.5M.
Runs: 7. Cost USD: 1.8082. Agent seconds: 2527.
Assessment: complete

*Written by an agent.*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The console sends ETags back and patches lease renewals in place

1 participant