Skip to content

Reconcile AP242 diameter PMI with recognized feature measurements - #2174

Merged
pzfreo merged 17 commits into
mainfrom
fix/pmi-feature-reconciliation
Oct 4, 2026
Merged

pzfreo merged 17 commits into
mainfrom
fix/pmi-feature-reconciliation

Conversation

@pzfreo

@pzfreo pzfreo commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Fixes #2172.

Change

  • Reconcile AP242 diameter PMI with recognized features and exact physical-member ownership at the existing model/compiled-plan boundary. Pattern members keep distinct tolerances or nominals; external cylindrical requirements join the recognized rotational feature they measure.
  • Print one size requirement per physical member while preserving hole count, THRU, pitch, and location. Equal member callouts combine only when their complete printed requirements and source ownership agree; ambiguous matches retain an explicit blocker.
  • Preserve source IDs through the compiled plan, independent lint census, and emitted Sheet script.
  • Reject a single editable Drawing.callout(pattern) in immediate and deferred modes when it would discard member-specific requirements.
  • When both CTC01 arrangements are incomplete, keep the A3 arrangement that preserves a strict superset of source PMI, and report its remaining incompleteness.

Evidence

  • nist_ctc_01_asme1_ap242.stp through build_drawing(path, pmi="annotate"): four Ø35 source requirements remain with their physical members; the generic 4× Ø35 label no longer repeats those sizes. The 2×2 pattern, THRU state, and pitches remain.
  • The combined CTC01 preview was rendered and inspected at A3 and 1:5. Its single-gap pitch labels are 90, 320, 350, and 650, without 1×.
  • Focused member-ownership, arrangement, editable-callout, replay, lint, tier-selection, and architecture tests passed locally. Deliberate mutations of member ownership, arrangement priority, pattern nominal agreement, source parity, and slot retry failed their named guards.
  • The first CI head passed seven Linux test shards; three timed out in a 300-second CTC01 parity test after its shared drawing fixture took about 270 seconds. The latest head compares automatic source identity before layout; the same test passes locally in 12 seconds and still fails when a source ID is removed. The adjacent declaration identity test now fixes its page and scale and passes in 11 seconds.
  • The first CI head failed the changed-line coverage gate at 86%. Exact-head coverage-report passed: 208 of 225 changed executable lines covered (92%), above the 90% gate.

Review and architecture

Fresh independent review of the exact local diff through 44ce49ad checked all five ADRs and the CI corrections. It found no remaining concrete issue. The change stays within ADR 1's single model waist and DAG, ADR 2's collect-then-solve placement and honest infeasibility, ADR 3's recognition boundary, ADR 4's compiled-plan and provenance rule, and ADR 5's explicit refusal for ambiguous matches. No ADR invariant changes. Required CI on 44ce49ad is the merge gate.

pzfreo added 11 commits October 3, 2026 20:45
Keep the smaller CTC01 A3 candidate when it retains an authored GD&T frame that the A2 fallback drops. Only informational inferred losses may trade in this incomplete-case comparison; all losses remain in the decision record.
Use the automatic callout batching contract for the public edit verb. If a pattern needs several distinct size labels, fail before placing one label that would claim the wrong member tolerance.
pzfreo added 6 commits October 3, 2026 23:45
Map the new pattern-member and AP242 diameter contracts to the source modules they defend. A source-only edit now selects these tests in the PR tier; test_tier_manifest checks both mappings. This follows the existing test selection contract and does not change drawing behavior.
A public pattern member cannot attribute its canonical bore diameter to a different source nominal. Validate NominalRequirement against the member diameter at the IR constructor, so direct Sheet declarations and generated-script replay use the same truth boundary. The new invalid-member test fails when agrees_with is deliberately bypassed; 163 affected tests and the static gate pass.
@pzfreo
pzfreo merged commit ee001d5 into main Oct 4, 2026
19 checks passed
@pzfreo
pzfreo deleted the fix/pmi-feature-reconciliation branch October 4, 2026 02:06
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.

Reconcile source PMI with recognized feature annotations before drawing

1 participant