Repository navigation
compass(tests): delete the tests that assert prose - #492
Conversation
Delete every test under tests/compass that opens a design document or a README, or reads a docstring or a code comment, to assert what the prose says. Assertions about behaviour or code structure that shared a test or file with them are kept; helpers, fixtures and module-level constants that only the deleted tests used go with them, including every one that read a document at import time. Whole files deleted: test_model_runner_citations.py, test_design_rpc_reply_contract.py (its one source-only test moves to test_runner_rpc_surface.py) and test_tier0_memory_goal_cites_empirical.py. test_kv_blob_doc_table.py keeps only its one-site structure test and is renamed test_kv_blob_site.py. Closes #490 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
This review is agent-authored. Review cycle 1 Verdict: APPROVE Head covered: Did any deletion remove a behaviour or code-structure assertion?No. I read every deleted and edited test at
Each other deleted assertion compares code or data against prose: a doc table, a README row, a gate comment, a docstring, or a citation's line span. The full list of deleted node ids is at the end. Two deletions are worth recording. Neither blocks:
Salvaged and renamed pins: mutation evidenceEach mutation changes one line and keeps the line count, and the runs were serial against the detached worktree. Every file was restored afterwards, and
One mutant was thrown away: commenting out Other checks
The two borderline tests flagged in the PR
Non-blocking
ponytail-reviewThe diff is 116 insertions and 1572 deletions. Every added line is a surviving test or a rename. There are no new helpers or abstractions. Lean already. Ship. Deleted node ids (base collect-only minus head, renamed ones excluded)model_runner_citations 16, design_rpc_reply_contract 10 (plus 1 moved), tier0_memory_goal 11, kv_blob_doc_table 8, runner_rpc_surface 9, memory_compare 8, cpu_gate_exclude 4, gate_gpu_surplus 4, sync_inventory 2, pipeline_minimum 1, pp_kv_shard_key 1, artifact_invalidation 1, artifact_store 1. Total 76 deleted outright, 2 salvaged. |
This reverts commit 051fc93. The caller refusal in test_the_unanswered_helper_returns_one_list_its_one_caller_partitions reads syntax-tree nodes only: import aliases, Name ids, Attribute attrs and the identity of each Call's func. It reads no docstring, comment or design document, so it stays under #489. The __doc__ assertions that were deleted by #492 were never part of it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Hardens the tests under tests/compass that inspect code structure so they refuse the spellings they cannot read, instead of passing them. Covered: setattr, annotated and tuple targets, async def, relative imports, reply arity, the exit KV tuple, import allowlists, and a non-call mention of unanswered_rpc_names. Re-scoped under #489: every hardening that asserted docstring or comment text was dropped, and the rest was merged over #492's deletion of the prose tests. Each kept item goes red when its old guard is reinstated. CPU gate on node 18 over the combined tree of this PR, #498 and 99c6107: 5213 passed, rc 0. Closes #223 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Base update only: the tip deleted the tests that parsed doc 01 (#492). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ield Conflicts resolved, keeping both sides: - atom/compass/audit/sync_sites.json: the two router rows #478 rewrote take the tip's file, line, anchor and why, and keep the branch's mechanism K8. - atom/compass/audit/sync_scan.py: the tip deleted category_counts with the count test (#492); the branch's counts_by, which replaced it, goes with it. - tests/compass/test_sync_inventory.py: the tip deleted the stated-count test (#492); the branch's extension of it to mechanism tables goes with it. The crosstab test counts mechanisms with Counter instead of counts_by. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Dev record for #490 (implements the ruling in #489: prose is not a test subject).
Deletions only under
tests/compass/. No production code, doc or script is touched. Two structural assertions that shared a test with a prose check were split into their own small tests. One source-only test moved out of a deleted file. Every symbol listed in the brief was re-checked at42e4aa324before deletion.What was deleted, per file
test_model_runner_citations.pytest_design_rpc_reply_contract.pyaudit,stated,unpack_site,REVERTED, the module-levelDOCUMENTread, and every test that runs the paragraph throughaudittest_the_two_claims_the_paragraph_makes_without_a_numberreads onlyasync_proc.pyandengine_core.py. It moves totest_runner_rpc_surface.pyastest_the_worker_cannot_break_on_an_unpack_and_the_wait_is_unbounded, with the same assertionstest_tier0_memory_goal_cites_empirical.pytest_kv_blob_doc_table.py→test_kv_blob_site.pystated,_split_table,_doc_rows,assert_the_table_lists_what_the_backend_emits,_derived_keys,DOC,HEADER,_FIELD,_CITE, and the four doc-table teststest_each_backend_builds_the_blob_at_exactly_one_siteand_blob_site. The file is renamed because it no longer has anything to do with a doc table. The line-number citations in_blob_site's docstring are removed tootest_sync_inventory.pyCOUNT_TABLES,_stated_counts,test_every_stated_count_matches_the_rows, unusedPathimporttest_cpu_gate_exclude.pyREADME,test_the_readme_states_the_counts_the_list_holds, unusedreimporttest_gate_gpu_surplus.pyREADME,_base,test_the_readme_states_the_baseline_the_gate_holds,test_gate_gpu_states_the_expectation_for_a_tree_without_compass_tests, unusedreimporttest_gate_gpu_derives_the_surplus_through_the_helper(code structure ofgate_gpu.sh)test_pipeline_minimum.pyDESIGN,test_the_design_document_states_the_table_and_widths_that_were_derived, and the docstring sentence that described ittest_pp_kv_shard_key.pyREPO,DESIGN,test_the_document_states_the_split_that_was_derived, and the docstring sentence that described itnum_hidden_layers // full_attention_intervalequals the paged count fromlayer_types). It is kept astest_the_interval_count_agrees_with_the_layer_kindstest_artifact_invalidation.pyREPO,MATRIX_DOC,MATRIX_HEADING,CELL,test_the_matrix_is_the_documents_table, the docstring paragraph intest_every_cell_of_the_matrix_decides_by_itselfthat pointed at it, unusedpathlib/re/Cellimportstest_artifact_store.pyREPO,KEY_TABLE_DOC,ROW,words,test_the_six_artifacts_are_the_ones_the_key_table_declares, unusedreimportset(KEY_FIELDS) == set(Kind)is kept astest_every_kind_declares_its_key_fieldstest_runner_non_allocating.pyast.get_docstring(runner)assertionstest_the_docstring_names_every_attribute_that_holds_the_ringis kept, renamedtest_exactly_two_attributes_of_the_runner_hold_the_ring.test_the_overrides_bind_no_attribute_that_could_hold_a_tensorkeeps its binding assertiontest_runner_rpc_surface.pyPACKAGE_DOC,UNWAITED,_refusal_comment,CITATION,COUNT_WORDS,_bullets,_modules,_stated_module_counts,_cite,_imported,_engine_imports, unusedre/resolve_nameimports, and the eight tests the brief lists by nametest_what_the_comment_says_a_hole_at_exit_loses_is_what_exit_doeskeeps itsModelRunner.exitAST assertions, renamedtest_what_a_hole_at_exit_loses_is_what_exit_does.test_the_unanswered_helper_describes_its_whole_return_and_not_one_halfkeeps its single-caller and partition assertions, renamedtest_the_unanswered_helper_returns_one_list_its_one_caller_partitionstest_memory_compare.py_TAGS,PACKAGE,test_no_module_in_the_package_carries_a_design_reference,test_the_guard_catches_the_forms_that_were_actually_removed,test_what_the_pattern_matches_beside_its_targets_is_on_record, unusedpathlib/re/memory_packageimportsListed in the brief but kept, and why
test_pp_kv_shard_key.py's interval check,test_artifact_store.py'sKEY_FIELDScheck, andtest_design_rpc_reply_contract.py's source-only test.Missed by the brief
tests/compass/for other reads of source text, comments and docs. Two judgement calls stay, for the reviewer to confirm:test_cpu_gate_exclude.py::test_every_manual_entry_states_whychecks that each MANUAL entry incpu_gate_exclude.txthas a#line above it. It checks that a reason exists, not what the reason says, in a checked-in data file the gate reads. Kept.test_runner_rpc_surface.py::test_the_profiler_replies_are_forwarded_whole_and_never_unpackedscans source for the stringtrace_dir, which matches comments too. Its subject is which code produces the reply's keys. Kept.Named result
(1) The brief's grep at the head (
grep -rnE '\.md\b|__doc__|get_docstring' tests/compass) matches three lines:test_gate_cpu_pipe_identity.py, module docstring andDOC: the stringscripts/compass/README.mdis asserted to appear ingate_cpu.sh's rendered failure output. The test runs the gate'sprintfblock through bash and never opens the README. It tests the gate script's output, so it is a behaviour test under docs(compass): prose is not a test subject; no line numbers or item counts; the kind of claim decides a doc-code disagreement #489. It stays.test_capture_real_model.py,argparse.ArgumentParser(description=__doc__): a script entry point's help text. Nothing asserts on it. It stays.(2)
scripts/compass/gate_cpu.shon node 18 (containerxiaobizh_n18_cpu). Each side was agit archivesnapshot with.compass-commit/.compass-changedstamps.PYTHONPATHpointed at its own root, andatom.__file__was verified under it. The two sides ran one after the other.42e4aa324154a6114cDifference: 74 passed. That matches a collect-only diff of the touched files on the two snapshots: 76 nodes deleted outright and 2 nodes added (the two split-out assertions above), a net of 74. Renamed and moved tests count on both sides and cancel out. Per file: model_runner_citations 16, design_rpc_reply_contract 11 (one of which moved to rpc_surface), tier0 11, kv_blob 8, runner_rpc_surface 9, memory_compare 8, cpu_gate_exclude 4, gate_gpu_surplus 4, sync_inventory 2, pipeline_minimum 1, pp_kv_shard_key 1, artifact_invalidation 1, artifact_store 1. The skipped and xfailed counts are unchanged, and no flake re-run was needed.
ruff checkandblack --checkare clean on every touched file.Left undone (filed as #491)
Out of this PR's file set:
atom/compass/artifacts/matrix.py's module docstring still names the deletedtest_the_matrix_is_the_documents_table. Design docs01and03still say a test holds their tables.sync_scan.category_countsnow has no caller.Closes #490
🤖 Generated with Claude Code