Skip to content
This repository was archived by the owner on Sep 8, 2026. It is now read-only.

feat(viewport): negotiated cold-attach + partial-view firewall + queueMirror (plan #960) - #964

Draft
btipling wants to merge 2 commits into
mainfrom
feat/a5-tail-cold-attach
Draft

btipling wants to merge 2 commits into
mainfrom
feat/a5-tail-cold-attach

Conversation

@btipling

@btipling btipling commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Refs #960 — the plan-comment Canvas on the issue drives this; not merged on this PR. Status: implementing decision #1 (cold-attach client) & partial firewall; #3#5 queued.

Refs #924, #553, #958.

What

  • lib/viewportAttach.ts — production cold-attach client (GET viewportVersion=1&hydrate=tail cold / startIndex=N indexed); legacy body/bad header = client error.
  • lib/viewportFirewall.ts — explicit historyComplete:false guard.
  • lib/sessions/sessionStore.tsqueueMirror reserved key.

Gates run here

… + queueMirror reserved key (plan #960)

- New production `viewportAttachTurnStream` (GET `viewportVersion=1&hydrate=tail` for cold / `startIndex=N` for indexed). Decodes ViewportStreamDecoder records, folds a legacy-shaped result, rejects bad-negotiation/zero headers. `lastSnapshot` accessor on the decoder for the parsed snapshot.
- `SessionSnapshot.historyComplete?: boolean` explicit view marker; `trimForCloudPut`/`assertCompleteForCloudPut` never persist view-incomplete snapshots; `repo.put` skips them.
- `queueMirror` reserved meta key (JSON-string carrier, `[]` = explicit tombstone, not unset).

Refs #960 (plan issue), #924, #553, #958. Plan-comment Canvas: #960 (comment)
Status: IN PROGRESS.
@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
invincible Ignored Ignored Sep 7, 2026 11:18pm UTC

Request Review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant