Skip to content

security: prove single-trigger recovery across streaming, restart and two clients #3606

Closed

Description

@schlessera

Out of scope

No dependency on persistent CRUD or transparent Git; no live external network/model call.

Context

Part of #3596.

The feature changes a previously sticky safety contract across the hosted write worker, egress proxy, both backends, protected Markdown policy and transcript replay. Individual task tests do not establish the complete user journey.

Read the reviewed implementation design and requested gpt-6-astra review/disposition. The delivered plan docs/plans/reviewable-session-safety.md and decision docs/decisions/session-safety-reviews.md record that design. The original source review used main 35217d283b849b5ef81700d5d4c2ec7486405d12; live implementation readiness is separate from that historical source review. ROADMAP.md “What binds future work”, the provider-history decision, G6 and the protected policy-writer boundary apply.

Scope

  • Add one end-to-end review-only journey through real detector/proxy/write-worker boundaries and two client views, independent of repository transparency or persistent settings.
  • Exercise exposure finalization, pending-add/failure latches, legacy detector coverage, capacity/deletion and provider-prefix upgrade behavior.
  • Record named failing-first/mutation receipts and exact-head local/hosted proof for this capability.

Acceptance criteria

  • A/B/C remain independently unresolved; reviewing A and then B leaves C, and only finalized C with complete detector coverage permits normal admission.
  • Clearing during an open stream/tunnel or before delayed input completion is refused; future input cannot inherit an earlier verdict.
  • Races, stale tabs, reordered updates, a late database write, host restart, lost recording and history retirement remain restrictive and recover truthfully.
  • Old clean and old tainted sessions have honest incomplete coverage; capacity/pruning never erases unresolved evidence.
  • Both backends retain provider prefixes, including sessions resumed after upgraded policy wording; deny/byte/private-access/outward/voice rules remain independent.

Verification

Offline real-Git and HTTP/CONNECT loopback, SQLite write-worker failure injection, pinned browser interaction/replay and both keyless provider guards. Mutations must fail on named safety assertions, not module setup.

Every behavioral implementation needs meaningful failing-first/mutation receipts and the relevant real runtime/browser proof. Run contribution preflight before opening a PR; missing/cancelled selected hosted proof is not green. No tests may require an API key or external network.

Contract impact

Test-only integrated qualification of the delivered optional schema/API/history and effective-taint foundations. No new public schema, API, history rewrite or semantic break is requested by this remaining slice; the implementing children already carry their contract metadata and changesets. Preserve mixed-version fallback and verify both provider-prefix guards.

2026-11-20 readiness correction: checked current main and the closed foundation children; narrowed the stale implementation-era contract paragraph to the issue's existing test-only scope. All original acceptance criteria remain unchanged.

Triage 2026-11-05 at main 35217d283b849b5ef81700d5d4c2ec7486405d12: verified source anchors and the published plan/review, retained all still-open output dependencies and existing native parent, and classified this requested but unscheduled work as priority: p2 without inventing a release milestone. The brief is complete with no independent needs gap; agent-ready may coexist with blocked, and this issue remains unpickable until its named outputs exist.

2026-11-14 dependency reconciliation: #3605, #3602 are closed with delivered prerequisites. #3605 now has all seven criteria and complete selected automatic-main proof, including native and both provider-history guards, at 03805baf5c0dc22e8dbd991956039c61b53641d0 (run 43612181306). Removed only the satisfied active dependency declarations. No active output blocker remains; the existing agent-ready brief is retained without claiming this issue's end-to-end verification has been implemented. All original acceptance criteria remain unchanged.

Completion — 2026-11-20

Delivered by PR #4262, squash c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542 on main. The squash parent is cb4236234c1cce1f45d034e9eb34d15eda41f934; its tree d5d1de3ac7cc98a82bd763728443a6caf350cf0f exactly matches the tested candidate checkout.

Candidate confirmation 44756418291 passed all selected fast proof, including eight unit partitions and changed-test/browser repetition. Automatic main 44759131939, attempt 1 passed every selected heavy category freshly: verification, packaging, four unit partitions, three browser shards, two layout shards, captures, runtime, native host and endurance. Its complete selected inventory and all 17 successful job checkouts were independently read back; each checkout is the squash SHA, and metadata names the actual squash parent. Main's two repetition categories are planner-intended skips because repetition ran on the candidate, not missing selected proof.

The integrated journey proves separate A/B/C verdicts, streaming/delayed refusal, actual outward process admission after every review stage, future same-source restriction, a held FULL-writer occurrence, concurrent client reads and exact owner-verdict retry, recording failure and restart. Legacy/capacity/pruning/retirement and independent deny/byte/private/outward/voice controls retain their focused tests in the selected proof. Actual main logs include both installed keyless provider-history guards, the retained legacy-wording cases, the Claude SDK-option guard, and healthy Claude/Pi native cells at UID 1000 and UID 0. All named mutation receipts are in the PR; restored guards pass.

The final independent PR review had no findings at 2ead77c4e060acdd45f1161b2a2102f781e510b6; subsequent base refreshes were clean merges with unchanged reviewed source and refusal: null. PR and issue milestones remain 0.45.0. This completes this qualification slice; the epic stays open for combined-review follow-ups #4267 and #4268. The earlier draft assertion timeout #4261 was resolved as documented Bun matcher misuse, not a product writer defect.

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.
    area: backendsAgentBackend implementations and the seam they share.
    blockedWaiting on another issue or an upstream dependency. Say which in the body.
    contractTouches the integration contract: CONTRACT: commit, contract doc updated in the same commit.
    breakingBreaks a published API or documented behaviour. Needs a maintainer ruling before code.
    on Nov 5, 2026
  2. added
    securityAuth, isolation, egress, secrets, or anything in the threat model.
    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.
    priority: p2Wanted, not scheduled. Pulled in when a milestone has room.
    on Nov 5, 2026
  3. schlessera commented on Nov 14, 2026

    @schlessera
    OwnerAuthor

    Unblocked: #3605, #3602 are closed, so scripts/sync-project.ts is removing the blocked label.

  4. removed
    blockedWaiting on another issue or an upstream dependency. Say which in the body.
    on Nov 14, 2026
  5. schlessera commented on Nov 14, 2026

    @schlessera
    OwnerAuthor

    2026-11-14 dependency reconciliation: #3605, #3602 are closed with delivered prerequisites. #3605 now has all seven criteria and complete selected automatic-main proof, including native and both provider-history guards, at 03805baf5c0dc22e8dbd991956039c61b53641d0 (run 43612181306). Removed only the satisfied active dependency declarations. No active output blocker remains; the existing agent-ready brief is retained without claiming this issue's end-to-end verification has been implemented. All original acceptance criteria remain unchanged.

  6. self-assigned this
    on Nov 20, 2026
  7. added this to the 0.45.0 milestone on Nov 20, 2026
  8. schlessera commented on Nov 20, 2026

    @schlessera
    OwnerAuthor

    Claim: 3606-recovery-20261120, branch test/3606-integrated-recovery, dedicated checkout based on bd751d43435bbffa919d987323d17098eb5f7166.

    Readiness/relevance: read the issue, epic/design comments, plan, ADR and binding roadmap. Existing collector, ledger, review, live-admission and browser suites cover individual invariants; the joined real proxy/owner-review/two-client recovery journey remains useful and is not claimed delivered by #3605. This is test-only qualification; no new schema or semantic break is needed. Existing contract-impact prose describes the delivered foundations, not an instruction to add duplicate APIs. Epic source anchors resolve, except prepareTurnEgress moved from line 84 to 87. #3606 has no direct file:line citations.

    Collision scan reports shared proof closures (including #3622/#4255), not permission to overwrite their work. Integration reservation will serialize confirmation/merge. Milestone 0.45.0 assigned per the authorized scope and read back. Linking via T3 failed because that connector has no credentials; authenticated CLI access works.

  9. removed
    contractTouches the integration contract: CONTRACT: commit, contract doc updated in the same commit.
    breakingBreaks a published API or documented behaviour. Needs a maintainer ruling before code.
    on Nov 20, 2026
  10. schlessera commented on Nov 20, 2026

    @schlessera
    OwnerAuthor

    Completed through PR #4262, squash c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542.

    Candidate 44756418291 and automatic main 44759131939 passed. Squash parent cb4236234c1cce1f45d034e9eb34d15eda41f934 and tree d5d1de3ac7cc98a82bd763728443a6caf350cf0f match the tested candidate. Main's complete selected inventory passed freshly, and all 17 successful job checkouts below were verified as c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542; metadata also names the actual parent. Both installed provider-history guards and the SDK-option upgrade guard passed in the actual main logs. All four healthy native backend/UID cells passed; the negative control is separately labelled.

    Main job Actual job ID
    changeset 136366670161
    runtime_host 136367303060
    browser (1) 136367303092
    runtime 136367303093
    captures 136367303101
    browser (3) 136367303115
    browser (2) 136367303119
    unit (1) 136367303123
    unit (3) 136367303130
    pack 136367303141
    unit (2) 136367303170
    layout (2) 136367303171
    layout (1) 136367303196
    verify 136367303205
    endurance 136367303333
    unit (4) 136367303342
    integrated or exhaustive proof 136381238654

    All five original qualification criteria are recorded in the updated issue body, with integrated streaming/admission/delayed-write/failure/restart/two-client evidence and named failing mutations in the PR. PR and issue milestones remain 0.45.0. #3606 is complete; #3596 stays open for combined-review follow-ups #4267 and #4268.

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

Metadata

Metadata

Assignees

Labels

agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: backendsAgentBackend implementations and the seam they share.area: ui-reactReact chat/files/voice components, stores, WebSocket transport.area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.priority: p2Wanted, not scheduled. Pulled in when a milestone has room.securityAuth, isolation, egress, secrets, or anything in the threat model.type: testCoverage, harness or proof work with no behaviour change.

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions