Skip to content

Commit 14ac78a

Browse files
committed
Merge refreshed checker-runtime base into mutual-information port
Preserve the current Gaussian-input canonicalization while adding the typed finite-table mutual-information operation and its declaration-owned checker runtime.
2 parents 2af6b96 + f67afce commit 14ac78a

46 files changed

Lines changed: 366 additions & 1069 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,33 @@ jobs:
4949
path: dist/
5050

5151
python:
52-
name: python
52+
name: python (${{ matrix.lane }})
5353
runs-on: ubuntu-latest
54-
timeout-minutes: 40
54+
timeout-minutes: ${{ matrix.timeout-minutes }}
55+
strategy:
56+
fail-fast: false
57+
matrix:
58+
include:
59+
- lane: unit
60+
timeout-minutes: 10
61+
- lane: component
62+
timeout-minutes: 15
63+
- lane: domain
64+
timeout-minutes: 15
65+
- lane: composition
66+
timeout-minutes: 25
67+
- lane: e2e
68+
timeout-minutes: 15
69+
- lane: provider
70+
timeout-minutes: 25
5571
steps:
5672
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5773
with:
5874
persist-credentials: false
5975
- uses: ./.github/actions/setup-python-tests
6076
with:
6177
python-version: "3.12"
62-
- run: make test-ordinary
78+
- run: make test-${{ matrix.lane }}
6379
env:
6480
PYTEST_ARGS: >-
6581
--junitxml=pytest.xml
@@ -69,17 +85,17 @@ jobs:
6985
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
7086
if: ${{ !cancelled() }}
7187
with:
72-
name: junit-python-3.12
88+
name: junit-python-${{ matrix.lane }}-3.12
7389
path: pytest.xml
7490
if-no-files-found: ignore
7591
retention-days: 7
7692
- if: ${{ !cancelled() }}
77-
run: mv .coverage .coverage.python
93+
run: mv .coverage .coverage.python-${{ matrix.lane }}
7894
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
7995
if: ${{ !cancelled() }}
8096
with:
81-
name: coverage-data-python
82-
path: .coverage.python
97+
name: coverage-data-python-${{ matrix.lane }}
98+
path: .coverage.python-${{ matrix.lane }}
8399
include-hidden-files: true
84100

85101
boundaries:

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ make check
2525

2626
Then open a pull request. `make setup` installs the locked development
2727
environment with the complete maintained Python backend stack. `make check`
28-
runs Ruff, mypy, and the same Lean-free ordinary pytest invocation CI uses.
28+
runs Ruff, mypy, and the same Lean-free ordinary test suite CI covers in fixed
29+
semantic groups.
2930
Open the PR once it is green, and add any explicitly relevant specialist
3031
validation called out below.
3132

Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ ORDERING_DEFAULT_SEED := --randomly-seed=17
99
PYTEST_DIAGNOSTIC_ARGS ?= --durations=10
1010
RUFF_PATHS := src tests benchmarks
1111
PYTEST_RUNNER := $(UV_RUN) python tools/pytest_lifecycle.py
12-
# Ordinary pytest used by `make check` and the CI python job.
13-
ORDINARY_PYTEST_FLAGS := -n 4 --dist worksteal --timeout=180
12+
# Fixed semantic lanes covering the Lean-free ordinary testpaths. CI runs these
13+
# independently; `make check` runs the same lanes locally in this order.
14+
ORDINARY_TEST_LANES := unit component domain composition e2e provider
1415
PUBLIC_COMMANDS := setup quick check check-external fix
1516

1617
include make/development.mk
@@ -81,9 +82,10 @@ test-e2e: ## Complete caller-visible journeys (serial, 180s).
8182
$(if $(TESTS),$(TESTS),tests/e2e) \
8283
$(PYTEST_DIAGNOSTIC_ARGS) $(PYTEST_ARGS)
8384

84-
test-ordinary: ## Lean-free ordinary pytest (same flags as CI python).
85-
$(UV_RUN) pytest $(ORDINARY_PYTEST_FLAGS) \
86-
$(PYTEST_DIAGNOSTIC_ARGS) $(PYTEST_ARGS)
85+
test-ordinary: ## Lean-free ordinary suite in the fixed CI group order.
86+
@for lane in $(ORDINARY_TEST_LANES); do \
87+
$(MAKE) test-$$lane || exit $$?; \
88+
done
8789

8890
test-compatibility: ## Supported-version import/API compatibility smoke.
8991
$(UV_RUN) pytest -n 0 --timeout=30 --timeout-method=thread \

benchmarks/tooling/codex_visibility.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,7 @@ def _codex_arguments(
463463
tool_mode: ToolMode,
464464
) -> tuple[str, ...]:
465465
arguments = [
466-
"-a",
467-
"never",
466+
"--approve-for-me",
468467
"exec",
469468
"--ephemeral",
470469
"--skip-git-repo-check",

docs/reference/capabilities/graphs/graph-distance-matrix.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ verification of the distance claim.
4343

4444
## Independent verification
4545

46-
`graph.distance_matrix.verify` consumes one stored producer result and can
47-
promote that exact matrix to `VERIFIED`. The operator-authorized checker uses
46+
`graph.distance_matrix.verify` consumes the exact producer input plus one complete
47+
typed candidate inline and can promote that matrix to `VERIFIED`. The operator-authorized checker uses
4848
only Python standard-library adjacency sets, queues, and integer distances. It
4949
does not import NetworkX or the producer package.
5050

@@ -55,9 +55,9 @@ checks. Acceptance still requires an exhaustive breadth-first traversal from
5555
every source and exact comparison of every finite distance and unreachable
5656
`null`.
5757

58-
The verification record is bound to the exact graph input artifact, matrix
59-
result artifact, schemas, semantics, checker source digest, witness format, and
60-
provider runtime. Rejection, timeout, cancellation, unavailable runtime, or
58+
The verification record is bound to the canonical graph input and matrix
59+
candidate digests, semantics, checker source digest, and provider runtime.
60+
Rejection, timeout, cancellation, unavailable runtime, or
6161
checker error remains `UNKNOWN` and cannot produce `VERIFIED`.
6262

6363
## Public composition evidence

docs/reference/capabilities/graphs/graph-maximum-matching.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
matching together with a Tutte–Berge barrier certificate. The producer remains
77
`COMPUTED`. An operator-authorized
88
`graph.invariant.maximum_matching.verify` capability may promote the exact
9-
stored result to `VERIFIED` only after independent clean-process replay.
9+
submitted `{input, candidate}` claim to `VERIFIED` only after independent
10+
clean-process replay.
1011

1112
## Exact claim and scope
1213

1314
The verifier checks one claim:
1415

15-
> The stored witness edges form a maximum-cardinality matching of the exact
16-
> stored finite simple undirected graph.
16+
> The submitted witness edges form a maximum-cardinality matching of the exact
17+
> submitted finite simple undirected graph.
1718
18-
The claim is bound to the producer input artifact, result artifact, graph
19-
semantics, result schema version, checker identity, and checker provider
20-
runtime. It does not certify a graph supplied directly by the caller, a
21-
different matching, or any theorem that uses the matching as an intermediate
22-
fact.
19+
The claim is bound to canonical producer-input and candidate digests, graph
20+
semantics, checker identity, and checker provider runtime. It does not certify
21+
a different graph or matching, or any theorem that uses the matching as an
22+
intermediate fact.
2323

2424
The producer accepts at most 64 vertices and 2,016 edges through a
2525
matching-specific graph contract. Other graph invariants retain their own

docs/reference/capabilities/graphs/graph-metric-verification.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
`graph.invariant.radius.compute` version `2` retain their existing producer
77
contracts and `COMPUTED` assurance. Operator-authorized
88
`graph.invariant.diameter.verify` and `graph.invariant.radius.verify`
9-
capabilities can promote one exact stored result to `VERIFIED` after
9+
capabilities can promote one exact submitted `{input, candidate}` claim to `VERIFIED` after
1010
independent all-sources breadth-first replay.
1111

1212
## Exact claims and conventions
1313

14-
Each verifier checks one stored producer result against the exact stored finite
14+
Each verifier checks one complete typed candidate against the exact submitted finite
1515
simple undirected graph:
1616

1717
- for a nonempty connected graph, diameter is the maximum vertex eccentricity
@@ -21,8 +21,8 @@ simple undirected graph:
2121
and returns `status = NOT_APPLICABLE`, `connected = false`, and
2222
`exactness = NOT_APPLICABLE`.
2323

24-
The claim is bound to the input artifact, result artifact, graph semantics,
25-
result schema, checker identity, checker source digest, and provider runtime.
24+
The claim is bound to canonical input and candidate digests, graph semantics,
25+
checker identity, checker source digest, and provider runtime.
2626
The verifier does not certify a directly supplied graph, an unbounded graph
2727
family, or a theorem that later uses the metric.
2828

docs/reference/testing-strategy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ Make targets that own storage, process, MCP, and Lean isolation. `make
3131
check-external` covers Lean and maintained-provider probes when those trees
3232
change.
3333

34+
Hosted CI runs that same ordinary suite as six fixed semantic lanes: `unit`,
35+
`component`, `domain`, `composition`, `e2e`, and `provider`. These are static
36+
Make targets, not path-selected or timing-planned shards; `make check` runs all
37+
six in the same order.
38+
3439
## Test ownership
3540

3641
The filesystem is the metadata. A test under `tests/domain/` is a domain test;

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dependencies = [
2323
"mcp-types==2.0.0",
2424
"networkx==3.6.1",
2525
"pydantic>=2.12,<3",
26+
"pydantic-core>=2.41,<3",
2627
"python-flint==0.9.0",
2728
"rfc8785==0.1.4",
2829
"sympy==1.14.0",

src/jacobian/adapters/mcp/guidance.py

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,41 @@
33
from __future__ import annotations
44

55
SERVER_DESCRIPTION = (
6-
"Use atomic exact and symbolic mathematics, with separate checker operations "
7-
"when independent verification is needed."
6+
"Search and run installed Jacobian exact-math operations, with separate checker "
7+
"operations for independent verification."
88
)
99

1010
SERVER_INSTRUCTIONS = (
11-
"Use Jacobian whenever a task may benefit from a specialized exact mathematical "
12-
"operation, including matrix or polynomial computation. This applies even when the "
13-
"user does not name Jacobian and shell code could also calculate the result. Unless "
11+
"Search and run the locally installed Jacobian toolbox whenever a task may benefit "
12+
"from exact computation, symbolic transformation, finite search, formal inspection, "
13+
"or independent checking, even when the user does not name Jacobian or shell code "
14+
"could also calculate the result. math.find is the authoritative local inventory; "
15+
"internet search cannot show which operations are available in this runtime. Unless "
1416
"an exact installed capability ID and its typed contract are already available, call "
15-
"math.find with a plain-language desired local mathematical outcome; no capability "
16-
"ID is required. math.run may execute a known contract directly. "
17+
"math.find with a plain-language desired local mathematical outcome. math.run may "
18+
"execute a known contract directly. "
1719
"For declaration queries explicitly targeting Jacobian's pinned CORE or MATHLIB "
1820
"environment, use the pinned mathematical operation; do not substitute repository "
1921
"search, cached Mathlib files, or a local Lean process because they may not match "
20-
"that server environment. Project-local Lean "
21-
"declarations are outside the server catalog and may require project-local tools. "
22-
"Other uses include symbolic transformation, structural analysis, examples or "
23-
"counterexamples, bounded search, Lean/Mathlib declaration search or formal-"
24-
"environment inspection, and requested independent verification. "
25-
"Do not report that no specialized mathematical operation is available without "
26-
"checking math.find. When independent checking is requested, multiple calculations "
27-
"or programs authored by the same model are not independent checker evidence. "
28-
"Search again whenever the objective or available evidence changes. "
22+
"that server environment. Project-local Lean declarations are outside the server "
23+
"catalog and may require project-local tools. Repeating the same lookup against an "
24+
"unchanged catalog returns the same operation facts; math.find is operation lookup, "
25+
"not confirmation. Merely restating an accepted value without new evidence is not a "
26+
"mathematical-tool use case. "
2927
"The model owns representation, decomposition, composition, iteration, verification "
30-
"timing, and stopping. Results keep execution status, mathematical conclusion, "
31-
"and verification record separate. No descriptor match, timeout, "
32-
"bounded or exhausted search, or failure to find a witness is a mathematical "
33-
"conclusion. Only a result with a local verification record URI is "
34-
"verified. A verification record for an input, premise, factorization, or related "
35-
"artifact does not verify a model-derived conclusion; the record must be bound to "
36-
"the exact final claim."
28+
"timing, and stopping. An operation match, timeout, incomplete search, or failure to "
29+
"find a witness is not a mathematical conclusion. Independent checking uses a "
30+
"separate checker operation; model-authored duplicate calculations are not independent "
31+
"evidence. Only a result with a local verification record URI is verified. A record "
32+
"for an input, premise, factorization, or related artifact does not verify a model-"
33+
"derived conclusion; the record must be bound to the exact final claim."
3734
)
3835

3936
MATH_FIND_DESCRIPTION = """\
40-
Search or inspect installed math tools by desired outcome or exact ID. Use when a
41-
task may benefit from exact computation, search, structural analysis, or a separate
42-
checker tool—even if shell code could also calculate the answer.
37+
Search or inspect locally installed Jacobian math tools by desired outcome or exact ID.
38+
This is the authoritative runtime inventory; internet search is not. Use when a task
39+
may benefit from exact computation, search, structural analysis, or a separate checker
40+
tool—even if shell code could also calculate the answer.
4341
4442
Forms:
4543
- `request.op="search"`: plain-language mathematical outcome (compact cards).
@@ -58,15 +56,17 @@
5856
"""
5957

6058
MATH_RUN_DESCRIPTION = """\
61-
Run one installed math tool by ID with its typed `payload`. Read the mathematical
62-
value in `output` first, then execution status. If the payload shape is unknown,
63-
inspect the exact operation with math.find, then copy and adapt one of its
64-
`invocation_examples`. Do not call math.run with an empty `payload` merely to
65-
discover required fields; the inspect result is the authoritative contract.
59+
Run one installed math tool by ID with its typed `payload`. Check execution status
60+
before treating `output` as mathematical evidence. For a completed run, interpret the
61+
operation-owned result fields and any `verification_record_uri` to determine exactly
62+
what the run established. If the payload shape is unknown, inspect the exact operation
63+
with math.find and copy its `invocation_examples`. Do not call math.run with an empty
64+
`payload` merely to discover required fields; the inspect result is the authoritative
65+
contract.
6666
6767
Ordinary tools return calculations. Independent checking uses a separate checker
6868
tool ID (for example `polynomial.identity.verify`), not a switch on the producer.
69-
Failed or incomplete runs are not mathematical conclusions.
69+
Failed, cancelled, timed-out, or incomplete runs are not mathematical conclusions.
7070
7171
Examples:
7272
- `{"capability_id":"integer.compute.gcd","payload":{"left":"84","right":"30"}}`

0 commit comments

Comments
 (0)