Repository navigation
Delete unreachable helpers and redundant tests, and lock-check CI's sync - #423
Conversation
Remove lean.project_source_revision, lean.strip_lean_comments and skeleton.source_excerpt with their __all__ entries. git grep finds no caller in autoform_cli, servers, skills, templates, docs or the bundled example, and no open PR adds one. project_source_revision had no caller at all. The strip_lean_comments tests now run the same inputs, with the same expected strings, through _without_lean_comments, which audit uses. The source_excerpt asserts only exercised the deleted helper. load_skeleton_report stays because #219 calls it, and publication_source_revision stays because #90, #378 and #411 add tests on it. focus_view is left for #90, which deletes it itself.
Remove ClaimBoard.heartbeat with the Heartbeat class and CLAIM_HEARTBEAT_S, ClaimBoard.holds, acquire's steal flag, DeclarationSkeleton.defines, and ProjectResourceCache.lease and invalidate, plus the README sentence on heartbeats. The CLI never starts a heartbeat or steals a lease, and the runtime only calls lease_resolved and invalidate_resolved. git grep finds no use outside tests in autoform_cli, servers, skills, templates, docs or the bundled example, and no open PR head adds one. The heartbeat tests and steal cases are gone. Ownership checks use a test helper over read and expired, the stale-release test plants the concurrent lease directly, and the runtime tests lease the resolved root. LeanLspSession.abort stays: 17 test calls and a test of its serialization with close have no public replacement.
TestReplServer.test_import_server, test_import_core, test_import_pool and TestLspServer.test_import_server only imported a module. The same modules are imported at module scope by test_lsp_protocol, test_batch_diagnostics, test_repl_pool_lifecycle, test_repl_core_protocol and test_plugin_runtime, and test_create_server in the same classes imports them again, so a broken import still fails collection. No open PR references these tests.
test_graph_pickles_only_public_types re-tested the standard pickle module on a plain dataclass of builtins, and test_graph_keeps_the_callers_plain_node_mapping asserted that late insertions into the caller's dict show up in children(). git grep finds no pickle, process pool or copy use in autoform_cli or servers, and no code mutates Graph.nodes after construction. Both guarded a per-Graph cache that 89b7bc2 removed. No open PR touches these lines.
The multiline-comment, fenced-block, hidden-header and one-broken-link render cases repeated coverage parsing. test_coverage.py covers each input: test_a_blank_line_inside_a_comment_cannot_shrink_the_contract, test_a_blank_line_inside_a_fence_cannot_shrink_the_contract, test_a_comment_adding_a_pipe_to_the_header_is_rejected and test_every_decomposition_link_must_resolve_not_merely_one. test_render_rejects_invalid_coverage_before_touching_output still pins that render refuses a bad contract before writing, and the missing-anchor case stays. No open PR edits or references these four tests.
The wheel test asserted that autoform_cli/lake.py and scripts/, autoform/, visualization/, servers/lean/ and servers/search/ are absent. None of those paths is in git ls-files or in any open PR head, and the wheel packages only autoform_cli and servers. The Codex prompt check for 'claim-backed workers' pinned wording no file contains. test_example_and_template_helpers_are_identical repeated the first assertion of test_example_workflows_match_the_scaffold_templates in test_skill_examples.py. test_main_plugin_surface_excludes_deicyde_orchestration now checks only the shipped skills, MCP servers and manifests, so it is renamed test_plugin_manifests_list_the_shipped_skills_and_servers. No workflow, doc or open PR diff refers to the old name.
test_skeleton.py and test_impact.py each carried a copy of _lean_toolchain_available; the second said it repeated the first. Both read the skeleton fixture's lean-toolchain, so the one copy now lives in tests/conftest.py and both modules import it. test_contract, test_lake_artifact_audit and test_lsp_protocol still import the name from tests.test_impact, which re-exports it; an import smoke test confirms all five modules see the same function. test_impact's orphaned os import goes. No marker or CI change, and no open PR edits the removed lines.
All 11 tests from tests/test_claim_cli.py now sit at the end of tests/test_claims.py. They use that file's board_repo fixture, _git, _plant_message and _plant_ref_lock in place of their own bare-repo, commit and lock helpers, and reach CLAIM_REF_PREFIX, ClaimBoard and author_claim_key through the claims module. No workflow, doc or open PR names test_claim_cli.py, and no open PR edits either file. The graph-view files and test_cli.py stay apart because #90 and #378 edit them.
The Lean indexing tables in test_lean_sources.py re-listed most of _COMMAND_HEADS; they now keep one row per rejection path: a non-identifier start, a modifier, a command head followed by nothing, a word, a colon, a bar or a binder, an unknown command the signature grammar rejects, and a multi-line command (56 to 20 commands, 27 to 16 names, 9 to 7 continuations, 11 to 10 signatures). An ast script confirms that every rejection category of the old command and name tables still has a row. test_project_create.py's package table no longer repeats every reserved root (test_every_release_has_creation_contracts pins the full set); it keeps a dependency root, a toolchain root, a toolchain extra root, a Lean sort, and case-folded spellings. The toolchain and Mathlib revision tables keep one row per rule of _LEAN_TOOLCHAIN and _valid_mathlib_revision. The C0 separator test in test_project_inspect.py keeps U+001C and U+001F on both sides. No test is removed and no open PR edits these tables.
28 tests in test_coverage.py each wrote one coverage file, called load_coverage and asserted on the summary and the reasons, lines or (line, reason) pairs. They are now rows of test_coverage_contract_is_rejected (22 rows) and test_coverage_contract_is_accepted (7 rows); each row id is the old test name, and the fragment test splits into its rejected and accepted halves. An ast script checked that every row writes byte-for-byte the contract its old test wrote, creates the same roadmap article, and expects the same reasons, substring, lines and summary fields. Tests starting between lines 550 and 660, which open PR #90 edits, and the imports and helpers at the top of the file are unchanged.
The test job ran a plain `uv sync`, which rewrites a stale uv.lock inside the runner before pytest starts. The suite's lock checks in tests/test_lock_platforms.py then read the rewritten file and passed, so a dependency or version bump without a lock refresh could merge green. With --locked, the job fails instead. The other jobs keep --frozen; one job checking is enough.
The runtime dependencies pin pymdown-extensions==11.0.1, so the dev extra's looser >=11.0.1,<12 can never select another version. uv.lock loses only the two entries for it; uv lock --check passes.
|
Review at 33724dd: nothing blocks merge. One round, read-only.
Note:
|
tests/test_skeleton.py's import list conflicted: this branch drops source_excerpt, which it deletes, and main adds stale_build_said, which stays. Nothing merged from main uses a name this branch deletes.
The table trim kept only the major part's leading-zero case (v04.30.0), so loosening the minor or patch part of _LEAN_TOOLCHAIN still passed. v4.030.0 and v4.30.00 come back, one row for each rule, as the trim meant to keep.
|
Thanks. The note is taken in 1d7a3cc: |
|
Head check: the review holds; ready to merge once CI finishes (reviewed at cd8d792; review at 33724dd).
Posted by Claude Code (348 worker session). |
- claims.py: main's new bounded `list(keys, *, timeout, progress)` stays, and holds goes as before. `import threading` stays, because #446's timeout code uses it (jackmccarthy-da spotted that git would drop it). - tests/test_claim_cli.py stays deleted. #446's seven new claim CLI tests and its stderr assertion move into test_claims.py beside the other moved CLI tests, using its board_repo fixture. - test_claims.py keeps #446's new tests ahead of the moved CLI tests. - test_impact.py keeps #449's import-closure CLI test and imports the one real-Lean gate from conftest. Nothing in autoform_cli, servers or tests uses a name this branch deletes.
|
Head check: nothing blocks merge (reviewed at 79960c6; last head check at cd8d792). It is ready once the WebKit and skeleton-suite jobs, still running, pass. 79960c6 merges main with #446 and #449. Its resolution:
Note: Posted by Claude Code (session jackmccarthy-da). |
|
Head check: nothing blocks merge (reviewed at 6ac6cfc; last head check at 79960c6). Every check passes except WebKit, which timed out installing system packages before any test ran, for the reason below. 6ac6cfc merges main a840c3f (#450 and #443). Its remerge diff is empty: Git resolved nothing and the merge adds no edits.
The WebKit job. It has hit its 15-minute limit five times, across two runs, each time inside
Running the job in the Playwright image, which the lead is testing on a scratch branch, removes the apt step. Posted by Claude Code (session jackmccarthy-da). |
#458 rewrote autoform_cli/README.md and moved its claim contract into autoform_cli/reference/claims-and-revisions.md. This branch's only README edit removed the sentence about the claim heartbeat, which it deletes, so the resolution takes main's README and removes that sentence where #458 moved it. Git saw no conflict there, because this branch never touched the reference page. No other doc names a function or class this branch removes.
|
Merged main (7677dbf, with #458) at 0585e57, at Jack's request.
Locally:
CI is running. Posted by Claude Code (session jackmccarthy-da). |
|
Head check at 0585e57 (merge of main 7677dbf, #458): nothing blocks merge. The merge leaves the PR's own diff as reviewed. Its 21 other files are unchanged line for line, and README resolved to main's text. The heartbeat sentence #423 deletes is now deleted, with the same lines, from autoform_cli/reference/claims-and-revisions.md, where #458 moved it. CI is green at 0585e57, 9 of 9: https://github.com/facebookresearch/autoform-bot/actions/runs/40060328696 Posted by PR swarm: PR Swarm Lead |
Problem
This is part of the stabilization Jack approved on 2026-10-20 (rules in #418). A read-only inventory of main found:
uv syncrewrites a stale uv.lock before the suite's lock-freshness checks run, so those checks cannot fail.Change
There is one commit per item, so any one can be dropped.
Code:
lean.project_source_revision,lean.strip_lean_commentsandskeleton.source_excerpt. Nothing outside tests calls them.ClaimBoard.heartbeatwithHeartbeatandCLAIM_HEARTBEAT_S,ClaimBoard.holds,acquire'sstealflag,DeclarationSkeleton.defines, andProjectResourceCache.leaseandinvalidate. Their tests now use the_resolvedvariants that production uses. The README sentence on heartbeats goes too.Tests:
CI:
--locked, so a stale uv.lock now fails CI instead of being rewritten.Net: 23 files, +539/-1,321.
Kept on purpose
load_skeleton_report, because Label statement approvals by the repository's code-owner review policy #219 calls it.publication_source_revision, because Scale roadmap inventories and the full DAG explorer #90, Retire generated Mermaid: a Markdown dependency summary and locked-down authored diagrams #378 and Clean up the dependency explorer's design #411 test it.focus_view, because Scale roadmap inventories and the full DAG explorer #90 deletes it itself.LeanLspSession.abort, because its tests have no public replacement.Test
uv lock --checkpasses.