Skip to content

Rebuild the object in a reference image as a code-only, procedural, quality-gated, animation-ready Three.js model. Token-efficient image-to-3D.

test: freeze a completed CS2 run as a byte-equality oracle

kokorolxcbf9ffd2c1a3
diff --git a/forge/tests/fixtures/oracle-talon/cs2-intake.json b/forge/tests/fixtures/oracle-talon/cs2-intake.json
new file mode 100644
index 0000000..61e5fde
--- /dev/null
+++ b/forge/tests/fixtures/oracle-talon/cs2-intake.json
@@ -0,0 +1,389 @@
+{
+ "schemaVersion": 1,
+ "state": "proceed",
+ "sourceViews": [
+ {
+ "role": "front",
+ "path": "/Users/tamlh/workspaces/self/AI/img2threejs-org/img2threejs/.img2threejs/talon/refs/talon-front.png",
+ "hash": 18347940451214977680,
+ "width": 2560,
+ "height": 1440,
+ "coverage": 0.2097,
+ "duplicate": false
+ },
+ {
+ "role": "back",
+ "path": "/Users/tamlh/workspaces/self/AI/img2threejs-org/img2threejs/.img2threejs/talon/refs/talon-back.png",
+ "hash": 17771475369051842768,
+ "width": 2560,
+ "height": 1440,
+ "coverage": 0.2097,
+ "duplicate": false
+ }
+ ],
+ "admission": {
+ "admitted": true,
+ "reasons": [],
+ "provenance": {
+ "viewpoint": "reference",
+ "sourcePath": "/Users/tamlh/workspaces/self/AI/img2threejs-org/img2threejs/.img2threejs/talon/refs/talon-front.png",
+ "width": 2560,
+ "height": 1440,
+ "foregroundCoverage": 0.2097,
+ "largestComponentFraction": 1.0,
+ "pHash": 18347940451214977680,
+ "duplicateOfHash": null
+ }
+ },
+ "probe": {
+ "path": "/Users/tamlh/workspaces/self/AI/img2threejs-org/img2threejs/.img2threejs/talon/refs/talon-front.png",
+ "type": "png",
+ "bytes": 1138300,
+ "width": 2560,
+ "height": 1440,
+ "aspectRatio": 1.7777777777777777,
+ "technicalSuitability": "pass",
+ "warnings": [],
+ "note": "This is only technical image probing. Semantic object suitability still requires visual inspection."
+ },
+ "heuristicSignal": {
+ "path": "/Users/tamlh/workspaces/self/AI/img2threejs-org/img2threejs/.img2threejs/talon/refs/talon-front.png",
+ "is_cs2_candidate": true,
+ "confidence": 0.55,
+ "signals": [
+ "aspect_ratio_matches:knife_folder,pistol_angle",
+ "wide_format_workshop_render",
+ "neutral_background_steam_style",
+ "typical_render_file_size"
+ ],
+ "weapon_categories": [
+ "knife_folder",
+ "pistol_angle"
+ ],
+ "dimensions": {
+ "width": 2560,
+ "height": 1440,
+ "aspectRatio": 1.778
+ },
+ "color_profile": {
+ "dominant_range": "neutral_grey",
+ "energy": 218.77
+ },
+ "note": "This is a heuristic pre-analysis guard using file metadata and basic byte statistics. It does NOT perform visual analysis. The agent's vision layer (Step 1) performs definitive CS2 identification using the M.C.M.T framework in grimoire/intake/cs2_technical_analysis.md"
+ },
+ "exactnessTier": "image-only",
+ "route": "reference-projection",
+ "textureSource": "image-only",
+ "identity": {
+ "status": "resolved",
+ "identity": {
+ "itemFamily": "knife",
+ "subtype": "talon",
+ "confidence": 0.93,
+ "evidenceRefs": [
+ ".img2threejs/talon/refs/talon-front.png",
+ ".img2threejs/talon/refs/talon-back.png",
+ ".img2threejs/talon/evidence/reference-measurements.json",
+ ".img2threejs/talon/evidence/suitability-and-classification.md"
+ ],
+ "provider": "agent-vision/claude-opus-5",
+ "version": "1",
+ "timedOut": false,
+ "discriminatingEvidence": [
+ "closed circular finger ring at the butt, bore circularity 0.986 -> karambit/talon family",
+ "hawkbill blade with the cutting edge on the concave inner curve",
+ "three graduated circular through-holes in the blade flat (r 25.7 / 30.5 / 40.7 px, circularity 0.98-1.02) -> Talon marker, absent on Karambit",
+ "sawtooth jimping band on the upper spine (dark notch components at (876,484) and (889,454))",
+ "broad-bellied hawkbill rather than the Karambit's narrower, more sharply recurved blade"
+ ],
+ "candidates": [
+ {
+ "subtype": "talon",
+ "confidence": 0.93
+ },
+ {
+ "subtype": "karambit",
+ "confidence": 0.06
+ }
+ ],
+ "notes": "Classification owns semantic identity only; it does not set geometry or finish parameters. detect_cs2.py (is_cs2_candidate true, 0.55) was recorded as a non-authoritative routing hint only."
+ },
+ "provenance": "classification-record"
+ },
+ "finish": {
+ "provenance": "visual-observation+measured-pixels",
+ "confidence": 0.88,
+ "finishStyle": "anodized-multicolored",
+ "family": "doppler-ruby",
+ "evidenceRefs": [
+ ".img2threejs/talon/evidence/image-analysis.md#layer-6"
+ ],
+ "note": "finishStyle from the measured highlight shape + gradient stops, not from the skin name"
+ },
+ "assets": {
+ "source": "image-only",
+ "records": []
+ },
+ "camera": {
+ "status": "unknown",
+ "provenance": "not-supplied"
+ },
+ "provenance": {
+ "reference": "user-supplied",
+ "metadata": "csgo-api-unreachable-http-403; image-only path retained"
+ },
+ "assumptions": {
+ "float": "band 0.00-0.07 inferred from the user-supplied 'Factory New' wear name only; no exact per-item float",
+ "paintSeed": "not recoverable from an image; fixed centred placement, approximated: true",
+ "hiddenRegions": "both flats observed via front+back; the Z axis (grind, stock thickness, spine top, bore chamfer) is inference",
+ "paintIndexCandidate": "415 (Doppler Ruby) per docs/cs2/distill.md:123 - local doc evidence, candidate only, drives nothing",
+ "toneMapping": "render uses AgX, not the fixture's recorded ACESFilmic; the peak ruby is clipped at R=255 in the reference and ACES desaturates it toward pink (registry.ts:90-92)"
+ },
+ "confidence": {
+ "overall": 0.93,
+ "hiddenRegions": 0.35,
+ "perRegion": {
+ "silhouette-both-flats": 0.95,
+ "in-plane-proportions": 0.93,
+ "ruby-albedo-gradient": 0.88,
+ "hardware-placement": 0.92,
+ "ivory-albedo-staining": 0.85,
+ "blade-cross-section-grind": 0.45,
+ "thickness-in-z": 0.35,
+ "spine-top-face": 0.3,
+ "ring-bore-chamfer": 0.4,
+ "finger-choil-depth": 0.35,
+ "roughness-metalness-scalars": 0.6,
+ "paint-seed-float": 0.0
+ }
+ },
+ "warnings": [
+ "heuristicSignal"
+ ],
+ "extensions": {
+ "compatibilityMode": "manifest-v1"
+ },
+ "reviewScene": {
+ "version": "cs2-knife-review-v1",
+ "camera": {
+ "fovDegrees": 40.0,
+ "position": [
+ 0.0,
+ 0.0,
+ 3.0
+ ],
+ "target": [
+ 0.0,
+ 0.0,
+ 0.0
+ ]
+ },
+ "objectTransform": {
+ "position": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "rotation": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "scale": [
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ },
+ "environmentHash": "not-supplied",
+ "exposure": 1.0,
+ "toneMapping": "ACESFilmic",
+ "resolution": [
+ 1024,
+ 1024
+ ],
+ "background": "#20242a",
+ "rendererVersion": "three-r170",
+ "thresholds": {
+ "silhouetteIoU": 0.85,
+ "aspectRatioDelta": 0.05,
+ "scaleDelta": 0.08,
+ "paintedRegionMask": 0.85,
+ "colorRegion": 0.8,
+ "patternRegion": 0.75,
+ "wearRegion": 0.7
+ },
+ "orbitViewpoints": [
+ {
+ "yaw": 35.0,
+ "pitch": 8.0
+ },
+ {
+ "yaw": -35.0,
+ "pitch": 8.0
+ }
+ ]
+ },
+ "classification": {
+ "itemFamily": "knife",
+ "subtype": "talon",
+ "confidence": 0.93,
+ "evidenceRefs": [
+ ".img2threejs/talon/refs/talon-front.png",
+ ".img2threejs/talon/refs/talon-back.png",
+ ".img2threejs/talon/evidence/reference-measurements.json",
+ ".img2threejs/talon/evidence/suitability-and-classification.md"
+ ],
+ "provider": "agent-vision/claude-opus-5",
+ "version": "1",
+ "timedOut": false,
+ "discriminatingEvidence": [
+ "closed circular finger ring at the butt, bore circularity 0.986 -> karambit/talon family",
+ "hawkbill blade with the cutting edge on the concave inner curve",
+ "three graduated circular through-holes in the blade flat (r 25.7 / 30.5 / 40.7 px, circularity 0.98-1.02) -> Talon marker, absent on Karambit",
+ "sawtooth jimping band on the upper spine (dark notch components at (876,484) and (889,454))",
+ "broad-bellied hawkbill rather than the Karambit's narrower, more sharply recurved blade"
+ ],
+ "candidates": [
+ {
+ "subtype": "talon",
+ "confidence": 0.93
+ },
+ {
+ "subtype": "karambit",
+ "confidence": 0.06
+ }
+ ],
+ "notes": "Classification owns semantic identity only; it does not set geometry or finish parameters. detect_cs2.py (is_cs2_candidate true, 0.55) was recorded as a non-authoritative routing hint only."
+ },
+ "itemFamily": "knife",
+ "subtype": "talon",
+ "rawItemFamily": "knife",
+ "componentAdapter": "cs2-knife-v1",
+ "adapterRoute": "cs2-knife-v1",
+ "adapterContractVersion": "1",
+ "adapterFixtureId": "cs2-knife-front-v1",
+ "adapterContract": {
+ "family": "knife",
+ "subtype": "talon",
+ "topology": [
+ "ground-blade",
+ "curve-sweep",
+ "extrude",
+ "assembled-solid"
+ ],
+ "paintedRegions": [
+ "blade-painted",
+ "grip-painted",
+ "guard-bare-metal",
+ "pommel-bare-metal"
+ ],
+ "materialAssignments": [
+ "skin-finish",
+ "substrate"
+ ],
+ "featureTargets": [
+ "silhouette",
+ "blade-edge-spine",
+ "grip",
+ "guard-quillon",
+ "fastener",
+ "pommel"
+ ],
+ "attachmentRules": [
+ "guard-to-blade",
+ "grip-to-guard",
+ "pommel-to-grip"
+ ],
+ "reviewViewpoints": [
+ "reference",
+ "orbit-left",
+ "orbit-right"
+ ],
+ "adapterId": "cs2-knife-v1",
+ "contractVersion": "1",
+ "active": true,
+ "fixtureId": "cs2-knife-front-v1"
+ },
+ "admissionByView": {
+ "front": {
+ "admitted": true,
+ "reasons": [],
+ "provenance": {
+ "viewpoint": "reference",
+ "sourcePath": "/Users/tamlh/workspaces/self/AI/img2threejs-org/img2threejs/.img2threejs/talon/refs/talon-front.png",
+ "width": 2560,
+ "height": 1440,
+ "foregroundCoverage": 0.2097,
+ "largestComponentFraction": 1.0,
+ "pHash": 18347940451214977680,
+ "duplicateOfHash": null
+ }
+ },
+ "back": {
+ "admitted": true,
+ "reasons": [],
+ "provenance": {
+ "viewpoint": "back",
+ "sourcePath": "/Users/tamlh/workspaces/self/AI/img2threejs-org/img2threejs/.img2threejs/talon/refs/talon-back.png",
+ "width": 2560,
+ "height": 1440,
+ "foregroundCoverage": 0.2097,
+ "largestComponentFraction": 1.0,
+ "pHash": 17771475369051842768,
+ "duplicateOfHash": null
+ }
+ }
+ },
+ "probeByView": {
+ "front": {
+ "path": "/Users/tamlh/workspaces/self/AI/img2threejs-org/img2threejs/.img2threejs/talon/refs/talon-front.png",
+ "type": "png",
+ "bytes": 1138300,
+ "width": 2560,
+ "height": 1440,
+ "aspectRatio": 1.7777777777777777,
+ "technicalSuitability": "pass",
+ "warnings": [],
+ "note": "This is only technical image probing. Semantic object suitability still requires visual inspection."
+ },
+ "back": {
+ "path": "/Users/tamlh/workspaces/self/AI/img2threejs-org/img2threejs/.img2threejs/talon/refs/talon-back.png",
+ "type": "png",
+ "bytes": 1099625,
+ "width": 2560,
+ "height": 1440,
+ "aspectRatio": 1.7777777777777777,
+ "technicalSuitability": "pass",
+ "warnings": [],
+ "note": "This is only technical image probing. Semantic object suitability still requires visual inspection."
+ }
+ },
+ "paintedRegions": {
+ "observedPainted": [
+ "blade-painted",
+ "tang-exposed-painted",
+ "pommel-ring-painted"
+ ],
+ "observedUnpainted": [
+ "grip-scale-ivory",
+ "hardware-brass",
+ "edge-apex-bare-steel"
+ ],
+ "adapterSeededPainted": [
+ "blade-painted",
+ "grip-painted",
+ "guard-bare-metal",
+ "pommel-bare-metal"
+ ],
+ "adapterRegionsNotPresentOnSubtype": [
+ "guard-bare-metal",
+ "guard-quillon"
+ ],
+ "divergenceNote": "The cs2-knife-v1 adapter seeds guard-bare-metal and a guard-quillon feature target. The Talon subtype has no crossguard or quillon; the blade runs straight into the scaled tang. The adapter list is preserved for auditability but the observed map is authoritative for this build, and guard-* regions must be reported not-applicable rather than scored as passing.",
+ "evidenceRefs": [
+ ".img2threejs/talon/evidence/image-analysis.md#layer-5",
+ ".img2threejs/talon/evidence/reference-measurements.json"
+ ]
+ }
+}
diff --git a/forge/tests/fixtures/oracle-talon/cs2-review-inputs.json b/forge/tests/fixtures/oracle-talon/cs2-review-inputs.json
new file mode 100644
index 0000000..3b40564
--- /dev/null
+++ b/forge/tests/fixtures/oracle-talon/cs2-review-inputs.json
@@ -0,0 +1,73 @@
+{
+ "_provenance": "All silhouette numbers are measured by forge/stage4_review/diagnose_render.py on renders/pass-final/front.png against renders/refplate/reference-front-1600.png (background-matched, 1600x900). Feature and region scores are agent-vision judgements against renders/pass-final/cmp-front.png, stated per the render_capture.md scorecard.",
+ "silhouetteIoU": 0.9654,
+ "aspectRatioDelta": 0.0149,
+ "scaleDelta": 0.0147,
+ "silhouetteIoUBack": 0.9559,
+ "finishMaterialResponse": 0.85,
+ "identityDetail": 0.9,
+ "_finishNote": "Measured region medians vs reference: ruby [135,20,25] vs [127,24,27] (dV +8, dS +10); ivory [163,162,160] vs [162,162,159] (dV +1, dS +1); brass [92,79,42] vs [122,106,64] (dV -30, dS +30). Divine Eye tonalParity 0.9578. Brass is 0.5% of frame and its hue-mask median is unstable under saturation change, so it is reported rather than treated as a confident 30-unit error.",
+ "paintedRegions": [
+ {
+ "id": "blade-painted",
+ "score": 0.9,
+ "confidence": 0.88,
+ "note": "de-lit front/back plates projected through the traced image->world mapping; measured ruby median within dV +8 / dS +10 of reference"
+ },
+ {
+ "id": "tang-exposed-painted",
+ "score": 0.82,
+ "confidence": 0.35,
+ "note": "the tang is OCCLUDED by the scales in both views; its painted extent is inferred, not observed"
+ },
+ {
+ "id": "pommel-ring-painted",
+ "score": 0.85,
+ "confidence": 0.85,
+ "note": "ruby coat continues onto the ring (reference crop share 0.96, median [89,12,17]); modelled with the solid measured ruby, not a plate, because the ring's own pixels are a thin arc"
+ }
+ ],
+ "_regionsNotApplicable": [
+ "guard-bare-metal and guard_quillon: the cs2-knife-v1 adapter and the knife_review_scene fixture both list a guard/quillon. A Talon has NO crossguard - the blade runs straight into the scaled tang - so these are reported not-applicable rather than scored as passing on a part that does not exist."
+ ],
+ "criticalFeatures": [
+ { "id": "hawkbill-silhouette", "score": 0.95, "threshold": 0.75, "note": "IoU 0.9654 front / 0.9559 back; aspect 2.908 render vs 2.883 reference" },
+ { "id": "spine-sawtooth-band", "score": 0.9, "threshold": 0.7, "note": "5 teeth at measured irregular pitches 64/61/69/139px, raked ratchet form, present in the traced outline as real geometry" },
+ { "id": "blade-hole-triad", "score": 0.95, "threshold": 0.75, "note": "3 real openings, radii 0.0245/0.0291/0.0388 world, growing toward the handle" },
+ { "id": "ruby-finish-response", "score": 0.85, "threshold": 0.7, "note": "projection route; gradient direction and crimson wisps read; measured dV +8 / dS +10. Residual: the spine specular is softer than the reference's" },
+ { "id": "grip-hardware-layout", "score": 0.88, "threshold": 0.7, "note": "7 rivets/side at measured positions, medallion with neutral-grey inlay + 4 spokes, 2 spacers with the aft one raked 12deg" },
+ { "id": "blade-cross-section-realism", "score": 0.82, "threshold": 0.6, "note": "variable-thickness loft; bladeBody distinct-Z 42 (a slab lands <=10); holds at three-quarter (ratio 0.880) and orbit-035 (0.929)" },
+ { "id": "tang-and-seam-continuity", "score": 0.75, "threshold": 0.6, "note": "blade->tang->ring is one continuous body with >=0.02 world seam overlap; the tang itself is inferred (confidence 0.35)" }
+ ],
+ "projection": {
+ "required": true,
+ "coverage": 0.92,
+ "source": "evidence/delit-regionwise-front.png + delit-regionwise-back.png",
+ "method": "mean-preserving per-region de-light, then planar projection that algebraically inverts the tracer's image->world mapping",
+ "note": "Coverage is 0.92 not 1.0: the broad +Z and -Z faces carry the plates, but walls, the ground bevel and hole interiors take a solid measured ruby because no reference pixel exists for a surface the camera never saw."
+ },
+ "multiAngle": {
+ "degenerate": false,
+ "collapseRatio": 0.15,
+ "angles": [
+ { "name": "orbit-035", "ratio": 0.929, "degenerate": false },
+ { "name": "orbit-325", "ratio": 0.881, "degenerate": false },
+ { "name": "orbit-180", "ratio": 1.007, "degenerate": false },
+ { "name": "three-quarter", "ratio": 0.88, "degenerate": false }
+ ],
+ "note": "The +-90 edge-on frames are excluded: the forge segmenter returns areaFraction 0.0 for them, while direct pixel measurement finds a real 97x545 sliver at 3.28% of frame. That is a segmentation limit on a 19:1 flat subject, not a collapsed volume - and a flat plane would also read ~0 at 90deg, so that angle cannot discriminate. The four angles above can, and none is degenerate."
+ },
+ "approximationNotes": [
+ "Every Z/thickness value is an inference: both references are broadside. bladeHalfStock 0.021, tangHalf 0.019, scaleHalf 0.019 (confidence 0.35).",
+ "Blade grind type modelled flat/sabre; hollow-vs-flat is not resolvable from a broadside (confidence 0.45).",
+ "The tang between blade base and ring is fully occluded; authored as a 62% vertical inset of the traced scale outline so blade and ring stay one body (confidence 0.35).",
+ "Rivet heads modelled as shallow domes; a broadside cannot separate a low dome from a flat pin (confidence 0.40).",
+ "Spacer strips modelled full-depth through the scale (confidence 0.40).",
+ "Ring bore chamfer profile not observable (confidence 0.40).",
+ "Paint seed and float are NOT recoverable from an image: fixed centred pattern placement and a Factory-New wear approximation, both marked approximated.",
+ "The ruby peak band's red channel is clipped at 255 in the source, so its true radiance is unknown and cannot be matched exactly.",
+ "Tone mapping is 'neutral' at exposure 0.70, chosen by a measured 16-way sweep. The registry documents 'agx' for a Ruby-Doppler blade, which is right for a procedural finish but was the WORST of 16 combinations here (dV +50 / dS -79) because the projected plate already carries the appearance.",
+ "The knife_review_scene fixture records environment.toneMapping as ACESFilmic; this build renders with NeutralToneMapping. The fixture's value is recorded scene metadata for the fixture itself and is not compared against the render, but the divergence is stated rather than left implicit.",
+ "Two small brass blobs appear on the BACK view only at (390,939) r 9.9 and (428,941) r 8.9 with no mirrored front counterpart. NOT modelled as hardware - recorded as an unexplained observation rather than invented as a part (confidence 0.30)."
+ ]
+}
diff --git a/forge/tests/fixtures/oracle-talon/cs2-review.json b/forge/tests/fixtures/oracle-talon/cs2-review.json
new file mode 100644
index 0000000..074b140
--- /dev/null
+++ b/forge/tests/fixtures/oracle-talon/cs2-review.json
@@ -0,0 +1,217 @@
+{
+ "verdict": "pass",
+ "action": "continue",
+ "family": "knife",
+ "subtype": "talon",
+ "exactnessTier": "image-only",
+ "route": "reference-projection",
+ "reviewScene": {
+ "version": 1,
+ "fixtureId": "cs2-knife-front-v1",
+ "camera": {
+ "projection": "orthographic",
+ "azimuthDegrees": 0,
+ "elevationDegrees": 0,
+ "rollDegrees": 0,
+ "target": [
+ 0,
+ 0,
+ 0
+ ]
+ },
+ "transform": {
+ "position": [
+ 0,
+ 0,
+ 0
+ ],
+ "rotationDegrees": [
+ 0,
+ 0,
+ 0
+ ],
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "environment": {
+ "hash": "code-generated-room-v1",
+ "exposure": 0,
+ "toneMapping": "ACESFilmic"
+ },
+ "resolution": {
+ "width": 1024,
+ "height": 1024
+ },
+ "background": "neutral-white",
+ "rendererVersion": "three-runtime-contract-v1",
+ "calibration": {
+ "status": "thresholds-frozen-awaiting-positive-negative-render-corpus",
+ "positiveFixtures": [],
+ "negativeFixtures": []
+ }
+ },
+ "metrics": {
+ "_provenance": "All silhouette numbers are measured by forge/stage4_review/diagnose_render.py on renders/pass-final/front.png against renders/refplate/reference-front-1600.png (background-matched, 1600x900). Feature and region scores are agent-vision judgements against renders/pass-final/cmp-front.png, stated per the render_capture.md scorecard.",
+ "silhouetteIoU": 0.9654,
+ "aspectRatioDelta": 0.0149,
+ "scaleDelta": 0.0147,
+ "silhouetteIoUBack": 0.9559,
+ "finishMaterialResponse": 0.85,
+ "identityDetail": 0.9,
+ "_finishNote": "Measured region medians vs reference: ruby [135,20,25] vs [127,24,27] (dV +8, dS +10); ivory [163,162,160] vs [162,162,159] (dV +1, dS +1); brass [92,79,42] vs [122,106,64] (dV -30, dS +30). Divine Eye tonalParity 0.9578. Brass is 0.5% of frame and its hue-mask median is unstable under saturation change, so it is reported rather than treated as a confident 30-unit error.",
+ "paintedRegions": [
+ {
+ "id": "blade-painted",
+ "score": 0.9,
+ "confidence": 0.88,
+ "note": "de-lit front/back plates projected through the traced image->world mapping; measured ruby median within dV +8 / dS +10 of reference"
+ },
+ {
+ "id": "tang-exposed-painted",
+ "score": 0.82,
+ "confidence": 0.35,
+ "note": "the tang is OCCLUDED by the scales in both views; its painted extent is inferred, not observed"
+ },
+ {
+ "id": "pommel-ring-painted",
+ "score": 0.85,
+ "confidence": 0.85,
+ "note": "ruby coat continues onto the ring (reference crop share 0.96, median [89,12,17]); modelled with the solid measured ruby, not a plate, because the ring's own pixels are a thin arc"
+ }
+ ],
+ "_regionsNotApplicable": [
+ "guard-bare-metal and guard_quillon: the cs2-knife-v1 adapter and the knife_review_scene fixture both list a guard/quillon. A Talon has NO crossguard - the blade runs straight into the scaled tang - so these are reported not-applicable rather than scored as passing on a part that does not exist."
+ ],
+ "criticalFeatures": [
+ {
+ "id": "hawkbill-silhouette",
+ "score": 0.95,
+ "threshold": 0.75,
+ "note": "IoU 0.9654 front / 0.9559 back; aspect 2.908 render vs 2.883 reference"
+ },
+ {
+ "id": "spine-sawtooth-band",
+ "score": 0.9,
+ "threshold": 0.7,
+ "note": "5 teeth at measured irregular pitches 64/61/69/139px, raked ratchet form, present in the traced outline as real geometry"
+ },
+ {
+ "id": "blade-hole-triad",
+ "score": 0.95,
+ "threshold": 0.75,
+ "note": "3 real openings, radii 0.0245/0.0291/0.0388 world, growing toward the handle"
+ },
+ {
+ "id": "ruby-finish-response",
+ "score": 0.85,
+ "threshold": 0.7,
+ "note": "projection route; gradient direction and crimson wisps read; measured dV +8 / dS +10. Residual: the spine specular is softer than the reference's"
+ },
+ {
+ "id": "grip-hardware-layout",
+ "score": 0.88,
+ "threshold": 0.7,
+ "note": "7 rivets/side at measured positions, medallion with neutral-grey inlay + 4 spokes, 2 spacers with the aft one raked 12deg"
+ },
+ {
+ "id": "blade-cross-section-realism",
+ "score": 0.82,
+ "threshold": 0.6,
+ "note": "variable-thickness loft; bladeBody distinct-Z 42 (a slab lands <=10); holds at three-quarter (ratio 0.880) and orbit-035 (0.929)"
+ },
+ {
+ "id": "tang-and-seam-continuity",
+ "score": 0.75,
+ "threshold": 0.6,
+ "note": "blade->tang->ring is one continuous body with >=0.02 world seam overlap; the tang itself is inferred (confidence 0.35)"
+ }
+ ],
+ "projection": {
+ "required": true,
+ "coverage": 0.92,
+ "source": "evidence/delit-regionwise-front.png + delit-regionwise-back.png",
+ "method": "mean-preserving per-region de-light, then planar projection that algebraically inverts the tracer's image->world mapping",
+ "note": "Coverage is 0.92 not 1.0: the broad +Z and -Z faces carry the plates, but walls, the ground bevel and hole interiors take a solid measured ruby because no reference pixel exists for a surface the camera never saw."
+ },
+ "multiAngle": {
+ "degenerate": false,
+ "collapseRatio": 0.15,
+ "angles": [
+ {
+ "name": "orbit-035",
+ "ratio": 0.929,
+ "degenerate": false
+ },
+ {
+ "name": "orbit-325",
+ "ratio": 0.881,
+ "degenerate": false
+ },
+ {
+ "name": "orbit-180",
+ "ratio": 1.007,
+ "degenerate": false
+ },
+ {
+ "name": "three-quarter",
+ "ratio": 0.88,
+ "degenerate": false
+ }
+ ],
+ "note": "The +-90 edge-on frames are excluded: the forge segmenter returns areaFraction 0.0 for them, while direct pixel measurement finds a real 97x545 sliver at 3.28% of frame. That is a segmentation limit on a 19:1 flat subject, not a collapsed volume - and a flat plane would also read ~0 at 90deg, so that angle cannot discriminate. The four angles above can, and none is degenerate."
+ },
+ "approximationNotes": [
+ "Every Z/thickness value is an inference: both references are broadside. bladeHalfStock 0.021, tangHalf 0.019, scaleHalf 0.019 (confidence 0.35).",
+ "Blade grind type modelled flat/sabre; hollow-vs-flat is not resolvable from a broadside (confidence 0.45).",
+ "The tang between blade base and ring is fully occluded; authored as a 62% vertical inset of the traced scale outline so blade and ring stay one body (confidence 0.35).",
+ "Rivet heads modelled as shallow domes; a broadside cannot separate a low dome from a flat pin (confidence 0.40).",
+ "Spacer strips modelled full-depth through the scale (confidence 0.40).",
+ "Ring bore chamfer profile not observable (confidence 0.40).",
+ "Paint seed and float are NOT recoverable from an image: fixed centred pattern placement and a Factory-New wear approximation, both marked approximated.",
+ "The ruby peak band's red channel is clipped at 255 in the source, so its true radiance is unknown and cannot be matched exactly.",
+ "Tone mapping is 'neutral' at exposure 0.70, chosen by a measured 16-way sweep. The registry documents 'agx' for a Ruby-Doppler blade, which is right for a procedural finish but was the WORST of 16 combinations here (dV +50 / dS -79) because the projected plate already carries the appearance.",
+ "The knife_review_scene fixture records environment.toneMapping as ACESFilmic; this build renders with NeutralToneMapping. The fixture's value is recorded scene metadata for the fixture itself and is not compared against the render, but the divergence is stated rather than left implicit.",
+ "Two small brass blobs appear on the BACK view only at (390,939) r 9.9 and (428,941) r 8.9 with no mirrored front counterpart. NOT modelled as hardware - recorded as an unexplained observation rather than invented as a part (confidence 0.30)."
+ ]
+ },
+ "paintedRegions": [
+ {
+ "id": "blade-painted",
+ "score": 0.9,
+ "confidence": 0.88
+ },
+ {
+ "id": "tang-exposed-painted",
+ "score": 0.82,
+ "confidence": 0.35
+ },
+ {
+ "id": "pommel-ring-painted",
+ "score": 0.85,
+ "confidence": 0.85
+ }
+ ],
+ "perRegionConfidence": {
+ "blade-painted": 0.88,
+ "tang-exposed-painted": 0.35,
+ "pommel-ring-painted": 0.85
+ },
+ "hiddenRegionConfidence": 0.35,
+ "approximationNotes": [
+ "Every Z/thickness value is an inference: both references are broadside. bladeHalfStock 0.021, tangHalf 0.019, scaleHalf 0.019 (confidence 0.35).",
+ "Blade grind type modelled flat/sabre; hollow-vs-flat is not resolvable from a broadside (confidence 0.45).",
+ "The tang between blade base and ring is fully occluded; authored as a 62% vertical inset of the traced scale outline so blade and ring stay one body (confidence 0.35).",
+ "Rivet heads modelled as shallow domes; a broadside cannot separate a low dome from a flat pin (confidence 0.40).",
+ "Spacer strips modelled full-depth through the scale (confidence 0.40).",
+ "Ring bore chamfer profile not observable (confidence 0.40).",
+ "Paint seed and float are NOT recoverable from an image: fixed centred pattern placement and a Factory-New wear approximation, both marked approximated.",
+ "The ruby peak band's red channel is clipped at 255 in the source, so its true radiance is unknown and cannot be matched exactly.",
+ "Tone mapping is 'neutral' at exposure 0.70, chosen by a measured 16-way sweep. The registry documents 'agx' for a Ruby-Doppler blade, which is right for a procedural finish but was the WORST of 16 combinations here (dV +50 / dS -79) because the projected plate already carries the appearance.",
+ "The knife_review_scene fixture records environment.toneMapping as ACESFilmic; this build renders with NeutralToneMapping. The fixture's value is recorded scene metadata for the fixture itself and is not compared against the render, but the divergence is stated rather than left implicit.",
+ "Two small brass blobs appear on the BACK view only at (390,939) r 9.9 and (428,941) r 8.9 with no mirrored front counterpart. NOT modelled as hardware - recorded as an unexplained observation rather than invented as a part (confidence 0.30)."
+ ],
+ "failedGates": []
+}
diff --git a/forge/tests/test_cs2_oracle_replay.py b/forge/tests/test_cs2_oracle_replay.py
new file mode 100644
index 0000000..54dbbe7
--- /dev/null
+++ b/forge/tests/test_cs2_oracle_replay.py
@@ -0,0 +1,67 @@
+"""Byte-equality replay of a completed CS2 run.
+
+The fixture under fixtures/oracle-talon/ is lifted verbatim from a real finished reconstruction
+(.img2threejs/talon: 23/25 steps done, verdict pass, silhouetteIoU 0.9654). It is the correctness
+oracle for extracting CS2 into its own plugin: if the review report drifts by a single byte during
+that work, this fails.
+
+Deliberately a byte comparison rather than a semantic one. A semantic assertion would have to
+enumerate what matters, and the whole point of an oracle is to catch the change nobody predicted --
+a reordered key, a dropped note, a float rendered to a different precision.
+"""
+
+from __future__ import annotations
+
+import json
+import subprocess
+import sys
+import tempfile
+import unittest
+from pathlib import Path
+
+ROOT = Path(__file__).resolve().parents[1]
+ORACLE = Path(__file__).resolve().parent / "fixtures" / "oracle-talon"
+CS2_REVIEW = ROOT / "stage4_review" / "cs2_review.py"
+
+
+class Cs2OracleReplay(unittest.TestCase):
+ def test_replaying_the_completed_run_reproduces_its_review_byte_for_byte(self) -> None:
+ expected = (ORACLE / "cs2-review.json").read_bytes()
+ with tempfile.TemporaryDirectory() as tmp:
+ out = Path(tmp) / "replay.json"
+ proc = subprocess.run(
+ [
+ sys.executable,
+ str(CS2_REVIEW),
+ "--manifest",
+ str(ORACLE / "cs2-intake.json"),
+ "--metrics",
+ str(ORACLE / "cs2-review-inputs.json"),
+ "--out",
+ str(out),
+ ],
+ cwd=ROOT.parent,
+ capture_output=True,
+ text=True,
+ )
+ self.assertEqual(proc.returncode, 0, f"cs2_review.py failed:\n{proc.stderr}")
+ actual = out.read_bytes()
+
+ self.assertEqual(
+ actual,
+ expected,
+ "CS2 review output drifted from the recorded oracle. If the change was intentional, "
+ "re-record the fixture in the same commit and say so -- do not relax this assertion.",
+ )
+
+ def test_the_oracle_records_a_passing_verdict(self) -> None:
+ # Guards against the fixture being replaced by a failing run, which would make the byte
+ # comparison above pass while proving nothing about a working pipeline.
+ report = json.loads((ORACLE / "cs2-review.json").read_text())
+ self.assertEqual(report["verdict"], "pass")
+ self.assertEqual(report["failedGates"], [])
+ self.assertGreaterEqual(report["metrics"]["silhouetteIoU"], 0.95)
+
+
+if __name__ == "__main__":
+ unittest.main()