Skip to content

test(claimant): fake git boundary in five fire-log tests - #13405

Merged
dezren39 merged 1 commit into
mainfrom
lane-zt-13344
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
lane-zt-13344

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

What

The opencode-claimant hermetic suite (pm-stack/opencode-claimant/run_hermetic_tests.py) exited 1 despite all 226 tests passing: its subprocess guard recorded five caught subprocess.Popen attempts across four test modules.

All five attempts trace to one production path: log_fire() calls read_code_source(), whose fail-open git provenance read (#12813) spawns git rev-parse. Five fire-log tests whose subject is another entry field (cap_room, babysitter, nudges, mode_source) drove a fire without faking that boundary; production caught the guard's raise (by design — the read is provenance, never a gate) but the attempt still counted against the run. Per-test verdicts are recorded on #13344.

Fix

Fake the subprocess boundary in each of the five tests with a fixed branch/commit git stub — the TestCodeSourceFireLog shape landed under #13254 — so the entries still carry a real-shaped code_source and no real spawn is attempted. The guard, its contract, and all production code are unchanged; no test moves out of the offline suite, and the fail-open spawn behaviour stays covered by TestCodeSourceFireLog.test_unreadable_clone_fails_open.

Verification

  • Before (pristine main 9904c3ae8ec): Ran 226 tests ... OK, then Forbidden external I/O attempted: subprocess.Popen ×5, exit 1.
  • After (laptop worktree): suite exit 0, 226 tests OK, empty violation list; a per-test bisect under the runner's own guard/env shows zero attempts in all six modules; the affected classes also pass standalone (7 tests + 5 mode tests, OK).
  • Remote dispatch: fleet run 45205014988 executed the suite at this branch — success.

Closes #13344.


Show it working
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

log_fire() records read_code_source()'s fail-open git provenance
read in every fire entry. Five fire-log tests whose subject is
another entry field (cap_room, babysitter, nudges, mode_source)
drove a fire without faking that read, so the hermetic runner's
subprocess guard recorded five caught attempts and exited 1
despite all 226 tests passing.

Fake the subprocess boundary in each test with a fixed
branch/commit git stub - the TestCodeSourceFireLog shape landed
under #13254 - so the entries still carry a real-shaped
code_source and no real spawn is attempted. The guard and its
contract are unchanged.

For #13344.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 43 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: caa4a10d-e410-428e-9f73-cc987646da8f
Commits

Reviewing files that changed from the base of the PR and between 1a0d5a9 and 10ba742.

Files selected for processing: 4

  • pm-stack/opencode-claimant/test/test_claimant.py
  • pm-stack/opencode-claimant/test_babysitter.py
  • pm-stack/opencode-claimant/test_claimant.py
  • pm-stack/opencode-claimant/test_nudges.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@dezren39
dezren39 merged commit 1310027 into main Nov 23, 2026
2 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T15:34:18.880328Z 10ba742 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

opencode-claimant hermetic suite: violation gate trips on 5 caught subprocess attempts across four modules

1 participant