Repository navigation
Closed
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)Package/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workSmall: expected under 2 hours of workkind/testTest coverage, test infrastructure, or test-only fixesTest coverage, test infrastructure, or test-only fixespriority/normalOrdinary priority (the default)Ordinary priority (the default)source/creatorFiled by the new-issue-creator jobFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this item
Description
Problem
pkgs/id/web's test suite is red on main: all 3 failures in src/world-contract.test.ts come from the shell contract's server view frame gaining a required view_revision field that the TypeScript test fixtures never adopted.
pkgs/id/contract/shell-contract.v1.json(revision 4) — server frameviewdeclares"view_revision": "u64"(required;base_view_revisionis the optional one). The field arrived in d488f32 ("revisioned JSON ScreenPatch view frames — id: F12.11 delta and binary frames (screen patches, resume tokens) #805 Phase 1"), which updated the Rust host (pkgs/id/src/world_session/mod.rs:2154-2204sends it on every view frame) and the Rust contract tests (pkgs/id/src/shell_contract/tests.rs:146sendsview_revision: 0) — but not the web tests.pkgs/id/web/src/world-contract.test.ts— theviewframes at :33 and :70 and the recorded-flow frames behind :330 carry noview_revision, so the TS checker (correctly, per the contract) rejects them:shell contract validator > accepts the frames a joined shell sends—checkServerFrame({type: "view", sequence: 1, data: …})returns not-ok.shell contract validator > accepts u64 values at and above 2^53, like the Rust checker (#1441)— theviewframe withsequence: 2**53…returns not-ok (the u64 case is collateral of the same missing field, not a u64 regression).web shell conformance > sends only contract frames, in the right phases, across every flow— violationsocket 0 frame 4 (server):viewneeds fieldview_revision``.
- Related surface to check while fixing:
pkgs/id/web/src/world.ts:31-32typesview_revision?: numberas optional on the client side, while the contract makes it required on every hostviewframe — triage should decide whether the client type should match the contract or the optionality is deliberate (older hosts).
Verified this run (2026-11-01)
- Laptop, pristine primary clone at main 7a0da2f (no local changes):
bun x vitest run src/world-contract.test.ts src/search-panel.test.ts→ the same 3 world-contract failures plus the search-panel failure already tracked as id(web): search-panel test expects aria-label 'Replace all' but implementation renders 'Replace all matches' — full web suite red on main #3243. Full web suite on the same clone: 4 failed / 569 passed / 9 skipped, and those 4 are exactly these + id(web): search-panel test expects aria-label 'Replace all' but implementation renders 'Replace all matches' — full web suite red on main #3243. - The sandbox clone at ceba688 carries the same contract JSON (revision 4,
view_revisionrequired) and the same test file, so the failure is not a laptop-local artifact.
Why it matters
A permanently red suite trains everyone to ignore it — the next real conformance regression in the TS shell-contract checker (the browser-side twin of src/shell_contract.rs) will land unnoticed, the same failure mode as the aggregator's red-main baseline (#4023). The drift pattern is also the recurring one for this contract: a revision lands on the Rust side and the TS port's fixtures lag one revision behind.
Acceptance criteria
-
bun run testinpkgs/id/webpasses forsrc/world-contract.test.ts(the 3 tests above) on main, with the fixtures sending contract-validviewframes (includingview_revision). - The fix does not weaken the contract:
view_revisionstays required inshell-contract.v1.jsonunless triage determines the field itself was mis-declared — in which case the JSON, the Rust tests, and the host are changed together instead. - Triage records a decision on
world.ts:31(view_revision?: numberoptional vs the contract's required). - No other test in the web suite regresses (the id(web): search-panel test expects aria-label 'Replace all' but implementation renders 'Replace all matches' — full web suite red on main #3243 search-panel failure is pre-existing and out of scope).
Metadata
Metadata
Assignees
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)Package/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workSmall: expected under 2 hours of workkind/testTest coverage, test infrastructure, or test-only fixesTest coverage, test infrastructure, or test-only fixespriority/normalOrdinary priority (the default)Ordinary priority (the default)source/creatorFiled by the new-issue-creator jobFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this item
Activity
dezren39 commentedon Nov 2, 2026
🤖 Agent note · state: filed
dezren39 commentedon Nov 2, 2026
🤖 Agent note · picked up
repo-health-code-pilot)dezren39 commentedon Nov 2, 2026
Triage verdict — ALREADY FIXED on current main (queue task 5993)
Re-checked fresh this shift instead of trusting the packet (the packet predates a relevant commit):
8052d96f0— "fix(id-web): validate shell contract field specs (fix(id-web): validate shell contract field specs #4238)", 2026-11-02T10:18:44Z — modifiedpkgs/id/web/src/world-contract.test.ts(+86/−7) andpkgs/id/web/src/shell-contract.ts. On currentmain, every view frame in the fixtures now sendsview_revision(world-contract.test.ts lines 81, 107, 146, 161, 329).a47cc0f90,bun install+ vitest inpkgs/id/web):bun x vitest run src/world-contract.test.ts— 21 passed, 0 failed. The 3 failures named in this issue are gone.bun run test— 1 failed | 626 passed | 9 skipped: the only remaining failure is the search-panel aria-label test (expected 'Replace all matches' to be 'Replace all'), which is issue id(web): search-panel test expects aria-label 'Replace all' but implementation renders 'Replace all matches' — full web suite red on main #3243 — pre-existing, out of scope here, and already has PR 🎨 Palette: align replace-all aria-label test with accessible label #4144 open.pkgs/id/web/src/world.ts:31keepsview_revision?: numberoptional — correct as-is. That type is the generic server-frame shape shared by all frame kinds (every field on it is optional); the requirement lives inshell-contract.v1.json(required) and is enforced by the TS checker, which is what the fixtures now satisfy. Making it required on the generic frame type would be wrong for non-view frames.🤖 Agent note · done
repo-health-code-pilot)