Repository navigation
test: start one node child for the ssrf-guard module, not four at once - #37716
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: one child per module in its own Notes
[DESIGN-REVIEWED] b687fc1 Description read[DESCRIPTION-READ] a6c4870204b926675b9c7f58bc0c26cecc4757a70f9fd0cead5f52ab77e16541 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Test-only fix for a shard stall that is linked to an issue (#36261) and backed by failing CI jobs; the riders are small extra assertions inside the same two test modules. What this change shipsInventory (7 items) — 5 justifiedIntent: stop the design-critique node tests from stalling Linux shard 7 and failing unrelated PRs. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] b687fc1 Description read[DESCRIPTION-READ] b4cbf165fe6c657626190dabe91b679edb184cdcc1ce93d78be30169d03c5b76 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsNo findings. None of the three candidates held up when checked against the code. All three are about how the test suite reports a failure or how much time a child gets, and none of them leads to a reachable defect. [OPUS-REVIEWED] b687fc1 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
a0f3090 to
88a7c48
Compare
fixed in 88a7c48: |
|
[operator: bolichen97] |
|
[operator: bolichen97] The rerun of |
88a7c48 to
71e0789
Compare
The four runtime tests in test_ssrf_guard_fail_closed.py each started their own node, and --dist loadgroup handed them to four workers, so four cold Node starts began in the same second at 98% of Linux Backend Tests shard 7. In six of six failed attempts the shard ran ~50 tests a second up to that second and almost none after it; every test in flight hit Timeout >120.0s. Each child's 120 s deadline equalled the suite's --timeout, so pytest-timeout always fired first and the child's own deadline never named the stall. One module-scoped child now runs all four cases and prints a verdict per case, the module has its own xdist group so it lands on one worker, and the child's deadline is half the test's own timeout (kiro_crew.testing.wait.default_timeout()). Both cache cases run copies of ensure-playwright.mjs under tmp, so neither can resolve a playwright above the checkout, and the missing-routeWebSocket case also checks no HTTP route was installed before the refusal. test_capture_site_resolver_rule.py, the other design_critique module that started node per test, gets the same shape: one child over every input its five tests use. The testing conventions, the writing-tests skill and AUTOSDE's tests- are-deterministic rule now name the shape. Fixes #36261
71e0789 to
b687fc1
Compare
Problem / Motivation
Goal: Stop
test_ssrf_guard_fail_closed.pyfrom stalling LinuxBackend Tests (3.12, 7)and failing unrelated PRs.On Linux shard 7,
TestInstallSsrfGuardRuntimeandTestGetPlaywrightVersionGatefail withFailed: Timeout >120.0s(sometimes oneassert -9 == 0), together with whatever else is in flight. It has blocked at least five different PRs in seven days, none of which touchdesign_critique. Latest: job 132937923896 on #37633.Why it matters
One shard going red fails
Coverage GateandPR Readiness, so every PR whose run hits it needs a rerun, and some runs lose the runner entirely.Not a goal
ci.yml.ssrf-guard.mjsorensure-playwright.mjs.What changed (motivation → approach → change)
The four runtime tests each started their own
node. xdist sent them to four workers, so four cold Node starts (a ~100 MB binary each) began in the same second, at 98% of shard 7, on a runner near its memory ceiling. The per-test progress artifacts (linux-pytest-progress-7) of six failed attempts all show the same thing: ~50 tests a second up to that second, almost nothing for minutes after it. Passing attempts start the same four in the same second and finish the last ~530 tests in under ten seconds. Each child's deadline was 120 s against--timeout=120, so pytest-timeout always fired first and the stall was reported as bare timeouts.nodechildren per runxdist_group)--timeoutkiro_crew.testing.wait.default_timeout(), half the test timeout: 60 s on Linux, 90 s on WindowsTimeout >120.0snode did not finish the ssrf-guard probe within 60sThe one child runs all four cases and prints a verdict per case.
test_capture_site_resolver_rule.py, the otherdesign_critiquemodule that startednodeper test, gets the same shape: one child over every input its five tests use. Both cache cases run copies ofensure-playwright.mjsunder tmp, so neither can resolve a playwright above the checkout. The missing-routeWebSocketcase also checks that no HTTP route was installed before the refusal.testing-conventions.md(Determinism D8 and class 6),builtin_skills/kirocrew-dev/writing-tests/SKILL.mdand thetests-are-deterministicrule inAUTOSDE.yamlnow name this shape: one module-scoped interpreter child, deadline at half the test timeout.Backwards compatibility
Compatible: only a test file and docs change.
Removes nothing: no product code, key or path changes; the four test names are unchanged.
Tests
Proof: not provable -- test-only change
-n0; 10/10 at-n 4beside the otherdesign_critiquetests (173 tests); 5/5 in shuffled order.hostResolverRulenot bracketing IPv6.-n 4 --timeout=120, 10 rounds each, before and after interleaved:Timeout >120.0s(124-132 s)nodenever finishes startingTimeout >120.0s, 122 swithin 60s, 62 snodecall 0.2–23 sManual verification
N/A — unit coverage and the DevSpace rounds above; CI on this PR runs shard 7.
Related Issues
Fixes #36261
Sibling sweep
Swept: git grep -l 'which("node")' -- 'test/.py' 'src/kiro_crew/**/tests/.py'
Sibling: src/kiro_crew/apps/builtins/design_critique/tests/test_capture_site_resolver_rule.py -- changed here
Sibling: test/test_symbols_manifest_contract.py -- tracked in #37714
Sibling: test/test_app_frame.py -- tracked in #37714
Pattern harvest
Rule candidate: review-prompt
Pattern: several tests in one module each spawn a real
node/interpreter child, or a child deadline equals the suite's--timeoutChecklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)