Skip to content

Fix four devtools reds and give a run result an identity - #4716

Merged
Sinity merged 1 commit into
masterfrom
fix/test-verify-reds
Sep 6, 2026
Merged

Sinity merged 1 commit into
masterfrom
fix/test-verify-reds

Conversation

@Sinity

@Sinity Sinity commented Sep 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes four master reds in tests/unit/devtools, and three defects that let a
run's result be misread or missing.

The four reds: which were real

Measured at d430734f1 (the commit before #4709 merged) with devtools and
tests both checked out there, not inferred:

test verdict
test_accepted_flake_clears_both_recorded_exit_statuses real defect, inherited — fails identically pre-#4709
test_missing_checkout_venv_tool_is_a_typed_failure stale expectation from #4709
test_the_default_tier_selects_and_the_all_tier_drops_testmon stale expectation
(fourth reported red) did not reproduce at 04e297bbc

The rerun routing through run_pytest is not implicated: it arrived in
#4581 and is unchanged here.

Problems

  1. _rerun_failed_once formatted its receipt with relative_to(ROOT), which
    raises when the step directory is outside the checkout. A rerun that had
    already adjudicated its flakes correctly died formatting its own path.
  2. A pueue task id is a queue position, not an identity. A reordered queue
    reassigns ids, so a waiting client could see a foreign job reach a terminal
    state and report it as its own release — claiming success for work it never
    ran, silently, in the direction that launders an unverified change.
  3. current-pytest-summary.json was named in both runners' output and written
    by neither for a failing run. Evidence: across every worktree, a successful
    focused run leaves 11 artifacts; one that ran tests and failed leaves 1,
    diagnosed pytest_no_report. So "read the receipt, not the log" was not
    available advice.
  4. The exit status does not survive a pipeline. verify | tail reports tail's
    status, and three readers here (me included) called failing runs green on
    that basis. This was not a devtools bug — the exit codes were correct.

Solutions

  • Receipt path reported relative when inside the checkout, absolute otherwise.
  • The slot client identifies its task by the launch document it carries; a
    reassigned id is refused rather than read.
  • The summary is written by the parent from what the parent knows, so it exists
    for every run, and carries its run_id so a stale read is detectable.
  • Both runners state the verdict as the last line of their own output, where
    truncation cannot lose it.
  • Stale expectations updated, keeping their original coverage and restating
    their anti-vacuity conditions against the current contract.

Verification

  • tests/unit/devtools/{test_pytest_invocation,test_run_result_identity,test_verify}.py
    — 52 passed, redirected to a file and read, not piped.
  • devtools verify --quick — exit 0, all gates ok, read from a file.

What did not run

No full corpus and no affected-tier run: the shared pytest slot had an hour of
queue depth and, per coordinator direction, this is landing on the static gates
plus the focused run above rather than waiting for it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DNGJ3awfNrsLaMdHgQZvid

Two reds in test_verify.py, from different causes.

`test_accepted_flake_clears_both_recorded_exit_statuses` is inherited, not
new: it fails identically at d430734, the commit before #4709 merged. The
rerun formats its report path with `relative_to(ROOT)`, which raises when the
step directory sits outside the checkout, so a rerun that had already
adjudicated its flakes correctly died formatting the result. Reported relative
when it is inside the checkout, absolute otherwise.

`test_missing_checkout_venv_tool_is_a_typed_failure` is a stale expectation
from #4709: an absent .venv now reports gate_unprovisioned_environment rather
than gate_missing_executable, which is the intended distinction. Split into
both cases so the original coverage survives alongside the new one.

Verification: tests/unit/devtools/test_verify.py, 41 passed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01DNGJ3awfNrsLaMdHgQZvid
@Sinity
Sinity enabled auto-merge (squash) September 5, 2026 23:54
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 8a98a800-b74d-4ccc-aace-a36abd4bc84d


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 commented Sep 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-05T23:56:44.187460Z f56af66 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.

@Sinity
Sinity merged commit afdb284 into master Sep 6, 2026
3 checks passed
@Sinity
Sinity deleted the fix/test-verify-reds branch September 6, 2026 00:00
@Sinity Sinity changed the title Fix rerun receipt path crash and a stale venv-gate expectation Fix four devtools reds and give a run result an identity Sep 6, 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