Skip to content

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 GitHub spec-kit, Fission OpenSpec, and AWS Kiro:
  • Constitutional System Prompt (specs/constitution.md): A steelmanned 7-article prose constitution explicitly instructing the model to preserve exact interfaces, use strict pydantic.BaseModel schemas, avoid float arithmetic on cents, parameterize SQL queries (?), confine file paths against ../ and symlink escapes, bound loop traversals, keep classes cohesive, and write thorough pytest suites.
  • 4-Stage Prose Expansion Pipeline: Prompt \(\to\) specs/spec.md (User Stories + EARS WHEN ... THE SYSTEM SHALL ... + GIVEN/WHEN/THEN Scenarios) \(\to\) specs/design.md \(\to\) specs/tasks.md (- [ ]) \(\to\) Python src/ + tests/ + checked-off specs/tasks.md (- [x]).
  • Treatment Arm — jezz Permit-and-Contract Engineering (PCE + JBC Edition 1.1 / 1.2): Executes the matched EngineeringMandate through PceWorkflowOrchestrator + UvSubprocessGateRunner (FRAME -> BIND_CODES -> INSPECT_CODE -> DECOMPOSE -> CHECKPOINT -> SPECIFY -> INSTRUMENT -> CHECKPOINT -> SYNTHESIZE / DELEGATE+RECONCILE -> VERIFY_STATIC -> VERIFY_DYNAMIC -> CERTIFY), enforcing all 30 provisions of JBC v1.1 (Waves 4A–4D) and all 31 provisions of JBC v1.2 including JBC-SEC-006 (Wave 4E) with mandatory RED_TAG -> REVERT -> HYPOTHESIZE rollback 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 PCE runs consumed a mean of 391,197 total tokens (41 requests, 505s wall-clock) vs. 58,564 total tokens (4.3 requests, 195s) for open-loop SDD.
  • Root Cause: jezz (jezz.guards, @jezz_callable, LoopBudget, and the 30 JBC v1.1 AST rules) is a private framework absent from gemini-3.8-flash's pretraining corpus. Consequently, PCE specialists discover subtle JBC constraints in-context via iterative _tool_preview_rough_in dry-runs and @output_validator (ModelRetry) turns, compounding prompt history across 35–45 requests.
  • Safety Payoff: Unlike open-loop SDD (which silently ships import-crashing or type-broken code 25%–50% of the time), PCE trades cheap unverified generation for 100% fail-closed soundness: every certified build (100% in Wave 4B) passed all 30 JBC codes, mypy --strict, and 100% of held-out Hypothesis oracle checks, while uncertified builds rolled back cleanly (0% silent defect escape).

4.2 Four Framework Calibrations Landed During Track 4

  1. Per-Request TLS Client Isolation & Retry (TlsResilientModel in src/jezz/cli.py): Eliminated macOS OpenSSL 3.x + Google Front End idle keep-alive TLS 1.3 SSLV3_ALERT_BAD_RECORD_MAC faults during long multi-turn runs by scoping a fresh infer_model(...) client context per request and retrying transient OSErrors without losing message history.
  2. Non-Punitive Greenfield Symbol & Directory Reads (src/jezz/agents/workspace.py): Updated _tool_inspect_file_symbols to return () on (FileNotFoundError, IsADirectoryError) and _tool_read_workspace_file to return # DIRECTORY: on IsADirectoryError, eliminating premature greenfield tool-retry aborts.
  3. Contract Exception Hierarchy Guidance (src/jezz/agents/specialists.py): Documented in build_instrument_agent that @icontract.require raises icontract.ViolationError (AssertionError subclass) whereas @jezz_callable raises ValidationError (ValueError subclass), and clarified in _JBC_STATUTORY_BRIEF that BoundedInt / PositiveInt are non-generic aliases (case_05 in Wave 4B failed because SpecifyNode subscripted BoundedInt[0, 10_000]).
  4. Held-Out Hypothesis Fixture Hygiene (src/jezz/evals/oracles.py): Replaced function-scoped tmp_path inside @given in ORACLE_03 with tempfile.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 / 6 Tasks Certified, 0% Silent Defect Escape): With Wave 4C, all 6 of 6 adversarial benchmark tasks (case_01..case_06) have achieved full OCCUPANCY_CERTIFIED seals on google:gemini-3.8-flash, with 0 / 30 unwaived JBC violations, 100% mypy --strict pass, and 100% (6/6 builds, 18/18 checks) held-out Hypothesis oracle survival across Waves 4B + 4C (0% silent defect escape).
  • Simultaneous Live SDD Escape Reproduction: In the same Wave 4C run, Control SDD on case_05_margin_engine emitted 452 lines of checked-off - [x] Markdown (sdd_markdown_valid = True) and passed its own self-tests (self_tests_passed = True via from src.margin_engine...), while failing mypy --strict (rc = 2) and crashing 0% (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

  1. "Over-Specified Prose Drift" — Frontier Markdown Specs Made Open-Loop SDD Violations Worse (+61% Total Violations, 3.8x LIFE_SAFETY Violations, 83.3% mypy --strict Failure): Upgrading SDD's specification and design stages to frontier google:gemini-4-hydrogen did not rescue prose SDD—it degraded downstream code safety:
  2. Total unwaived JBC violations rose from 82 (Wave 4B) to 132 (Wave 4D), LIFE_SAFETY violations jumped 3.8x (5 \(\to\) 19), and mypy --strict pass rate collapsed from 4/6 (66.7%) to 1/6 (16.7%) while 2/6 cases (case_04, case_06) failed their own pytest suites under 100% checked-off - [x] tasks.md files.
  3. Forensic Mechanism (case_02_sql_ledger_store): gemini-4-hydrogen authored an elaborate nested savepoint/transaction prose design in specs/design.md. Without executable AST gates binding the implementation, gemini-3.8-flash translated that prose into a 27-Cognitive-Complexity _atomic_transaction context manager containing 6 dynamic SQL f-string interpolations (JBC-SEC-001, LIFE_SAFETY) (conn.execute(f"SAVEPOINT {sp_name}"), conn.execute(f"ROLLBACK TO SAVEPOINT {sp_name}")) and 4 silent except sqlite3.Error: pass fault-swallowing blocks (JBC-FLT-001, LIFE_SAFETY), alongside # type: ignore suppressions (JBC-VRF-004, STRUCTURAL).
  4. Executable Contract Leverage — Frontier SPECIFY Eliminated Construction Rollbacks and Cut PCE Latency Nearly in Half (-48.5%): In jezz PCE, gemini-4-hydrogen's reasoning capability was channeled into compiled Phase III Pydantic + @icontract schemas rather than unverified Markdown prose:
  5. Both case_04_workflow_topo and case_05_margin_engine—which failed Wave 4B and required 1 REVERT -> HYPOTHESIZE rollback each in Wave 4C on uniform gemini-3.8-flash—certified on the first pass (0 rollbacks) in Wave 4D, alongside case_01 (13 total requests, 186.1s), case_02, and 2-scope parallel case_06 (25 requests, 239.6s).
  6. 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 (0 HYPOTHESIZE calls required across all 5 certified cases).
  7. Cumulative Track 4 Safety Ledger (46 Live Workspaces Across Waves 4A–4E):
  8. Control (Prose SDD, N = 23 workspaces): 23 / 23 (100%) Markdown - [x] valid, 0 / 23 (0.0%) JBC occupiable, 375 unwaived JBC violations (36 LIFE_SAFETY), 13 / 23 (56.5%) failed mypy --strict, 9 / 23 (39.1%) failed their own pytest suites, and 4 / 23 (17.4%) silently escaped with runtime crashes on held-out Hypothesis oracles.
  9. Treatment (jezz PCE, N = 23 workspaces): 15 certified CertificateOfOccupancy builds closing all 6 / 6 benchmark tasks on both uniform gemini-3.8-flash (Waves 4B+4C) and symmetric tiered gemini-4-hydrogen + gemini-3.8-flash (Waves 4D+4E), with 0 unwaived JBC violations, 100% (15 / 15) mypy --strict and self-test pass, and 100% (12 / 12 post-calibration certified builds across Waves 4B–4E = 36 / 36 oracle checks) held-out Hypothesis oracle 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:

  1. Wave 4E-1 (Budget-Only Hypothesis — request_limit: 28 -> 36 on gemini-3.8-flash): Falsified. Raising the request ceiling alone still hit UsageLimitExceeded: 36 (528.6s), with _rollback_aborted_sandbox restoring the clean checkpoint_contract state (0 defects shipped), while Control SDD emitted 17 unwaived JBC v1.2 violations (including JBC-SEC-006 hardcoded /tmp and /etc/passwd literals, JBC-VRF-004 # type: ignore, and CC = 23).
  2. Wave 4E-2 (Role-Tiering Hypothesis — [tool.jezz.models.roles] instrument = "google:gemini-4-hydrogen"): Falsified. Promoting INSTRUMENT to frontier gemini-4-hydrogen also hit UsageLimitExceeded: 36 (413.2s), proving the bottleneck was tool observability rather than model reasoning capacity.
  3. 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') because inspect_installed_package_api inspected only module-level vars(mod) callables—omitting public methods on exported classes (ContainedPath.from_parts), PEP 695 TypeAliasType aliases (IdentifierStr, ShortText), and multi-hop pkg.mod.Class.method paths. Extending env_introspect.py to emit own-class method signatures and TypeAliasType definitions (paired with a 4-line ContainedPath.from_parts + read_bounded_text idiom in _JBC_CANONICAL_EXEMPLAR) eliminated the blind spot.
  4. Wave 4E-3 (Calibrated Symmetric Tiered Verification — arch=google:gemini-4-hydrogen, build=google:gemini-3.8-flash):
  5. Treatment (jezz PCE v1.2): OCCUPANCY_CERTIFIED — 0 / 31 JBC Edition 1.2 violations (0 LIFE_SAFETY, 0 STRUCTURAL, 0 WORKMANSHIP), 100% mypy --strict pass, 100% self-tests pass, and 3 / 3 (100.0%) held-out adversarial Hypothesis oracle pass (1 self-healed rollback, 230 total Python lines, and a 25-line loader.py with 3 statements and 0.0 Cognitive Complexity vs. 36 mandate lines).
  6. Control (Prose SDD): Passed Markdown - [x] validation (367 spec lines, 506 Python lines, CC = 19), failed mypy --strict (rc = 1), failed its own pytest suite (self_tests_passed = False), and incurred 12 unwaived JBC v1.2 violations (2 LIFE_SAFETY, including JBC-SEC-006, JBC-VRF-004, JBC-VRF-005, JBC-VRF-006).