Skip to content

ui-react: continuity run loses ambient authorization and retains an unknown checkpoint #3170

Closed as not planned

Description

@schlessera

Out of scope

The #2932 owned-scene cleanup repair, changing authorization policy, bypassing native checkpoint ownership, deleting retained native state, weakening offline guards, increasing deadlines or treating a passing retry as a repair.

Context

During #2932 implementation on main c77e673b84872e8c18b463667e0f1d3fda4f88cb plus the permanent fixture-regression working patch, an offline real-Chromium precursor run failed before the finalization-delay control was armed. The selected phone ten-drop case timed out after a reconnect waiting for a fresh status/replay; the client diagnostic read ws: disconnected, vpn: unauthorized, active: null, empty draft (until, packages/ui-react/tests/connection-continuity-runtime.test.ts:282-287; original recovery at lines 675-691 on that main source).

Shutdown then threw NativeJournalObservationError: one checkpoint remained retained, and release reported NativeBrainManagerError: This native root has no recorded checkpoint lease; arbitrary broker roots cannot be deleted (createNativeJournalObserver, packages/ui-server/src/brain/native-journal-observer.ts:489-494; checkpoint ownership refusal, packages/ui-server/src/brain/native-brain-leases.ts:224).

The local result was 1 pass / 2 fail / 13 deliberately filtered, 591 assertions, Bun 1.4.2 and Chromium 155.0.8059.84. The second selected IME case passed. The normal offline wrapper, private user/network namespaces, zero capability sets, original deadlines and native storage guards remained enabled. The control did not reach its old-B recorder wrapper, so neither failure is counted as #2932 failing-first/mutation evidence. No production file changed.

Read-only inspection of the retained fixture database found the ambient no-auth principal still unrevoked, with its existing maximum expiry; this does not establish why the socket/client became unauthorized. The relationship between the authorization symptom and the checkpoint cleanup failure is unproven. The continuity scratch/database and raw receipt are retained for diagnosis; the native helper already ran its own shutdown. No manual or bypass deletion of an unconfirmed native root was attempted. Source bound: createFixtureApp, packages/ui-server/tests/helpers/native-app-fixture.ts:25-35, retains real app/native shutdown behavior.

Raw log SHA-256: 4369871a22cb3db297cd996823338016d6018c7b7c27e6d518836956af4795b6. This is a distinct local runtime observation, not evidence that main CI changed or that #2932's captured extra-tracker cause was wrong. Related lifecycle/load work #2807 is broader; no matching open issue for this paired receipt was found. Refs #2932.

Scope

  • Capture the server's authorization/close-code and native checkpoint lease lifecycle around the reconnect and shutdown failures.
  • Determine whether the symptoms share a fixture/native owner or are independent; compare clean-source and instrumented inputs without attributing a cause from one passing run.
  • Repair only after the owning cause is established, preserving native lease refusals and ambient authorization semantics.

Acceptance criteria

  • Identify the actual reason for unauthorized client state while the retained ambient principal is not revoked, or record a bounded non-reproduction with the exact missing evidence.
  • Identify the checkpoint lease acquisition/release sequence behind the guarded shutdown refusal; retain any unresolved state rather than deleting it.
  • A repair has a causal failing-first/mutation/restored runtime receipt, required affected proof and no weakened deadline, authorization or native ownership guard.
  • Keep ui-react: connection-continuity preparation can expose an extra tracker #2932's actual extra-tracker evidence and this earlier pre-control failure distinct.

Verification

Use the normal offline launcher with required real Chrome and recorded Bun identity. Select the phone ten-drop and IME precursor, retain native close/authorization/checkpoint events, then run the complete continuity file after any correction. The first run above is a failed receipt; a later passing run alone cannot close this issue.

Contract impact

None established. Any product repair requires its own scoped ownership; none is authorized or implemented as part of #2932.

2026-11-02 triage at main a84d9bfbcb4e608b504aa0a9feb1144ad9a0b77e: Classified the paired authorization/checkpoint investigation as wanted unscheduled work (p2). Retain needs: repro: the original precursor’s exact causal/ownership gap remains. A bounded namespace capability probe failed before runtime with write failed /proc/self/uid_map: Operation not permitted; no Chrome/native continuity reproduction, new causal attribution or successful cleanup is claimed. Preserve original failed evidence and all native ownership refusals.

Main CI recurrence check (2026-11-03): in the window 2026-10-26 18:00 UTC to 2026-11-03 08:00 UTC, main CI ran 116 times; 97 runs were green and the failed-job logs of the other 19 contain no failure of the continuity file with NativeJournalObservationError or no recorded checkpoint lease. Main CI selects affected suites, so this loosely bounds hosted recurrence; it is not a flake rate, a reproduction or a repair. The continuity test file is unchanged since the 2026-11-02 triage. The missing evidence is still the authorization/close-code and checkpoint-lease timeline from a failing precursor run.

Triage 2026-11-03: added main-CI recurrence check; needs: repro and p2 unchanged.

2026-11-04 native membership: attached to #2753 because the full deliverable attributes authorization/reconnect and fixture-owned native cleanup during an actual Chromium continuity run. This matches its real-browser runtime and resource-ownership outcome; it does not select a shared cause or repair. Preserve needs: repro, the exact missing timelines and every native lease refusal.

Later fix that matches the shutdown symptom — 2026-11-09

#3521 (closed as completed 2026-11-03, milestone 0.45.0) reported the same shutdown error text from main CI: 1 native checkpoint(s) remain retained after shutdown … NativeBrainManagerError: This native root has no recorded checkpoint lease; arbitrary broker roots cannot be deleted. PR #3529 (squash bb91defdc) fixed the mechanism it found. The observer added a checkpoint id to retained before the lease owner checked the signal. When shutdown began while an observation was in flight, or the caller's signal was already aborted, the owner refused before recording a lease. The cleanup release was then refused, and close() threw. The observer now checks the signal in the same synchronous step that hands the id to the manager (checkpoint, packages/ui-server/src/brain/native-journal-observer.ts:292-302 at fb999b8ba).

The #3170 precursor ran on c77e673b8, which does not contain bb91defdc. Its shutdown followed a timed-out reconnect, so an in-flight observation during close() is plausible. That is an inference, not an attribution: the retained receipt has not been compared with the #3529 window (observation awaiting initialization or an already-aborted signal at checkpoint). The similar, still-open worktree-journal window is #3528. It is distinct and not claimed here.

Effect on this issue:

Current navigation at main fb999b8ba: until at packages/ui-react/tests/connection-continuity-runtime.test.ts:283-290; the ten-drop test template at :1095; observer close() at packages/ui-server/src/brain/native-journal-observer.ts:496-505 (inside createNativeJournalObserver at :278); the checkpoint-lease refusal at packages/ui-server/src/brain/native-brain-leases.ts:227; createFixtureApp at packages/ui-server/tests/helpers/native-app-fixture.ts:23-37. The citations in Context keep their c77e673b8 source identities.

Triage 2026-11-09 at main fb999b8baeabbb3a9cb5756a19862eee45467ebf: Linked the #3521/#3529 fix as a likely but unverified explanation for the checkpoint half, and narrowed what is left open to the unauthorized-client question. Refreshed the line numbers. needs: repro, priority: p2 and parent #2753 are unchanged. No new runtime result is claimed.

Recurrence check, bounded rerun and navigation — 2026-11-10

Main CI, 2026-11-03 08:00 UTC to 2026-11-10 07:00 UTC: 160 CI runs, 98 green, 40 cancelled, 22 failed. The failed-job logs of the 22 failed runs contain no failure of connection-continuity-runtime.test.ts. Five of them, all on 2026-11-03, contain the NativeJournalObservationError … remain retained after shutdown text. All five ran on main SHAs that do not contain bb91defdc (#3529, committed 2026-11-03 19:14 UTC). None of the 14 failed runs whose head contains that commit has it. This matches #3529's fix for the checkpoint half, but it does not attribute the original #3170 receipt. The cancelled runs were not inspected.

A bounded local rerun at main 3aadc8df5 did not reproduce either symptom. It ran BRAIN_REQUIRE_CHROME=1 scripts/test-offline.sh -- bun run test ./packages/ui-react/tests/connection-continuity-runtime.test.ts -t "320 phone, dark: (ten drops and reconnects|an IME composition started before a drop)" with private user/network namespaces, all five capability sets zero, Bun 1.4.2 and Google Chrome 140.0.7339.127. Result: 2 pass / 0 fail, exit 0, 109 s, with no never held diagnostic and no observer shutdown error. The original ran Chromium 155 on c77e673b8. A passing run is a non-reproduction, not a repair.

Navigation at main 3aadc8df5 after #3823 (3aadc8df5) and #3776 (f3490fb1a): until packages/ui-react/tests/connection-continuity-runtime.test.ts:283-290; the ten-drop test template :1097; the IME test template :1178; observer close() packages/ui-server/src/brain/native-journal-observer.ts:513-522 (inside createNativeJournalObserver at :278; checkpoint :292-302); the checkpoint-lease refusal packages/ui-server/src/brain/native-brain-leases.ts:227; createFixtureApp packages/ui-server/tests/helpers/native-app-fixture.ts:23-37. #3823 adds timed release retries to the observer. It does not change the checkpoint signal check.

What would complete the reproduction: a failing precursor run on current main that records the server's authorization state and WebSocket close code around the reconnect that leaves the client vpn: unauthorized, together with the checkpoint-lease acquire/release timeline if shutdown also refuses.

Activity

  1. added
    type: testCoverage, harness or proof work with no behaviour change.
    area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.
    area: ui-reactReact chat/files/voice components, stores, WebSocket transport.
    needs: reproBlocked on a reproduction.
    priority: p2Wanted, not scheduled. Pulled in when a milestone has room.
    on Oct 29, 2026
  2. schlessera commented on Nov 10, 2026

    @schlessera
    OwnerAuthor

    2026-11-10 triage at main 3aadc8df5: A bounded offline rerun of the phone ten-drop and IME cases (real Chrome 140, zero capabilities) passed 2/0. It reproduces neither symptom. In main CI from 2026-11-03 to 2026-11-10, the observer shutdown error appears only in five failed runs whose heads lack bb91defdc (#3529). None of the 14 failed runs whose heads contain it shows the error. That supports #3529 for the checkpoint half, but it does not attribute this receipt. The vpn: unauthorized question remains open. Refreshed navigation after #3823/#3776: observer close() :513-522, ten-drop :1097. needs: repro, priority: p2 and parent #2753 are unchanged.

  3. schlessera commented on Nov 13, 2026

    @schlessera
    OwnerAuthor

    Closing as not planned (maintainer-requested triage, 2026-11-13). One local sighting on a tree that carried an uncommitted fixture patch, with two halves.

    On recurrence: file a new issue with the server's authorization state and the WebSocket close code at the reconnect. #3528 stays open for the distinct journal-observer window.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ui-reactReact chat/files/voice components, stores, WebSocket transport.area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.needs: reproBlocked on a reproduction.priority: p2Wanted, not scheduled. Pulled in when a milestone has room.type: testCoverage, harness or proof work with no behaviour change.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions