Skip to content

PM - #3469

Closed
briansrls wants to merge 5 commits into
mainfrom
session/sunny-wolf-435-l1-skeleton-collapse-followup
Closed

PM#3469
briansrls wants to merge 5 commits into
mainfrom
session/sunny-wolf-435-l1-skeleton-collapse-followup

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session sunny-wolf-435.
Pushing to session/sunny-wolf-435-l1-skeleton-collapse-followup advances this PR.

Worker attestation

Before flipping this PR to ready for review, confirm each item:

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why (replace the TODO below).
  • Tests run: name the command (e.g. npm test, cargo test) and the result.
  • If this closes a work item, the body contains a Closes #N directive.
  • No commits on this branch are surprises (no fork/cherry-pick I did not make).
  • No secrets / credentials / large binaries staged.

Summary

TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.

Test plan

  • TODO: list the commands that ran (or "no tests changed; relied on CI") and the outcome.

briansrls and others added 5 commits May 21, 2026 01:29
…match_arm_skeleton derived stage

Follow-up to PR #3455 (L1.13 merged). Addresses post-merge BLOCKING
inline review: L1.13 introduces skeleton extraction as a required
derived fact but §10's dependency model wasn't updated with the
producer/consumer stage — leaving facts-flow-forward (INVARIANTS P2)
unresolved.

Added:
- §10.1 row: "Match-arm RHS skeleton + histogram" produced by new
  v4.lens.match_arm_skeleton derived stage, consumed by L1.13
- §10.2 fourth derived-stage entry: v4.lens.match_arm_skeleton with
  consumes/produces declaration, reusable-by note (L1.13, future
  L1.13.b, future match-as-typed-table lens), and algorithm sketch
- Updated heading from "Three small derived stages" to "Four"

Mirrors the existing pattern (match_arm_shape / closed_vocab_scan /
concept_home) — small deterministic fold producing a typed shared
index multiple lenses can consume.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…codex #2 + #3)

Address two additional codex BLOCKING findings on PR #3455 (merged):

#2 — Outlier auto-fix conflated skeleton-equality holes with executable
   replacement syntax. "Substitute constructor with _ wildcard" works
   for COMPARING arms but doesn't produce compilable code when the
   constructor appears in the RHS.
   Fix: split Outlier fix-confidence by RHS form:
   - (a) Constructor NOT in uniform RHS → Direct auto-apply
     (literal `_ => <uniform_RHS>`)
   - (b) Constructor IS in uniform RHS → Templated auto-apply (bind
     the matched value via `c => <RHS_with_c_substituted>`)
   Explicit note that the wildcard-substitution form is for arm
   comparison only, not executable code generation.

#3 — F14 worked example wrapped the singleton group with
   `{ kind: ModeledKind }` despite the sub-coproduct having only one
   member. That's overhead, no discrimination work.
   Fix: singleton groups become fieldless top-level variants; only
   non-singleton groups carry `{ kind: <SubKind> }` wrappers. Updated
   F14 example accordingly; added general rule applicable to all
   MultiOutlier / Categorical dissolutions.

#1 (§10 dependency-model entry) was addressed in commit 260685c
earlier on this same branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nstructor-hole presence (briansrls BLOCKING #3466)

Findings (Facts Flow Forward / P2 single authority):
- SkeletonReport carried only summary counts/histogram/classifier_shape,
  but the L1.13 auto-fix mechanism (Outlier (a)/(b) split → Direct vs
  Templated; MultiOutlier/Categorical → templated wrapping-variant
  names) needs:
    1. Per-arm group membership (which arms collapsed to which
       skeleton-equivalence class)
    2. Constructor-hole presence per skeleton (drives Outlier
       Direct-vs-Templated distinction)
    3. Matched-constructor list per group (derives MultiOutlier/
       Categorical default wrapping-variant names)
  Without these, the auto-fix has to re-walk arms = second authority
  computing the same normalization = P2 violation.

Fix:
- §10.1 row reworded to explicitly include the new fields.
- §10.2 SkeletonReport schema expanded with SkeletonGroup record:
  { skeleton, arm_ids, constructor_hole_present, matched_constructors }.
- Algorithm sketch updated to reflect group-level emission.
- Added explicit 'Facts Flow Forward (Practice 3)' clause stating no
  consumer re-walks arms or re-derives skeleton equivalence.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… consumes: list (briansrls BLOCKING #3466)

Finding: §10.3's v4.lens.dissolution consumes-declaration listed the
other §10.2 derived stages but omitted v4.lens.match_arm_skeleton —
leaves the one-pipeline dependency graph incomplete and contradicts
THESIS dependency-modeling + INVARIANTS P2 single-authority discipline.
The dissolution stage IS the L1.13 consumer, so it must declare the
edge so the compiler's existing stage-ordering can schedule
match_arm_skeleton before dissolution (same machinery as 04_infer
after 03_resolve).

Fix: add v4.lens.match_arm_skeleton to the consumes list.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Duplicate draft on the same branch as PR #3466 (the canonical L1.13 follow-up that has been in review). Auto-snapshot artifact; closing.

— sent from sunny-wolf-435

@briansrls briansrls closed this May 21, 2026
This was referenced May 21, 2026
Closed
Closed
Closed
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