Repository navigation
test(crew-container): scope the vanish race with monkeypatch.context() - #18015
KiroCrewCaptain merged 1 commit into
Conversation
First Principles Review (Opus 5.5, fork) — ⏭️ skippedRevision |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] dd56b57 Description read[DESCRIPTION-READ] befb0453deb83c35a763b872365a31f3ad791c06ecd55248d04b76a3e2b45615 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
UX Review (Opus 5.5, fork) — ⏭️ skippedRevision |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
66f3075 to
002427a
Compare
002427a to
9fd5706
Compare
9fd5706 to
e6d2f1a
Compare
|
The GPT 6.1 Review check on e6d2f1a is red with "review incomplete": the fork lane (run 38395961667) finished without producing a verdict, so this is not a finding against the diff. The check's own summary says to re-run it, and re-running needs admin rights I don't have. Could a maintainer re-run that lane? Everything else on this head is green, and the earlier GPT and Opus reviews of this change had no findings. |
e6d2f1a to
44128d9
Compare
|
@chenmingwei23 friendly ping, this has been waiting for a first review since 8 Oct. It only narrows the crew-container test scoping. The two red backend shards are the known flakes #20324 and #20325, which this PR doesn't touch (details here). |
44128d9 to
9bdf7c4
Compare
|
The red Windows shard 7 on 9bdf7c4 is not from this PR: both failures are in |
9bdf7c4 to
91ac1d2
Compare
test_a_gone_transcript_does_not_withhold_on_the_following_cycle called a bare monkeypatch.undo() to end the deletion race before its second cycle. That also reverts every autouse fixture's patch, so the second cycle ran on host values. Scope the race patch with monkeypatch.context() instead. Clears the semgrep.kirocrew.test-bare-monkeypatch-undo finding introduced by kirodotdev#13374.
91ac1d2 to
dd56b57
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: test (1 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: test-only change that scopes the vanish-race patch to the first backup cycle with monkeypatch.context() instead of a bare undo().
Problem / Motivation
Goal: Make SAST (Semgrep) green again for every pull request, by removing the bare
monkeypatch.undo()that #13374 added to a crew-container test (now suppressed on main rather than fixed).Since #13374 merged,
SAST (Semgrep)fails on unrelated pull requests with one finding,semgrep.kirocrew.test-bare-monkeypatch-undo, attest_sidecar_durability_gaps.py:4402. The scan covers files changed since the PR's baseline, so every branch based before #13374 now inherits the finding.Update 2026-10-19: main has since split the file (#21518), moving the test to
test_sidecar_durability_gaps_walk.py, and added anosemgrep: kirocrew.test-bare-monkeypatch-undosuppression above theundo(). So SAST is no longer red on other PRs, but the bareundo()is still there. This PR now changes the split file, and with theundo()gone the suppression is no longer needed, so it's removed too.Why it matters
Every open PR shows a red SAST check it did not cause, which hides real findings and costs each author an investigation. The finding itself is also real:
monkeypatch.undo()reverts every patch on the shared fixture, including the autouse fixtures this test inherits, so the test's second cycle runs on the host's real values.Not a goal
_vanish_after_listing.What changed (motivation → approach → change)
test_a_gone_transcript_does_not_withhold_on_the_following_cycleneeds the deletion race only for its first cycle, and ended it withmonkeypatch.undo(). The race patch is now applied insidewith monkeypatch.context() as mp:around that first cycle, which is the rule's own suggested fix (D11). The second cycle and every assertion are unchanged.Backwards compatibility
N/A — test-only change.
Tests
The changed test keeps its assertions; only the patch scope changes. The crew container suite skips on non-Linux hosts (
conftest.py), so it was only compiled and linted locally (py_compile,ruff check); CI runs it on Linux.Manual verification
N/A — test-only change.
Screenshots / video
N/A — no UI change.
Related Issues
Follow-up to #13374.
Pattern harvest
Not generalizable: the class is already caught by
semgrep.kirocrew.test-bare-monkeypatch-undo; this is the one occurrence that merged before the rule could block it.Checklist
Contribution License Agreement
I agree that this contribution is made under the project's Apache-2.0 license.