Skip to content

test(omp): align resume assertions with transcript paths - #21648

Closed
nwparker wants to merge 2 commits into
mainfrom
nwparker/omp-resume-test-contracts
Closed

nwparker wants to merge 2 commits into
mainfrom
nwparker/omp-resume-test-contracts

Conversation

@nwparker

@nwparker nwparker commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 0
Prod 0 0 0 0

ELI5

OMP now remembers the transcript file it should resume. Three tests still expected the old behavior (resume by session ID), so CI reported failures even though the runtime fix was correct. The relay test also treated an asynchronous environment hook as synchronous. These assertions now match the shipped contracts.

What changed

  • Expect OMP resume commands to use the recorded transcript path when one is available.
  • Keep the legacy ID expectation for metadata that deliberately omits a path.
  • Await the relay environment augmenter before checking its result.

Proof

  • Focused run: 13 tests passed; the child-session suite was also loaded but this isolated worktree's Vitest alias setup could not resolve an existing @/lib/setup-script-prompt import.
  • Pre-commit oxlint, React Doctor, and oxfmt passed.
  • The failures are reproduced in CI on current main and are unrelated to this test-only patch's implementation behavior.

No visual proof applies: this is test-contract maintenance for already-shipped OMP resume behavior.

Relationship

This follows merged PR #20634 and makes its recorded-transcript-path behavior enforceable in CI.

@coderabbitai

coderabbitai Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 053b3181-d91b-4866-b90b-8116723ad42e

📥 Commits

Reviewing files that changed from the base of the PR and between 211821d and 162275e.

📒 Files selected for processing (3)
  • src/main/pi/omp-transcript-metadata.test.ts
  • src/relay/omp-fresh-launch-environment.test.ts
  • tests/e2e/omp-child-session-recovery.unit.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The tests now expect OMP resume commands to use the resolved session transcript path. The fresh-launch environment test now awaits the asynchronous augmentation result before asserting the empty environment.

Priority: ⬇️ Low

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the test changes, rationale, and validation results. However, it does not follow the required template fully: it omits the required Linked Issue entry in the Fixes # format,… Add the required template sections. Include a valid linked issue using Fixes #..., rename or add the Testing section with the required test and platform details, state N/A with a reason under Visual Proof, and complete the Review, b…
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: updating OMP tests to assert transcript-path resume behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the test changes, rationale, and validation results. However, it does not follow the required template fully: it omits the required Linked Issue entry in the Fixes # format, uses Proof instead of Testing, and does not provide the required checklist and review sections.

Resolution

Add the required template sections. Include a valid linked issue using Fixes #..., rename or add the Testing section with the required test and platform details, state N/A with a reason under Visual Proof, and complete the Review, boundary, Notes, and Checklist sections.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@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 — test-only contract alignment for OMP resume-by-transcript-path (no production code touched).

  • OMP resume argv expects the recorded transcript path — omp-transcript-metadata.test.ts now expects ['omp', '--resume', file] when the session carries a transcriptPath, matching getAgentResumeArgv's ompResumeFilePath || transcriptPath || id precedence.
  • Relay augmenter is awaited — omp-fresh-launch-environment.test.ts adds await to the augmenter call, which can return a Promise<Record<string, string>>. The previous assertion compared a Promise to {}.
  • Child recovery resumes the root transcript — omp-child-session-recovery.unit.test.ts expects /sessions/root.jsonl (the root's getSessionFile) instead of the ROOT_SESSION id, pinning the #16353 behavior.

I ran the three focused files locally: 15 tests pass. The assertions are exact against the production branches, so they fail if the runtime regresses to id-based resume. The legacy id fallback stays covered by omp-transcript-metadata.test.ts:105-116 and agent-session-resume.test.ts:86,171-199.

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

@nwparker

Copy link
Copy Markdown
Contributor Author

Fresh CI run 35436460489 completed. All PR-specific checks and runtime/typecheck passed; the only failing test shard is the pre-existing pane-title scan-budget test ( at ). This stack PR does not touch that area, so I am leaving it unmerged rather than weakening the budget test.

@nwparker

Copy link
Copy Markdown
Contributor Author

Fresh CI run 35436460489 completed. All PR-specific checks and runtime/typecheck passed; the only failing test shard is the pre-existing pane-title scan-budget test (expected 2081 to be less than 1740 at src/renderer/src/components/terminal-pane/pane-title-update-global-scan-budget.test.tsx:397). This stack PR does not touch that area, so I am leaving it unmerged rather than weakening the budget test.

@nwparker

Copy link
Copy Markdown
Contributor Author

Superseded by the merged current-main transcript-path contract in #21661; this stale test-only stack is no longer needed.

@nwparker nwparker closed this Sep 19, 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