Repository navigation
fix(ui-react): recover safety history and name unresolved sources - #4269
Conversation
|
No uploads on this PR yet This PR changes UI files (
Tips for agentsLabel each shot so reviewers know what they're seeing. Labels apply to every file in a call, so run one uploads put after.png --pr 4269 --meta path=/settings --state after --caption "Saved settings toast"
uploads put chat.png --pr 4269 --app ios --screen "Chat" --state afterNo CLI? With the Uploads MCP, call This comment updates with each upload, so you don't need to post the images yourself. A shot or two in the PR description is still welcome. Check what's attached with Workspace admins can turn this comment off in Settings → GitHub · docs |
Independent reviewReviewed head 949b6c3 against base c5071f7. Reviewer: agent. 1 finding: 0 fixed, 0 filed, 0 rejected, 1 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4269,
"head": "949b6c39dacaaf705449f2422c0b8db34d124704",
"base": "c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-react/src/lib/safety-client.ts:52 retries every capacity refusal after the final page. When the host already has 256 subscriptions, it refuses the new subscription with capacity. Each fresh snapshot then leads to another refused subscription, repeatedly paging the selected history until a host limit stops it. Recovery needs a bound for consecutive capacity refusals."
}
]
} |
Independent reviewReviewed head 949b6c3 against base c5071f7. Reviewer: agent. 1 finding: 1 fixed, 0 filed, 0 rejected, 0 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4269,
"head": "949b6c39dacaaf705449f2422c0b8db34d124704",
"base": "c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-react/src/lib/safety-client.ts:52 retries every capacity refusal after the final page. When the host already has 256 subscriptions, it refuses the new subscription with capacity. Each fresh snapshot then leads to another refused subscription, repeatedly paging the selected history until a host limit stops it. Recovery needs a bound for consecutive capacity refusals.",
"disposition": "fixed",
"commit": "f4b11154ce9440c755b4bd9a11981c935965c257"
}
]
} |
Independent reviewReviewed head f4b1115 against base c5071f7. Reviewer: agent. 2 findings: 0 fixed, 0 filed, 0 rejected, 2 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4269,
"head": "f4b11154ce9440c755b4bd9a11981c935965c257",
"base": "c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-react/src/lib/safety-client.ts:58 clears the active request ID when a capacity notification without a request ID arrives during pagination. A delayed or duplicate subscription-loss notice can therefore cancel the fresh snapshot and make the client discard its remaining pages. Ignore uncorrelated capacity notices while awaiting a page, while preserving terminal handling for a refusal bearing the active read’s ID."
},
{
"summary": "packages/ui-react/tests/safety-client.test.ts:156 uses empty, restricted pages at high-water 0 and checks only partial status. The recovery test still passes if the client drops first-page records, enables normal policy on partial evidence, or always subscribes after revision 0. Use distinct records across pages, a normal projection and a nonzero high-water, then assert retained records, partial normal=false and the final afterRevision."
}
]
} |
Independent reviewReviewed head f4b1115 against base c5071f7. Reviewer: agent. 2 findings: 2 fixed, 0 filed, 0 rejected, 0 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4269,
"head": "f4b11154ce9440c755b4bd9a11981c935965c257",
"base": "c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-react/src/lib/safety-client.ts:58 clears the active request ID when a capacity notification without a request ID arrives during pagination. A delayed or duplicate subscription-loss notice can therefore cancel the fresh snapshot and make the client discard its remaining pages. Ignore uncorrelated capacity notices while awaiting a page, while preserving terminal handling for a refusal bearing the active read’s ID.",
"disposition": "fixed",
"commit": "5b021368134959324d917c71e377dfbb66ba38c1"
},
{
"summary": "packages/ui-react/tests/safety-client.test.ts:156 uses empty, restricted pages at high-water 0 and checks only partial status. The recovery test still passes if the client drops first-page records, enables normal policy on partial evidence, or always subscribes after revision 0. Use distinct records across pages, a normal projection and a nonzero high-water, then assert retained records, partial normal=false and the final afterRevision.",
"disposition": "fixed",
"commit": "5b021368134959324d917c71e377dfbb66ba38c1"
}
]
} |
|
Collision assessment at head |
Independent reviewReviewed head 5b02136 against base c5071f7. Reviewer: agent. No findings. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4269,
"head": "5b021368134959324d917c71e377dfbb66ba38c1",
"base": "c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542",
"reviewer": "agent",
"outcome": "no-findings",
"findings": []
} |
|
Fresh collisions scan at reviewed head |
|
Current combined-candidate collision graph at |
|
Merged via the shared integration command as |
|
Automatic-main qualification run 44767813281 has an endurance infrastructure failure before any test executed. Actual job 136397887662 checked out squash |
|
Main run 44767813281 attempt 1 completed: verification, packaging, all four unit partitions, both layout partitions, all three browser partitions, runtime, native-host runtime and captures passed. Endurance alone failed before tests at the diagnosed pinned-image registry connection reset, causing the aggregate failure. A single job-specific infrastructure retry of endurance (and its dependent aggregate) has now been requested. The source remains squash |
Closes #4267
Closes #4268
What changed
A dropped safety-history subscription now recovers from an oversized delta by obtaining a fresh paginated snapshot and subscribing at its final watermark. Grouped safety indicators name an unresolved source in their accessible name and hover/focus reason even when an earlier trigger has already been marked safe.
Why this shape
Both fixes restore the existing per-trigger and bounded-history contracts from #3596. The wire cannot distinguish a dropped delta from a refused subscription. Capacity recovery therefore allows one automatic resnapshot until a valid advancing update or explicit refresh/reselection/reconnect; a second refusal remains visibly unavailable. Page completion and duplicate updates do not rearm recovery. Capacity during a page read remains a visible refusal. Individual decisions, counts and persistent details retain their original scope. No machine schema or provider conversation changes.
Proof
Initial tested base:
c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542. Current base:615a7fcfc21051612d48933097cada690d56c757, merged cleanly into reviewed head5b021368134959324d917c71e377dfbb66ba38c1asc566b9cf680df0111dac3d70a6beb556cf08168a. The base adds immutable-reference read binding and has no file overlap with this diff. Fresh combined-candidate preflight and 28 focused tests pass. Earlier build/typecheck/browser receipts retain their actual pre-refresh identity; complete candidate and main proof below qualify the combined tree.Client failing-first: capacity loss fails
SUBSCRIPTION_LOSS_REQUESTS_FRESH_SNAPSHOTbecause no read is emitted (8 pass/1 fail). Removing capacity recovery after implementation fails the same assertion (11 pass/1 fail); restored client tests pass 12/12, including cursor-free new request IDs, stale-page fencing, pagination, final subscription and refusal-loop checks.Pinned offline Chromium: reviewed web fetch followed by unresolved workspace read fails
GROUP_REASON_NAMES_UNRESOLVED_SOURCEin both themes. Mutation restoring the first-occurrence expression gives exactly 2 failures/9 passes at that assertion. Restored browser suite passes 11/11, including hover, focus, accessible name, persistent details and existing 320/1280 light/dark flows. Image:mcr.microsoft.com/playwright@sha256:eff16c30e6f3f4af0a03fa4b706120d5e9b0891c344a27d64559aff5900a4a27. Initial missing-build and screenshot-permission failures were harness setup failures, not reproduction receipts.bun run test packages/ui-react/tests/safety-client.test.ts packages/ui-react/tests/safety-evidence.test.ts packages/ui-react/tests/safety-reviewer.test.ts: 28 pass, 0 fail.NODE_OPTIONS=--max-old-space-size=6144 bun run buildandNODE_OPTIONS=--max-old-space-size=6144 bun run typecheck: both pass.Capacity-bound review fix: before the fix and with its bound removed, the new tests fail at
CONSECUTIVE_CAPACITY_REFUSALS_HAVE_BOUNDED_RECOVERYandONLY_ADVANCING_CONTIGUOUS_UPDATE_REARMS_CAPACITY_RECOVERY(12 pass/2 fail). Restored tests pass 14/14. Audited allread(target)resnapshot paths; existing gap/page/update recovery does not reset the capacity bound.Re-review fixes: while paging, uncorrelated resync notices leave the active read intact; a refusal bearing its request ID remains terminal. All four resync reasons now recover two reviewed occurrences over separate pages at high-water 4, proving record retention, partial normal=false and final afterRevision=4. Notice-fence, dropped-first-page, premature-normal and revision-zero mutations each produce the intended named assertion failures (15 pass/4 fail); restored client tests pass 19/19. Other frame handlers already fence by request ID, identity or paging state; read/refusal-focused fixtures retain their narrow parser/flow purpose.
Pending changeset package validation and full
changeset statusplan pass; the consumer fix has a ui-react patch changeset.NODE_OPTIONS=--max-old-space-size=6144 bun run check:pr --base origin/main: passed at merge headc566b9cf680df0111dac3d70a6beb556cf08168a, receipt below.Candidate qualification: run 44764503535 passed at head
c566b9cf680df0111dac3d70a6beb556cf08168a, base615a7fcfc21051612d48933097cada690d56c757. The shared merge path verified every successful selected job at synthetic checkout30cbbf8d899d122e2efe3523eea2a1f65d8be57c, whose parents are that base/head and whose tree is182a200025c44f6a41aeae0150401301b564929f.Delivered squash
63bb400b31403ee319926d38e223711a9bf0e7e1has that exact parent/tree and is on main. Automatic-main run 44767813281 passed on attempt 2. Audited all nine selected categories and all 17 successful job checkouts at the exact squash. Attempt 1 had only a pinned-image registry connection reset before endurance tests; one diagnosed infrastructure retry passed the ten-minute native endurance test and aggregate. Passing-job logs retain their original execution timestamps; this is not a claim that all jobs executed again. The structured receipt has no retained categories, and only the two planner-unselected repeat categories were skipped.{"version":1,"kind":"brain-check-pr-receipt","head":"c566b9cf680df0111dac3d70a6beb556cf08168a","base":"origin/main","mode":"focused","startedAt":"2026-11-20T15:31:13.143Z","finishedAt":"2026-11-20T15:31:57.088Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":14213.857214},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":124.98506999999881},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":73.5970559999987},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":22.987403999999515},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":29490.935351999997}]}Checklist
5b021368134959324d917c71e377dfbb66ba38c1returned no findings; the clean base merge preserves it.Anything left open
No implementation or qualification work remains for #4267/#4268. Epic #3596 stays open for its parent's follow-up combined review. Operational incident #4272 remains open awaiting a subsequent inclusive main plan: this successful retry reused metadata selected before the incident existed, so the separate red-main controller marker has not cleared. Its evidence and handoff are recorded; no source fix is justified by the transient registry failure.