Repository navigation
test(dashboard): give the slots-flush read budget its own SEL audit window - #29588
iamwhatever wants to merge 1 commit into
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: this is a test-only fix that isolates the module-global dedup state causing the cross-test leak. Notes
[DESIGN-REVIEWED] 3bcf57b Description read[DESCRIPTION-READ] 308cae60fa033ae52cfeb03bc2385bc8ba4da8eb2304b4b5468bfe733d6ef183 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 |
Opus 5.5 Review — ✅ no blocking findingsReviewed 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: |
|
Superseded by #29549 (merge 82dc9d7), which counts facade reads only on the test thread. The extra |
Problem / Motivation
Goal:
test_one_slots_flush_stays_under_its_per_slot_facade_read_ceilingmeasures only per-row facade reads, so it stops failing on Windows when nothing per-row changed.On Backend Tests (Windows) shard 3 the test fails on unrelated PRs (#29516, #29524, #29528, #29368, #29430, #29537) with
one slots flush costs 6.005 facade reads per slot (ceiling 6):__path__is read 401 times for 200 extra slots instead of 400.Why it matters
Every PR whose Windows shard 3 lands this test goes red for a reason it did not cause, and a rerun can fail again on the same head. Authors lose time and stop trusting the read budget.
Not a goal
SLOTS_FLUSH_READS_PER_SLOTstays 6, still an integer bar).What changed (motivation → approach → change)
Cause. Each slots frame sent to a dashboard socket records one grant audit, deduplicated per 5-minute window in
ws_event_scope._sel_last_audit. That dict is module state, shared by every test on the worker. When an earlier test opened the window, it can close in the middle of this test. The flush that crosses it runsfrom kiro_crew.sel import sel(a facade), which reads__path__once. When that flush is the measured 400-slot one, the count is 401 instead of 400. The single warm call cannot absorb it, because the window was opened by another test. Windows hits it because its shard timing puts the expiry there.Change. The test gets its own dedup dict and a window that never closes. The one audit lands in the first warm call, and the measured flushes count only per-row reads.
Backwards compatibility
Compatible: test-only change.
Removes nothing: the diff only adds two
monkeypatch.setattrlines to one test.Tests
test/test_facade_read_budget.py, both tests:ws_event_scope.time.monotonic301 s): the test on main fails with6.025 facade reads per slot (ceiling 6); with this change it passes. Clearing the dedup dict at that point on main reproduces the CI message exactly (6.005,__path__ 401).serialize_slotsstill fails with this change:one slots flush costs 7.0 facade reads per slot (ceiling 6).Proof: not provable -- test-only change
Manual verification
N/A — the failure is Windows-only and cannot run here (Linux host); the forced-expiry repro above shows the same count on Linux, and CI's Windows shard confirms.
Related Issues
Fixes #29534
Checklist