Skip to content

feat(http): unchanged JSON answers under /v1 are 304 with an ETag - #920

Merged
V3RON merged 8 commits into
feature/905-adrfrom
task/919
Oct 23, 2026
Merged

V3RON merged 8 commits into
feature/905-adrfrom
task/919

Conversation

@V3RON

@V3RON V3RON commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Closes #919

Status

Implement: done (1/1 green) Review: round 1 + fix-check (CI fix) passed, no findings Hardware: n/a Gate: waiting for the stack

  • pnpm vitest run src/http/app.test.ts passes with the new test (ETag on a JSON read under /v1): audit ran the file, 174/174.
  • A second GET /v1/tokens with If-None-Match: <first tag> answers 304: asserted in that test; the audit's probes (drop the mount skip, the content-type check, the tag step) each turned it red. /v1/workers 304s only on a gateway (no code needed).

Assumptions

  • Assumption: the mount fake — the test registers its own JSON mount instead of changing the existing text mount fake, which other tests rely on.

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 0 blocking, 0 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 1. Tokens: 2.5M.
Runs: 6. Cost USD: 1.4683. Agent seconds: 1107.
Assessment: complete

Written by an agent.

@V3RON
V3RON added this pull request to stack #921 October 23, 2026 10:20
@V3RON

V3RON commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: d9aabc0

Runs: 6. Cost USD: 1.4683. Agent seconds: 1107.
Tokens input 130, output 32271, cache read 2085718, cache write 234949.
- build implementer: claude-sonnet-5-5 146 s $0.2334
- audit implementer: claude-sonnet-5-5 116 s $0.1153
- review 1 reviewer: claude-sonnet-5-5 355 s $0.197
- review 1 spec: claude-sonnet-5-5 18 s $0.1189
- review 1 claims: claude-sonnet-5-5 279 s $0.105
- review 1 code both: claude-opus-5-5 193 s $0.6987
Finding outcomes: {}. Classes: {}.
{"findings": []}

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review October 23, 2026 10:29
@V3RON

V3RON commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: d9aabc0
Round fix-check: e9e683a

Fix-check: the CI fix (ETag step registered as * with a /v1/ early return) verified by coordinator, no lens; CI on e9e683a is the test check.

Runs: 8. Cost USD: 1.7286. Agent seconds: 1291.
Tokens input 164, output 37425, cache read 2532551, cache write 300559.
- build implementer: claude-sonnet-5-5 146 s $0.2334
- audit implementer: claude-sonnet-5-5 116 s $0.1153
- review 1 reviewer: claude-sonnet-5-5 355 s $0.197
- review 1 spec: claude-sonnet-5-5 18 s $0.1189
- review 1 claims: claude-sonnet-5-5 279 s $0.105
- review 1 code both: claude-opus-5-5 193 s $0.6987
- fix implementer: claude-sonnet-5-5 98 s $0.109
- review fix-check reviewer: claude-sonnet-5-5 86 s $0.1513
Finding outcomes: {}. Classes: {}.
{"findings": []}

Written by an agent.

@V3RON
V3RON merged commit 125d739 into main Oct 23, 2026
32 checks passed
@V3RON
V3RON deleted the task/919 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.

Unchanged JSON answers under /v1 are 304 with an ETag

1 participant