Skip to content

fix(cabinet-bin): align div_x source default with manifest - #102

Merged
aldoruizluna merged 1 commit into
mainfrom
fix/default-drift-cabinet-bin
Oct 2, 2026
Merged

aldoruizluna merged 1 commit into
mainfrom
fix/default-drift-cabinet-bin

Conversation

@aldoruizluna

@aldoruizluna aldoruizluna commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

What changed

cabinet-bin/main.py:50: the PARAM fallback for div_x now equals the manifest default.

param mode(s) manifest default source literal (before) source literal (after)
div_x bin, angled_bin, divided_bin 1 0 1

Direction and why

The source literal now follows the manifest default. Studio always sends the manifest-resolved set, so users already see 1. docs/README.md already documents 1. The default geometry does not change:

  • Only divided_bin reads div_x.
  • With 0 dividers, build_divided_bin already substituted one centred divider (x = 0).
  • div_x = 1 places its single divider at -inner_w/2 + inner_w/2 = 0, the same wall.

How this maps to GOC-1

GOC-1 (Digital Twins MES, Phase 2) variables.json is only complete once yantra4d injects every declared parameter (RENDER_INJECT_FULL_PARAMS). This PR removes the default-drift note for this cartridge (rule from hyperobjects-spec#30), so turning that flag on cannot change this cartridge's geometry for callers that send {}.

Evidence

Run with hyperobjects-spec at 510efba (the #30 branch; CI pins 3ff3736, which lacks the rule), CadQuery 2.8.0, macOS:

$ y4d-spec check ./cabinet-bin
y4d-spec check: cartridges=1 failures=0 notes=0 ...            # before: notes=1 (default-drift div_x)

$ y4d-spec check ./cabinet-bin --render --require-openscad --parity --openscad-path libs --openscad-path .
  ok cabinet-bin (./cabinet-bin, 6 render(s) verified (3 preset), no comparable pair)
y4d-spec check: cartridges=1 failures=0 notes=0 geometry=verified renders=6 presets=3 skipped=0 parity=0/0 ok, warn=0, exempt=0, placement=0, failures=0

A green render on macOS does not prove the Linux render (AGENTS.md rule 4); the CI Linux render lane decides. That lane had not run when this was written. No verification change. One cartridge, one file.

CI status (updated)

Linux CI on this head: manifest conformance (all cartridges): pass; render (cartridges changed in this PR) (cabinet-bin): pass; render scope (which cartridges changed): pass.

🤖 Generated with Claude Code

The PARAM fallback for `div_x` was 0 while the manifest (and the docs
table) declare 1. divided_bin already substituted one centred divider when
the count was 0, and div_x=1 places that same divider at x=0, so the
default geometry is unchanged; the source literal now states the manifest
default (GOC-1 default-drift).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Aldo Ruiz Luna <aldo.ruiz.luna@gmail.com>
@aldoruizluna
aldoruizluna marked this pull request as ready for review October 2, 2026 22:26
@aldoruizluna
aldoruizluna merged commit 0910cd0 into main Oct 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant