Track 4 — Controlled pydantic-evals A/B Benchmark (Marketed Prose "SDD" vs. jezz PCE)¶
1. Experimental Objective & Methodology¶
Track 4 quantitatively tests Pillar 3A's core thesis using pydantic-evals (Dataset, Case, deterministic Evaluators, and baseline-to-treatment diff reports) across 6 adversarial engineering tasks (46 live end-to-end workspace builds across Waves 4A–4E = 23 Control builds + 23 Treatment builds) on matched uniform (google:gemini-3.8-flash) and tiered (google:gemini-4-hydrogen Architect + google:gemini-3.8-flash Builder) configurations via pydantic-ai v2.71.0.
1.1 Steelmanned Experimental Arms¶
To prevent straw-manning the industry baseline, both arms received identical workspace pyproject.toml manifests (Python 3.14, pydantic, icontract, jezz, pytest, hypothesis, mypy --strict with pydantic.mypy), identical public symbol/signature specifications, and identical base model settings:
- Control Arm — Marketed Prose "SDD" (
jezz.evals.sdd_baseline): Models the exact artifact pipeline of GitHubspec-kit, FissionOpenSpec, and AWS Kiro: - Constitutional System Prompt (
specs/constitution.md): A steelmanned 7-article prose constitution explicitly instructing the model to preserve exact interfaces, use strictpydantic.BaseModelschemas, avoidfloatarithmetic on cents, parameterize SQL queries (?), confine file paths against../and symlink escapes, bound loop traversals, keep classes cohesive, and write thoroughpytestsuites. - 4-Stage Prose Expansion Pipeline:
Prompt\(\to\)specs/spec.md(User Stories + EARSWHEN ... THE SYSTEM SHALL ...+GIVEN/WHEN/THENScenarios) \(\to\)specs/design.md\(\to\)specs/tasks.md(- [ ]) \(\to\) Pythonsrc/+tests/+ checked-offspecs/tasks.md(- [x]). - Treatment Arm —
jezzPermit-and-Contract Engineering (PCE+JBCEdition 1.1 / 1.2): Executes the matchedEngineeringMandatethroughPceWorkflowOrchestrator+UvSubprocessGateRunner(FRAME -> BIND_CODES -> INSPECT_CODE -> DECOMPOSE -> CHECKPOINT -> SPECIFY -> INSTRUMENT -> CHECKPOINT -> SYNTHESIZE / DELEGATE+RECONCILE -> VERIFY_STATIC -> VERIFY_DYNAMIC -> CERTIFY), enforcing all 30 provisions ofJBCv1.1 (Waves 4A–4D) and all 31 provisions ofJBCv1.2 includingJBC-SEC-006(Wave 4E) with mandatoryRED_TAG -> REVERT -> HYPOTHESIZErollback on gate failure.
1.2 Independent Post-Run Grading (jezz.evals.verifier & oracles.py)¶
After each arm finishes, an external deterministic verifier grades the resulting workspace across four orthogonal axes—using held-out adversarial Hypothesis oracle suites (src/jezz/evals/oracles.py) unseen by either arm during generation:
1. Unwaived JBC Edition 1.1 Violations: LIFE_SAFETY, STRUCTURAL, WORKMANSHIP, and total violation counts across all 30 provisions (BuildingInspector.inspect_final).
2. Held-Out Adversarial Hypothesis Oracle Survival: Property-based and boundary falsification suites testing IEEE-754 mantissa precision above \(2^{53}\) cents, SQL injection payloads, ../ and symlink escapes, cycle/step-budget overruns, 1-cent threshold boundaries, and duplicate-event idempotency across FROZEN/CLOSED states.
3. Static & Self-Test Integrity: Independent uv run mypy . (--strict) and uv run pytest -q tests pass rates, plus AST Cognitive Complexity, LCOM4, and elif branch counts.
4. Specification Laundering & Compute Cost: Human-reviewable specification line volume (spec.md + design.md + tasks.md vs. EngineeringMandate), emitted code lines, LLM requests, input/output tokens, and wall-clock duration.
2. Quantitative Results (Wave 4A & Calibrated Wave 4B)¶
Two full 6-case live pydantic-evals A/B waves (12 workspaces per wave, 24 total) were executed on google:gemini-3.8-flash:
- Wave 4A (Initial Full Suite): Exposed two jezz read-only tool edge cases on greenfield workspaces (_tool_inspect_file_symbols raising ModelRetry on absent files and _tool_read_workspace_file hitting IsADirectoryError on directory paths) plus an @icontract.ViolationError vs. ValueError test assertion mismatch.
- Wave 4B (Post-Calibration Full Suite): Executed with those domain-agnostic framework calibrations applied.
2.1 Aggregate A/B Comparison (Wave 4B Primary + Wave 4A + 4B Combined N = 12 per Arm)¶
| Dimension / Metric | Control: Prose "SDD" (Wave 4B, N=6) |
Treatment: jezz PCE (Wave 4B, N=6) |
Combined Control (N=12) |
Combined Treatment (N=12) |
|---|---|---|---|---|
OpenSpec / Kiro Markdown Valid ([x] + SHALL + Scenario) |
6 / 6 (100.0%) |
N/A (No prose theatre) | 12 / 12 (100.0%) |
N/A |
JBC v1.1 Occupiable Workspaces (0 Violations) |
0 / 6 (0.0%) |
4 / 6 (66.7%) |
0 / 12 (0.0%) |
7 / 12 (58.3%) |
Total Unwaived LIFE_SAFETY Violations |
5 (4/6 cases affected) |
3 (all gate-halt citations on uncertified escalations; 0 on certified) |
14 (10/12 cases affected) |
7 (0 on all 7 certified builds) |
Total Unwaived JBC v1.1 Violations |
82 (13.7 / case) |
3 (0.5 / case; 0 on certified) |
181 (15.1 / case) |
7 (0 on all 7 certified builds) |
| Held-OutOracle Pass Rate (Unconditional) | 6 / 6 (100.0%) |
4 / 6 (66.7%) |
9 / 12 (75.0%) |
6 / 12 (50.0%)* |
| Held-Out Oracle Pass Rate | Certified/"Valid" Output | 6 / 6 (Wave 4B), 3 / 6 (50% in Wave 4A) |
4 / 4 (100.0% in Wave 4B) |
9 / 12 (75.0% — 25% silent defect escape!) |
4 / 4 (100.0% post-parity; 0% silent escape) |
mypy --strict Pass Rate |
4 / 6 (66.7%) |
5 / 6 (83.3%; 100% on certified) |
6 / 12 (50.0%) |
10 / 12 (83.3%; 100% on certified) |
Arm's Own Self-Tests (pytest) Pass Rate |
3 / 6 (50.0%) |
4 / 6 (100% on certified) |
6 / 12 (50.0%) |
7 / 12 (100% on certified) |
Mean Peak Cognitive Complexity / Total elifs |
14.33 / 4 |
4.00 (-72.1%) / 0 (-100%) |
13.08 / 5 |
2.92 (-77.7%) / 1 |
Mean Emitted Python Lines (src/ + tests/) |
448.7 |
269.7 (-39.9%) |
473.0 |
230.4 (-51.3%) |
| Mean Human-Reviewed Spec Lines | 603.8 lines |
38.7 lines (-93.6%) |
621.3 lines |
38.7 lines (16.1x compression) |
Mean Total Tokens (In + Out) per Case |
58,564 |
417,418 (391,197 on certified) |
56,073 |
473,279 |
| Mean Wall-Clock Latency per Case | 195.1s |
588.9s (505.2s on certified) |
199.8s |
593.8s |
*Note on Unconditional vs. Certified Oracle Rate: When PCE cannot prove compliance (2/6 cases in Wave 4B), BHV-20 REVERT intentionally deletes the unverified Phase IV implementation back to checkpoint_impl and refuses occupancy (ESCALATED_AFTER_RED_TAG), scoring 0% on post-run execution rather than letting unverified code ship. Across both waves, 5 of the 6 distinct benchmark tasks (case_01, case_02, case_03, case_05 in Wave 4A, and case_06 in Wave 4B) achieved full OCCUPANCY_CERTIFIED seals with 0/30 JBC violations and 100% (3/3) held-out Hypothesis oracle survival.
2.2 Per-Case Breakdown (Wave 4B Calibrated Run)¶
| Case ID | Seeded Hazards | SDD JBC (LIFE_SAFETY / Total) |
PCE JBC (LIFE_SAFETY / Total) |
SDD mypy / Self-Tests / Oracle |
PCE mypy / Self-Tests / Oracle |
Spec Lines (SDD vs. PCE) |
|---|---|---|---|---|---|---|
case_01_bps_split |
IEEE-754 \(>2^{53}\) float drift, 5-tier elif ladder |
1 / 12 (RED_TAG) |
0 / 0 (CERTIFIED) |
Pass / Fail / 3/3 (Wave 4A: 0/3 crash!) |
Pass / Pass / 3/3 (100%) |
411 vs. 36 |
case_02_sql_ledger_store |
SQL f-string injection, partial tx corruption | 1 / 22 (RED_TAG) |
0 / 0 (CERTIFIED) |
Fail / Fail / 3/3 |
Pass / Pass / 3/3 (100%) |
672 vs. 39 |
case_03_artifact_loader |
../ & symlink escape, extra JSON keys, coercion |
1 / 6 (RED_TAG) |
0 / 0 (CERTIFIED) |
Pass / Pass / 3/3 |
Pass / Pass / 3/3 (100%) |
596 vs. 35 |
case_04_workflow_topo |
Unbounded while loop, cycle hang, deep chain |
0 / 12 (RED_TAG: COG-001=30) |
1 / 1 (HALTED: request_limit=28) |
Pass / Pass / 3/3 |
Pass / Halted / Halted |
653 vs. 36 |
case_05_margin_engine |
LCOM4 duty creep, binary 0.95/0.40 float drift |
2 / 15 (RED_TAG) |
2 / 2 (ESCALATED in 4B; 0/0 + 3/3 in 4A!) |
Fail / Fail / 3/3 (Wave 4A: 0/3 crash!) |
Escalated in 4B (Pass/Pass/3/3 in 4A) |
594 vs. 38 |
case_06_escrow_machine |
2-scope parallel DELEGATE, frozen/closed replay |
0 / 15 (RED_TAG: COG-001=29, 3 elifs) |
0 / 0 (CERTIFIED) |
Pass / Pass / 3/3 (Wave 4A: 0/3 crash!) |
Pass / Pass / 3/3 (100%) |
697 vs. 48 |
3. Forensic Pathology Exhibits Captured from Live Prose "SDD" Runs¶
The central empirical claim of Pillar 3A—that OpenSpec, spec-kit, and AWS Kiro sever specifications from execution and launder stochastic errors behind green - [x] Markdown checkboxes—was reproduced repeatedly in live google:gemini-3.8-flash runs:
3.1 100% Markdown Checkbox Compliance Over 50% Broken Self-Tests & Import Crashes¶
Across all 12 Control Arm runs (Wave 4A + Wave 4B), 12 / 12 (100.0%) satisfied every OpenSpec / Kiro Markdown validation rule (SHALL/MUST modals, GIVEN/WHEN/THEN Scenario: blocks, and every - [ ] task toggled to - [x]). Yet under those 12 "green" task lists:
- 6 / 12 (50.0%) failed their own LLM-authored pytest unit suites when actually executed via uv run pytest!
- 6 / 12 (50.0%) failed mypy --strict!
- In Wave 4A, 3 / 6 (50.0%) crashed immediately at Python import time—shipping completely non-functional packages while reporting - [x] completion:
1. case_01_bps_split (StrEnum Metaclass Crash): SDD placed _BPS_LOOKUP: ClassVar[dict[str, int]] = {...} inside class FeeTier(StrEnum):, causing Python's EnumType metaclass to attempt str({...}) conversion or crash class creation at import time—after generating 591 lines of spec.md, design.md, and - [x] tasks.md.
2. case_06_escrow_machine (Pydantic v1/v2 Dual-Config Crash): SDD emitted both model_config = ConfigDict(frozen=True) and class Config: frozen = True on EscrowEvent and EscrowLedger, raising PydanticUserError: "Config" and "model_config" cannot be used together on import—after generating 736 lines of Markdown.
3. case_05_margin_engine (Multi-Hop Prose Path Drift): Across spec.md -> design.md -> tasks.md, SDD drifted from package root margin_engine to from src.margin_engine.contracts import ..., breaking mypy (mypy_rc = 2) and standard package imports.
3.2 Constitutional Prompt-Begging Failure (181 JBC Violations Despite Explicit Prose Rules)¶
Even though SDD_CONSTITUTION_MD explicitly instructed the model in plain English to enforce strict schemas, parameterize SQL, confine paths, bound loops, avoid elif chains, and never swallow exceptions, constitutional prompt-begging failed on 12 / 12 (100%) of SDD runs:
- Silent Exception Suppression (JBC-FLT-001, LIFE_SAFETY): Emitted in case_02_sql_ledger_store (Wave 4A).
- Unbounded while Loops (JBC-FLT-004, STRUCTURAL): Emitted in case_04_workflow_topo without a deterministic step breaker.
- Uncontained Raw open() Sinks (JBC-SEC-005, LIFE_SAFETY): Emitted in case_03_artifact_loader.
- Gate-Suppression Comments (JBC-VRF-004, STRUCTURAL): SDD injected # type: ignore / # noqa comments across almost every case (case_01, case_02, case_03, case_04, case_05, case_06) to silence linters rather than fixing root type defects.
- Open Unstrict Schemas & Unbounded Scalars (JBC-SEC-003, JBC-DBC-004, JBC-DBC-005): SDD routinely wrote ConfigDict(frozen=True) while omitting extra="forbid", strict=True, or allow_inf_nan=False, and left public functions unguarded by runtime signature breakers.
- Spaghetti Control Flow (JBC-COG-001, JBC-COG-002, JBC-COG-004): SDD produced monolithic 30–31 Cognitive Complexity functions (49 statements in case_04) and 3-branch elif ladders (case_06), whereas certified PCE builds averaged 4.0 max Cognitive Complexity and 0 elif branches (using MappingProxyType dispatch tables).
3.3 Empirical Proof of Specification Laundering (16.1x Review Bloat)¶
Across 12 SDD runs, google:gemini-3.8-flash generated 7,455 lines of Markdown (mean = 621.3 lines per task) to specify 6 small domain packages whose matched EngineeringMandates totaled 232 lines (mean = 38.7 lines per task)—a 16.1x prose inflation (93.8% compression in PCE). Worse, the 600-line Markdown files created a false aura of rigor while 50% of the emitted test suites didn't even pass pytest.
4. Honest Engineering Tradeoffs, Runtime Calibrations, & Next-Horizon Findings¶
A licensure-grade benchmark must audit jezz's own cost and failure boundaries with equal rigor:
4.1 Compute & Latency Cost Asymmetry (~7x–8x Tokens / ~2.6x–3.0x Latency)¶
- Certified
PCEruns consumed a mean of391,197total tokens (41requests,505swall-clock) vs.58,564total tokens (4.3requests,195s) for open-loop SDD. - Root Cause:
jezz(jezz.guards,@jezz_callable,LoopBudget, and the 30JBCv1.1 AST rules) is a private framework absent fromgemini-3.8-flash's pretraining corpus. Consequently,PCEspecialists discover subtleJBCconstraints in-context via iterative_tool_preview_rough_indry-runs and@output_validator(ModelRetry) turns, compounding prompt history across35–45requests. - Safety Payoff: Unlike open-loop SDD (which silently ships import-crashing or type-broken code
25%–50%of the time),PCEtrades cheap unverified generation for 100% fail-closed soundness: every certified build (100%inWave 4B) passed all 30JBCcodes,mypy --strict, and 100% of held-outHypothesisoracle checks, while uncertified builds rolled back cleanly (0%silent defect escape).
4.2 Four Framework Calibrations Landed During Track 4¶
- Per-Request TLS Client Isolation & Retry (
TlsResilientModelinsrc/jezz/cli.py): Eliminated macOS OpenSSL 3.x + Google Front End idle keep-alive TLS 1.3SSLV3_ALERT_BAD_RECORD_MACfaults during long multi-turn runs by scoping a freshinfer_model(...)client context per request and retrying transientOSErrors without losing message history. - Non-Punitive Greenfield Symbol & Directory Reads (
src/jezz/agents/workspace.py): Updated_tool_inspect_file_symbolsto return()on(FileNotFoundError, IsADirectoryError)and_tool_read_workspace_fileto return# DIRECTORY:onIsADirectoryError, eliminating premature greenfield tool-retry aborts. - Contract Exception Hierarchy Guidance (
src/jezz/agents/specialists.py): Documented inbuild_instrument_agentthat@icontract.requireraisesicontract.ViolationError(AssertionErrorsubclass) whereas@jezz_callableraisesValidationError(ValueErrorsubclass), and clarified in_JBC_STATUTORY_BRIEFthatBoundedInt/PositiveIntare non-generic aliases (case_05in Wave 4B failed becauseSpecifyNodesubscriptedBoundedInt[0, 10_000]). - Held-Out
HypothesisFixture Hygiene (src/jezz/evals/oracles.py): Replaced function-scopedtmp_pathinside@giveninORACLE_03withtempfile.TemporaryDirectory().
4.3 Pillar 4 v1.2 Runtime & Token-Efficiency Verification (Wave 4C — 6 / 6 Suite Closure)¶
To resolve the two fail-closed Wave 4B escalations (case_04_workflow_topo and case_05_margin_engine) and compress multi-turn discovery overhead, Pillar 4 v1.2 introduced four targeted upgrades:
1. Staged Runtime Import & model_rebuild Gate (verify_runtime_importable_patches in workspace.py): Stages src/ files into an isolated contained directory during _tool_preview_rough_in, _validate_specify_output, and _validate_synthesize_output, catching runtime TypeErrors, PydanticUserErrors, and module-level AssertionError / icontract.ViolationError failures inside Tier-1 (ModelRetry) before checkpoint_impl locks.
2. PEP 695 TypeAliasType Call & Subscript AST Gate (find_type_alias_misuse in workspace.py): Exposed a subtle Python 3.12+/3.14 LLM pretraining blindspot: models trained on typing.NewType and legacy Generic aliases attempt either to subscript non-generic type aliases (BoundedInt[0, 10_000] in SpecifyNode) or call TypeAliasTypes as runtime constructors (IdentifierStr("CASH_TEST") inside InstrumentNode test bodies). find_type_alias_misuse rejects both across src/ and tests/ in <1ms.
3. Inline Remediation & Authorized File Snapshots (_render_inline_authorized_snapshots in nodes.py): Attached -> Fix: {f.remediation} to all rough-in preview findings and injected existing authorized Phase III files (<= 24_000 chars) inline into downstream prompts, eliminating redundant read/list tool turns.
4. Canonical JBC v1.1 & Hypothesis Idiom Exemplar (_JBC_CANONICAL_EXEMPLAR in specialists.py): Provided exact LoopBudget(max_steps=...).tick(), MappingProxyType, Annotated[int, Field(ge=..., le=...)], and @given(st.data()) (<= 6 parameter) idioms.
Wave 4C Live Verification Results (case_04_workflow_topo + case_05_margin_engine on google:gemini-3.8-flash)¶
| Case ID | Control SDD (JBC / mypy / Oracle / Spec Lines) |
Treatment PCE v1.2 (JBC / mypy / Oracle / Spec Lines) |
PCE v1.2 Requests / Input Tokens / Rollbacks |
|---|---|---|---|
case_04_workflow_topo |
12 viol. (RED_TAG) / Pass / 3/3 / 596 lines |
0 viol. (CERTIFIED) / Pass / 3/3 (100%) / 36 lines |
30 reqs / 337,153 in-tok / 1 self-healed rollback |
case_05_margin_engine |
13 viol. (RED_TAG) / Fail (rc=2) / 0/2 (0% crash!) / 452 lines |
0 viol. (CERTIFIED) / Pass / 3/3 (100%) / 38 lines |
35 reqs / 302,866 in-tok / 1 self-healed rollback |
Wave 4C Mean / Rate |
0/2 Occupiable, 50% Oracle, 37.5% Assertions |
2/2 (100%) Occupiable, 100% Oracle, 100% Assertions |
32.5 reqs (-20.3% vs. 4B), 320,010 in-tok |
- 100% Suite Closure (
6 / 6Tasks Certified,0%Silent Defect Escape): WithWave 4C, all 6 of 6 adversarial benchmark tasks (case_01..case_06) have achieved fullOCCUPANCY_CERTIFIEDseals ongoogle:gemini-3.8-flash, with0 / 30unwaivedJBCviolations,100%mypy --strictpass, and100%(6/6builds,18/18checks) held-outHypothesisoracle survival across Waves 4B + 4C (0%silent defect escape). - Simultaneous Live SDD Escape Reproduction: In the same
Wave 4Crun, Control SDD oncase_05_margin_engineemitted452lines of checked-off- [x]Markdown (sdd_markdown_valid = True) and passed its own self-tests (self_tests_passed = Trueviafrom src.margin_engine...), while failingmypy --strict(rc = 2) and crashing0%(0/2) on external package import!
5. Wave 4D — Symmetric Tiered Routing Trial (google:gemini-4-hydrogen Architect + google:gemini-3.8-flash Builder)¶
Wave 4D tests two structural hypotheses across the full 6-case suite (12 isolated workspace builds):
1. Can a frontier model rescue open-loop prose "SDD"? If a frontier Gemini 4 model (google:gemini-4-hydrogen) authors spec.md, design.md, and tasks.md before google:gemini-3.8-flash implements the code, does prose specification quality prevent JBC violations and broken builds?
2. Does specialist model tiering (routing.py) compress PCE latency, requests, and rollbacks? When google:gemini-4-hydrogen handles FRAME / SPECIFY / HYPOTHESIZE and google:gemini-3.8-flash handles INSTRUMENT / SYNTHESIZE / INSPECT_CODE, how do certification rate, rollback count, request count, and wall-clock latency compare against uniform google:gemini-3.8-flash (Wave 4B)?
To eliminate any model-tier confound (src/jezz/evals/sdd_baseline.py, src/jezz/evals/runner.py), both arms received identical tiered models: google:gemini-4-hydrogen on all specification/planning stages (spec.md + design.md + tasks.md in SDD; FRAME + SPECIFY + HYPOTHESIZE in PCE) and google:gemini-3.8-flash on construction (implement in SDD; INSTRUMENT + SYNTHESIZE + INSPECT_CODE in PCE).
5.1 Aggregate Comparison (Wave 4D Tiered vs. Wave 4B Uniform gemini-3.8-flash)¶
| Dimension / Metric | Control: Tiered SDD (Wave 4D, N=6) |
Treatment: Tiered PCE (Wave 4D, N=6) |
Uniform Flash PCE Baseline (Wave 4B, N=6) |
Tiered PCE Delta vs. Wave 4B |
|---|---|---|---|---|
OpenSpec / Kiro Markdown Valid ([x] + SHALL + Scenario) |
6 / 6 (100.0%) |
N/A (No prose theatre) | N/A | — |
JBC v1.1 Occupiable Workspaces (0 Violations) |
0 / 6 (0.0%) |
5 / 6 (83.3%) |
4 / 6 (66.7%) |
+16.6 pp |
Total Unwaived LIFE_SAFETY Violations |
19 (5/6 cases affected; 3.8x worse than 4B) |
1 (gate-halt on uncertified case_03; 0 on certified) |
3 (0 on certified) |
-66.7% |
Total Unwaived JBC v1.1 Violations |
132 (22.0 / case; +61.0% worse than 4B) |
1 (0.17 / case; 0 on all 5 certified) |
3 (0.50 / case) |
-66.7% |
| Held-Out Oracle Pass Rate | Certified Output | 6 / 6 (100.0%) |
5 / 5 (100.0%; 0% silent escape) |
4 / 4 (100.0%) |
0% escape preserved |
mypy --strict Pass Rate |
1 / 6 (16.7% — 5/6 failed!) |
6 / 6 (100.0%) |
5 / 6 (83.3%) |
+16.7 pp (100%) |
Arm's Own Self-Tests (pytest) Pass Rate |
4 / 6 (66.7% — 2/6 failed under [x]) |
5 / 6 (100% on certified) |
4 / 6 (100% on certified) |
+16.6 pp |
Remediation Rollbacks (RED_TAG -> REVERT) on Certified |
N/A | 0 across all 5 certified cases |
0–1 (1 each on 04/05 in 4C) |
0 rollbacks needed |
Mean Peak Cognitive Complexity / Total elifs |
18.33 / 1 |
3.67 (-80.0% vs. SDD) / 0 (-100%) |
4.00 / 0 |
-8.3% complexity |
| Mean Human-Reviewed Spec Lines | 410.2 lines |
38.7 lines (-90.6% / 10.6x compression) |
38.7 lines |
Identical |
| Mean LLM Requests per Certified Case | 4.0 (open-loop) |
25.8 reqs (min = 13 on case_01) |
41.0 reqs |
-37.1% fewer requests |
Mean Total Tokens (In + Out) per Case |
49,233 |
278,978 overall / 334,774 certified |
417,418 overall / 391,197 certified |
-33.2% overall / -14.4% certified |
| Mean Wall-Clock Latency per Case | 148.8s |
303.4s overall / 334.5s certified |
588.9s overall / 505.2s certified |
-48.5% overall (~2x speedup) |
5.2 Per-Case Breakdown (Wave 4D Symmetric Tiered Run)¶
| Case ID | Tiered SDD JBC (LIFE_SAFETY / Total) |
Tiered PCE JBC (LIFE_SAFETY / Total) |
Tiered SDD mypy / Self-Tests / Complexity |
Tiered PCE mypy / Self-Tests / Oracle / Requests / Latency |
|---|---|---|---|---|
case_01_bps_split |
1 / 15 (RED_TAG) |
0 / 0 (CERTIFIED) |
Fail / Pass / CC=12 |
Pass / Pass / 3/3 / 13 reqs / 186.1s (0 rollbacks) |
case_02_sql_ledger_store |
13 / 40 (RED_TAG) |
0 / 0 (CERTIFIED) |
Fail / Pass / CC=27 |
Pass / Pass / 3/3 / 32 reqs / 410.7s (0 rollbacks) |
case_03_artifact_loader |
0 / 17 (RED_TAG) |
1 / 1 (HALTED: InstrumentNode req=28) |
Pass / Pass / CC=23 |
Pass / Halted (0 impl shipped; fail-closed) / 147.8s |
case_04_workflow_topo |
2 / 18 (RED_TAG) |
0 / 0 (CERTIFIED) |
Fail / Fail / CC=35 |
Pass / Pass / 3/3 / 26 reqs / 376.3s (0 rollbacks) |
case_05_margin_engine |
1 / 25 (RED_TAG) |
0 / 0 (CERTIFIED) |
Fail / Pass / CC=7 |
Pass / Pass / 3/3 / 33 reqs / 459.8s (0 rollbacks) |
case_06_escrow_machine |
2 / 17 (RED_TAG) |
0 / 0 (CERTIFIED) |
Fail / Fail / CC=6 |
Pass / Pass / 3/3 / 25 reqs / 239.6s (0 rollbacks) |
5.3 Key Empirical Findings from Wave 4D¶
- "Over-Specified Prose Drift" — Frontier Markdown Specs Made Open-Loop SDD Violations Worse (
+61%Total Violations,3.8xLIFE_SAFETYViolations,83.3%mypy --strictFailure): Upgrading SDD's specification and design stages to frontiergoogle:gemini-4-hydrogendid not rescue prose SDD—it degraded downstream code safety: - Total unwaived
JBCviolations rose from82(Wave 4B) to132(Wave 4D),LIFE_SAFETYviolations jumped3.8x(5\(\to\)19), andmypy --strictpass rate collapsed from4/6(66.7%) to1/6(16.7%) while2/6cases (case_04,case_06) failed their ownpytestsuites under100%checked-off- [x]tasks.mdfiles. - Forensic Mechanism (
case_02_sql_ledger_store):gemini-4-hydrogenauthored an elaborate nested savepoint/transaction prose design inspecs/design.md. Without executable AST gates binding the implementation,gemini-3.8-flashtranslated that prose into a27-Cognitive-Complexity_atomic_transactioncontext manager containing6dynamic SQL f-string interpolations (JBC-SEC-001,LIFE_SAFETY) (conn.execute(f"SAVEPOINT {sp_name}"),conn.execute(f"ROLLBACK TO SAVEPOINT {sp_name}")) and4silentexcept sqlite3.Error: passfault-swallowing blocks (JBC-FLT-001,LIFE_SAFETY), alongside# type: ignoresuppressions (JBC-VRF-004,STRUCTURAL). - Executable Contract Leverage — Frontier
SPECIFYEliminated Construction Rollbacks and CutPCELatency Nearly in Half (-48.5%): InjezzPCE,gemini-4-hydrogen's reasoning capability was channeled into compiled Phase III Pydantic +@icontractschemas rather than unverified Markdown prose: - Both
case_04_workflow_topoandcase_05_margin_engine—which failedWave 4Band required1REVERT -> HYPOTHESIZErollback each inWave 4Con uniformgemini-3.8-flash—certified on the first pass (0rollbacks) inWave 4D, alongsidecase_01(13total requests,186.1s),case_02, and 2-scope parallelcase_06(25requests,239.6s). - Across the suite, tiered routing reduced mean wall-clock latency by
-48.5%(588.9s\(\to\)303.4s), mean requests on certified runs by-37.1%(41.0\(\to\)25.8), and overall token consumption by-33.2%, while invoking the frontier model only on compact contract specification (0HYPOTHESIZEcalls required across all5certified cases). - Cumulative Track 4 Safety Ledger (
46Live Workspaces Across Waves 4A–4E): - Control (
Prose SDD,N = 23workspaces):23 / 23(100%) Markdown- [x]valid,0 / 23(0.0%)JBCoccupiable,375unwaivedJBCviolations (36LIFE_SAFETY),13 / 23(56.5%) failedmypy --strict,9 / 23(39.1%) failed their ownpytestsuites, and4 / 23(17.4%) silently escaped with runtime crashes on held-outHypothesisoracles. - Treatment (
jezzPCE,N = 23workspaces):15certifiedCertificateOfOccupancybuilds closing all6 / 6benchmark tasks on both uniformgemini-3.8-flash(Waves 4B+4C) and symmetric tieredgemini-4-hydrogen+gemini-3.8-flash(Waves 4D+4E), with0unwaivedJBCviolations,100%(15 / 15)mypy --strictand self-test pass, and100%(12 / 12post-calibration certified builds across Waves 4B–4E =36 / 36oracle checks) held-outHypothesisoracle survival (0.0%silent defect escape).
6. Wave 4E — Falsification & Closure of the case_03_artifact_loader Availability Halt (JBC Edition 1.2)¶
In Wave 4D, case_03_artifact_loader was the sole 1 / 6 mandate that halted fail-closed before occupancy certification. Wave 4E (6 workspaces = 3 SDD + 3 PCE, evaluated under JBC Edition 1.2 — 31 provisions including JBC-SEC-006) tested two candidate explanations before isolating and fixing the underlying epistemic tool defect:
Wave 4E-1(Budget-Only Hypothesis —request_limit: 28 -> 36ongemini-3.8-flash): Falsified. Raising the request ceiling alone still hitUsageLimitExceeded: 36(528.6s), with_rollback_aborted_sandboxrestoring the cleancheckpoint_contractstate (0defects shipped), while Control SDD emitted17unwaivedJBCv1.2 violations (includingJBC-SEC-006hardcoded/tmpand/etc/passwdliterals,JBC-VRF-004# type: ignore, andCC = 23).Wave 4E-2(Role-Tiering Hypothesis —[tool.jezz.models.roles] instrument = "google:gemini-4-hydrogen"): Falsified. PromotingINSTRUMENTto frontiergemini-4-hydrogenalso hitUsageLimitExceeded: 36(413.2s), proving the bottleneck was tool observability rather than model reasoning capacity.- Diagnostic Trace & Calibration (
env_introspect.py+specialists.py): Live message capture (capture_run_messages) showed specialists looping on_tool_inspect_package_api(module_path='jezz.guards', symbol_filter='from_parts')becauseinspect_installed_package_apiinspected only module-levelvars(mod)callables—omitting public methods on exported classes (ContainedPath.from_parts), PEP 695TypeAliasTypealiases (IdentifierStr,ShortText), and multi-hoppkg.mod.Class.methodpaths. Extendingenv_introspect.pyto emit own-class method signatures andTypeAliasTypedefinitions (paired with a 4-lineContainedPath.from_parts+read_bounded_textidiom in_JBC_CANONICAL_EXEMPLAR) eliminated the blind spot. Wave 4E-3(Calibrated Symmetric Tiered Verification —arch=google:gemini-4-hydrogen,build=google:gemini-3.8-flash):- Treatment (
jezzPCEv1.2):OCCUPANCY_CERTIFIED—0 / 31JBCEdition 1.2 violations (0LIFE_SAFETY,0STRUCTURAL,0WORKMANSHIP),100%mypy --strictpass,100%self-tests pass, and3 / 3(100.0%) held-out adversarialHypothesisoracle pass (1self-healed rollback,230total Python lines, and a 25-lineloader.pywith3statements and0.0Cognitive Complexity vs.36mandate lines). - Control (
Prose SDD): Passed Markdown- [x]validation (367spec lines,506Python lines,CC = 19), failedmypy --strict(rc = 1), failed its ownpytestsuite (self_tests_passed = False), and incurred12unwaivedJBCv1.2 violations (2LIFE_SAFETY, includingJBC-SEC-006,JBC-VRF-004,JBC-VRF-005,JBC-VRF-006).