Skip to content

Remove release pins and the formal-contract tooling - #547

Merged
chris-dare-dev merged 3 commits into
mainfrom
claude/remove-formal-contract
Nov 15, 2026
Merged

chris-dare-dev merged 3 commits into
mainfrom
claude/remove-formal-contract

Conversation

@chris-dare-dev

@chris-dare-dev chris-dare-dev commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

What

Closes #546. This removes arXMCP's half of the cross-repo formal contract (CLAUDE.md §4.10). Delivery moves to continuous integration against main rather than a pinned record of a tagged sibling release. The design and scope are in #546.

Three commits, one concern each. In total 23 files change: about 5,000 lines deleted and 58 added.

Commit Removes
9521a03 tools/formal_release_pin.py; the arxmcp://formal/{notebook} and /{key} resources, including the coverage-census code only they used; the retrieved_formal wrap tag; and the store's formal_releases methods. notebooks.db goes to v7, which drops formal_releases.
2843c9e tools/statement_resolve.py, tools/statement_mint.py, tools/_statement_common.py and their tests; the contract extra (mfc) and .github/workflows/contract.yml, which ran only those tests. uv.lock loses only mfc and the extra.
aa1c9c6 CLAUDE.md §4.10, the §4.1 sentences about contract.yml, and the four tools in the directory tree, as a pure deletion. Also two tests that read that text (see below).

Kept: documents.arxiv_version and tools/notebook_arxiv_version_backfill.py. They were built for the resolver's version guard, but the column is half the documents primary key and is hashed into the corpus manifest. Their comments now give that reason instead of citing the resolver.

Verification

Run on Ubuntu (Linux) at aa1c9c6, built on main at e2357bd. That main is still at notebooks.db schema 6, so this branch's v7 is the only v7. The failure baseline below was measured on main at d9ddaa8, before #539, #540 and #541 merged. No test those PRs added shows up as a failure here.

  • Migration: new TestV6ToV7Migration seeds a real v6 notebooks.db holding a notebook and a formal_releases row, reopens it, and checks user_version == 7, that the table is gone, and that the notebook row survived. The other migration tests in test_notebook_api.py pass.
  • Tests touching the store, resources and packaging: across the 41 test files that touch mcp_resources, NotebooksStore or wheel packaging, every failure is one in the baseline (the BGE-M3 download), and none is new. The backfill, wheel-packaging and dev-toolchain tests pass.
  • Full pytest: 199 failures and errors, against the baseline's 214, in this sandbox.
  • Checks: ruff check . is clean, uv lock --check passes, and python3 .github/credo_prose.py origin/main exits 0.
  • Before merge: a workstation make test.

Notes

  • The one destructive step. The store's rule against dropping tables (server/notebooks_store.py) protects user-authored notebook metadata. A pin was re-derived from a sibling repo's git tag, and CLAUDE.md recorded that none had been made on the workstation. The rule's wording now names user-authored state explicitly. Restoring an older v6 backup migrates it to v7 the same way.
  • Tests of documentation wording, which CREDO.md forbids. Two of them read §4.10:
    • test_claude_md_table_matches_live_behavior keeps its useful half: _declaration_names is still checked against the eight snippet shapes it has got wrong before. It no longer parses CLAUDE.md.
    • test_the_contract_state_date_is_not_behind_claude_md is deleted along with the dated table it compared. Its entry leaves the AGENTS.md section baseline, which may only shrink.
  • Sibling repo. bridgeland-stab-lean was built against this contract (its ADR-0001/0002/0004/0006, cross-repo issues and committed resolver output). It needs its own issue, which is drafted but not yet filed.
  • AGENTS.md is gitignored, so its §4.10 copy has to be deleted on the workstation.
  • Follow-up: server/tools.py imports jsonschema at runtime, but jsonschema was only ever declared in the removed contract extra. It still installs, transitively through mcp. This change does not alter that; a separate change declares it, as httpx is an undeclared dependency of the test suite — 60 test modules import fastapi.testclient and get httpx only by accident, transitively through the mcp SDK #377 did for httpx.

arXMCP no longer pins a sibling repo's tagged formalization or
re-serves it. Removed:

- tools/formal_release_pin.py, the CLI that pinned a topic repo's
  release into notebooks.db;
- the arxmcp://formal/{notebook} and /{key} resources, with the
  coverage census that only they used, and the retrieved_formal
  wrap tag;
- the store's formal_releases methods.

notebooks.db goes to v7, which drops the formal_releases table. The
store's rule against dropping tables exists to protect user-authored
notebook metadata; a pin was re-derived from a git tag, so the rule
now names user-authored state explicitly. A new migration test seeds
a v6 file holding a notebook and a pin, and checks that v7 drops only
the pin table.

Refs #546.
Removed the offline statement tooling that existed for the cross-repo
formal contract:

- tools/statement_resolve.py, the resolver that checked whether a
  registry quote still appeared in the corpus;
- tools/statement_mint.py, which prefilled candidate registry entries;
- tools/_statement_common.py, their shared plumbing;
- their tests;
- the `contract` extra (mfc from math-formal-contract-lean, pinned to a
  commit), and .github/workflows/contract.yml, which ran only these
  tests.

uv.lock loses only the mfc package and the extra.

Kept: documents.arxiv_version and its backfill. They were built for
the resolver's version guard, but the column is half the documents key
and is hashed into the corpus manifest. Their comments now give that
reason instead of citing the resolver.

Refs #546.
With the release pin, the formal resources and the statement CLIs
gone, CLAUDE.md described tooling that no longer exists. Deleted, with
nothing added or reworded:

- §4.10, the binding cross-repo contract boundary, including its
  "what has landed" table;
- the §4.1 sentences about .github/workflows/contract.yml;
- the four removed tools from the directory tree.

Two tests read that text and would now fail or skip forever. Both
were tests of documentation wording, which CREDO.md forbids:

- test_claude_md_table_matches_live_behavior keeps its useful half:
  _declaration_names is still checked against the eight snippet shapes
  it has got wrong before. It no longer parses the table out of
  CLAUDE.md.
- test_the_contract_state_date_is_not_behind_claude_md is deleted,
  since the dated table it compared is gone. Its section's entry
  leaves the AGENTS.md section baseline, which may only shrink.

Refs #546.
@chris-dare-dev
chris-dare-dev merged commit 9f15587 into main Nov 15, 2026
1 check passed
@chris-dare-dev
chris-dare-dev deleted the claude/remove-formal-contract branch November 15, 2026 19:16
chris-dare-dev pushed a commit that referenced this pull request Nov 15, 2026
#547 removed the contract extra, whose jsonschema entry sat next to
the runtime one this branch adds. uv.lock keeps the runtime
requirement and drops the contract one.
chris-dare-dev pushed a commit that referenced this pull request Nov 15, 2026
#547 removed the formal resources from server/mcp_resources.py, next
to where this branch adds the chunk resource. Kept the chunk resource
and dropped everything formal: the resource count becomes four, and
the read_corpus_version import goes with the code that used it.
chris-dare-dev added a commit that referenced this pull request Nov 15, 2026
server/tools.py imports jsonschema to validate lean_verify's result
against the schema it advertises, but no runtime dependency declared
it. It installed only because mcp requires it. The contract extra,
which #547 removes, was the one place it was ever named. Declare it
explicitly, at the >=4.20 floor mcp already requires, as the project
does for jinja2 and python-multipart.

uv.lock gains only the jsonschema lines; `uv lock --check` passes.

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove release pins and the formal-contract tooling

2 participants