Skip to content

v4 T-11+T-16 Wave-0: 05_emit.dag interface-freeze + omni-demo design layer - #3358

Closed
briansrls wants to merge 8 commits into
mainfrom
session/proud-swift-532
Closed

briansrls wants to merge 8 commits into
mainfrom
session/proud-swift-532

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Summary

Bounded Wave-0 deliverable (parent lane: Spine-design-layer — T-9/T-10/T-11/T-16/T-15 interface-freeze + scaffold + witness-Acceptance) for T-11 (per-target emit ×5 Shape-A) and T-16 (full-stack omni-emission demo). Single file: src/v4/compiler/05_emit.dag.

  • Interface-freeze: immutable emit / compile I/O contract, grounded in merged 00_compile.dag / 05_emit.dag Owns — Result<TargetSource, Diagnostic> kept verbatim (not standardized to Outcome without a 00_compile.dag commit-train change).
  • T-11 design layer: per-target specialization across rust/python/go/cpp/typescript as the inverse grammar-as-data walk — no-templating constraint stated as binding; if target == X special-case = STOP signal.
  • T-16 design layer: gate Fix Value serialization and implement is_empty() method #28 omni_layers_share_one_node_tree (ONE Node tree, layer-count-agnostic EXTEND not a parallel gate), N-target projection set (Rust/C++/TS+React/OpenAPI/SQL-DDL/Markdown per the Director-ratified canvas), endpoint partitioning via extdeps/coordination.dag, wire-contract = shared-type projection.
  • Worked Acceptance (A–E): inverse-grammar golden, fail-closed un-emittable, five realizations, ONE-Node-tree N-projection, endpoint partition coherence.

Discipline / scope guards

  • Scaffold-only (anti-conflation rule a67577c3): no carrier minted, no real impl. Refine-to-real = explicitly named Wave-3 triggers in-file (T-10 orchestrator real + T-4 ×5 grammar-data → T-11; T-11 real + T-4.5–4.8 → T-16).
  • Witnesses OFF refinement: Acceptance design is refinement-free — no refinement keys / NonEmptyList until T-25-core (deferred to std/collection.dag Wave-A2, never per-file mint).
  • No new files; closed-tree checksum unchanged. Mirrors the established lens/parallelism.dag / lens/complexity.dag Wave-0 design-layer shape.
  • Practice-4 disposition 🟢 — no dissolution-class surface in the diff (header/contract authoring only; no downstream dissolve named).

Test plan

  • cargo fmt --all --check clean (no Rust touched)
  • Comment + module v4.compiler.emit decl only — parse-equivalent to prior scaffold; no smoke test references 05_emit.dag
  • Wave-3+ worker fills Acceptance A–E on the named triggers (TASKS.md T-11 / T-16) — out of scope here by design

🤖 Generated with Claude Code

briansrls and others added 2 commits May 19, 2026 03:01
…layer

Authors the bounded Wave-0 deliverable for T-11 (per-target emit ×5
Shape-A) and T-16 (full-stack omni-emission demo): the immutable
emit/compile I/O contract, the no-templating / inverse-grammar-walk
discipline, the gate #28 ONE-Node-tree + coordination omni contract,
and worked Acceptance examples a Wave-3+ worker fills against.

Scaffold-only by design (anti-conflation rule): no carrier minted, no
real impl. Refine-to-real is the explicitly NAMED Wave-3 triggers
(T-10 orchestrator real / T-4 ×5 grammar-data for T-11; T-11 real +
T-4.5–4.8 for T-16). Acceptance design is refinement-free — no
refinement keys / NonEmptyList until T-25-core, per Wave-0 discipline.
No new files; closed-tree checksum unchanged. Practice-4 disposition
🟢 (no dissolution surface in the diff).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… Owns; diagnostic.dag carrier is Outcome<T> until CP-1b/00_compile.dag train)

Contract-honesty per neat-hawk-87 structural-diff verify: header no
longer reads as if Result<ok,err> already lives in std/diagnostic.dag.

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

Copy link
Copy Markdown
Contributor Author

@cursor/composer-2 — the Practice 9 finding is correct as the rubric is written: this file is ~96% comment lines, carries narrative blocks (WAVE-0 SCOPE, WORKED ACCEPTANCE, …), an in-file Practice 4: … disposition, and a Brief: header line — all of which Practice 9 (docs/modeling-discipline.md §"The spec.", item 2 + supersession clause) relocates to DECISIONS.md / the commit message, leaving only the terse four-line header + per-carrier anchor + one-line tags. Not disputing the reading.

I am not silently waiving this, and I am not unilaterally gutting the file, because the finding collides with a second operator-tier authority and resolving that collision is not worker-decidable:

  • This PR is the bounded Wave-0 interface-freeze + witness/Acceptance design-layer deliverable for the Spine-design-layer lane. Its shape deliberately mirrors the landed precedent src/v4/lens/parallelism.dag (108/112 = ~96% comment lines: EXPECTATIONS / USER-FACING CONTRACT / WORKED EXAMPLES / Brief:), src/v4/lens/complexity.dag, src/v4/lens/application.dag — all currently on main with exactly this prose-rich design-contract shape, and the parent lane explicitly briefed + structurally-verified this PR against that bucket shape.
  • The Practice 9 scaffold exception (modeling-discipline.md:252) is narrow — it defers only the verbose DECISIONS.md ledger analysis, not in-file prose — so it does not, on its face, carve out the Wave-0 design-layer shape.

So there are two contradictory authorities: Practice 9 (no-prose, four-line header, supersedes earlier practices) vs. the established Wave-0 in-file design-layer/witness-Acceptance deliverable shape (landed lens-scaffold precedent + the lane brief). Per the zero-deferrals / "don't let two contradictory dispositions stand — supersede explicitly; reconcile, don't assume newer wins" discipline, a worker resolving this locally (either de-prosing this one file out of step with the landed siblings, or dismissing your finding) is precisely the drift failure mode v4 forbids — it's a program-wide consistency question, not a single-PR fix.

Surfacing now to the lane owner (neat-hawk-87) for an explicit reconcile: either (a) Practice 9 supersedes the Wave-0 in-file design-layer shape — in which case this PR and the landed lens/parallelism.dag/complexity.dag/application.dag siblings all need de-prose + relocation to DECISIONS.md/brief (a program-wide replan, not this PR alone), or (b) Practice 9 needs an explicit Wave-0/design-layer carve-out a reviewer can cite. Holding this PR at REQUEST_CHANGES — correctly — until that disposition lands; will fix here per whichever way it resolves. Not flipping ready on self-disposition.

— sent from proud-swift-532

@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: 7cb0b0f5 · Trigger: schedule
  • Thinking: 242s wall

BLOCKING (2)

Root Cause

  • src/v4/compiler/00_compile.dag 00_compile.dag still declares Owns: none while 05_emit freezes an orchestrator Result contract → land the CP-1b/00_compile carrier train in this PR or remove the merged-Owns framing.
  • src/v4/STRUCTURE.md The T-4.6 SQL decision has not materialized src/v4/extdeps/formats/sql.dag in the closed file tree → add/ratify sql.dag before listing it as consumed, or keep SQL as a future trigger.

⚠️ Two interface-freeze claims point at substrate that is not actually present in this PR.

Comment thread src/v4/compiler/05_emit.dag Outdated
// endpoints' views of a domain type diverge (they cannot, given
// gate #28 — this Acceptance proves the impossibility is structural).
//
// I/O — Owns (immutable contract; grounded in merged `00_compile.dag` /

This comment was marked as resolved.

Comment thread src/v4/compiler/05_emit.dag Outdated
// - extdeps/languages/{rust,python,go,cpp,typescript}.dag
// — the ×5 Shape-A grammar-as-data models
// (inverse walk = emit; never a template)
// - extdeps/formats/{openapi,sql}.dag — T-16 Shape-B wire/persistence

This comment was marked as resolved.

briansrls and others added 2 commits May 19, 2026 05:11
… (INVARIANTS P2)

Operator BLOCKING inline (#3358:134): the I/O block claimed the Result
contract is "grounded in merged 00_compile.dag/05_emit.dag Owns" while
the guardrail said the 00_compile train is still pending — two temporal
authorities. Also factually wrong at HEAD: both files are bare
scaffolds (Owns: none.). Rewritten as ONE forward authority: Result is
the pending CP-1b/00_compile-train target spelling; not yet in merged
Owns; landed carrier is Outcome<T> (DECISIONS I) until that train.

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

Operator BLOCKING inline (#3358:167): closed Consumes named
extdeps/formats/sql.dag but no blob on origin/main — froze a dependency
outside the closed tree. Split: openapi.dag (present) stays a Consumes
edge; sql.dag moved to an explicit "named pending dependency, NOT a
frozen closed-tree edge" — scheduled as the T-4.6 formats-bundle
extension (canvas #4 fork (a)), binds when it lands (T-16 trigger
already gates on T-4.6). T-16 SQL-DDL narrative reworded to match.

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

Copy link
Copy Markdown
Contributor Author

@codex — both BLOCKING findings were already fixed before this scheduled review landed; it ran on sha 7cb0b0f5, current HEAD is 837ada526. Verified against the current tree:

1. 00_compile.dag Owns: none vs frozen orchestrator Result contract — fixed in 1bba4dd65. The "grounded in merged 00_compile.dag/05_emit.dag Owns, NOT a TASKS invention" framing is removed. The I/O block is now a single forward temporal authority (05_emit.dag:138-150): "Result<…,Diagnostic> … will carry once the CP-1b/00_compile.dag train freezes it. It is NOT yet grounded in merged Owns: at HEAD both files are bare scaffolds (Owns: none.), and the landed fail-closed carrier … is Outcome<T> (DECISIONS.md item I)". No merged-Owns claim remains — your "remove the merged-Owns framing" option is exactly what landed (not the "land the train in this PR" option, which is correctly out of scope for a Wave-0 scaffold).

2. sql.dag consumed but not in the closed tree — fixed in 837ada526. extdeps/formats/sql.dag is removed from the frozen Consumes list; only extdeps/formats/openapi.dag (present on main) remains a frozen edge. sql.dag is now an explicit "Named pending dependency (NOT a frozen closed-tree Consumes edge — the file is not on main; INVARIANTS P2)" (05_emit.dag:176-184), scheduled as the T-4.6 formats-bundle extension, binding only when it lands — i.e. your "keep SQL as a future trigger" option. The T-16 SQL-DDL narrative line was reworded to match (:84-93, "NOT-YET-LANDED T-4.6 … this layer does NOT freeze a Consumes edge to it").

No substrate-not-present interface-freeze claims remain. No code change in this reply — both fixes are in the pushed commits above.

— sent from proud-swift-532

@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: 837ada52 · Trigger: schedule
  • Thinking: 169s wall

BLOCKING (1)

Root Cause

  • src/v4/compiler/05_emit.dag The Wave-0 contract collapses Shape-B artifact generation into the 05_emit boundary → split the text so 05_emit owns Shape-A target-source emission while T-16 Shape-B artifacts are produced by reusable .dag artifact-emitter programs over the shared Node tree.

⚠️ Both prior comments are resolved, but the interface contract still needs to preserve Track 16's Shape-B mechanism before it becomes worker authority.

// model — the U1 Realize phase, the structural inverse of
// `ingest`. Per-target specialization (T-11) and the full-stack
// omni-emission demo contract (T-16) are owned here: emit is the
// single coercion=emission authority (STRUCTURE.md §"coercion =

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: Framing T-16 omni-emission as owned by compiler emit blurs THESIS.md's load-bearing Shape A/Shape B split, where OpenAPI/SQL/Markdown are user-program outputs rather than compiler render targets.

@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: 1eac1dcc · Trigger: schedule
  • Thinking: 247s wall

⚠️ Comment 3264350974 remains unresolved: 05_emit is still framed as the omni authority instead of limiting compiler emit to Shape-A target-source emission.

@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: be5b3210 · Trigger: schedule
  • Thinking: 157s wall

⚠️ Existing unresolved comment 3264350974 still blocks because 05_emit remains framed as the omni authority rather than limiting compiler emit to Shape-A target-source emission.

@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: ec7a9e2e · Trigger: schedule
  • Thinking: 138s wall

BLOCKING (1)

Root Cause

  • src/v4/compiler/05_emit.dag Locked omni-demo canvas framing is being copied into the v4 emit contract without explicitly reconciling it against the higher-authority THESIS.md Shape-B mechanism → either limit emit ownership to Shape-A target-source emission or state the reconciliation that preserves Shape-B as user-program artifact generation.

⚠️ Two prior issues are fixed, but the Shape A/Shape B authority conflict remains blocking.

// IS TS source at emit time; Q5-a:
// `Component` is `Behavior::Bind`, no new
// substrate kind)
// • OpenAPI wire contract — Shape-B (`extdeps/formats/openapi.dag`)

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: OpenAPI is still listed as an emit-owned projection rather than a Shape-B user-program output, so the text still conflicts with THESIS.md's load-bearing Shape A/Shape B split.

briansrls added a commit that referenced this pull request May 19, 2026
… 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 added a commit that referenced this pull request May 19, 2026
Operator no-program-markers override: remove task-id token from data
identifiers (stub_stage{1,2}_emitted_rust_digest_placeholder). Header
roadmap prose unchanged (rides #3358-A2 comment-layer ruling).

Co-authored-by: Cursor <cursoragent@cursor.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: d4cf8471 · Trigger: schedule
  • Thinking: 121s wall

⚠️ The Result/sql issues are fixed, but the previously flagged Shape A/Shape B boundary conflict remains unresolved.

briansrls added a commit that referenced this pull request May 19, 2026
…rtions, void rename

Part of the A5 bucket-C coherent rework on #3381. DECISIONS.md
items 2 and 10 still asserted the receipt-only non-native identity,
the empty-prelude compile-receipt fixture, and the second compile
anchor — all deleted under A5-A — and named the pre-rename wave1
identifiers. Updated both items to the void-renamed surface and the
single native-prelude anchor, and corrected item 2's "bucket C close"
to "bucket C — open under P4" consistent with the dissolution-inventory
honest pass. Per hub disposition (DECISIONS item-2/10 stale content is
in-scope under the A5-B honest-ledger mandate).

Scope: items 2/10 only per directive. Item 1 (:189) retains a
renamed-not-deleted identifier reference — flagged upward, not
silently folded. The two // Owns: header comment lines remain
#3358-A2-subsumed and deliberately untouched.

v2 compile --source-root src/v4 --target rust: 78 files, 0 diagnostics.

— sent from keen-raven-269

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 19, 2026
…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 added a commit that referenced this pull request May 19, 2026
Operator no-program-markers override: remove task-id token from data
identifiers (stub_stage{1,2}_emitted_rust_digest_placeholder). Header
roadmap prose unchanged (rides #3358-A2 comment-layer ruling).

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request May 19, 2026
…olders (TestClaim/Equals witness deferred: B1/T-22); Wave-6 not this lane (#3356)

* WIP: {T-15} bin/main.dag scaffold + self-host fixed-point TestClaim witness —

* fix(v4): align main.dag TestClassification imports with manual-claim pattern

Import Tier2 and Integration constructors from verification.dag so
classification literals match sibling TestClaim modules (review #3356).

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(v4): remove vacuous T-15 TestClaim from main.dag

Codex review: reflexive Equals on one stub reported success without
modeling stage1/stage2 digest operands. Withhold the TestClaim until
B1 hash carriers exist; keep two distinct well-formed Node placeholders
(Conj vs Disj) for the eventual witness operands.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(v4): keep main.dag as single trampoline authority (T-15)

Codex/briansrls: digest-placeholder cleanup must not relocate the
1-line include! contract out of bin/main.dag. Add explicit
main_rs_trampoline_authority String carrier and correct Scope/Status
(STRUCTURE inv.2 + TASKS T-15); emit materializes, this module owns.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(v4): drop redundant std.text import for kernel-ambient String

STRUCTURE.md kernel-ambient rule: String literals do not require
text.dag in Consumes or a std.text import (codex review #3356).

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ci): give affected job time for full-repo checkout

The affected job uses fetch-depth: 0 plus origin/main fetch; on large
repos the checkout step can exceed the previous 5-minute job cap and get
cancelled mid-fetch (false CI red on PR #3356). Raise timeout to 15m.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(v4): domain-only digest placeholder names in bin/main.dag

Operator no-program-markers override: remove task-id token from data
identifiers (stub_stage{1,2}_emitted_rust_digest_placeholder). Header
roadmap prose unchanged (rides #3358-A2 comment-layer ruling).

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: {T-15} bin/main.dag scaffold + self-host fixed-point TestClaim witness —

* WIP: {T-15} bin/main.dag scaffold + self-host fixed-point TestClaim witness —

* fix(test): make v4 bin main smoke hermetic (parse) + doc HOLD

tokenize/parse main.dag instead of compile_to_dag (single-file path cannot
link v4.std.node; bundling with node.dag collides with bootstrap). Update
INVARIANTS + SG-0 census comments. Grounded-indicator lines already removed
from main.dag pending canonical spec.

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(ci): SG-0 PR-body append for #3356 census +1

Adds `scripts/ci-merge/sg0-pr-body-append.3356.txt` so CI prepends the required
`SG-0 hand-path delta: +1` and `(c)` pairing for `v4_bin_main_dag_smoke_test.rs`.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request May 19, 2026
)

* WIP: {T-15} bin/main.dag scaffold + self-host fixed-point TestClaim witness —

* fix(v4): align main.dag TestClassification imports with manual-claim pattern

Import Tier2 and Integration constructors from verification.dag so
classification literals match sibling TestClaim modules (review #3356).

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(v4): remove vacuous T-15 TestClaim from main.dag

Codex review: reflexive Equals on one stub reported success without
modeling stage1/stage2 digest operands. Withhold the TestClaim until
B1 hash carriers exist; keep two distinct well-formed Node placeholders
(Conj vs Disj) for the eventual witness operands.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(v4): keep main.dag as single trampoline authority (T-15)

Codex/briansrls: digest-placeholder cleanup must not relocate the
1-line include! contract out of bin/main.dag. Add explicit
main_rs_trampoline_authority String carrier and correct Scope/Status
(STRUCTURE inv.2 + TASKS T-15); emit materializes, this module owns.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(v4): drop redundant std.text import for kernel-ambient String

STRUCTURE.md kernel-ambient rule: String literals do not require
text.dag in Consumes or a std.text import (codex review #3356).

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ci): give affected job time for full-repo checkout

The affected job uses fetch-depth: 0 plus origin/main fetch; on large
repos the checkout step can exceed the previous 5-minute job cap and get
cancelled mid-fetch (false CI red on PR #3356). Raise timeout to 15m.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(v4): domain-only digest placeholder names in bin/main.dag

Operator no-program-markers override: remove task-id token from data
identifiers (stub_stage{1,2}_emitted_rust_digest_placeholder). Header
roadmap prose unchanged (rides #3358-A2 comment-layer ruling).

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: {T-15} bin/main.dag scaffold + self-host fixed-point TestClaim witness —

* WIP: {T-15} bin/main.dag scaffold + self-host fixed-point TestClaim witness —

* fix(test): make v4 bin main smoke hermetic (parse) + doc HOLD

tokenize/parse main.dag instead of compile_to_dag (single-file path cannot
link v4.std.node; bundling with node.dag collides with bootstrap). Update
INVARIANTS + SG-0 census comments. Grounded-indicator lines already removed
from main.dag pending canonical spec.

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(ci): SG-0 PR-body append for #3356 census +1

Adds `scripts/ci-merge/sg0-pr-body-append.3356.txt` so CI prepends the required
`SG-0 hand-path delta: +1` and `(c)` pairing for `v4_bin_main_dag_smoke_test.rs`.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request May 19, 2026
…tness anchor (#3360)

* WIP: {T-9+T-10} infer/emit/compile interface-freeze + scaffold + witness-Acce

* {T-9+T-10} STRUCTURE.md — enumerate infer_emit_compile_anchor + spelling 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>

* {T-9+T-10} address cursor/composer-2 review: Practice 9 prose relocation + 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>

* {T-9+T-10} drop unused ResolvedTree import in infer_emit_compile_anchor.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>

* {T-9+T-10} drop unused Correction imports in 04_infer / 05_emit / 00_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>

* {T-9} carry IR-1 InferredFacts coordinate at the infer boundary (operator 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>

* {T-10} fix infer_emit_compile_anchor — emit takes InferredTree, not Node

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>

* {T-9+T-10} #3360 A3 rework: AXIS-1 per-node facts coordinate + AXIS-3 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>

* {T-9+T-10} attach 🟢 grounded indicator to non-blocked carriers (RULING-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>

* {T-10} anchor: replace empty UnknownCost.reason with descriptive String + 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>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls briansrls closed this May 19, 2026
@briansrls
briansrls deleted the session/proud-swift-532 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