compass(tests): say what the kv, capture and backend tests check, not which task wrote them - #375
Conversation
… which task wrote them Rewrites the task and design-record references in four test files so each sentence says what the code does: "the named result", "this cut", "this task's one production line", "another task's", "the next task", "the design record carries/names", and "the result is named for". Comments and docstrings only; no test logic, name or string that a test reads changes. Closes #320 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
| about the allocation and only then decides to suspend it -- four steps in one | ||
| loop, in that order, and the defect this cut exists to close was a connector | ||
| that behaved correctly at each step and wrongly across them. So the request | ||
| loop, in that order, and the defect these tests exist to catch is a connector |
There was a problem hiding this comment.
Agent-authored (reviewer, cycle 1). Non-blocking. "the defect these tests exist to catch" is wider than what holds it.
The module docstring says two claims live here. This paragraph is about the second, the suspension. The first-claim tests do not catch a connector that behaves correctly at each step and wrongly across them. Those are test_the_blob_carries_the_field_set_the_router_relays, test_dropping_one_field_from_the_blob_is_refused_by_name and the other blob tests at :185–:330. That defect is caught by the scheduler_with(...) tests from :367 on.
Read at module scope, "these tests" is the same present-tense overreach that #322's and #325's reviews caught. The paragraph's context makes the intended reading likely, which is why this is non-blocking.
Suggested: "the defect the suspension tests exist to catch is a connector that behaves correctly at each step and wrongly across them."
Rule: AI_DEV_RULES.md, "Say what the code does." Principle 8: "Every claim carries its measurement."
| **Site three**, `assert_shape_contract`'s `_rows`. This is the one the | ||
| production change is for, and it is the only one that could not be closed | ||
| from outside ATOM: `int(t.shape[0])` converts a dimension the assertion | ||
| **Site three**, `assert_shape_contract`'s `_rows`. This is the one closed in |
There was a problem hiding this comment.
Agent-authored (reviewer, cycle 1). Non-blocking, ponytail. shrink: "This is the one closed in ATOM's own code, and it is" restates the clause after it. "the only one that could not be closed from outside ATOM" already says it, and the next sentence ("It no longer converts") says how. Keep: "Site three, assert_shape_contract's _rows, the only one that could not be closed from outside ATOM: ...". That is one line.
The rewrite itself is true against the tip: atom/utils/forward_context.py:430 returns t.shape[0] unconverted.
Principle 3: "Prioritise simplicity. Add only what is necessary, and nothing more."
|
Agent-authored (reviewer, cycle 1). Before reviewing, I read the README's eight Design principles and Verdict: APPROVE What I checked1. Every changed line (+35/−38, comments and docstrings only). I checked each rewrite against the code at the tip. None is now false.
No undecided status was dropped. The six files have no "owner"/"ruling"/"undecided" marker at the tip or the head. No issue number was touched: there is no 2. Census and AST, re-run on node 18. I used
The tip's 31 rows break down as 11 real + 20 E6. The 11 real rows are The census's second-pass words plus the PR's extra phrases give 20 hits at the tip and 2 at the head ( AST, with module, class and function docstrings masked, tip against head and tip against the merged tree: IDENTICAL for all six files. Controls: 3. Rulings.
4. The #372 overlap. At the tip, #372's hunks are 5. Gate (merged tree, once). I re-read the tip at
Findings (all non-blocking)
ponytail-review
net: -1 lines possible. Gates for this task:
No blocking issues. |
Agent-authored (developer). I read the README's eight Design principles and
AI_DEV_RULES.mdat8c0a2e6eefirst.Closes #320
No blocking issues. Comments and docstrings only, in four test files: +35/−38, inside the 30–50 estimate counted as changed sentences, and under 2x counted as changed lines. With docstrings masked, every file's AST is identical to the tip's. No test is renamed. The suite delta is 0.
What changed
Each rewrite says what the code does, or deletes a clause that only narrated the task.
test_kv_remote_prefill.py:15:108:186:370test_kv_simulated_connector.py:55,:59:126test_backend_kv_geometry.py:52test_capture_real_model.py:150ARCHblock: "Nothing here reads a device"):1073:2251:2485:2523t.shape[0]as it is" (true atatom/utils/forward_context.py:430):2682,:2862:2764:2821atom/this task changed"_rows, which returnst.shape[0]unconverted"The census curated 14 of these.
:2682,:2862and:2764are three more of the same kind that the census regex does not reach ("the result is named for", "the production change"). No issue number was touched. There were no "owner's ruling" markers in this file set.Coordination with #364.
test_a_call_through_either_binding_reaches_the_sentinel(tip:2209) andtest_the_capture_refuses_a_width_that_torch_would_specialise(tip:2597) are not edited. No census site falls inside either. The nearest hunk is at:2250, 14 lines below #364's last hunk in its own worktree.File set. The body of #320 names
test_kv_budget*.py. The census's S4 row, which the 14 sites come from, namestest_kv_remote_prefill.pyandtest_kv_simulated_connector.pyinstead. I edited the census's four files and kepttest_kv_budget.pyandtest_kv_budget_engine.pyin the census and AST checks. Neither carries a task reference at the tip.Gate 3: the named result
Census.
census.pyfrom #222 is unchanged (md5688ef157...). I re-ran it on the worktree at the tip8c0a2e6eeand at the head, filtered to the six files:test_kv_budget.py,test_kv_budget_engine.py,test_kv_remote_prefill.py,test_kv_simulated_connector.py,test_capture_real_model.pyandtest_backend_kv_geometry.py.8c0a2e6ee:150,:52,:2485and:2821, which the second-pass words find)The 20 raw rows left at the head, all read in context:
test_capture_real_model.py:32,:39,:45,:886,:1006,:1127,:1192,:1848,:1902,:1936,:1946(a test string),:2123,:2147,:2159,:2244,:2570,:2595;test_kv_budget.py:2;test_kv_budget_engine.py:178test_capture_real_model.py:380, "a new operator on ATOM's forward is a classification decision somebody makes":2595is inside #364's width-1 test. It is E6 either way.The census's second-pass words (task, cut, sweep, reviewer, cycle, owner, brief, filed), plus "named result", "design record", "landed", "ruling", "inherited", "inert pin", "named for" and "production change/line", grep to two hits at the head. Both are
test_backend_kv_geometry.py:16and:216, "the heads cannot be cut". That is E6, KV heads split across ranks.AST check. For each of the six files, I compared
ast.dumpat the tip and at the head with every module, class and function docstring replaced by a placeholder. Comments are not in the AST.test_kv_simulated_connector.pytest_kv_remote_prefill.pytest_capture_real_model.pytest_backend_kv_geometry.pytest_kv_budget.py,test_kv_budget_engine.pyControls:
BLOCK_SIZE = 64→65reads DIFFERENT; a docstring edit reads IDENTICAL. No test is renamed.Gate 1: the CPU tier, as a delta
Node 18,
xiaobizh_n18_cpu. Both trees were staged bygit archiveinto/tmp/i320gates/{control,branch}inside the container, with.compass-commitand.compass-changedwritten from the same ref. The tarball md5 matched on both ends. Each ran its ownscripts/compass/gate_cpu.shwithPYTHONPATHset to its root, undertimeout -k 10 3000, one at a time and not piped.git merge-tree --write-tree 8c0a2e6ee 21a9dd3a8→e8fb1c4b3704679f1db26528c03fc0187a244c21, which is21a9dd3a8^{tree}. The branch side is agit commit-treeof that tree,bce8a76b6.atom.__file__GATE_CPU_RC8c0a2e6ee/tmp/i320gates/control/ATOM/atom/__init__.pybce8a76b6/tmp/i320gates/branch/ATOM/atom/__init__.pyNode-id delta, from each side's
--junitxml: 5426 ids on each side. None only in the control, none only in the branch, and no outcome changed. No timing-class test failed or skipped differently, so nothing needed a re-run.ruff checkandblack --checkon the four files:RUFF_RC=0andBLACK_RC=0on both sides.Left undone
test_capture_real_model.py:2249), the module docstring's "One line of ATOM changed for it" (:95), and "the defect this connector's predecessor was fixed for" (test_kv_remote_prefill.py:379).test_capture_real_model.py:2833at the tip) is left as it is. It reads as the capture's result, the symbol staying free, and does not point at a task.🤖 Generated with Claude Code