Skip to content

Commit 76351fb

Browse files
authored
Refactor MCP SDK 2.0 boundaries and remove reasoning workflows (#956)
* refactor(sdk): preserve concrete worker contracts * refactor(mcp): stabilize tools and remove reasoning mode * refactor(eval): remove reasoning-coupled analyzers * fix(lean): parse pickle acknowledgements separately
1 parent 0052a5b commit 76351fb

191 files changed

Lines changed: 5792 additions & 13412 deletions

File tree

Some content is hidden

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

benchmarks/datasets/mathematical-benchmarks-v1/README.md

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,6 @@ both jobs; only the treatment adds the Jacobian sidecar and MCP config. This
5454
paired setup is for workflow comparison; the public dataset is not held-out
5555
evidence.
5656

57-
To isolate the external reasoning-log protocol, keep Jacobian enabled in both
58-
arms and vary only its mode:
59-
60-
```sh
61-
# Control: identical Jacobian portfolio without the log protocol.
62-
JACOBIAN_REASONING_LOG_MODE=off make agent-eval \
63-
DATASET=mathematical-benchmarks-v1 JACOBIAN_ENABLED=1 \
64-
TASKS=graph-counterexample EVAL_EXECUTE=1
65-
66-
# Treatment: identical Jacobian portfolio with required bracketing.
67-
JACOBIAN_REASONING_LOG_MODE=required make agent-eval \
68-
DATASET=mathematical-benchmarks-v1 JACOBIAN_ENABLED=1 \
69-
TASKS=graph-counterexample EVAL_EXECUTE=1
70-
```
71-
72-
Bind `reasoning_log_mode` in each runtime snapshot's condition. The normalizer
73-
requires a structurally complete `PLAN`/call-cycle/`FINAL` trace for every
74-
`REQUIRED` trial and excludes summary text from normalized evidence. Public
75-
workflow observations remain non-causal; protected runs must also freeze the
76-
model, prompt, agent version, task digests, sampling settings, and budgets.
77-
7857
To evaluate the canonical `math.find` and `math.run` surface, keep each model,
7958
task set, and prompt condition in a separate result root:
8059

@@ -93,8 +72,8 @@ tool adoption. Public-suite observations remain directional workflow evidence,
9372
not a causal performance claim.
9473

9574
Jacobian-enabled jobs collect both Codex ATIF and the Jacobian sidecar's MCP
96-
runtime log. The runtime log is authoritative for `math.find`, `math.run`, and
97-
`reasoning.write` counts and failed capability attempts; the normalizer does
75+
runtime log. The runtime log is authoritative for `math.find` and `math.run`
76+
counts and failed capability attempts; the normalizer does
9877
not infer executions from JavaScript source text. A missing configured trace or
9978
sidecar log makes the observation incomplete. Control jobs collect ATIF only
10079
because they do not start the Jacobian sidecar.

benchmarks/datasets/mathematical-benchmarks-v1/jacobian-observation.compose.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ services:
2020
- --port
2121
- "8000"
2222
- --allow-anonymous
23-
- --reasoning-log-mode
24-
- ${JACOBIAN_REASONING_LOG_MODE:-off}
2523
- --state-dir
2624
- /state
2725
volumes:

benchmarks/datasets/symbolic-coordination-v1/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ make harbor-oracle-task DATASET=symbolic-coordination-v1 TASKS="<task ids>"
5454
make harbor-check
5555
```
5656

57-
PR1 contains no comparison job, model run, post-solution audit, reasoning-log
58-
analysis, or training contract. Product-surface observations that did not block
57+
PR1 contains no comparison job, model run, post-solution audit, or training
58+
contract. Product-surface observations that did not block
5959
the pilot are recorded in [deferred capability gaps](CAPABILITY_GAPS.md).

benchmarks/schemas/held-out-manifest.schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@
118118
"id": {"const": "C2"},
119119
"role": {"const": "PRIMARY_TREATMENT"},
120120
"jacobian_enabled": {"const": true},
121-
"reasoning_log_mode": {"enum": ["REQUIRED", "AUDIT", "OFF"]},
122121
"image": {"type": "string", "pattern": "^[^@]+@sha256:[0-9a-f]{64}$"},
123122
"source_sha": {"type": "string", "pattern": "^[0-9a-f]{40}$"},
124123
"platform": {"type": "string", "pattern": "^[a-z0-9_]+/[a-z0-9_]+$"},

benchmarks/schemas/observation-evidence.schema.json

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"$id": "https://jacobian.invalid/benchmarks/schemas/observation-evidence.schema.json",
44
"title": "Jacobian Harbor workflow observation evidence",
5-
"description": "Strict normalized observation evidence v3. Binds the immutable benchmark snapshot ID and Harbor version (read from explicit job/runtime/held-out manifest bindings, never invented), normalized evaluation arguments, runtime/model/agent/repetition/budgets/results/rewards/verifier states/failures, and manifest-driven per-artifact identity. Fails closed: VALID only when execution is complete and every binding matches. The reasoning_protocol trial member is required. No v2 compatibility.",
5+
"description": "Strict normalized observation evidence v4. Binds the immutable benchmark snapshot ID and Harbor version (read from explicit job/runtime/held-out manifest bindings, never invented), normalized evaluation arguments, runtime/model/agent/repetition/budgets/results/rewards/verifier states/failures, and manifest-driven per-artifact identity. Fails closed: VALID only when execution is complete and every binding matches. No compatibility path for earlier evidence versions.",
66
"type": "object",
77
"additionalProperties": false,
88
"required": [
@@ -24,7 +24,7 @@
2424
"validation_failures"
2525
],
2626
"properties": {
27-
"schema_version": {"const": "3"},
27+
"schema_version": {"const": "4"},
2828
"evidence_class": {"type": "string", "minLength": 1},
2929
"causal_claim_authorized": {"const": false},
3030
"status": {"enum": ["VALID", "INCOMPLETE"]},
@@ -244,7 +244,6 @@
244244
"artifacts",
245245
"tool_calls",
246246
"tool_errors",
247-
"reasoning_protocol",
248247
"raw_result_digest"
249248
],
250249
"properties": {
@@ -310,7 +309,6 @@
310309
"additionalProperties": {"type": "integer"}
311310
},
312311
"tool_errors": {"type": "integer", "minimum": 0},
313-
"reasoning_protocol": {"$ref": "#/$defs/reasoning_protocol"},
314312
"raw_result_digest": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"}
315313
}
316314
},
@@ -369,7 +367,6 @@
369367
"id": {"type": "string", "minLength": 1},
370368
"role": {"type": "string", "minLength": 1},
371369
"jacobian_enabled": {"type": "boolean"},
372-
"reasoning_log_mode": {"enum": ["REQUIRED", "AUDIT", "OFF"]},
373370
"image": {"type": "string", "minLength": 1},
374371
"source_sha": {"type": "string", "pattern": "^[0-9a-f]{40}$"},
375372
"platform": {"type": "string", "pattern": "^[a-z0-9_]+/[a-z0-9_]+$"},
@@ -379,42 +376,6 @@
379376
"policy_digest": {"$ref": "#/$defs/digest"}
380377
}
381378
},
382-
"reasoning_protocol": {
383-
"type": "object",
384-
"additionalProperties": false,
385-
"required": [
386-
"status",
387-
"mode",
388-
"requirement_status",
389-
"plan_count",
390-
"before_tool_count",
391-
"after_tool_count",
392-
"final_count",
393-
"run_count",
394-
"bound_invoke_count",
395-
"missing_after_tool_count",
396-
"pending_call_count",
397-
"unavailable_after_tool_count",
398-
"reported_actual_mismatch_count",
399-
"summary_characters"
400-
],
401-
"properties": {
402-
"status": {"enum": ["COMPLETE", "INCOMPLETE"]},
403-
"mode": {"enum": ["REQUIRED", "AUDIT", "OFF", "UNKNOWN"]},
404-
"requirement_status": {"enum": ["COMPLETE", "INCOMPLETE", "NOT_REQUIRED"]},
405-
"plan_count": {"type": "integer", "minimum": 0},
406-
"before_tool_count": {"type": "integer", "minimum": 0},
407-
"after_tool_count": {"type": "integer", "minimum": 0},
408-
"final_count": {"type": "integer", "minimum": 0},
409-
"run_count": {"type": "integer", "minimum": 0},
410-
"bound_invoke_count": {"type": "integer", "minimum": 0},
411-
"missing_after_tool_count": {"type": "integer", "minimum": 0},
412-
"pending_call_count": {"type": "integer", "minimum": 0},
413-
"unavailable_after_tool_count": {"type": "integer", "minimum": 0},
414-
"reported_actual_mismatch_count": {"type": "integer", "minimum": 0},
415-
"summary_characters": {"type": "integer", "minimum": 0}
416-
}
417-
},
418379
"runtime_invariants": {
419380
"type": "object",
420381
"additionalProperties": false,

benchmarks/tooling/observation_artifacts.py

Lines changed: 2 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717
from typing import Any
1818

1919
from benchmarks.tooling.errors import HarborSuiteError
20-
from jacobian.eval.telemetry import parse_reasoning_protocol_trace
2120

2221
_MCP_TOOL_CALL = re.compile(
23-
r"\bMCP tool call tool=(math\.(?:find|run)|reasoning\.write)\b"
22+
r"\bMCP tool call tool=(math\.(?:find|run))\b"
2423
r".{0,512}?\bstatus=(success|error)\b"
2524
r".{0,512}?\brequest_digest=([0-9a-f]{16}|none)\b",
2625
re.DOTALL,
@@ -36,7 +35,6 @@ def _canonical_tool_name(value: str) -> str:
3635
aliases = {
3736
"mcp__jacobian__math_find": "math.find",
3837
"mcp__jacobian__math_run": "math.run",
39-
"mcp__jacobian__reasoning_write": "reasoning.write",
4038
}
4139
return aliases.get(value, value)
4240

@@ -611,9 +609,7 @@ def trial_artifacts(
611609
)
612610
]
613611
ignored_tools = (
614-
frozenset({"math.find", "math.run", "reasoning.write"})
615-
if runtime_logs
616-
else frozenset()
612+
frozenset({"math.find", "math.run"}) if runtime_logs else frozenset()
617613
)
618614
errors = sum(
619615
_read_trace(path, calls, ignored_tools=ignored_tools) for path in agent_traces
@@ -624,67 +620,6 @@ def trial_artifacts(
624620
return artifacts, dict(sorted(calls.items())), errors, failures
625621

626622

627-
def trial_reasoning_protocol(
628-
trial_path: Path | None,
629-
artifacts: list[dict[str, Any]],
630-
) -> dict[str, int | str]:
631-
"""Extract bounded reasoning-protocol facts without retaining summary text."""
632-
633-
empty: dict[str, int | str] = {
634-
"status": "INCOMPLETE",
635-
"plan_count": 0,
636-
"before_tool_count": 0,
637-
"after_tool_count": 0,
638-
"final_count": 0,
639-
"run_count": 0,
640-
"bound_invoke_count": 0,
641-
"missing_after_tool_count": 0,
642-
"pending_call_count": 0,
643-
"unavailable_after_tool_count": 0,
644-
"reported_actual_mismatch_count": 0,
645-
"summary_characters": 0,
646-
}
647-
if trial_path is None:
648-
return empty
649-
root = trial_path.parent
650-
candidates = [
651-
_artifact_host_path(root, artifact)
652-
for artifact in artifacts
653-
if Path(artifact["artifact_path"]).suffix in {".json", ".jsonl"}
654-
and any(
655-
marker in Path(artifact["artifact_path"]).name.lower()
656-
for marker in ("trajectory", "atif", "telemetry")
657-
)
658-
]
659-
observed: list[dict[str, int | str]] = []
660-
for path in candidates:
661-
try:
662-
protocol = parse_reasoning_protocol_trace(path)
663-
except (OSError, json.JSONDecodeError, KeyError, TypeError, ValueError):
664-
continue
665-
if isinstance(protocol, dict) and any(
666-
int(protocol.get(field, 0)) > 0
667-
for field in (
668-
"plan_count",
669-
"before_tool_count",
670-
"after_tool_count",
671-
"final_count",
672-
"bound_invoke_count",
673-
)
674-
):
675-
observed.append(protocol)
676-
if len(observed) == 1:
677-
return observed[0]
678-
if not observed:
679-
return empty
680-
combined = dict(empty)
681-
for field in empty:
682-
if field == "status":
683-
continue
684-
combined[field] = sum(int(item.get(field, 0)) for item in observed)
685-
return combined
686-
687-
688623
def artifact_source_reuse(trials: list[dict[str, Any]]) -> list[str]:
689624
"""Reject reuse of one canonical host source path across trials."""
690625

@@ -707,5 +642,4 @@ def artifact_source_reuse(trials: list[dict[str, Any]]) -> list[str]:
707642
__all__ = [
708643
"artifact_source_reuse",
709644
"trial_artifacts",
710-
"trial_reasoning_protocol",
711645
]

benchmarks/tooling/observation_comparison.py

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -89,60 +89,6 @@ def _mcnemar_exact(control: list[float], treatment: list[float]) -> float | None
8989
return float(min(1.0, 2 * tail))
9090

9191

92-
_VARYING_CONDITION_KEYS = frozenset({"id", "role", "reasoning_log_mode"})
93-
94-
95-
def _reasoning_condition_failures(
96-
control_condition: Any, treatment_condition: Any
97-
) -> list[str]:
98-
"""Validate the reasoning-log condition pair and its non-varying invariants.
99-
100-
Only applies when both arms have Jacobian enabled — a baseline
101-
comparison (control has Jacobian disabled) is not a reasoning-log
102-
isolation experiment and must not be rejected here.
103-
"""
104-
105-
failures: list[str] = []
106-
if not (
107-
isinstance(control_condition, dict)
108-
and isinstance(treatment_condition, dict)
109-
and control_condition.get("jacobian_enabled") is True
110-
and treatment_condition.get("jacobian_enabled") is True
111-
):
112-
return failures
113-
control_mode = control_condition.get("reasoning_log_mode")
114-
treatment_mode = treatment_condition.get("reasoning_log_mode")
115-
if control_mode is None and treatment_mode is None:
116-
return failures
117-
if (control_mode, treatment_mode) != ("OFF", "REQUIRED"):
118-
failures.append(
119-
"reasoning-log comparison must pair OFF control with REQUIRED treatment"
120-
)
121-
# Compare every condition field except the explicitly varying
122-
# identity, role, and reasoning_log_mode fields. Divergent
123-
# image, server_version, policy_profile, catalog_digest, or
124-
# policy_digest means the two arms used different Jacobian code
125-
# or capability portfolios and cannot support a valid
126-
# reasoning-log comparison.
127-
if isinstance(control_condition, dict) and isinstance(treatment_condition, dict):
128-
control_invariant = {
129-
k: v
130-
for k, v in control_condition.items()
131-
if k not in _VARYING_CONDITION_KEYS
132-
}
133-
treatment_invariant = {
134-
k: v
135-
for k, v in treatment_condition.items()
136-
if k not in _VARYING_CONDITION_KEYS
137-
}
138-
if control_invariant != treatment_invariant:
139-
failures.append(
140-
"reasoning-log condition invariants differ outside "
141-
"the allowed id/role/mode fields"
142-
)
143-
return failures
144-
145-
14692
def _comparison_failures(
14793
control: dict[str, Any], treatment: dict[str, Any]
14894
) -> list[str]:
@@ -177,12 +123,6 @@ def _comparison_failures(
177123
)
178124
if control.get("fixed_invariants") != treatment.get("fixed_invariants"):
179125
failures.append("fixed invariants differ")
180-
control_condition = control.get("runtime_snapshot", {}).get("condition")
181-
treatment_condition = treatment.get("runtime_snapshot", {}).get("condition")
182-
if isinstance(control_condition, dict) or isinstance(treatment_condition, dict):
183-
failures.extend(
184-
_reasoning_condition_failures(control_condition, treatment_condition)
185-
)
186126
if control.get("job", {}).get("comparison_signature") != treatment.get(
187127
"job", {}
188128
).get("comparison_signature"):

0 commit comments

Comments
 (0)