Skip to content

fix(omp): publish parent transcript paths for native chat - #20615

Merged
nwparker merged 2 commits into
mainfrom
nwparker/omp-transcript-path
Sep 19, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/omp-transcript-path

Conversation

@nwparker

@nwparker nwparker commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​441 $\color{#cf222e}{\Huge{\mathbf{−}}}$​38 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​403
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​7 $\color{#cf222e}{\Huge{\mathbf{−}}}$​9 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2

OMP now tells Orca exactly where its parent conversation is saved, so native chat can read custom session directories without guessing. Resume still uses the session ID; child callbacks cannot replace the parent transcript path.

Stacked on #20611 (nwparker/omp-child-session-owner) because transcript ownership must use its root-session fence. Takes over #19529 with Brennan Benson co-author credit. The optional metadata keeps old-extension discovery fallback and leaves plain SSH support gated.

Validation

  • Independent review approved final head f835a5c. 125 focused tests, node/web typechecks, and full changed-quality gate against the stack base passed.
  • Actual read-only OMP loader + persistent SessionManager → real HTTP metadata → Orca transcript reader passed for dedicated and Pi-routed OMP. Covers custom directories, lazy file creation, same-manager new-session switches, child suppression, and ID-based resume; zero model calls. Parent reran the smoke successfully.
  • Hidden Electron rendered four actual reader results with production components and styles. This is macOS component rendering, not a full-app transport test. Windows/WSL authority has unit coverage; plain SSH remains gated.
  • Reproduce runtime with ORCA_BACKGROUND_LAUNCH=1 bun tests/tools/omp-transcript-runtime-smoke.mjs /path/to/oh-my-pi; rendered reproduction is documented in tests/tools/omp-transcript-rendered/README.md.

Actual OMP transcript after new-session switch

Rebase and final verification

Rebased onto current main after #20611 merged; duplicate ownership commits were removed rather than replayed.

  • ORCA_BACKGROUND_LAUNCH=1 pnpm test src/main/pi/omp-transcript-metadata.test.ts src/main/pi/omp-session-status-owner.test.ts src/main/native-chat/session-file-resolver-wsl.test.ts src/main/pi/agent-status-extension-source.test.ts — 66 passed.
  • pnpm tc:node and pnpm run check:code-quality:changed — passed.
  • ORCA_BACKGROUND_LAUNCH=1 bun tests/tools/omp-transcript-runtime-smoke.mjs /Users/nwparker/projects/oh-my-pi /tmp/omp-transcript-reader-proof.json — actual OMP loader, persistent SessionManager, custom roots, new-session switch, HTTP metadata, reader output, and child suppression; zero model calls.
  • ORCA_BACKGROUND_LAUNCH=1 node tests/tools/omp-transcript-rendered/run.mjs /tmp/omp-transcript-reader-proof.json — hidden Electron production-component rendering passed and wrote the fixture evidence under .bench-fixtures/omp-transcript-*.

@nwparker
nwparker marked this pull request as ready for review September 14, 2026 12:23

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — the OMP hook/metadata path that lets native chat read custom session directories, plus its WSL-authority and proof coverage.

  • OMP hook publishes session_file — getPiAgentStatusExtensionSource now emits the owning session manager's file path alongside session_id in both the dedicated-OMP and Pi-routed-OMP runtime metadata. The existing both-id-and-file gate is unchanged, so ephemeral sessions still publish no metadata.
  • Extraction maps session_file → transcriptPath — extractAgentProviderSession('omp') uses the shared withTranscriptPath validator (trim, reject empty/control-char paths). Resume stays id-based: getAgentResumeArgv('omp') ignores transcriptPath, and agentProviderSessionsEqual ignores it for OMP, so sleeping/live records do not churn.
  • SSH gate unchanged — nativeChatRequiresLocalTranscript still returns true for OMP; only its doc comment changed, so Model-A SSH chat stays closed even with a hook path.
  • WSL authority now covered for OMP — the codex guest-path cases in session-file-resolver-wsl.test.ts are parameterized over codex/omp, asserting an attested distro wins and a guest hook path never falls back to a host/other-guest id match.
  • Proof tooling — tests/tools/omp-transcript-runtime-smoke.mjs (real OMP loader + persistent SessionManager → HTTP metadata → Orca reader, lazy creation, new-session switch, child suppression) and omp-transcript-rendered/ (hidden-Electron render of the production message list using exported reader output). Manual runbook, not CI-wired.

Verified locally: the five focused suites (omp-transcript-metadata, omp-session-status-owner, session-file-resolver-wsl, agent-session-resume, agent-status-extension-source) pass (102 tests). The new assertions are exact-equality on session_file/transcriptPath, so they fail against the pre-change behavior rather than absorbing it.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

nwparker and others added 2 commits September 19, 2026 00:42
Adopt #19529 on the child-session ownership fence. Preserve id-based resume and execution-host transcript boundaries.

Co-authored-by: Brennan Benson <[email protected]>
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