Repository navigation
fix(boot-hook-puller): rod/blade tangency constraint in the Studio dialect - #188
Merged
Merged
Conversation
…alect constraints[1] joined its two comparisons with the word `or`, which the Studio's safeFormula parser does not have: it stops at `or` as a trailing token and throws, useConstraints swallows the error and the rule never fired. `||` binds looser than the comparisons in safeFormula, so the rewrite has the same meaning. Severity and both messages are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Aldo Ruiz Luna <aldo.ruiz.luna@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
constraints[1] (
error) joined its two comparisons with the wordor. The Studio evaluatesconstraints[].expressionwithsafeFormula, which has no word operators. It parseshook_d <= blade_t - 0.35, meetsoras an unexpected trailing token, and throws.useConstraintsswallows the error, so the rule never fired: a rod within 0.35 mm of the blade thickness (tangent faces, a broken union) was never flagged.Found by the keystone's note-only
constraint-dialectrule (hyperobjects-spec 0.17.0, main73f092cf; landed in madfam-org/hyperobjects-spec#66), lane K's whole-commons run: 8 notes on 6 cartridges. x-carriage was fixed in #180. This PR is one of the five follow-ups, one cartridge per PR.What changed
constraints[1].expression:hook_d <= blade_t - 0.35 or hook_d >= blade_t + 0.35becomeshook_d <= blade_t - 0.35 || hook_d >= blade_t + 0.35. The semantics are identical.error) and the es/en message are unchanged.Only
boot-hook-puller/project.jsonchanges. No geometry, parameters, presets or docs change.How verified
Before, at origin/main
11f16f7, keystone main73f092cf(0.17.0), whole commons:After, on this branch:
All five constraint PRs applied together on origin/main, whole commons (512 cartridges): keystone main gives
failures=0 notes=36, down from 43, with 0constraint-dialectnotes left. SPEC_PIN 70fe821 givesfailures=0 notes=36.Semantics: safeFormula's precedence is ternary, then
||, then&&, then comparison, then additive, then multiplicative (yantra4dapps/studio/src/lib/safeFormula.ts). So the rewritten expression groups exactly as the authored one was meant to.&&/||returnBoolean(left) op Boolean(right). The default and every preset were evaluated against the new expression with a plain Python evaluator.At the default and both presets: satisfied (3 of 3 points).
Not run: a render. This is a manifest-only change, and CI's render lane decides the scope for changed cartridges.
Risk / rollback
Low. The constraint was dead before and is live now, so the Studio can show this message where it did not before. Rollback: revert this one commit.
Needs the owner
Nothing.
🤖 Generated with Claude Code