Skip to content

Official Codebase of 3DCodeVerse

Python

docs: D46 — the judge is grounded in what the gates measure

gaoypenge09aa8cec243
diff --git a/harness/docs/ARCHITECTURE.md b/harness/docs/ARCHITECTURE.md
index e4fab78a..ac38ecbc 100644
--- a/harness/docs/ARCHITECTURE.md
+++ b/harness/docs/ARCHITECTURE.md
@@ -174,6 +174,7 @@ codeverse/
common.py (RunContext, Services), static_object.py (+ the detail round and the
reference-image gates), articulated_object.py (+ the planned-motion gate),
scene.py, scene_assets.py (+ cheap single-shot asset generation),
+ zone_layout.py (L2 zone director: per-zone structured layout calls + deterministic validator),
graphics.py (the whole graphics track: planner hooks, prompt context, frame
RenderSet, and recipe seeding into the harness-owned, read-only
src/recipes.glsl — measured: flash calls a recipe on disk, not one it is
@@ -339,9 +340,20 @@ crops at ≤ 1024 px, shuffled per sample. The wire schema is **observe-then-sc
(summary, strengths, issues, **defect checklist**, acceptance *before* criteria) —
criteria-first measurably compressed flash to 0.6–0.7. Every rubric carries binary
`defects` (id/text/penalty/cap); defect and acceptance votes are majority (an exact
-tie — even `n_samples` only — follows the representative sample, D36) and
-`overall = caps(weighted_mean − Σ penalties)`. Floors, deterministic caps from gate
-findings (`data["kind"]`), console errors, missing must-acceptance and
+tie — even `n_samples` only — reads as absent for a defect and follows the
+representative sample for an acceptance item, D36 as amended 2026-08-30) and
+`overall = caps(weighted_mean − Σ penalties)`. On the static track the judge's structure
+facts come from the connectivity gate's **contact ledger** (2026-08-30): `gates_section`
+renders one measured overlap line instead of the per-pair "interpenetrate by ≈d mm"
+WARN prose (1 254 such sentences on 241 stored rounds → 0), a MEASURED STRUCTURE block
+(parts / contacts / floating / deepest overlap, the plan's PLANNED JOINS as contact or
+OPEN with the gap, the lowest point above the floor) and a CONNECTIVITY PASSED paragraph
+that also forbids the interpenetration checklist claim. It is rendered from the stored
+`GateReport`, so `3dcv judge <slug>` and calibration see exactly what the in-run judge
+saw, and a round recorded before the ledger existed renders byte-identical to before
+(`ObjectPipeline.judge_context` stays empty on purpose — one source). Floors,
+deterministic caps from gate findings (`data["kind"]`), console errors, missing
+must-acceptance and
`missing_views` rules apply on top; degraded verdicts are glitches, not scores.
`PairwiseJudge` (position-swapped, tie on disagreement) also ranks N candidates via
`compare_many`; `ReferenceJudge` for image-conditioned specs.
diff --git a/harness/docs/COMPLEXITY.md b/harness/docs/COMPLEXITY.md
index e8a1efd9..2a00a0ce 100644
--- a/harness/docs/COMPLEXITY.md
+++ b/harness/docs/COMPLEXITY.md
@@ -232,12 +232,19 @@ generation-side levers belong to the other two owners of the complexity wave.
rubric). Binary checklist items are the mechanism that gives a compressed
judge range (ARCHITECTURE §6), and this is the one statement of F2 that a
judge cannot answer with a vibe: it forces the kinds to be counted.
-6. **Nothing in the physical-plausibility path was touched.** Every cap and
- defect cap is byte-identical — `build_error` 0.0, `floating_part` 0.6,
+6. **Nothing in the physical-plausibility path was touched by this wave.** Every
+ cap FLOOR and defect cap is unchanged — `build_error` 0.0, `floating_part` 0.6,
`penetration_error` 0.7, `contract_violation` 0.75,
- `missing_must_acceptance` 0.6, `wrong_object` 0.25 — and
+ `missing_must_acceptance` 0.6, `wrong_object` 0.25. One of them has since
+ changed shape, deliberately and outside this wave: since 2026-08-30 the
+ acceptance cap is GRADED on the object rubrics — `0.6 + 0.4 · verified/total`
+ over the must items, so 0 of n still floors at 0.6 while 9 of 10 caps at 0.96
+ (`CapRule.graded`; DECISIONS D46 b, EVAL §6). The guard
`tests/judges/test_detail_anchors.py::test_physical_plausibility_caps_are_untouched`
- fails if a later wave softens one.
+ pinned `.cap` alone and so let that through; its companion
+ `test_acceptance_cap_is_graded_with_the_floor_pinned` now pins both the
+ `graded` flag and the 0.6 floor, so a later wave can neither soften a floor
+ nor quietly fall back to the flat cap.
### 3.1 Did the rubric change measurably work? Not yet — and here is the number
diff --git a/harness/docs/DECISIONS.md b/harness/docs/DECISIONS.md
index 9341ce3b..e00aa2c3 100644
--- a/harness/docs/DECISIONS.md
+++ b/harness/docs/DECISIONS.md
@@ -198,7 +198,13 @@ written) that were accepted because the code works that way and the tests pin it
overall is closest to the mean — already the narrative source); ids decided this
way are listed in `ScoreBreakdown.tie_broken`; `VlmJudge` warns on an even n.
Consequence: P(item flagged) at n=2 equals n=1's while the continuous scores still
- average over both samples; odd n is unchanged.
+ average over both samples; odd n is unchanged. **Amended 2026-08-30 for DEFECTS only:**
+ an exact defect tie now reads as ABSENT. The representative is whichever sample's
+ overall sits nearer the mean — a float comparison, not evidence — and a 1-1 tie on a
+ defect that caps the run at 0.7 was therefore a coin flip; the rubric already puts the
+ burden on the defect ("present only when an image or a gate finding shows it").
+ Acceptance ties still follow the representative: a must-item tie decides pass/fail, and
+ that policy stays the owner's. Moves nothing on disk (419/419 stored verdicts are n=1).
* **D37 The judge protocol is hashed (2026-08-25).** Context: only the rubric YAML was
hashed; the role prompt, the view-rig rules and the wire schema (whose field order
IS the observe-then-score protocol — EVAL.md §6 measured σ 0.01 → 0.08 when it
@@ -339,6 +345,74 @@ written) that were accepted because the code works that way and the tests pin it
Also fixed: `kind="detail"` files as `Stage.REFINE`, `Stage.ASSEMBLE` maps to the generator
role, and pairwise books `Stage.PAIRWISE` instead of hiding in the judge bucket.
+* **D46 The judge is grounded in what the gates measure (2026-08-30).** Context: a 7-study
+ audit of 420 judged static_object rounds. The judge did not SEE interpenetration, it READ the
+ connectivity gate's text — P(flag | gate ERROR) = 69/69, 110 of 237 flags citing only WARNs the
+ rubric excuses, a coin flip (117/97) where the gate was silent; the measured-absent veto had
+ fired for it 0 times (cap rule `penetration_error`, defect `interpenetration`, matched on id)
+ and an unrelated failing gate switched it off for floating too (53/62 blocked cases, mostly
+ the invented-plan contract); one unverified must-item pinned 121/424 verdicts to a flat 0.600;
+ and the gate itself was blind where a thin member's tip is a small share of a large part's
+ surface (`PENETRATION_MIN_FRACTION`, a telescope spreader 4 mm into three legs at 0.7–1.0 % of
+ 600 samples). Decisions, each measured offline on the stored corpus before it shipped
+ (`bench/rejudge_offline.py`, 419 verdicts, $0):
+ (a) **`CapRule.measures`** names the checklist defect a gate rule is the measurement of, and the
+ object rubrics' `floating_part` / `penetration_error` watch `connectivity` only. The veto is
+ depth-aware: a penetration WARN measured at `VETO_PENETRATION_DEPTH_M` (5 mm) or deeper is not
+ "measured absent" — of the 163 claims a WARN-blind veto switched off, 79 sat on a 5 mm+ overlap
+ (median 4.8 mm), and since (d) a stile 17 mm through a seat is a WARN too. Replayed with (b):
+ 213 verdicts move (0 down), mean +0.078, pass 15.0 % → 19.3 %, pearson(gate errors, overall)
+ −0.219 → −0.291, vetoed on replay: interpenetration 93, floating 72. articulated_v1 keeps
+ `gate: "*"` — no single gate owns either measurement there (joint_sweep + connectivity).
+ `Rubric.content_hash` hashes what the YAML declares, not the model's defaults, so a schema field
+ (`measures`, `graded`) never re-keys recorded verdicts of an unchanged rubric.
+ (b) **The acceptance cap is graded**: `cap + (1 − cap) · verified/total` must items. Pass/fail
+ unchanged (`must_missing` still fails). Without it 98 of the rounds (a) frees are re-pinned to
+ 0.600 by the flat cap; with it the 0.600 spike falls 130 → 19.
+ (c) **A defect vote tie is absent** (D36 amended); acceptance ties unchanged. `SCORING_VERSION`
+ = 2 is stamped on every breakdown; the replay tool holds identity only to same-version verdicts.
+ (d) **The gate measures overlap where it is**: a dense pass on the AABB-overlap region, a
+ `local_fraction` trigger beside the global one, and a `through_ratio` (2·depth / thickness of
+ the part entered). The ratio is MEASURED AND NAMED, never a severity: a 0.9 ERROR line was
+ tried and flipped 9 runs of designed joinery (a boom 5 mm into a mast at 0.96, arch stretchers
+ in 8 mm ribs at 0.91–0.97) because the number saturates at the container's mid-plane. Severity
+ stays on depth — and ERROR keeps its old meaning, deep AND a visible share of the part
+ (`PENETRATION_MIN_FRACTION`): a deep overlap only the dense pass can see (a chair's rear stile
+ 17 mm through its seat, 1 % of either surface) is a WARN with every number, because ERROR by
+ depth alone flipped 27 runs of such joinery pass→fail on a cap the eye cannot confirm. Final
+ corpus re-run over 217 GLBs: 441 pairs newly WARN, 0 newly ERROR, 50 WARN→ERROR (pairs the old
+ gate already reported, now measured 9.4 → 11.3 mm), 14 runs whose gate now fails; median gate
+ time 344 → 378 ms, p90 1381 → 1085 ms.
+ (e) **The contact ledger is kept**: one INFO finding (`data.kind = "ledger"`) per report with every
+ contact's gap, every overlap down to sub-threshold welds, the ground gap per part, and the plan's
+ `attach_to` pairs measured regardless of the AABB prefilter (CONTACT / OPEN). One resolver,
+ `spatial.contract.planned_joins`: a child is offered against EVERY parent copy its box touches
+ and the gate keeps what the exact distances say (each CONTACT row, else the nearest) — resolving
+ the tie by list order printed "OPEN: Brace_1→Leg_0" for a join the plan never meant, and
+ reducing per child hid a second, genuinely open one. An open planned join is reported, not
+ failed — that policy is the owner's.
+ (f) **Orientation is measured** in the contract gate: an extents-permutation test in the plan
+ frame (lying / stood → ERROR, turned → WARN), 0 flags over 629 corpus measurements, fires on
+ brilliana's c-clamp and gate-valve. Facing-away and upside-down are not visible to an AABB.
+ (g) **World frames are composed by walking the graph's edge matrices**: trimesh 4.12 left a
+ scene-root `pivot` rotation out of its descendants and re-parented a renamed duplicate node, so
+ brilliana's three THREE-exported h2h sides measured lying on their side; a GLB with
+ duplicate / unnamed nodes now lands a finding. Our own exporters name every node uniquely
+ (0 of 14 recorded threejs GLBs differ).
+ (h) **The judge reads the ledger, not WARN prose**: `gates_section` renders one measured
+ overlap line, a MEASURED STRUCTURE block with the plan's joins as contact / OPEN, and the
+ lowest point above the floor — from the stored `GateReport`, so `3dcv judge` and calibration
+ see what the in-run judge saw, and a pre-ledger round renders byte-identical (1 254
+ "interpenetrate by ≈d mm" sentences on 241 stored rounds → 0; 171 rounds carry an OPEN
+ planned join). It rides on the v1 `judge_prompt_hash` — per-run text is not hashed — so its
+ effect is measured by a paired re-judge, never by replay.
+ (i) **`VlmJudge(fixed_order=True)`** and `calibration --fixed-order`: the per-sample shuffle
+ measures view-order robustness; the loop's σ-keyed stops need the model's re-judge noise.
+ Measured on 53 items × 3 ($7.79): σ 0.035 mean / 0.027 median / 0.060 p90 — the magnitude
+ `JUDGE_NOISE` already tables, so the corpus's 0.072 round-to-round spread is generation, not
+ the judge. Rejected on the way: a through-ratio ERROR line (d), and a per-part ground gap
+ for every part (a shade is legitimately 400 mm off the floor).
+
## Rejected / deferred
* A versioned `Spec`/`RunRecord`/`RunState` load-normaliser (rejected 2026-08-30: of the seven
diff --git a/harness/docs/EVAL.md b/harness/docs/EVAL.md
index 53e70f14..f42e0598 100644
--- a/harness/docs/EVAL.md
+++ b/harness/docs/EVAL.md
@@ -186,23 +186,66 @@ Notes: the earlier criteria-first schema compressed flash to 0.6–0.7 (std 0.01
part should cap via `connectivity` findings with `data["kind"]="floating"`.
* A better recurring smoke than re-judging e2e rounds: a separation set with
deliberately broken variants (exploded / floating / primitive-only).
-* **A checklist defect a passed gate measured absent does not cap (7a9b6d3).** The
- judge's binary checklist feeds a per-item penalty and, for `floating_part` /
- `interpenetration`-class items, a hard cap (`defect:<id>` in `caps_applied`). Those are
- also what the connectivity gate *measures*. Measured 2026-08-26 on a plan-pinned pair
+* **A checklist defect a passed gate measured absent does not cap (7a9b6d3; repaired
+ 2026-08-30).** The judge's binary checklist feeds a per-item penalty and, for
+ `floating_part` and `interpenetration`, a hard cap (`defect:<id>` in `caps_applied`).
+ Those two are also what the connectivity gate *measures*, and since 2026-08-30 the veto
+ really reaches both: replayed over the 419 stored static_object verdicts
+ (`bench/rejudge_offline.py`) it switches off `interpenetration` on 163 and `floating_part`
+ on 72 — before the repair it had fired 10 times in total and never once for
+ interpenetration. Measured 2026-08-26 on a plan-pinned pair
(fancy_v1 `gas_street_lamp`, two lamps the eye cannot tell apart): the gate reported
"all 9 parts connected, gap ≤ 2 mm" and was in the judge's input; both pro samples read
the dark seam under the pedestal as "floating in mid-air, a clear daylight gap", and
`defect:floating_part` capped the run at 0.600 (uncapped 0.720) against 0.962 for its
- sibling. `judges/caps.measured_absent`: when a `when=gate` cap rule with the same id
- has all its watched gates passed with no ERROR finding of its `kinds`, the checklist
- claim is switched off before the penalty and before `apply_caps`, and named in the verdict
- tail ("checklist claims contradicted by a passed gate"). A failed gate, a gate that did
- not run, or a defect nothing measures (`wrong_object`, `missing_named_part`) are
- untouched. Re-aggregating the eleven judged fancy_v1 cells from their stored samples
- changed exactly one score (that lamp, 0.600 → 0.720); the other 0.600s are
- `missing_must_acceptance` / interpenetration caps the gates agree with. 0b6f52b tells the
- judge the same thing in its prompt; this holds when the judge does not listen.
+ sibling. `judges/rubrics.measured_absent`: when a `when=gate` cap rule whose `measures`
+ names the defect (`penetration_error.measures: [interpenetration]`; `floating_part` by
+ default) has all its watched gates passed with no ERROR finding of its `kinds`, the
+ checklist claim is switched off before the penalty and before `apply_caps`, named in the
+ verdict tail ("checklist claims contradicted by a passed gate") and listed in
+ `raw.overridden`. A failed gate, a gate that did not run, or a defect nothing measures
+ (`wrong_object`, `missing_named_part`) are untouched. Two faults kept it dead until
+ 2026-08-30: the rule was matched by *id* (`penetration_error` ≠ `interpenetration`, so 237
+ interpenetration flags — 110 of them citing only WARNs the rubric says to ignore — were
+ never vetoed), and the object rubrics' rules watched `gate: "*"`, so a failing contract gate
+ (53 of the 62 blocked cases) switched off a veto connectivity had earned; they now watch
+ `connectivity` alone, the only gate that emits floating / penetration ERRORs on this track
+ (540 findings over 356 records). The veto is depth-aware (`VETO_PENETRATION_DEPTH_M`, 5 mm):
+ a penetration WARN measured that deep is not "absent" — the WARN-blind version switched off
+ 163 interpenetration claims, 79 of them on a 5 mm+ overlap. With the graded cap below the
+ final replay moves 213 of 419 stored verdicts (none down), pass rate 15.0 % → 19.3 %,
+ pearson(gate errors, overall) −0.219 → −0.291, vetoed: interpenetration 93, floating 72. 0b6f52b tells the judge the same thing in its prompt; this holds when the judge
+ does not listen.
+* **`missing_must_acceptance` is graded (2026-08-30).** The flat 0.6 was the decisive cap on
+ 121 of 424 static_object verdicts (28.6 %): one unverified must item out of ten scored
+ exactly like ten out of ten, and 130 of 419 stored scores sat on 0.600. The cap is now
+ `0.6 + 0.4 · verified/total` over the must items (`CapRule.graded`; the ledger line says
+ "k of n must items verified"). Pass/fail is unchanged — any unverified must item still
+ fails — only the score keeps its gradient: the 0.600 spike drops 130 → 19 on replay, σ
+ 0.206 → 0.224. Every breakdown now carries `scoring_version` (`rubrics.SCORING_VERSION`,
+ 2 for this batch); `rejudge_offline --identity` holds only same-version verdicts to 1e-9.
+* **The judge reads the contact ledger, not WARN prose (2026-08-30).** Audited over 420
+ rounds: P(judge marks interpenetration | connectivity ERROR) = 69/69, and 110 of the 237
+ flags cited only WARNs the rubric excuses — the same images with the gate section removed
+ flipped the flag on 13/24 sides. `gates_section` now renders the gate's contact ledger:
+ one measured overlap line (deepest pair, through-ratio, "these are welds, not the defect"),
+ a MEASURED STRUCTURE block with the plan's joins as contact/OPEN (312 stored rounds carry
+ joins; 171 have ≥ 1 OPEN one — the assembly_fit ground truth that did not exist), and the
+ lowest point above the floor with its number. p50 307 / p90 484 tokens on the corpus.
+ It rides on the v1 `judge_prompt_hash` (per-run text is not hashed), so its effect is NOT
+ in any replay: the measurement is a paired re-judge — 40 rounds, fixed order, arm A the
+ stored text vs arm B the ledger text over the same images (~$5.5), kill criteria: the
+ interpenetration claim rate on gate-clean rounds must fall from 39 %, and on open-join
+ rounds assembly_fit must separate by more than the fixed-order σ below.
+* **The judge's own re-judge σ is 0.035 (2026-08-30, fixed montage order).** 53 items — the
+ 29 corpus rounds that still carry view PNGs + the 24 h2h object-sides re-rendered from their
+ GLBs — judged three times each with the identical prompt (`VlmJudge(fixed_order=True)`,
+ pro, $7.79): σ of the final overall mean 0.035, median 0.027, p90 0.060; per criterion
+ 0.037 (intent) – 0.065 (structure). That is the number `cost/routing.JUDGE_NOISE` already
+ tables (0.030, measured with per-sample view shuffles), so the loop's σ-keyed stops are
+ keyed to the right magnitude and the 0.072 round-to-round spread in the corpus is
+ generation variance, not the judge. Untested: temperature 0.0 (brilliana measured 0.013
+ vs 0.035 between 0.0 and 0.2 on 512 calls) — one more $8 battery.
* Never tune rubric text against the battery you report on; bump the rubric version
(`*_v2`) instead and re-run.
@@ -521,6 +564,15 @@ rank **#2–#26 of the 120 scored entries in their gallery** (all ≥ 0.8085 by
median 0.7747). The comparison that would answer the question — our configured best
(`gemini-cli:gemini-3.7-flash`, `--candidates 3 --texture`) against a *median* draw from their
gallery — has not been run.
+**Measurement caveat found 2026-08-30 (evening):** the three THEIRS threejs sides (desk_lamp,
+clock, lighthouse — THREE.GLTFExporter files with a root ``pivot`` matrix, 21–173 unnamed nodes
+and duplicate names) were MIS-MEASURED by trimesh: an upright lamp read as lying on its side
+with a part 28 mm under the floor, and the judge saw that measurement table. Their
+``wrong_orientation`` ticks and the ground-gap numbers on those three are suspect, and so is
+the threejs +0.335. Our own 14 threejs GLBs are unaffected (0 mm difference between the
+graph walk and trimesh). ``measure_glb`` now walks the edge matrices itself and flags
+duplicate/unnamed nodes; those three sides need a re-evaluation before the per-language
+threejs number is quoted again.
### 8.8 PR #1's articulated planner repair, verified (2026-08-26 evening)
diff --git a/harness/docs/INTERFACES.md b/harness/docs/INTERFACES.md
index eea1c27b..80501190 100644
--- a/harness/docs/INTERFACES.md
+++ b/harness/docs/INTERFACES.md
@@ -269,9 +269,23 @@ from codeverse.spatial.complexity import (ComplexityVector, COMPLEXITY_WEIGHTS,
complexity_of_glb(glb) -> ComplexityVector # part_count, assembly_depth, tri_count, materials, silhouette,
# feature_density, symmetry_groups, hollowness, + index 0-1 (documented weights) and band
# (trivial|simple|moderate|complex|intricate). Deterministic, no VLM/render. docs/COMPLEXITY.md
-from codeverse.spatial.connectivity import check_connectivity # (glb, *, gap_m=…, …, language="") — Δ language selects the
+from codeverse.spatial.connectivity import check_connectivity # (glb, *, gap_m=…, …, language="", planned_edges=()) — planned_edges: (child, parent | (copies…)); Δ language selects the
from codeverse.spatial.contract import check_contract # frame of fix hints; both gates emit hints in the AUTHORING frame
# (labelled "blender frame: Z-up, -Y front" etc.), GLB vectors in data
+ # (Δ 2026-08-30) connectivity measures overlap WHERE it is (a dense pass on the AABB-overlap region), so a thin
+ # member's tip is no longer diluted under PENETRATION_MIN_FRACTION; every interpenetration finding carries
+ # data{kind="penetration", other, entering, container, depth_m, fraction_inside, local_fraction, inside_count,
+ # through_ratio (2·depth/thickness of the part entered — MEASURED, never a severity), thickness_m}; severity is
+ # depth alone (2 mm WARN / 10 mm ERROR). One INFO "contact ledger" finding closes every report:
+ # data{parts, contacts [[a,b,gap_mm]], overlaps [[a,b,depth_mm,through]] incl. sub-threshold welds, ground_gap_mm{part},
+ # planned [[a,b,gap_mm,"contact"|"open"]] for the plan's attach_to pairs (spatial/contract.planned_joins — a child against
+ # every parent copy its box touches; the gate keeps each CONTACT row, else the nearest), planned_unresolved}.
+ # (Δ 2026-08-30) check_contract adds ONE orientation finding on a StaticPlan (data.kind="orientation", pose lying|stood → ERROR,
+ # turned → WARN; planned_up_m, measured_up_m, best_axis): an extents-permutation test in the plan frame, 0 flags over
+ # 629 corpus measurements, fires on brilliana's c-clamp / gate-valve.
+from codeverse.spatial.measure import measure_glb, world_transform, node_name_findings # (Δ 2026-08-30) world frames are composed
+ # by walking the graph's edge matrices (trimesh's get() dropped a root pivot's rotation); a GLB with duplicate / unnamed nodes
+ # lands a finding in Measurement.extra["findings"] — trimesh re-parents renamed nodes and the numbers are approximate
from codeverse.spatial.scene_placement import check_placement, placement_findings, placement_gate_safe, placement_census, placement_table_text
check_placement(ws, *, indoor=None, force_probe=False) -> GateReport # gate "scene_placement"; data.kind ∈ floating | sunken |
# unsupported | interpenetration | summary | probe_failed; target "Zone/Asset" (routes to src/zones/<zone>.js);
@@ -309,9 +323,14 @@ from codeverse.judges.base import JudgeInput # (spec, renders, measurement=Non
# round_index=0, previous=None, extra_context="", geometry_views=None)
from codeverse.judges.prompt_builder import plan_montages, render_montage, Montage # ≤3 2×2 montages (shaded/geometry/poses) + ≤2 detail
# crops @≤1024px replace sheet+9 views; clay/normals views (RenderView.mode) auto-route to the GEOMETRY montage
-from codeverse.judges.rubrics import is_degraded, aggregate_samples # ScoreBreakdown adds defects, defect_votes (majority,
- # ties→representative sample, D36), tie_broken, defect_penalty, overall_after_defects,
- # judge_prompt_hash (D37); overall = caps(weighted_mean − Σpenalty)
+from codeverse.judges.rubrics import is_degraded, aggregate_samples, SCORING_VERSION # ScoreBreakdown adds defects,
+ # defect_votes (majority; a defect tie → absent, an acceptance tie → representative sample, D36 as amended
+ # 2026-08-30), tie_broken, defect_penalty, overall_after_defects, overridden (defects the measured-absent
+ # veto switched off), scoring_version (= SCORING_VERSION, 2; older records carry 0), judge_prompt_hash (D37);
+ # overall = caps(weighted_mean − Σpenalty)
+ # CapRule gains measures: list[str] (the checklist defect ids a gate rule is the MEASUREMENT of —
+ # penetration_error.measures = [interpenetration]) and graded: bool (an acceptance rule caps at
+ # cap + (1−cap)·verified/total instead of a flat cap); rubrics._rule_evidence is now _rule_hit -> CapApplied | None
from codeverse.judges.rubrics import apply_caps # (rubric, overall, gates, acceptance_results, acceptance_items=None, *,
# console_errors=None, views=None, defects_present=None) -> CapResult;
# cap rules add when="missing_views" and ledger lines "defect:<id>"
@@ -404,6 +423,13 @@ from codeverse.tracks.graphics import seed_recipes, graphics_brief, cookbook_fun
# which loses the helpers recipes.glsl now provides (trim_skeleton_common; recipes are pasted first).
# GraphicsTrack.prepare() runs it after the skeleton and commits "recipes" when it wrote something.
from codeverse.tracks.common import RunContext, Services # common.py; RunContext.single_shot / .agent_kind
+ # (Δ 2026-08-30) Services.connectivity(glb, language="", planned_edges=()) forwards the plan's attach_to pairs;
+ # spatial.contract.planned_joins(plan, measurement) -> [(child, (parent copies…))] spells them in GLB part names via
+ # spatial.contract.match_parts (instance copies Leg_0..n join the nearest parent copy — no regex on ids)
+from codeverse.judges.prompt_builder import gates_section, contact_ledger # (Δ 2026-08-30) contact_ledger(gates) finds the
+ # connectivity report's INFO ledger; with it gates_section renders MEASURED STRUCTURE + one overlap line + planned joins
+ # (LEDGER_MAX_CONTACTS 24, LEDGER_MAX_JOINS 20, ground line for parts within GROUND_BAND_MM of the lowest point whose gap
+ # exceeds GROUND_GAP_REPORT_MM) and drops the per-pair penetration WARN prose; without it the pre-change text, byte for byte
from codeverse.tracks.generation import write_files # (ws, files, *, allowed_roots, only=None, frozen=(), on_skip=None):
# frozen = harness-owned paths a single-shot envelope may not rewrite (skipped with a reason, never an error)
from codeverse.agents.cli_common import find_json_object, default_mcp_command # THE one JSON-envelope finder behind