Skip to content

Finish terminal side-effect authority migration#5123

Closed
nwparker wants to merge 9 commits into
nwparker/term-speed-2-side-effect-facts-completefrom
nwparker/term-speed-2-side-effect-cleanup
Closed

Finish terminal side-effect authority migration#5123
nwparker wants to merge 9 commits into
nwparker/term-speed-2-side-effect-facts-completefrom
nwparker/term-speed-2-side-effect-cleanup

Conversation

@nwparker

@nwparker nwparker commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Phase 3 slice 4 — completes the side-effect authority migration (design: docs/reference/terminal-side-effect-authority.md).

  • Command Code output scraping moves to main: the chunk-boundary-safe detector runs per-PTY beside the title tracker on OSC-9999-stripped bytes, emitting command-code-working/command-code-done facts (banner self-arming preserved, plus runtime.noteTerminalSpawnCommand for the startup fast-arm since agent kind isn't known main-side). The 1500ms done settle timer deliberately stays in the renderer policy layer — it must consult the live store row that hook events also write (contract invariant 3)
  • sidecar OSC-9999 dedup: background-launch and automation observers no longer double-write setAgentStatus for PTYs main covers; their pacing/automation responsibilities and byte access are untouched
  • the parked watcher is now purely fact-driven under authority; the DECSET-2031 reply lives in a dedicated parked-terminal-mode2031-responder.ts whose byte subscription doubles as the Phase 4 delivery-interest signal
  • headless hydration seeds prefer main's tracked title (the actual stale consumer from the synthetic reroute); daemon checkpoint lastTitle traced as write-only today and documented in the doc's Open Items

Parity improvement (pinned by test)

The old renderer raw-byte path's ANSI strip leaked OSC-9999 payload text into Command Code prompt-echo capture (working fired with an empty prompt; done never fired). Main's clean-data feed fixes this; the parity harness documents both behaviors.

Validation

  • typecheck clean; oxlint + type-aware exhaustiveness clean
  • 202 files / 2,688 tests green (orca-runtime, pty IPC, agent-hooks, full terminal-pane directory, background-session, automation observers, all of src/shared)
  • e2e: terminal-attention, droid-notification, parking 3/3, hidden TUI restore 4/4 (14 total) + golden 2/2 on a fresh build

Cut-off

Independently mergeable; Phase 3 complete. Phase 4 (gating hidden PTY delivery in main) builds on the four enumerated subscribeToPtyData delivery-interest registrations.

Made with Orca 🐋

nwparker and others added 2 commits June 10, 2026 13:06
Co-authored-by: Orca <help@stably.ai>
…nwparker/term-speed-2-side-effect-cleanup

# Conflicts:
#	src/main/runtime/orca-runtime.ts
@stage-review

stage-review Bot commented Jun 16, 2026

Copy link
Copy Markdown

@nwparker

Copy link
Copy Markdown
Contributor Author

Closing as superseded by merged PR #7214 (merge e84a8dd), which explicitly revived the complete term-speed-2 model/view chain into current main and then added newer scheduler, producer flow-control, snapshot, and reliability work. This old component/rollup branch no longer has an independent delta to rebase.

@nwparker nwparker closed this Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant