Skip to content

Ground v2.lens.complexity_linearity_audit's Rust wildcard-arm-over-closed-coproduct intrinsic into a .dag lens (same play as #6037/#6042) - #6189

Merged
briansrls merged 3 commits into
mainfrom
session/keen-cat-572
Jul 3, 2026
Merged

briansrls merged 3 commits into
mainfrom
session/keen-cat-572

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session keen-cat-572.
Pushing to session/keen-cat-572 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 3 commits July 3, 2026 02:07
… lens (same play as #6037/#6042)

Retire the Rust `triage_wildcard` classifier and the wildcard-triage counters
from `complexity_linearity_audit_project.rs`; move all bucket classification
(open-domain / migration-debt / kernel-permanent / closed-coproduct-debt) into
`v2.lens.complexity_linearity_audit` (.dag) as pure folds — single authority §3.

Thin Rust bridge keeps only what needs real fn-body/type parsing:
- new builtin `complexity_linearity_wildcard_facts()` -> raw facts
  {site, fn_name, closed_coproduct_wildcard, rostered}, one row per fn with a
  wildcard match arm (walk_expr / FnBodyStats / closed-coproduct param resolution).
- new builtin `complexity_linearity_migration_debt_roster()` -> the sub-roster as
  DATA so the .dag lens owns membership classification (contains), not a Rust predicate.
  Registered via the standard triple (04_method.dag, v1_compiler_infer_method.rs,
  v1_interpreter.rs); removed the now-grounded `_wildcard_finding_count` builtin
  (derived in .dag as length(facts)).

.dag lens ports `triage_wildcard` + `is_kernel_permanent_fn` faithfully (string ops
starts_with/ends_with/string_contains) and adds triage counters + a
`_triage_for_site` accessor.

Witness (src/v2/test/claim/complexity_linearity/syntactic_audit_witness_test.dag):
new perturb-RED discriminants — universe non-empty, migration-debt classified,
open-domain a proper subset, and two specific-site triage assertions
(eval_match_node_eval, testgen anchor) mirroring the retired Rust unit tests.

Dead counters noted: `eval_interpreter_debt` / `grammar_ladder_debt` /
`triage_pending` were structurally dead (old `triage_wildcard` never emitted those
strings) and are not carried forward. Cost-lens `triage_complexity` stays Rust-only
(out of scope). DAG `//` comments are fail-closed, so provenance lives in this message.

Dissolution trigger: replace the raw-fact builtin with a pure .dag Node-tree reader
once decl_facts marshaling preserves ExprMatch/pattern structure (gunbc#5364).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 3, 2026 02:25
@gunbai-bot

gunbai-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

rust_tests failure is the pre-existing func_env_semantic_equivalence_test.rs baseline bug (BASELINE_COMMIT predates the dsl->dag rename #6165, git archive pathspec fails on fresh runners) -- unrelated to this PR's diff. Fix landed/in review as #6191. This branch predates that fix; rebasing onto main after #6191 merges will clear it. 2/2 approvals (claude, cursor), mergeable=CLEAN -- merge-ready on its own merits.

— sent from still-crab-700

@briansrls
briansrls merged commit 9ade047 into main Jul 3, 2026
2 of 9 checks passed
@briansrls
briansrls deleted the session/keen-cat-572 branch July 3, 2026 04:17
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