Repository navigation
compass: cite code by symbol, not line number, and drop category_counts - #499
Conversation
Rewrite every prose `file.py:NNN` citation in comments, docstrings and runtime messages under atom/compass/ and tests/compass/ to a path and symbol, or delete it where the line number was its only content. The file:line strings that tests compare against recorded frames or detector output stay as they are. Also drop the matrix.py docstring paragraphs that described a deleted test, drop item counts in the comments touched, and delete sync_scan.category_counts, which has no caller left. No behaviour change. Closes #491 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
This review is agent-authored. Review cycle 1 Verdict: APPROVE Head covered: 1. No behaviour change
2. Citation accuracyI resolved every old
The prose paraphrases in
Non-blocking precision nits in
3. Kept matches are functionalOver the
All of these are functional, and the PR body lists them correctly. 4.
|
Closes #491
Text edits plus one deleted helper. No behaviour change. Under the #489 rule, code is cited by path and symbol, never by line number.
What changed
Every prose
file.py:NNNcitation underatom/compass/,tests/compass/andscripts/compass/(.pyfiles) was resolved against the cited file at8ac0dd28eand rewritten to a path and symbol (for exampleEngineCore.__init__inatom/model_engine/engine_core.py). That includes the bare:NNNfollow-on references in the same sentences. Where a sentence only carried the line number, the line number was dropped and the sentence kept its content. None of the citations turned out to be stale: each cited line was still inside the symbol the sentence describes.Item counts in the comments I touched were dropped ("Fourteen dispatched names", "seven belong to", "three of these twelve", "Nine attributes", "broadcast five times"). Counts that describe a shape a caller unpacks ("unpacks three values", "fixes its four keys") were kept, and so were counts that a test in the same place asserts.
Per file
atom/compass/runner/overrides.py: module docstring (reply contract), theRPC_SURFACEcomment block and its per-entry comments, and the_build_and_load_model,_estimate_cudagraph_overhead,get_num_blocks,capture_cudagraphandforwarddocstrings now citeAsyncIOProc.busy_loop,EngineCore.__init__,EngineCore._process_engine_step_inner,DecodeEngineCore,PPEngineCoreProc.*,Scheduler.postprocess,MemoryManagerMixin.*,LLMEngine.__init__,Config.__post_init__,StateRuntime.from_wire,RapidServeModelRunner.*andPPStageTransport.*by name.atom/compass/runner/__init__.py: theexitandprocess_kvconnector_outputbullets name the broadcasting methods.atom/compass/runner/model_runner.py: theAsyncIOProc.__init__comment.atom/compass/runner/step_output.py: the "a step that produces nothing" paragraph describes theScheduler.postprocessandScheduler.schedulereads by what they do instead of by line.atom/compass/memory/readings.py: the module docstring, and three runtimeTerm/MemoryRefusalstrings, now nameModelRunner.get_num_blocks,ModelRunner._piecewise_per_token_bytes,ModelRunner.__init__andRotaryEmbedding.atom/compass/memory/graph_pool.py: the module docstring, constant comments, two docstrings and three runtimeTermstrings now nameModelRunner._estimate_cudagraph_overhead/_piecewise_per_token_bytes.atom/compass/artifacts/matrix.py: the module docstring no longer saystest_the_matrix_is_the_documents_table(deleted in compass(tests): delete the tests that assert prose (#489) #490) opens the design document and checksMATRIXagainst it. The design-doc path went with it. The "two sevens" count sentence was also dropped.atom/compass/audit/sync_scan.py: deletedcategory_counts. Whole-tree grep (includingscripts/andtools/) found no caller; its only caller was the test compass(tests): delete the tests that assert prose (#489) #490 deleted.load_inventory, which it called, is kept becausetests/compass/test_sync_inventory.pyuses it.tests/compass/test_runner_rpc_surface.py: the docstrings from compass(tests): delete the tests that assert prose #492's review comment, plus the_aritydocstring and one comment, now citeDPEngineCoreProc._execute_dummy_batch,PPEngineCoreProc._pp_head_step/_downstream_busy_loop,LLMEngine.stop_profile,BlockManager.__init__andScheduler._warn_if_unschedulable.tests/compass/test_runner_step_semantics.py,test_kv_budget.py,test_kv_budget_engine.py,test_capture_real_model.py: docstrings and comments rewritten the same way. Intest_capture_real_model.pythe:1115references now say "site one", whichSITE_ONEpins.Remaining
[a-z_]+\.py:[0-9]+matches, and why they stayOver the
.pyfiles of the three trees, every remaining match is a functional string:tests/compass/test_capture_real_model.py:ROW_PARALLEL,VOCAB_EMBEDDING,VOCAB_LM_HEAD,SAMPLER,SITE_ONE,SITE_TWO,SITE_THREE,BUFFER_INITand the keys ofEXPECTED_HOST_RESOLUTIONS. These are recorded frame identifiers that the tests compare the capture's output against.tests/compass/test_detect_loose_refusals.py: the expected detector output lines (atom/compass/opaque.py:3 ...,tests/compass/sample.py:6 ..., and so on) over a fixture tree.Left alone because they are outside this issue's file set:
atom/compass/design/*.md(the PDES doc PRs under compass(design): revise the design documents to the PDES time model #443 rewrite them),scripts/compass/README.mdandatom/compass/audit/sync_sites.json, as the brief says.scripts/compass/regen_gpu_gate_triggers.shand the header it generates intoscripts/compass/gpu_gate_triggers.txtcitetest_moe_dp_token_capacity.py:39andtests/test_mla_index_cache.py:99-100in comments. They are prose, but they are not.pyfiles, and the.txtis generated from the.sh, so the two would have to change together. If they should be fixed, that belongs in a follow-up.Gate
Full CPU gate (
scripts/compass/gate_cpu.sh) on node 18 (xiaobizh_n18_cpu). Both trees were staged bygit archivewith stamps, md5-verified, and run one after the other, withPYTHONPATHset to each root andimport atomchecked to resolve under it:bab1a1eb9GATE_CPU_RC=0 PASSED, 5213 passed, 155 skipped, 3 xfailed8ac0dd28eGATE_CPU_RC=0 PASSED, 5213 passed, 155 skipped, 3 xfailedThe pass counts are equal, as expected: no test was added or removed. This PR fixes prose and deletes an uncalled function, so no mutation or pin applies.
black --checkandruff checkare clean on all changed files.🤖 Generated with Claude Code