Repository navigation
calm-ant-861 #953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
calm-ant-861 #953
Changes from 10 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
4e632ca
docs(audit): W-C1 follow-up harvest table
briansrls f6a460c
docs(audit): close #897/#824/#825 rows per bright-wolf-465 audit
briansrls c02ee52
docs(audit): reconcile note with row dispositions for #897/#824/#825
briansrls e97163a
WIP: calm-ant-861
briansrls 3b25ae1
chore: apply cargo fmt
briansrls cc8807a
WIP: calm-ant-861
briansrls b916bcc
fix(test): fold B5 Loop closure receipt into m1_substrate_test
briansrls 70bb993
Merge remote-tracking branch 'origin/main' into session/calm-ant-861
briansrls be4a6ab
docs: correct B5 receipt file path in synthesis doc (m1_substrate_tes…
briansrls db7b773
docs: mark ROADMAP loop-emission row resolved + correct synthesis cite
briansrls 09ff39c
fix(test): split global vs fixture-scoped Loop closure assertions
briansrls bbbaca3
Merge remote-tracking branch 'origin/main' into session/calm-ant-861
briansrls 32ad830
post-merge: drop superseded artifacts; correct ROADMAP B5 receipt cite
briansrls File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # W-C1 Follow-up Harvest Table (2026-04-27) | ||
|
|
||
| **Lane:** Cleanup (W-C1) | ||
| **Owner:** session calm-ant-861 (R2-cleanup) | ||
| **Dispatch:** tidy-dove-734 inbox #941 → calm-ant-861 inbox #942 | ||
| **Control surface:** No `ctrl#263` issue exists in repo (PR #263 is a closed/merged bootstrap PR, unrelated). Per dispatch fallback, this single docs/audit artifact is the agreed control surface for the W-C1 cleanup harvest. New rows append here; no per-row issues are opened unless a row's tracking authority demands it. | ||
|
|
||
| ## Disposition legend | ||
|
|
||
| - **closed** — finding addressed pre-merge or dissolved by a later landed change. | ||
| - **tracked** — finding stands; tracked by an existing ROADMAP row or peer worker; no new authority needed. | ||
| - **needs worker** — finding stands; no existing tracker; row below is the authority. | ||
|
|
||
| Coordination: bright-wolf-465 owns deeper archaeology for #897/#824/#825. Rows below are kept narrow so they can be dropped/merged when bright-wolf-465 reports. | ||
|
|
||
| ## Rows | ||
|
|
||
| | # | Source PR | Gap | File / Invariant | Owner lane | Dissolution trigger | Acceptance check | Tracking authority | Disposition | | ||
| |---|---|---|---|---|---|---|---|---| | ||
| | 1 | #900 | NominalOpacity carrier landed as opt-in field, not yet enforced | `src/v3/compiler/src/dag.rs:222` (`pub nominal_opacity: Option<NominalOpacity>`); walker has no fail-closed read | Modeling (#858) | Walker enforces NominalOpacity at every consumer; promote `Option<NominalOpacity>` to non-optional once Secret<T> graduates | `nominal_opacity: None` initialiser at `dag.rs:3689` is gone; walker raises Diagnostic on opacity violation; Secret<T> is the canonical user surface | control-table-only; cross-post to Modeling #858 | needs worker | | ||
| | 2 | #900 | Diagnostic for opacity violations is hand-Rust, not authored in `.dag` | (no `.dag` source yet) | Modeling (#858) | Author opacity Diagnostic in `dsl/std/` once walker enforcement lands | Diagnostic emitted from compiled `.dag`, not `src/v3/compiler/src/*.rs` | control-table-only | needs worker | | ||
| | 3 | #900 | Test fixture seeded `Some(NominalOpacity{..})` then re-set `nominal_opacity: None`, so the carrier path is not exercised — original BLOCKING (sha 42d4ef41) | `src/v3/compiler/src/dag.rs:3689` trailing `nominal_opacity: None` initialiser still present at HEAD (3a18fa80b) | R2-cleanup | Drop the trailing `None` so the Some-branch is compiled & tested | `grep -n nominal_opacity src/v3/compiler/src/dag.rs` shows no shadowing initialiser; test exercises the Some path | control-table-only | needs worker | | ||
| | 4 | #901 | `rest_request_wire_serde_alignment` not closed; opaque-Json removal landed but provider-specific wire shapes still missing — original BLOCKING (sha 6f494af6, 6 findings) | `dsl/extdeps/github/auth.dag` (no scope/expiry evidence on Secret-Manager token); `dsl/extdeps/llm/anthropic.dag` (role/content-block variants collapsed to product); `dsl/extdeps/llm/openai.dag` (role-keyed union flattened) | R2-cleanup or B4-substrate | Model role-discriminated wire carriers (anthropic/openai); model token scope+expiry as typed evidence (auth.dag) before any caller relies on typed-body 200s | Round-trip tests for each provider's wire shape pass; no caller pattern-matches on `Json` for these endpoints | ROADMAP row required (gates typed-body 200 callers) | needs worker | | ||
| | 5 | #920 | Bot review absent on merge commit; UCD citation missing from PR body | n/a (process gap) | R1-process / Cleanup | Re-run codex review on merge SHA `40740a6b`; add UCD citation pointer (or back-fill in next docs sweep) | PR #920 has a non-environmental codex review; UCD line present in either PR description or a follow-up docs commit | control-table-only | needs worker | | ||
| | 6 | #897 | ~~Annotated-let literal narrowing skips diagnostic-producing range/refinement check~~ | `src/v3/compiler/src/infer.rs` annotated-let literal seed path | R2-cleanup | — | bright-wolf-465 audit (inbox #945, 2026-04-27): annotated-let retry gated with diagnostic path + Diagnostic emission landed pre-merge; later codex re-review approved | — | closed (bright-wolf-465) | | ||
| | 7 | #824 | ~~Latest scheduled review env-failed; merge-SHA re-review needed~~ | n/a (review-coverage gap) | R1-process | — | bright-wolf-465 audit (#945): bootstrap snapshots refreshed pre-merge; serializer/tests fixed to Python literals; later codex approved/no findings | — | closed (bright-wolf-465) | | ||
| | 8 | #825 | ~~B4.4 carrier wired into fresh-regen but committed bootstrap snapshot + parity loop missing~~ | `src/v3/compiler/src/bootstrap.rs`; `bootstrap_generated.rs` / `bootstrap_generated_without_parse_surface.rs` | R2-cleanup | — | bright-wolf-465 audit (#945): committed snapshots regenerated pre-merge; parity test added; accessor/assert semantics tightened; later codex approved | — | closed (bright-wolf-465) | | ||
|
|
||
| ## Notes | ||
|
|
||
| - Rows 1–3 (#900) are kept distinct because the dissolution triggers are independent (walker, `.dag` Diagnostic authoring, and the fixture compile-shadow bug). Folding them risks losing the fixture row, which is a concrete pre-merge BLOCKING that the env-failed re-review never re-checked. | ||
| - Row 5 (#920) is process-only; if R1-process surfaces a recurring bot-review-on-merge gap, promote to ROADMAP rather than expanding rows here. | ||
| - Rows 6–8 are `closed (bright-wolf-465)` per audit reported on inbox #945 (sha-cited evidence: #897 fixed by `923c3ccfb`/`f7e334824`/`936ac7cdd`; #824 by `37a8d2033`/`5a08f9e15`/`e0a623a63`/`fb03411df`; #825 by `7fab462e8`/`f035183be`/`9927c14ba`). | ||
| - This file is the W-C1 control surface. Future cleanup-lane harvest entries append below the existing rows; do not split into per-PR files. | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| use v3_compiler::compile_to_dag; | ||
| use v3_compiler::dag::{ | ||
| ArrowBody, AtomPayload, Behavior, BranchPattern, Dag, DeclarationId, PortState, | ||
| TransformTarget, TypeConnective, | ||
| ArrowBody, AtomPayload, Behavior, BranchPattern, Dag, DeclarationId, LoopBound, LoopNode, | ||
| PortState, TransformTarget, TypeConnective, | ||
| }; | ||
| use v3_compiler::operators::{ArithmeticOp, ComparisonOp, LogicalOp, OperatorKind}; | ||
| use v3_compiler::Diagnostic; | ||
|
|
@@ -3204,3 +3204,94 @@ fn behavior_port(behavior: Behavior) -> PortId = | |
| dag.diagnostics() | ||
| ); | ||
| } | ||
|
|
||
| // --------------------------------------------------------------------------- | ||
| // B5 — Loop construction-closure structural receipt. | ||
| // | ||
| // Audit (W-B5, 2026-04-27): every `Behavior::Loop` in a lowered Dag originates | ||
| // from recursive-function lowering. Two production construction sites in | ||
| // `src/v3/compiler/src/lower.rs`: `finalize_mutual_clusters` (mutual cluster, | ||
| // `LoopBound::Descent`) and `lower_fn_item_expr_body` (single recursion, | ||
| // `LoopBound::Cardinality`). All other `push_loop` callers are `#[test]` code. | ||
| // Structural signature of recursive-function lowering: the loop's `output` | ||
| // port is the `value` port of some `Behavior::Bind` node. | ||
| // | ||
| // This receipt is the closure-holds proof that retires the speculative | ||
| // `LoopKind` marker — closure is structurally observable, no marker needed. | ||
| // --------------------------------------------------------------------------- | ||
|
|
||
| fn loops_in(dag: &Dag) -> Vec<&LoopNode> { | ||
| dag.nodes().iter().filter_map(Behavior::as_loop).collect() | ||
| } | ||
|
|
||
| fn loop_output_is_a_bind_value(dag: &Dag, loop_node: &LoopNode) -> bool { | ||
| dag.nodes() | ||
| .iter() | ||
| .filter_map(Behavior::as_bind) | ||
| .any(|bind| bind.value == loop_node.output) | ||
| } | ||
|
|
||
| #[test] | ||
| fn every_loop_node_originates_from_recursive_function_lowering() { | ||
| let src = "\ | ||
| type IntList = Empty | Cons { head: Int, tail: IntList } | ||
|
|
||
| fn count(list: IntList) -> Int = match list { | ||
| Empty => 0, | ||
| Cons(payload) => 1 + count(payload.tail), | ||
| } | ||
|
|
||
| fn even(list: IntList) -> Bool = match list { | ||
| Empty => true, | ||
| Cons(payload) => odd(payload.tail), | ||
| } | ||
|
|
||
| fn odd(list: IntList) -> Bool = match list { | ||
| Empty => false, | ||
| Cons(payload) => even(payload.tail), | ||
| } | ||
| "; | ||
| let dag = cached_compile_to_dag(src, "loop_construction_closure_receipt.v3"); | ||
| assert!( | ||
| dag.diagnostics().is_empty(), | ||
| "fixture should compile cleanly: {:?}", | ||
| dag.diagnostics() | ||
| ); | ||
|
|
||
| let loop_nodes = loops_in(&dag); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BLOCKING: The B5 receipt gathers every Loop in the bootstrap-loaded Dag, so the fixture non-vacuity and LoopBound assertions can be satisfied by preexisting std loops rather than the count/even/odd fixture; this leaves the ROADMAP loop-emission closure unproven under P5. |
||
| assert!( | ||
| !loop_nodes.is_empty(), | ||
| "fixture must produce at least one Behavior::Loop, otherwise the closure assertion is vacuous" | ||
| ); | ||
|
|
||
| let mut saw_cardinality = false; | ||
| let mut saw_descent = false; | ||
| for loop_node in &loop_nodes { | ||
| assert!( | ||
| loop_output_is_a_bind_value(&dag, loop_node), | ||
| "Behavior::Loop {:?} output port {:?} is not the value of any Behavior::Bind \ | ||
| — would indicate a construction site outside recursive-function lowering", | ||
| loop_node.id, | ||
| loop_node.output | ||
| ); | ||
| match loop_node.bound { | ||
| LoopBound::Cardinality { .. } => saw_cardinality = true, | ||
| LoopBound::Descent { cluster } => { | ||
| saw_descent = true; | ||
| assert!( | ||
| (cluster.raw() as usize) < dag.clusters().len(), | ||
| "LoopBound::Descent cluster id {:?} must reference a real cluster", | ||
| cluster | ||
| ); | ||
| } | ||
| } | ||
| } | ||
| assert!( | ||
| saw_cardinality, | ||
| "fixture's single-recursive `count` should produce a LoopBound::Cardinality" | ||
| ); | ||
| assert!( | ||
| saw_descent, | ||
| "fixture's mutual-recursive `even`/`odd` should produce a LoopBound::Descent" | ||
| ); | ||
| } | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BLOCKING: This makes a live cleanup-debt control surface authoritative without any ROADMAP entry or ROADMAP link, bypassing ROADMAP.md's tracker rule that internal follow-up state belongs in ROADMAP or docs it links to.