Skip to content

feat: enforce framing deviation at the call site - #149

Merged
TMHSDigital merged 1 commit into
mainfrom
feat/framing-deviation-contract
Sep 13, 2026
Merged

TMHSDigital merged 1 commit into
mainfrom
feat/framing-deviation-contract

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Summary

  • API: additive measure_framing_deviation(scene, camera, ...) -> (FramingResult, score). check_framing still returns 0 / 10. Not an extra return on check_framing — ~24 callers do fcode = check_framing(...) and treat it as an int.
  • Removed deviation=. Helper always enforces Layer 1. Call sites that own bleed assert their own cap.
  • modular-kit-snap: projection fill-over cap FRAME_DEV_MAX = 8.0. Gallery camera score 5.0584 (pass). --close-camera score 30.9012, exit 10. README exit table includes 10. Existing --falsify still exits 0.
  • socket-attach-points: drop deviation=. Gallery --output still uses check_framing (Layer 1). --falsify measures and prints, does not return 10 — otherwise the diagnostic would fail as a framing violation (margins touch right/top). --falsify / --probe still exit 0.
  • Other check_framing call sites are untouched (git diff names only the two examples + the helper).

Stop condition did not fire: default --output stays under the cap on all three binaries.

Live-run evidence

Binaries (path → self-reported version):

Path Reports
.scratch/blender-4.5.11-windows-x64/blender.exe 4.5.11 LTS (4db51e9d1e1e)
.scratch/blender-5.1.2-windows-x64/blender.exe 5.1.2 (ec6e62d40fa9)
.scratch/blender-5.2.1-windows-x64/blender.exe 5.2.1 LTS (9e2066aef7ef)

modular-kit-snap:

Path 4.5.11 5.1.2 5.2.1
default (check-only) 0 0 0
--output (score 5.0584) 0 0 0
--output --close-camera (score 30.9012) 10 10 10
--falsify 0 0 0

socket-attach-points on 5.2.1: --probe 0, --falsify 0 (framing printed as FAIL on margins; not enforced).

Inspection only: generated gallery HTML alts for both detail pages (modular-kit-snap render / socket-attach-points render); card alts on docs/gallery/index.html unchanged.

Test plan

  • Validate + manifest/counts
  • Blender 5.2 LTS smoke
  • Blender 4.5 LTS smoke
  • Blender 5.1 smoke (needs-5.1 via REST)
  • Socket Security
  • Drift check

check_framing no longer accepts deviation=. measure_framing_deviation returns the score so bleed compositions fail at the call site. modular-kit-snap asserts a projection fill-over cap; socket-attach-points drops the flag and leaves --falsify unenforced.

Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 13, 2026
@TMHSDigital TMHSDigital added the needs-5.1 Opt-in Blender 5.1 smoke on this PR. Default matrix stays 4.5 + 5.2. Auto-label will not apply this. label Sep 13, 2026
@TMHSDigital
TMHSDigital merged commit 7d90367 into main Sep 13, 2026
13 checks passed
@TMHSDigital
TMHSDigital deleted the feat/framing-deviation-contract branch September 13, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation needs-5.1 Opt-in Blender 5.1 smoke on this PR. Default matrix stays 4.5 + 5.2. Auto-label will not apply this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant