Skip to content

test(ui-react): await cap retirement before polling the limit panel - #2002

Merged
schlessera merged 1 commit into
mainfrom
fix/1866-retirement-boundary
Oct 16, 2026
Merged

schlessera merged 1 commit into
mainfrom
fix/1866-retirement-boundary

Conversation

@schlessera

@schlessera schlessera commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Closes #1866

What changed

Wait for the server-retired Action to reach dropped in the browser's real replicated inbox before polling the Actions-limit panel. The shared fill helper previously started its presentation deadline when the server command returned, while the browser still had the 60-Action burst to consume. All original L1, retirement, no-card, pause/resume, accessibility, focus, geometry and screenshot assertions remain.

Why this shape

The controlled native failure shows the successful paused-review response arriving just after the prematurely started L1 poll's final sample. The product then renders L1 correctly. An explicit stimulus-delivery assertion gives the unchanged presentation poll its own default budget after retirement arrives; it also fails explicitly if retirement never reaches the browser. No product source, timeout values, baselines, transport guards or shipped output change. The only sibling fill outside this helper occurs before native page mount and has no live-burst/presentation overlap.

Proof

Source before the fix: 45908608df63b07ee3d10d84ac608d132aa21caa. Native controls use Bun 1.4.2, Vitest 4.1.11 and network-disabled mcr.microsoft.com/playwright:v1.63.0-noble (digest sha256:eff16c30e6f3f4af0a03fa4b706120d5e9b0891c344a27d64559aff5900a4a27), with existing locked fonts read-only and serial browser files.

  • Failing first: Docker CPU quota 1 plus a temporary 100 ms delivery hold on real successful paused GET /api/hygiene/review responses reproduces the exact original dark-1280 L1 assertion. Refresh starts 2682.2 ms after fill returns; final undefined sample 2746.9 ms; assertion failure 2752.4 ms; current successful paused response 2792.7 ms. Exit 1, one failure, 16 cases excluded, 9.78 s.
  • Fix: same control, complete original dark-1280 Resume/focus, light-1280 P0/L1/L3 and long-metadata Resume-failure bodies: 3 pass, 14 excluded, 17.37 s.
  • Mutation: remove only the retirement barrier under the same control: all 3 fail the original L1 assertion, 15.17 s. All subsequently receive the successful current response and render real L1. Restore the barrier: all 3 pass, 15.39 s.
  • Clean file: remove all temporary tracing and response holds; node scripts/visual.mjs --project=ui-react-layout --filter=hygiene-actions-limit.layout passes all 17/17, 46.70 s, Bun 1.4.2. Original screenshot comparisons pass; reviewed unchanged light-320 L1 and dark-1280 L3 baselines for readable wrapping and visible Resume controls.
  • Local preflight: bun run check:pr --base origin/main passes all gates and 54 affected fast-invariant tests (local Bun 1.4.3).
  • Hosted proof: ready-PR run 38833690050, attempt 1: all 13 selected jobs passed, including the independently validating aggregate; packaging is the planner-intended test-only skip. No retained proof and no reruns. Layout (2) passes 579 tests / 28 files, 1142.25 s; the affected hygiene file passes all 17, 47.297 s. Layout (1) passes 514 / 28 files. Browser shards pass 4580 and 4228; the 10 existing touch-only cases excluded under fine-pointer mode pass in their coarse/mixed executions.

Actual checkout from every selected job log: 01cc3fe9dc252d4188e55d5cdb01f9559ef7d912; immutable API and local Git agree on parents base 9cf4aa5f37a33d40f53f783ecd0e8344f920f9ec + head 1b3e6adac2883c8092742be26506b8a525a313c4, tree 85b301f6f08ff99e9975c5f731c576040c58b782. Downloaded retention ledger has retained: {}; aggregate revalidation passes. The separate successful contract job 116757916369 checks the exact PR head, as its workflow requires. An initial superseded contract run was cancelled by the same-head label event; the replacement passed.

Selected job Actual job Result
changeset 116757911352 success
captures 116758106951 success
verify 116758106971 success
layout (1) 116758106983 success
unit (2) 116758107012 success
browser (1) 116758107029 success
runtime 116758107032 success
unit (1) 116758107072 success
unit (3) 116758107078 success
unit (4) 116758107107 success
browser (2) 116758107164 success
layout (2) 116758107169 success
proof 116764160635 success

Main subsequently advanced to 665bf5e4e7dca4fcaba5e9cf6b341fbef95c9f4c via #1776. Its 159 changed files are all under website/: closed-demo request handling/checks and regenerated website previews/shares. No package, fixture, dependency, browser harness, CI workflow, font or capture-recipe input changed; the selected editorial verifier generates its own five recipes and does not consume those website assets. This is unrelated advancement, so no rebase or repeated long PR suites are required. The passing run still proves its recorded base/tree; the final squash and automatic main-push qualification are recorded separately.

The temporary response hold preserves the real status/body and is below the existing 1000 ms polling timeout. It is a reproduction stimulus, absent from this patch. The exact original CI scheduling remains unknown; this controlled reproduction establishes the fixture ordering defect without reconstructing those historical timelines. Detailed issue evidence and limits.

Controlled-reproduction recipe

In the first native route handler in hygiene-server-command.ts, read the real response body before fulfillment and apply only this temporary hold:

const body = await r.text();
const read = JSON.parse(body);
if (req.method() === "GET" && path === "/api/hygiene/review"
    && read.review?.pauseReason?.kind === "actions-limit") {
  await new Promise(resolve => setTimeout(resolve, 100));
}
await route.fulfill({ status: r.status, contentType: "application/json", body });

Use the existing pinned offline container invocation with --cpus=1, mounted Bun 1.4.2 and locked fonts, then run from packages/ui-kit:

node /repo/node_modules/vitest/vitest.mjs run   --project=ui-react-layout --browser.fileParallelism=false   ../ui-react/tests/browser/hygiene-actions-limit.layout.tsx   -t 'light 1280: Actions-limit P0 L1 L3|dark 1280: Resume waits for server confirmation then focuses L2|Resume request failure retains L1'

Remove/reinsert only the new replicated-retirement poll for the mutation/restoration pair. Temporary observation traces record original assertion failure before waiting for pending requests and observing eventual L1; that observation does not clear the failed test. Remove all controls before clean qualification.

Checklist

  • Focused local receipts and complete selected hosted proof passed; actual head/base/job checkout evidence is in Proof.
  • All acceptance criteria are met, with the controlled-reproduction causal limits recorded above.
  • PR and issue target 0.44.0, the upcoming release after published 0.43.1.
  • No changeset: this changes only test fixture sequencing.
  • Leakage gate passes; no personal data in the diff.
  • No integration contract change.
  • No documented product behavior or source citation moved.

Anything left open

Nothing within the scoped fixture correction. The exact historical failure scheduling remains unknown; the controlled reproduction and mutation establish the corrected boundary.

@schlessera schlessera added this to the 0.44.0 milestone Oct 16, 2026
@schlessera schlessera added type: test Coverage, harness or proof work with no behaviour change. area: ui-react React chat/files/voice components, stores, WebSocket transport. area: ci CI workflows, the gates they run, release scripts, packaging. labels Oct 16, 2026
@schlessera

Copy link
Copy Markdown
Owner Author

Current-head qualification passed on the first run: 13/13 selected jobs in run 38833690050, attempt 1; packaging is intentionally unselected. Layout (2) passes 579 tests across 28 files, including all 17 Actions-limit tests. The original three callers pass with their full downstream checks. The proof aggregate independently passes and no older browser/layout evidence was reused.

Every selected job's actual checkout is 01cc3fe9dc252d4188e55d5cdb01f9559ef7d912, parents 9cf4aa5f37a33d40f53f783ecd0e8344f920f9ec + 1b3e6adac2883c8092742be26506b8a525a313c4, tree 85b301f6f08ff99e9975c5f731c576040c58b782, verified by logs/API/local Git. The PR body now contains the complete job IDs, controlled fail/pass/mutation/restoration receipts and unrelated website-only main advancement assessment. PR #2002 and issue #1866 both target 0.44.0. Proceeding with the matching-head squash, then verifying the actual main result separately.

@schlessera
schlessera merged commit 4e4a663 into main Oct 16, 2026
18 of 19 checks passed
@schlessera

Copy link
Copy Markdown
Owner Author

Post-merge verification is complete. Matching-head squash 4e4a663f98054d86f2dc90154b42ffbe8f8b7692 is on remote main. Its parent is 665bf5e4e7dca4fcaba5e9cf6b341fbef95c9f4c, tree de39ecb9ee3026c2d5141b5383004cd40a0254a9, exactly matching the independently reconstructed merge with the intervening website-only commit. The squash changes only the intended helper (6 insertions, 1 deletion). This final tree is distinct from the earlier PR checkout and has its own complete proof.

Automatic push run 38835980599, attempt 1, passes all 13 selected jobs on that exact squash. Packaging is intentionally unselected; the retention ledger is empty. Every selected job's checkout log and the downloaded layout artifact agree with the immutable API/local Git identity above, and the aggregate independently passes. No rerun.

Layout (2): 579/579 across 28 files, 1280.38 s. The complete hygiene Actions-limit file passes 17/17, 64.077 s, including all three original affected callers and their full downstream oracles. Layout (1): 514/514 across 28 files. All four unit partitions, both browser shards, native runtime, captures, types and metadata pass.

Selected main job Actual job
changeset 116765095426
verify 116765223164
captures 116765223185
unit (2) 116765223191
layout (1) 116765223207
layout (2) 116765223328
browser (1) 116765223352
unit (1) 116765223372
unit (4) 116765223378
runtime 116765223379
browser (2) 116765223405
unit (3) 116765223590
proof 116771829339

Issue #1866 is closed, and both issue and PR retain release milestone 0.44.0. The issue records the controlled reproduction and removed/restored mutation, clean local file/preflight, current-head PR proof and exact-squash automatic-main proof separately. The original historical failure timelines remain unavailable; the supported resolution is the demonstrated fixture sequencing correction.

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

Labels

area: ci CI workflows, the gates they run, release scripts, packaging. area: ui-react React chat/files/voice components, stores, WebSocket transport. type: test Coverage, harness or proof work with no behaviour change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ui-react: Actions-limit panel stays absent after authoritative retirement in layout CI

1 participant