Skip to content

ui-sdk: expose bounded revisioned session-safety history and recovery #3604

Closed

Description

@schlessera

Out of scope

No UI mutation, model-generated narration, new source trust or expanded read authorization.

Context

Part of #3596.

createSessionRoutes (packages/ui-server/src/routes/sessions.ts:9) serves backend history; createGovernanceWrites (packages/ui-server/src/governance/event-writes.ts:92) owns durable host evidence. This slice adds read/replay transport for the exact occurrence identities supplied by #3601; it does not publish policy or implement the safe-verdict mutation.

Read the reviewed implementation design and requested gpt-6-astra review/disposition. The repository plan docs/plans/reviewable-session-safety.md and ADR docs/decisions/session-safety-reviews.md are now on main, including the proposed V1 data contract. Source pointers were verified at main cfbfcab18b869f829da803dec39f23fd55935074: createSessionRoutes (packages/ui-server/src/routes/sessions.ts:9), createGovernanceWrites (packages/ui-server/src/governance/event-writes.ts:92), safetyProjection (packages/ui-server/src/governance/safety-store.ts:230) and the host-only verdict store prepareSafetyReview (packages/ui-server/src/governance/safety-reviews.ts:75). ROADMAP.md “What binds future work”, the provider-history decision, G6 and the protected policy-writer boundary apply.

Scope

  • Add authenticated host history sidecars/snapshots and incremental updates with session/history identity, coverage, aggregate revision, cursor and complete-snapshot watermark.
  • Provide exact entry correlation when available and honest turn-level network events otherwise; redact bounded evidence without trusting model text as instructions.
  • Integrate reconnect, paging, history retirement, deletion, capabilities and mixed-version reads independently of the provider transcript.

Acceptance criteria

  • Live and replayed A/B/C identities and verdicts are identical; duplicate/reordered frames and a partial page never reset aggregate unresolved count.
  • Unknown proxy attribution stays unknown; read-side grouping never collapses independent trigger IDs or invents a Git operation from timing.
  • Old hosts/clients degrade via explicit unavailable/coverage state, and unbound first-turn identities reconcile without duplicate markers.
  • Deleted/revoked histories and late replies cannot resurrect evidence; unresolved summaries and allowed retirement tombstones obey retention and bounds.
  • No security metadata, labels or verdicts modify provider-facing messages/tools/system bytes.

Verification

Real authenticated HTTP/WS history and replay fixtures, cursor/high-water pagination, duplicate/reordered deliveries, first-turn binding, restart and deletion/revocation races. Read-only transport must never execute a verdict or policy mutation.

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

Implement the reviewed optional schema/API/history additions and the relevant effective-taint behavior. Update integration contracts and API reports in the same implementing commit with CONTRACT metadata and a minor changeset. The G6 default/coverage and effective-state semantic break follows the recorded breaking-before-1.0 ruling and breaking label; preserve mixed-version fallback.

Blocked by #3601

Readiness refresh 2026-11-06: #3601 delivered via #3633 at main cfbfcab18b869f829da803dec39f23fd55935074; project sync already removed blocked. The plan/ADR exist on main. All five original acceptance criteria are preserved. #3602 admission enforcement is independent work; this read-only slice neither publishes Settings policy nor exposes verdict mutation.

Final reconciliation 2026-11-06: automatic main42164637980 passed all nine selected categories freshly, with every one of its17 actual job checkouts verified at squash 223ca157aecce4ea48cb4ffd77743e7d5d796295. Candidate42162309827 likewise has complete exact-candidate proof. Both installed provider-history suites passed on both runs (18 Claude and15 Pi cases including expanded reference cases). Actual squash parent/tree, issue closure and PR/issue milestone0.45.0 are verified. All five original criteria are complete. Only parent claim safety-3604-review-parent-20261106 is released; no other issue claim changes.

Activity

  1. added
    type: featA new capability or a change in user-visible behaviour.
    area: ui-sdkWire protocol, runtime schemas, the server and client SDK surfaces.
    area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.
    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.
    securityAuth, isolation, egress, secrets, or anything in the threat model.
    on Nov 5, 2026
  2. added
    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 6, 2026

    @schlessera
    OwnerAuthor

    Unblocked: #3601 is 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 6, 2026
  5. self-assigned this
    on Nov 6, 2026
  6. schlessera commented on Nov 6, 2026

    @schlessera
    OwnerAuthor

    Claim safety-3604-history-20261106-6dba9b98: implementing only #3604 on feat/3604-safety-history-20261106, based on qualified main cfbfcab18b869f829da803dec39f23fd55935074 (tree cdfd61e5628f6cb253149ef97569a81c228bfcde). #3601 is delivered via #3633; ordinary closed-dependency reconciliation is already complete. All five original criteria remain. No open PR claims #3604. Collision detection reports shared affected-test closures with #3056/#3059/#3069/#3116/#3336/#3393/#3437/#3458/#3464/#3581/#3587/#3590/#3594/#3622, and no direct path collision for the cited files. #3602 admission enforcement remains independent; this slice will use a separate read module without changing its shared projection/writer signatures. Read-only transport and recovery only: no verdict endpoint/capability or Settings publication.

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

    @schlessera
    OwnerAuthor

    Implementation handoff for claim safety-3604-history-20261106-6dba9b98: draft #3639, head c1110cc3f3485236ea07105bb87b414d8ea86c27, tree b2c4d5b028126e1d08490aa17da510fcee914bed, base cfbfcab18b869f829da803dec39f23fd55935074. The branch is independent of #3602 and leaves shared safety projection/writer signatures intact. Its optional internal host reader and SDK/client transport are read-only; every mutation flag stays false.

    Final-head check:pr --base origin/main, strict typecheck, 124 focused tests (591 assertions) and four exact inventory/mount/lifetime checks pass. Four meaningful mutations fail on retired delivery, reordered count reduction, partial-page normal and held-delta capacity assertions; restored runs pass and committed-source hashes match. Existing out-of-scope citation drift remains on #3626. Both actual keyless provider-history attempts remain unqualified here, with exact failures and hashes in the PR; native CLI/schedule host failures are also retained rather than called passes.

    All five original criteria are preserved. Root owns independent review, complete hosted proof and supported-host qualification/integration. No watch, confirmation or merge was requested. Releasing only this invocation's #3604 assignment at this handoff.

  9. schlessera commented on Nov 6, 2026

    @schlessera
    OwnerAuthor

    Taking over the existing #3604 draft #3639 under parent claim safety-3604-review-parent-20261106 on its existing branch. The implementation worker released its claim. Independent review at c1110cc3f3485236ea07105bb87b414d8ea86c27 found three P2 gaps in adoption membership, duplicate client frames and supported Apify sources. I will correct the complete bug classes, retain failing-first/restored evidence and all five criteria, then obtain independent re-check and exact-candidate hosted qualification. #3647 independently changes host wiring and package contracts; root owns integration ordering and overlap reconciliation.

  10. schlessera commented on Nov 6, 2026

    @schlessera
    OwnerAuthor

    Completed #3604 via #3639, squash 223ca157aecce4ea48cb4ffd77743e7d5d796295. Exact candidate42162309827 and automatic main42164637980 each freshly passed all nine selected categories; all17 actual job checkouts per run and both provider-history suites were independently verified. Actual parent/tree, closure and milestone0.45.0 agree. All five criteria remain complete. Releasing only my parent claim safety-3604-review-parent-20261106; #3602 remains owned separately.

  11. removed their assignment
    on Nov 6, 2026
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

    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: ui-sdkWire protocol, runtime schemas, the server and client SDK surfaces.area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.breakingBreaks a published API or documented behaviour. Needs a maintainer ruling before code.contractTouches the integration contract: CONTRACT: commit, contract doc updated in the same commit.priority: p2Wanted, not scheduled. Pulled in when a milestone has room.securityAuth, isolation, egress, secrets, or anything in the threat model.type: featA new capability or a change in user-visible behaviour.

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions