Skip to content

fix(devtools): keep pytest basetemp on workspace scratch - #2807

Merged
Sinity merged 1 commit into
masterfrom
feature/fanout/basetemp-fix
Jul 13, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/fanout/basetemp-fix

Conversation

@Sinity

@Sinity Sinity commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Summary

Keep managed pytest basetemps on the workstation scratch volume when local agent sessions inherit the cloud sandbox default.

Problem

A fresh linked worktree inherited POLYLOGUE_PYTEST_BASETEMP_ROOT=/tmp/polylogue-pytest from cloud-oriented agent settings. The devtools child environment copied it unchanged, so pytest chose host /tmp even though the local default is /realm/tmp/polylogue-pytest. Three fanout lanes filled the 6 GiB host tmpfs.

Solution

  • Normalize only the known cloud default to /realm/tmp/polylogue-pytest when the workstation scratch mount exists.
  • Apply the same normalization to focused devtools test and broad devtools verify subprocess environments.
  • Preserve arbitrary caller-selected roots and retain the cloud default where /realm/tmp is unavailable.
  • Cover both managed environment construction paths with regression tests.

Ref polylogue-ra3w.

Verification

  • Before: fresh-worktree devtools test printed pytest: basetemp → /tmp/polylogue-pytest/... (configured).
  • After: focused devtools test printed pytest: basetemp → /realm/tmp/polylogue-pytest/... (configured).
  • devtools test tests/unit/devtools/test_run_tests.py tests/unit/devtools/test_verify.py: 72 passed; 1 unrelated pre-existing failure in test_quick_verify_omits_pytest, rerun alone and confirmed its stale expected command list.
  • ruff format --check, ruff check, and mypy on the five changed files: passed.
  • devtools verify --quick: passed.

GitHub Actions currently fails at initialization because of account billing, before project checks run.

Problem: linked worktrees inherited the cloud pytest temp default from
Claude settings, so the focused runner selected host /tmp even though the
workstation default is /realm/tmp.

What changed: normalize the known cloud default only when the workstation
scratch mount exists, and apply it to both focused and broad devtools
subprocess environments. Explicit custom roots and cloud sandboxes remain
unchanged.

Regression coverage exercises the managed child environments that launch
pytest.

Ref polylogue-ra3w.

Co-Authored-By: Claude <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Sinity, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 15 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0fa12243-f356-4aa0-b1f2-74e139619061

📥 Commits

Reviewing files that changed from the base of the PR and between 8ec9955 and c8585d4.

📒 Files selected for processing (5)
  • devtools/run_tests.py
  • devtools/verify.py
  • devtools/verify_runs.py
  • tests/unit/devtools/test_run_tests.py
  • tests/unit/devtools/test_verify.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fanout/basetemp-fix

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c8585d4726

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/unit/devtools/test_run_tests.py Resolved
@Sinity
Sinity merged commit 2b8c8eb into master Jul 13, 2026
3 of 12 checks passed
@Sinity
Sinity deleted the feature/fanout/basetemp-fix branch July 13, 2026 00:13
@Sinity
Sinity restored the feature/fanout/basetemp-fix branch July 13, 2026 00:49
Sinity added a commit that referenced this pull request Jul 13, 2026
…807,2780,2790,2791,2795,2802,2806,2809

uwk3, jph5 (rigor-contracts #2783), bby.17 (web-cockpit #2793), dmp
(terminal-note #2801), ra3w (basetemp-fix #2807), r4no/bkff/r2kb
(extension-redesign #2780) fully satisfied — closed. nhjs (#2793), peo
(daemon-forensics #2802), 4g3n (#2780), 67ac/212.11 (demo-corpus #2795),
rsad (mcp-ergonomics #2790, real gaps remain per 5-iteration adversarial
cap), 9e5.8.4/jnj.7 (provider-origin #2806), mrxt/37t.12/p5g/rxdo.4
(annotation-judgment #2791), s7ae.8/20d.2 (live-performance-2 #2809)
partially satisfied — noted with disposition, left open.

Also discovered and documented the actual root cause of this session's
recurring bead-revert incidents: bd reimports the live database from
.beads/issues.jsonl on every CLI invocation, so a write not immediately
exported is lost the moment the next bd command runs. Every mutation in
this commit was individually export-verified against that behavior.

Co-Authored-By: Claude <[email protected]>
@Sinity
Sinity deleted the feature/fanout/basetemp-fix branch July 13, 2026 02:19
@Sinity

Sinity commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

  • 78.F050 / P1: stale at the checked revision: The old normalize_pytest_basetemp_env test and its unconditional host scratch-mount expectation are absent at the pin. The current basetemp-parent test creates a path beneath tmp_path and asserts that its parent exists at tests/unit/devtools/test_run_tests.py:215-221; it no longer depends on a particular host mount.

Only the rows listed above are dispositioned. Held findings remain open.

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