Establish the next exact producer interface #3

Closed
opened 2026-08-28 19:24:37 +00:00 by dikka · 1 comment
Owner

What to build

Replace the current exact producer revision once with the interface required by the browser-primary workspace. The extension remains the only raw-Pi adapter; the hub continues to consume normalized validated messages rather than Pi lifecycle objects.

Registration and authoritative state must carry the exact nullable Pi session path, durable-history revision or invalidation facts, and current model and thinking information needed by later tickets. Define the typed model and thinking commands and results now so later browser work does not cause another producer revision. Do not transmit full branch chunks through the producer connection: durable history will be read through the history source introduced separately.

Update extension and hub atomically. There is no compatibility path for the previous producer revision and no product-semver scheme. A mismatched producer must receive a prompt bounded diagnostic while the running hub remains healthy.

Acceptance criteria

  • One new required integer producer revision replaces the current revision across extension, shared parser, and hub.
  • Registration supports an exact nullable canonical Pi session path and validates identity, size, and path bounds.
  • The interface carries bounded history invalidation or revision facts without carrying a complete branch snapshot.
  • Current model and thinking state, plus typed model/thinking commands and results, have exact validated shapes.
  • Matching extension and hub versions register and exchange existing live behavior successfully.
  • Old or malformed producers are rejected promptly and cannot poison subsequent valid registrations.
  • Protocol parser tests, extension adapter tests, and the real temporary-socket hub harness cover the new interface.

Blocked by

  • None (can start immediately).

Human checkpoint note: Do not request routine per-ticket approval. The implementing agent may make the internal architecture, refactoring, testing, and UI-detail decisions needed to satisfy the acceptance criteria. Pause only if implementation requires a material product or ownership change, a destructive or hard-to-reverse action, excluded security or deployment scope, credentials or spending, or a real-browser design fork with no safe default. Forgejo completion updates may be batched with the rest of the completed frontier. The user performs final hub and Pi restart steps. Agents must not start, restart, replace, or stop the user-run Pilcrow development server.

## What to build Replace the current exact producer revision once with the interface required by the browser-primary workspace. The extension remains the only raw-Pi adapter; the hub continues to consume normalized validated messages rather than Pi lifecycle objects. Registration and authoritative state must carry the exact nullable Pi session path, durable-history revision or invalidation facts, and current model and thinking information needed by later tickets. Define the typed model and thinking commands and results now so later browser work does not cause another producer revision. Do not transmit full branch chunks through the producer connection: durable history will be read through the history source introduced separately. Update extension and hub atomically. There is no compatibility path for the previous producer revision and no product-semver scheme. A mismatched producer must receive a prompt bounded diagnostic while the running hub remains healthy. ## Acceptance criteria - [ ] One new required integer producer revision replaces the current revision across extension, shared parser, and hub. - [ ] Registration supports an exact nullable canonical Pi session path and validates identity, size, and path bounds. - [ ] The interface carries bounded history invalidation or revision facts without carrying a complete branch snapshot. - [ ] Current model and thinking state, plus typed model/thinking commands and results, have exact validated shapes. - [ ] Matching extension and hub versions register and exchange existing live behavior successfully. - [ ] Old or malformed producers are rejected promptly and cannot poison subsequent valid registrations. - [ ] Protocol parser tests, extension adapter tests, and the real temporary-socket hub harness cover the new interface. ## Blocked by - None (can start immediately). > **Human checkpoint note:** Do not request routine per-ticket approval. The implementing agent may make the internal architecture, refactoring, testing, and UI-detail decisions needed to satisfy the acceptance criteria. Pause only if implementation requires a material product or ownership change, a destructive or hard-to-reverse action, excluded security or deployment scope, credentials or spending, or a real-browser design fork with no safe default. Forgejo completion updates may be batched with the rest of the completed frontier. The user performs final hub and Pi restart steps. Agents must not start, restart, replace, or stop the user-run Pilcrow development server.
Author
Owner

Implemented in jj revision ae7e0844 (feat(protocol): add protocol v8 state projections and Pi controls).

What changed:

  • Replaced producer v7 atomically with exact v8; no v7 wire fallback remains.
  • Added authoritative nullable Pi session path, bounded history facts, model catalog/current model, thinking state, and normalized presentation facts without sending branch chunks.
  • Added strictly validated, correlated set-model and set-thinking-level commands/results with bounded idempotent replay across disconnects.
  • Added an absolute producer-registration deadline that cannot be extended by trickled input, with slow-trickle and subsequent-valid-registration coverage.
  • Added explicit browser-only unknown sentinels for opportunistic older-hub projections so missing facts are not fabricated as real values.
  • Updated extension, hub registry/SSE projection, browser fixtures, documentation, and exact protocol tests.

Validation:

  • Focused final suite passed: 6 files / 87 tests.
  • Full suite passed: 59 files / 404 tests.
  • TypeScript no-emit check, hub build, and production browser build passed.
  • The only whole-tree formatter findings are two unchanged pre-existing files documented during implementation; all changed implementation/test files pass validation.

Required runtime handoff after deploying this protocol build remains: restart the hub, reload/restart active Pi sessions, then reload browser pages. No dev server was managed by the agent.

Implemented in jj revision `ae7e0844` (`feat(protocol): add protocol v8 state projections and Pi controls`). What changed: - Replaced producer v7 atomically with exact v8; no v7 wire fallback remains. - Added authoritative nullable Pi session path, bounded history facts, model catalog/current model, thinking state, and normalized presentation facts without sending branch chunks. - Added strictly validated, correlated `set-model` and `set-thinking-level` commands/results with bounded idempotent replay across disconnects. - Added an absolute producer-registration deadline that cannot be extended by trickled input, with slow-trickle and subsequent-valid-registration coverage. - Added explicit browser-only unknown sentinels for opportunistic older-hub projections so missing facts are not fabricated as real values. - Updated extension, hub registry/SSE projection, browser fixtures, documentation, and exact protocol tests. Validation: - Focused final suite passed: 6 files / 87 tests. - Full suite passed: 59 files / 404 tests. - TypeScript no-emit check, hub build, and production browser build passed. - The only whole-tree formatter findings are two unchanged pre-existing files documented during implementation; all changed implementation/test files pass validation. Required runtime handoff after deploying this protocol build remains: restart the hub, reload/restart active Pi sessions, then reload browser pages. No dev server was managed by the agent.
dikka closed this issue 2026-08-28 21:11:57 +00:00
Sign in to join this conversation.
No description provided.