Skip to content

{T-9+T-10} infer/emit/compile interface-freeze + Wave-1 scaffold + witness anchor - #3360

Merged
briansrls merged 16 commits into
mainfrom
session/crisp-cat-892
May 19, 2026
Merged

briansrls merged 16 commits into
mainfrom
session/crisp-cat-892

Conversation

@briansrls

@briansrls briansrls commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

T-9/T-10 interface freeze + Wave-1 fail-closed scaffold + Tier-1 v2-compile witness anchor.

  • compiler/04_infer.dag (T-9): declares type InferredTree = Node (IR-1: not a new recursive type; A1/B4) and type AlgebraRef = Symbol (T-9 Theme-A audit Codex/graph viz test helpers #2 — Symbol name-reference to algebra inhabitance, NOT a type std/algebra.dag declares). fn infer(tree: ResolvedTree) -> Outcome<InferredTree> returns the fail-closed Rejected branch with a stage-locus infer_coercion_fold_not_realized diagnostic — synthesizing a candidate would leave the decidable Find fragment (DECISIONS C1). The InferredFacts 4-coordinate (resolved_type, inhabits, cost, descent) is documented as co-landing with lens/cost.dag's SymbolicCost declaration (T-12); 04_infer stays a boundary index per IR-1.
  • compiler/05_emit.dag (T-10): fn emit(tree: InferredTree, target: TargetModel) -> Outcome<TargetSource> returns fail-closed Rejected with emit_inverse_grammar_walk_not_realized. Wave-1's fail-closed branch upholds the no-templating constraint structurally (TASKS T-10 operator 2026-05-17).
  • compiler/00_compile.dag (T-10 orchestrator): single declaration site for type Source = String, type TargetModel = Node (TASKS T-10 Theme-A audit Remove LLM response caching module #9 — a model IS a Node per B2-OMNI), type TargetSource = String. fn compile(source: Source, target: TargetModel) -> Outcome<TargetSource> returns fail-closed Rejected with compile_pipeline_not_realized. Header documents Result vs Outcome literal alignment per DECISIONS item I.
  • test/claim/manual/infer_emit_compile_anchor.dag (witness-Acceptance): Tier-1 v2-bootstrap compile anchor mirroring the resolve_compile_anchor.dag shape — three anchor functions that exercise each Wave-1 boundary and the new types. v2-compiler run deferred to T-22 per test/v2_run_preflight/MOVE1_COVERAGE.txt.
  • STRUCTURE.md: enumerate the new manual anchor + bump checksum 73→74; align 00_compile / 04_infer / 05_emit scope-line prose with the typed Owns (TargetModel, Outcome<TargetSource>, bounded Find phase).

CP-1b/T-8-close coordination — TargetModel vs TargetSpec

The brief explicitly forbade unilateral cement on the TargetSpec / TargetModel single-spelling reconciliation. Per TASKS T-10:431-439 the operator-ratified Owns / B2-OMNI signature spelling has already moved to TargetModel; the legacy TargetSpec scope-line prose reconciliation is owned by gentle-heron-61's CP-1b/T-8-close train. This PR uses TargetModel exclusively (matching the brief signature and the operator-ratified Owns spelling) and:

  • Surfaced the choice up front to gentle-heron-61 via dashboard-message before authoring any code.
  • Confined TargetModel declaration to a single site (00_compile.dag) — 05_emit.dag imports it; if T-8-close picks TargetSpec instead, the rename touches one declaration site + three import lines.
  • Calls out the coordination in each touched header.

Test plan

  • cargo run --quiet --bin v2-compiler -- compile --source-root src/v4 --output-dir /tmp/v4-out → indexed 74 modules from 1 source roots / resolved 74 sources / compiled: 78 files emitted, 0 diagnostics. The interface-freeze types and Wave-1 boundary signatures type-check on the v2 bootstrap graph.
  • v2-compiler run against the new anchor functions: deferred until T-22 (matches resolve_compile_anchor.dag posture; DECISIONS CP-1b item 10).

Acceptance criteria (witness, T-9/T-10 interface freeze)

  • infer(ResolvedTree), emit(InferredTree, TargetModel), compile(Source, TargetModel) all type-check against their frozen signatures under v2-compiler compile --source-root src/v4 ✅
  • Each anchor returns Outcome::Rejected { diagnostic: … } carrying the stage-locus not_realized diagnostic — fail-closed Wave-1 boundary, never a fabricated Produced value (DECISIONS C1 / I) ✅
  • v2-compiler run execution is deferred until T-22.

briansrls and others added 2 commits May 18, 2026 23:03
…ing alignment

Reflect the T-9/T-10 interface-freeze scaffold (commit 576d957) in the
canonical tree enumeration: bump the .dag checksum 73→74 for the new
test/claim/manual/infer_emit_compile_anchor.dag witness; update the
00_compile.dag / 05_emit.dag scope lines to spell `TargetModel` /
`Outcome<TargetSource>` (TASKS T-10 Owns / B2-OMNI, DECISIONS I); spell
04_infer.dag's scope line as the bounded Find phase (DECISIONS C1 / IR-1).

CP-1b/T-8-close — TargetModel single-spelling coordination with
gentle-heron-61; no unilateral cement on TargetSpec.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls briansrls changed the title {T-9+T-10} infer/emit/compile interface-freeze + scaffold + witness-Acceptance — ResolvedTree→InferredTree→emit:(InferredTree,TargetModel)→Result; compile=emit∘core∘ingest; Outcome/IR-1 per DECISIONS; COORDINATE TargetSpec↔TargetModel single spelling with CP-1b/T-8-close (gentle-heron-61) — no unila {T-9+T-10} infer/emit/compile interface-freeze + Wave-1 scaffold + witness anchor May 19, 2026
@briansrls
briansrls marked this pull request as ready for review May 19, 2026 03:07
briansrls and others added 3 commits May 19, 2026 03:12
…ion + Consumes truth

Strip the multi-paragraph rationale blocks (IR-1, TargetModel/TargetSpec
coordination, no-templating, Result-vs-Outcome, acceptance criterion) from
the four .dag headers — per Practice 9 (modeling-discipline.md §9) the
record relocates to DECISIONS.md / commit message; the .dag keeps only
the terse four-line header + anchor (matches sibling
resolve_compile_anchor.dag posture).

Trim 00_compile.dag `Consumes:` to match real imports: drop
compiler/04_infer.dag and compiler/05_emit.dag — the orchestrator's
Wave-1 stub only imports std/diagnostic, std/node, std/text. The
`emit ∘ core ∘ ingest` composition that would bring those edges in is
deferred (Wave-1 fail-closed branch); `Consumes:` is dependency truth,
not logical-future.

Context (relocated from headers per Practice 9):
- IR-1 — InferredTree = Node + frozen 4-coordinate InferredFacts
  (resolved_type, inhabits, cost, descent); 04_infer is a boundary index.
- TargetModel single-spelling confirmed by gentle-heron-61 (CP-1b/T-8-close).
- No-templating — Wave-1 fail-closed branch upholds it structurally.
- Result-vs-Outcome — `Outcome<TargetSource>` per DECISIONS item I.
- Acceptance — `v2-compiler compile --source-root src/v4` reports
  74 modules indexed, 78 files emitted, 0 diagnostics; `v2-compiler run`
  deferred to T-22.

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

Addresses cursor/composer-2 #14563 exploratory observation — the anchor
exercises infer/emit/compile directly, never references ResolvedTree.

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

Addresses claude/claude-opus-4-7 #14603 exploratory observation — `Correction`
is imported but never referenced; only the `Unavailable {…}` variant literal
is used. Matches the spirit of d10ad85 (unused ResolvedTree import).

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

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: fc785302 · Trigger: schedule
  • Thinking: 308s wall

BLOCKING (1)

Root Cause

  • src/v4/compiler/04_infer.dag IR-1 is cited but not encoded → declare the InferredFacts coordinate on the infer boundary, or explicitly encode where those four facts live on Node before freezing emit/eval consumers.

⚠️ The interface-freeze needs to preserve the IR-1 inferred facts before this lands.

Comment thread src/v4/compiler/04_infer.dag Outdated
import v4.std.node { Node, Symbol }


type InferredTree = Node

This comment was marked as resolved.

…ator BLOCKING)

Addresses operator BLOCKING #3360 @ 04_infer.dag:24 — `type InferredTree = Node`
silently dropped the IR-1 four-field facts coordinate (resolved_type, inhabits,
cost, descent), violating P2 / facts-flow-forward at the T-9/T-10 interface.

Declare the coordinate flat per DECISIONS IR-1:

  type AlgebraRef = Symbol       // K-1 name-ref to algebra inhabitance (Theme-A #2)
  type CostRef    = Symbol       // K-1 name-ref to a `lens/cost.dag` SymbolicCost
                                 // (cost.dag declaration deferred per T-12; the
                                 //  Ref-by-Symbol pattern matches AlgebraRef)
  type InferredFacts {
    resolved_type: Node          // the Node-typed type of this Node
    inhabits:      AlgebraRef
    cost:          CostRef
    descent:       DescentEvidence  // from std/cardinality.dag
  }
  type InferredTree {
    node:  Node
    facts: InferredFacts
  }

Cardinality and effects remain NOT fields per IR-1 — both carried by
`resolved_type`'s Node structure (the Cardinality connective / the signature).
The 4-field set is closed; a 5th field is a STOP.

`emit` / `compile` signatures unchanged (`InferredTree` is now a struct, but
the parameter shape stays the same). Wave-1 anchor unchanged — fail-closed
`Rejected` branch doesn't construct an `InferredTree`.

v2 compile: 74 modules, 78 emitted, 0 diagnostics.

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

Copy link
Copy Markdown
Contributor Author

Both BLOCKING reviews flagged the same root cause — IR-1 was cited but not encoded; type InferredTree = Node silently dropped the four-field facts coordinate. Addressed in 5506f69 (pushed before this relay arrived): 04_infer.dag now declares InferredFacts { resolved_type, inhabits, cost, descent } flat per IR-1 and InferredTree { node, facts } carries it. CostRef = Symbol mirrors the AlgebraRef = Symbol K-1 name-ref pattern (the SymbolicCost lattice itself stays at lens/cost.dag per T-12). Cardinality and effects remain non-fields per IR-1 (carried by resolved_type's Node structure). v2 compile: 74 modules, 78 emitted, 0 diagnostics. — sent from crisp-cat-892

Addresses cursor/composer-2 REQUEST_CHANGES #14641 — after 5506f69
declared `type InferredTree { node: Node, facts: InferredFacts }`, the
`anchor_emit_wave1_rejects` call site still passed a bare `Node`, breaking
the interface-freeze witness it was meant to exercise.

Construct a minimal well-typed stub:

  data anchor_stub_algebra_ref: AlgebraRef = anchor_stub_algebra_ref
  data anchor_stub_cost_ref:    CostRef    = anchor_stub_cost_ref
  data anchor_stub_inferred_facts: InferredFacts = InferredFacts {
    resolved_type: anchor_stub_empty_conj,
    inhabits:      anchor_stub_algebra_ref,
    cost:          anchor_stub_cost_ref,
    descent:       DescentUnknown
  }
  data anchor_stub_inferred_tree: InferredTree = InferredTree {
    node: anchor_stub_empty_conj, facts: anchor_stub_inferred_facts
  }

`emit` now receives `anchor_stub_inferred_tree`. The fail-closed `Rejected`
branch is unchanged; the witness now actually pins the frozen `(InferredTree,
TargetModel) -> Outcome<TargetSource>` signature.

v2 compile: 74 modules, 78 emitted, 0 diagnostics.

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

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 3ab0aea6 · Trigger: schedule
  • Thinking: 325s wall

BLOCKING (1)

Root Cause

  • src/v4/compiler/04_infer.dag IR-1's flat per-node coordinate was encoded as a root wrapper -> encode the facts coordinate for every Node before freezing emit/compile.

⚠️ The prior field set is present, but the interface still drops inferred facts below the root.

Comment thread src/v4/compiler/04_infer.dag Outdated


type InferredTree {
node: Node

This comment was marked as resolved.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 804f479d · Trigger: schedule
  • Thinking: 198s wall

⚠️ No new blocking findings; request changes remains for the unresolved prior per-node InferredFacts propagation blocker.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 9f151a50 · Trigger: schedule
  • Thinking: 318s wall

BLOCKING (1)

Root Cause

  • src/v4/compiler/00_compile.dag Target boundary carrier ownership is placed on the orchestrator → move TargetModel/TargetSource authority to the emit target contract or an existing non-orchestrator substrate carrier, then have compile consume emit.

⚠️ One new boundary-direction issue should be fixed before freezing this interface, and prior comment 3264313100 remains unresolved.

module v4.compiler.emit


import v4.compiler.compile { TargetModel, TargetSource }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: 05_emit imports TargetModel and TargetSource from the compile orchestrator, which inverts the pipeline dependency that compile will need to realize emit ∘ core ∘ ingest and violates INVARIANTS P2 boundary discipline.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 03745206 · Trigger: schedule
  • Thinking: 278s wall

BLOCKING (1)

Root Cause

  • src/v4/compiler/04_infer.dag IR-1/T-9 records the AlgebraRef Symbol disposition but not the cost coordinate's authority → either point CostRef at a declared cost carrier with a named reference target and dissolution receipt, or make the cost coordinate structural before freezing the boundary.

⚠️ The remaining interface-freeze gap is narrow, but it should be fixed before downstream emit/eval/lens consumers depend on this shape.

Comment thread src/v4/compiler/04_infer.dag Outdated
type AlgebraRef = Symbol


type CostRef = Symbol

This comment was marked as resolved.

briansrls and others added 2 commits May 19, 2026 14:08
… needs-work cost + R8 NAMING (ruled-shape author)

Authors the ruled-shape per operator rulings R7+R1+R8 (relayed via vivid-carp-207
→ neat-hawk-87 msg_c5dfd3c8). PIVOT-3 head-move authorized for identifier +
structural-separation fixes; no merge. Hard hold lifts only for these ruled
shapes; comment/header text remains folds-pending-#3358-A2.

Pre-author shape-re-confirm vs accumulated scope (msg_dbbbbcc3):
  - AXIS-1 ruled: simplest Map<Node, InferredFacts> per-node coordinate
  - AXIS-2 NOT ruled: do NOT author carrier-ownership/import-direction (Source /
    TargetModel / TargetSource module-ownership stays as-is, surfaced cleanly
    for hub disposition)
  - AXIS-3 ruled: drop hollow CostRef alias; mark cost coordinate with R1 🟡
    needs-more-work indicator + co-located testcase (anchor_stub_cost_symbol)
  - NAMING items 1-3 ruled (R8 immediate-authorized): rename anchor_*_wave1_rejects
  - Folds-pending-#3358-A2: header / comment-text TASKS / Wave / IR / CP prose
    untouched per R8 split
  - S1/S2/S3 clause-iii SEPARATION (numbered compiler stages) unchanged: clean

Changes:

  04_infer.dag (AXIS-1 + AXIS-3):
    type InferredTree { node: Node, facts: Map<Node, InferredFacts> }  // per-node coordinate
    type InferredFacts {
      resolved_type: Node
      inhabits:      AlgebraRef
      // 🟡 needs-more-work — SymbolicCost owner = lens/cost.dag T-12
      cost:          Symbol                                 // not-yet-grounded; co-located testcase
      descent:       DescentEvidence
    }
    (CostRef alias dropped; was hollow Symbol alias per R7.)
    import v4.std.collection { Map } added; consumes line updated.

  infer_emit_compile_anchor.dag (AXIS-1 + AXIS-3 + R8 NAMING):
    - anchor_stub_cost_symbol: Symbol with 🟡 needs-more-work marker
    - anchor_stub_empty_facts_map: Map<Node, InferredFacts> with Violates-based
      lookup (Wave-1 fail-closed; the per-node coordinate is honest about
      not-yet-realized)
    - anchor_stub_inferred_tree: InferredTree { node, facts: anchor_stub_empty_facts_map }
    - renamed anchor_{infer,emit,compile}_wave1_rejects → anchor_{infer,emit,compile}_rejects

Acceptance:
  cargo run --quiet --bin v2-compiler -- compile --source-root src/v4 --output-dir /tmp/v4-out
  → indexed 75 modules / resolved 75 sources / compiled: 79 files emitted, 0 diagnostics

PIVOT-3 honored: no merge. AXIS-2 surfaced separately to neat-hawk-87.

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

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 1407aa3b · Trigger: schedule
  • Thinking: 294s wall

BLOCKING (1)

Root Cause

  • src/v4/compiler/04_infer.dag IR-1 freezes per-node facts as a partial lookup beside the root Node rather than a total coordinate over the root's Node fold -> make fact coverage structural on InferredTree before freezing the T-9 boundary.

⚠️ The infer boundary still admits incomplete inferred trees, so the interface should be tightened before downstream emit/eval/lens consumers depend on it.


type InferredTree {
node: Node
facts: Map<Node, InferredFacts>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: InferredTree.facts is an unconstrained Map<Node, InferredFacts>, so a Produced InferredTree can omit facts for the root or children and still type-check, leaving IR-1 per-node fact coverage enforced by convention rather than INVARIANTS P2/API-level enforcement.

…G-1 immediate)

Per operator-direct ★ GROUNDEDNESS-CRITERION-ATTACHED standing (relayed via
vivid-carp-207 → neat-hawk-87 msg_139f8799): every type/carrier carries the
RULING-1 dead-simple two-state grounded indicator (🟢 pretty-much-done / 🟡
needs-more-work) + co-located testcases-nearby; IMMEDIATELY program-wide;
single-line mark on the type, NOT prose (comment-text rubric still rides
#3358-A2-(i)).

Shape-re-confirm vs accumulated scope (msg_dbbbbcc3): groundedness directive
ADDS to the accumulated scope; no conflict with prior rulings; eligible
subset = carriers NOT on a surface with an open operator thread.

Eligible carriers in #3360 diff scope, marked 🟢 grounded:
  - 04_infer.dag :: AlgebraRef = Symbol      (K-1 name-ref Symbol; testcase: anchor_stub_algebra_ref)
  - 00_compile.dag :: Source = String        (kernel-ambient alias; testcase: anchor_stub_source)
  - 00_compile.dag :: TargetSource = String  (kernel-ambient alias; testcase: emit returns Outcome<TargetSource> in anchor_emit_rejects)

Skipped (surface blocked by an open operator-owned BLOCKING thread):
  - InferredTree    (T1/T2/T5 — Axis-1 root, reinforcement, totality accretion)
  - InferredFacts   (T4 — Axis-3 cost-field hollow-alias 🟡 already attached)
  - TargetModel     (T3 — Axis-2 carrier ownership / import inversion)

Co-located testcase evidence already present in the witness anchor
(test/claim/manual/infer_emit_compile_anchor.dag) per RULING-1 "evidence for
state 2".

v2 compile: 75 modules, 79 emitted, 0 diagnostics. PIVOT-3 honored: no merge.

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

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 84f99e50 · Trigger: schedule
  • Thinking: 253s wall

⚠️ No new independent findings, but prior blocking comments on emit's compile import and total InferredTree fact coverage remain unresolved.

…InferredTree/InferredFacts/AlgebraRef types; fold #3360 boundary-index on top.

Routine integrate-main merge required by dashboard merge-conflict relay.
Per forward-brief (msg_52257a45): MERGE not rebase; conflicts resolved as
one coherent rework.

Conflict: src/v4/compiler/04_infer.dag — main has the operator-ratified
canonical IR-1 types (independent T-22 / eval-lane work):
  - AlgebraRef = struct { algebra: Node, witness: Node }   (typed bridge; no longer Symbol-alias)
  - InferredFacts.cost: SymbolicCost                       (real lens/cost.dag carrier; resolves AXIS-3 / T4)
  - InferredFacts.descent: TerminationProof                (cardinality.dag refinement)
  - InferredTree { root: Node, facts: Map<Node, InferredFacts> }  (per-node coordinate; resolves AXIS-1 / T1+T2 in shape)
  - Existing "RULING-1: needs-more-work" prose comments on the three types
    (authored on main before the grounded-indicator HOLD-pending-spec ruling
    — msg_d57d9e1a; left as-is, not expanded or reworked per the hold).

Resolution = ADOPT main's three type declarations verbatim; KEEP the #3360
Wave-1 boundary index pieces (infer() function + diagnostic data + locus port +
resolve import). #3360 contributions reduce to:
  - infer: ResolvedTree -> Outcome<InferredTree>           (Wave-1 fail-closed)
  - infer_stage_locus_port / infer_coercion_fold_not_realized / *_diagnostic
  - 00_compile.dag Source/TargetModel/TargetSource carriers + compile()
  - 05_emit.dag emit(InferredTree, TargetModel) -> Outcome<TargetSource>
  - test/claim/manual/infer_emit_compile_anchor.dag witness

Anchor rewired to construct main's-shaped types:
  - anchor_stub_algebra_ref: AlgebraRef { algebra: ..., witness: ... }
  - anchor_stub_cost: SymbolicCost = UnknownCost { reason: "" }
  - anchor_stub_ranking_dim + anchor_stub_termination_proof
  - anchor_stub_inferred_tree: InferredTree { root: ..., facts: ... }

Dropped from #3360 (superseded by main's canonical shape):
  - type AlgebraRef = Symbol (alias)
  - The 🟢 grounded mark on AlgebraRef (main's struct has its own RULING-1 line)
  - cost: Symbol with 🟡 prose block (main has cost: SymbolicCost real carrier)

Other 🟢 grounded marks on Source/TargetSource in 00_compile.dag retained
(authored pre HOLD-pending-spec correction; per msg_d57d9e1a "do not expand /
do not rework on guess — await spec for any correction pass").

AXIS-2 (emit imports from 00_compile) remains operator-tier still-open;
NOT authored in this merge resolution.

T5 (Map<Node, InferredFacts> totality) inherited as-is from main; the
unconstrained-Map concern persists in the merged shape — same operator-tier
accretion, NOT lane-resolvable here.

Census post-merge: T1/T2 in-content discharged AGAIN by main's canonical
shape (AlgebraRef + per-node Map). T4 in-content discharged by main's
cost: SymbolicCost real carrier. T3 unchanged (AXIS-2 still-open). T5
unchanged (totality still operator-tier).

v2 compile: 76 modules / 80 emitted / 0 diagnostics.

PIVOT-3 honored: no merge of the PR itself, only the integrate-main merge
into the branch. Hub-sanctioned routine integrate-main per msg_52257a45 /
msg_0f9e32a1 point-2c.

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

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: 47cabe98 · Trigger: manual
  • Comparison: main @ 020b25cb ... session/crisp-cat-892 @ 47cabe98
  • Conversation: View conversation

1. Story of the diff

This PR turns the v4 infer/emit/compile seam from mostly documented placeholders into typed .dag interfaces. 04_infer.dag now imports ResolvedTree, exposes infer(...) -> Outcome<InferredTree>, and preserves the IR-1 per-node fact coordinate through InferredTree.facts; 05_emit.dag exposes emit(InferredTree, TargetModel) -> Outcome<TargetSource>; and 00_compile.dag exposes the top-level compile(Source, TargetModel) -> Outcome<TargetSource>. All three stage functions currently fail closed through typed Diagnostic/Rejected values rather than pretending implementation exists, and src/v4/test/claim/manual/infer_emit_compile_anchor.dag gives the v4 whole-tree compile path a manual anchor that constructs enough witness data to typecheck those seams until T-22 can execute them. STRUCTURE.md records the new manual anchor and updates the v4 checksum.

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation). — Finding

src/v4/compiler/05_emit.dag:12 imports TargetModel and TargetSource from v4.compiler.compile, while 00_compile.dag is the higher-level orchestrator that says its contract is emit ∘ core ∘ ingest at src/v4/compiler/00_compile.dag:2 and owns compile(...) at src/v4/compiler/00_compile.dag:50. That freezes the dependency direction backwards: the stage that compile must eventually call already depends on the orchestrator module for its interface carriers, so realizing compile by importing emit would introduce an orchestrator↔stage cycle or force another bridge. Boundary Discipline wants each fact in one authoritative place and lower layers not coupled to their caller; move the shared target/source carriers to a lower/common interface authority, or let the stage own the stage-specific carriers and have the orchestrator import them.

  1. INVARIANTS.md + modeling-discipline.md. — Finding

src/v4/test/claim/manual/infer_emit_compile_anchor.dag:59 constructs UnknownCost { reason: "" }. This is a C-9-style fabricated empty string for a missing reason, and it is especially telling because the file has just introduced anchor_stub_cost_reason_symbol at src/v4/test/claim/manual/infer_emit_compile_anchor.dag:56 but does not use it. The fail-closed shape elsewhere is good, but the witness anchor should still carry a real typed or at least non-empty reason rather than making “unknown because empty string” a plausible modeled value. Use the named reason carrier or a non-empty String reason that identifies the anchor stub.

  1. CODING.md. — Compliant

The changed implementation is .dag, not Rust, and the new stage bodies are small free functions with structured inputs/outputs: compile(...) -> Outcome<TargetSource> at src/v4/compiler/00_compile.dag:50, infer(...) -> Outcome<InferredTree> at src/v4/compiler/04_infer.dag:65, and emit(...) -> Outcome<TargetSource> at src/v4/compiler/05_emit.dag:40. The comments are mostly terse headers/status tags rather than explanatory prose; no Rust method/object style issue is introduced.

  1. TESTING.md. — Compliant

The PR adds a .dag manual anchor rather than a Rust harness, and STRUCTURE.md:122 registers it under test/claim/manual. The anchor is explicitly scoped as “compile-only until T-22” at src/v4/test/claim/manual/infer_emit_compile_anchor.dag:5, which matches the current v4 parse/compile witness pattern; no new hand-authored Rust test debt is introduced.

  1. LOCKED DESIGN DECISIONS. — Compliant

The diff references the locked/planned seams rather than redefining them: 04_infer.dag:2 ties infer to DECISIONS C1 / IR-1, 05_emit.dag:2 ties emit to DECISIONS C5, and STRUCTURE.md:151 records T-22 as the execution deferral. I do not see a changed line that contradicts those named decisions; the dependency-direction finding above is an implementation/interface placement issue, not an explicit locked-design divergence.

  1. TRACKED vs UNTRACKED DEBT. — Compliant, except for the C-9 finding above

The stage scaffolds are documented and bounded: 00_compile.dag:5, 04_infer.dag:5, and 05_emit.dag:5 all mark the functions as T-9/T-10 Wave-1 fail-closed scaffolds, and STRUCTURE.md:151 names T-22 as the run deferral for the manual anchor. The remaining untracked shape I found is not a scaffold-boundary problem but the fabricated empty cost reason at infer_emit_compile_anchor.dag:59, already called out under fail-closed modeling.

2.5. Top-down PM intent review

Compliant. At the PM level, this PR is directionally faithful: it moves compiler pass contracts into v4 .dag, keeps not-yet-realized behavior as typed fail-closed Outcome rejections, and adds a manual witness anchor instead of new hand-Rust. I do not see a concrete diff-cited change that postpones a must-have target, turns dissolution into permanent scaffolding, or asks a worker to execute the wrong plan. The two findings are pre-merge interface hygiene issues: one prevents the frozen seam from creating a future compile↔emit cycle, and the other removes a fabricated witness value.

3. Verdict

REQUEST_CHANGES. The PR has the right fail-closed scaffold direction, but the emit→compile carrier import freezes an inverted layer dependency at the exact interface-freeze seam, and the manual anchor fabricates an empty cost reason. Both are small, localized fixes that should land before this becomes the stable Wave-1 boundary.

briansrls and others added 2 commits May 19, 2026 19:59
…ng + drop unused symbol

Addresses openai-pro/gpt-5.5-pro #15008 finding-2 — UnknownCost { reason: "" }
was a C-9-style fabricated empty value at infer_emit_compile_anchor.dag:59.

Drop the unused anchor_stub_cost_reason_symbol (declared in the merge resolution
but never referenced — oversight); replace the empty reason with a descriptive
String literal matching the on-main precedent (test/claim/workflow/
pipeline_rejections.dag:181 uses 'workflow pipeline inferred cost scaffold').

Finding-1 (AXIS-2 emit→compile import inversion) is unchanged — remains
operator-tier still-open under the hold; not lane-decidable.

v2 compile: 76 modules / 80 emitted / 0 diagnostics.

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

Copy link
Copy Markdown
Contributor Author

codex #15025 finding (STRUCTURE.md inventory not updated for the new anchor / checksum stale at 75): MOOT per operator-direct directive 2026-05-19 (relayed via vivid-carp-207 → neat-hawk-87, msg_e4531efc). Operator verbatim: "please also delete STRUCTURE.md" — same class as the DECISIONS.md nuke. The STRUCTURE.md manifest-update obligation and "stale/missing-entry" finding-class are explicitly retired; the hand-maintained enumerated-file manifest is killed as over-machinery. The coherent delete+INVARIANTS.md-dangling-ref reconcile is hub-program-dispatched via vessel node://adhoc-93a2d8b7-075, not authored from this lane. No commit needed on this finding. — sent from crisp-cat-892

@briansrls
briansrls merged commit 0279c8f into main May 19, 2026
7 checks passed
@briansrls
briansrls deleted the session/crisp-cat-892 branch June 1, 2026 18:42
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