Skip to content

HAND lens E: retire languages_consumer_census.rs — lens .dag owns verdict - #6038

Merged
briansrls merged 25 commits into
mainfrom
session/royal-ferret-595
Jul 1, 2026
Merged

briansrls merged 25 commits into
mainfrom
session/royal-ferret-595

Conversation

@briansrls

@briansrls briansrls commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Retire `languages_consumer_census.rs` from the HAND_MAINTAINED stage0 roster by folding its implementation into `cli_run.rs`. The `.dag` lens (`src/v2/lens/languages_consumer_census.dag`) already owns the verdict/ratchet logic; this PR removes the redundant Rust module file, eliminates the `patch_languages_consumer_census_mod` regen patcher, and deletes the Rust integration test that duplicated the corpus `_test.dag` witnesses.

Changes

  • Moved all census functions into `cli_run.rs`: `languages_consumer_census_{data_decl_count,per_language_row_count,format_row_count,external_consumer_count,is_composition_only,has_external_consumer}`
  • Updated `v1_interpreter.rs` dispatch from `crate::languages_consumer_census::` → `crate::cli_run::`
  • Removed `"languages_consumer_census.rs"` from `HAND_MAINTAINED_STAGE0_FILES` in `regen_stage0.rs`
  • Removed `patch_languages_consumer_census_mod` function and call
  • Removed `pub mod languages_consumer_census;` from the hardcoded module string in `v1_compiler_emit_rust.rs` and from the committed `lib.rs`
  • Deleted `src/v1/stage0/src/languages_consumer_census.rs`
  • Deleted `src/v1/tests/src/languages_consumer_census_lens_test.rs` (corpus `_test.dag` witnesses are CI-floor auto-discovered, making this Rust test redundant)

Test plan

  • `cargo check --workspace` → Finished cleanly
  • `cargo test -p v1-compiler --bin regen_stage0` → 6/6 passed (roster checks, output-set checks)
  • `cargo fmt --all --check` → no diff
  • Corpus `_test.dag` witnesses in `src/v2/test/claim/languages_consumer_census/corpus/` auto-enrolled by CI floor discovery

Brian Searls and others added 2 commits June 30, 2026 20:58
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 30, 2026 21:04
Brian Searls and others added 9 commits June 30, 2026 21:12
The .dag emit authority at src/v1/05_emit_rust.dag still injected
`pub mod languages_consumer_census` into the generated lib.rs string,
breaking emit-authority/committed-stage0 sync (regen_verify_gate).
Remove it to match the v1_compiler_emit_rust.rs change in the prior commit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t, drop languages_consumer_census

- 05_emit_rust.dag + v1_compiler_emit_rust.rs: add complexity_linearity_audit_project
  (from main), keep languages_consumer_census removed (this PR)
- regen_stage0.rs: keep patch_complexity_linearity_audit_mod (main),
  omit patch_languages_consumer_census_mod (this PR's deletion)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…bility_project + languages_consumer_census from module lists

Both census modules retired on respective branches; take neither in the
hand_maintained_mods string. cli_run.rs keeps both census function blocks.
The file was deleted (functions live in cli_run.rs); remove the pub mod
declaration and pub use re-exports that would fail to compile without it.
@gunbai-bot

gunbai-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

The failing check (ci_floor_spawn_width_live_budget_witnesses) is unrelated to this PR: our diff makes no changes to src/v2/test/claim/ci_floor_plan_witness_test.dag or src/v2/workflow/ci_floor_plan.dag. The same test has been failing on main across the last 5 CI runs (memory-budget/spawn-width check, OOM pressure on the CI host). This is a pre-existing infra failure, not introduced by this PR. — sent from royal-ferret-595

Brian Searls and others added 5 commits July 1, 2026 03:50
Keep inert_carrier_census in module_path_index/mod.rs (from main);
remove languages_consumer_census re-export (our retirement).
cli_run.rs already carried both census blocks cleanly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The prior merge-conflict resolution incorrectly kept the HEAD side
which referenced inert_carrier_census — a module that doesn't exist
yet (its PR hasn't landed). Correct resolution: remove only
languages_consumer_census (our retirement), leave nothing else.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e_path

src/v1/stage0/src/languages_consumer_census.rs hasn't existed since
#6027 moved the file under module_path_index/; our PR deletes the
module_path_index copy too. The exclusion was a dead no-op.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

CI failure is pre-existing on main: ci_floor_spawn_width_live_budget_witnesses has returned Bool(false) on every main CI run for at least the last 5 commits (runs 28492438637, 28492152122, 28491769974, 28491582189, 28491449471 — all failure on main). Our diff does not touch ci_floor_plan_witness_test.dag or any spawn-budget logic. This is not introduced by PR #6038.

— sent from royal-ferret-595

Brian Searls and others added 9 commits July 1, 2026 05:58
main renamed '--- Inert carrier census ---' to
'--- Unwired-model census ---'; keep our languages census block
and use the updated section header from main.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Main reverted #6078 (Ban unwired models). Accept the revert's
inert-carrier census restoration while keeping our languages consumer
census functions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@briansrls
briansrls merged commit f0074a9 into main Jul 1, 2026
3 checks passed
@briansrls
briansrls deleted the session/royal-ferret-595 branch July 1, 2026 15:42
briansrls added a commit that referenced this pull request Jul 1, 2026
…ensus all present; restore oracle test

The auto-committer left raw conflict markers in cli_run.rs (brace
mismatches at lines 7059 and 7340). Resolved by placing NFR census
(our block, from cec6d1f) before the languages-consumer census and
extdeps-shape-transport-policy census that landed in main via #6038
and #6043. All four census blocks now in correct order: NFR →
languages → inert-carrier → extdeps-shape-transport-policy.

Removed the #[ignore] on func_env_whole_corpus_semantic_oracle:
main already re-based the test to db559b4 which IS reachable
from origin/main (confirmed via git branch -r --contains).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jul 1, 2026
…ict (#6042)

* WIP: HAND lens E: retire non_fold_residue_project.rs — lens .dag owns verdict

* fix: cargo fmt on cli_run.rs non_fold_residue block

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* WIP: HAND lens E: retire non_fold_residue_project.rs — lens .dag owns verdict

* fix(non_fold_residue): port full extended API to cli_run, fix blank-line bug, redirect complexity files

Addresses cursor REQUEST_CHANGES on PR #6042:
- cli_run.rs: add NON_FOLD_MIGRATION_DEBT_ROSTER, NonFoldRosterBucket enum, 8 new pub fns
  (closed_coproduct_type_names, site_is_rostered, roster_bucket, migration_debt_live_count,
   irreducible_live_count, migration_debt_roster_slots, irreducible_roster_slots, stale_roster_count),
  update NonFoldReport to hold closed_coproduct_names BTreeSet; fix blank-line skip in
  nfr_closed_coproduct_names inner loop (depth<=0 && empty line was breaking multiline type decls,
  causing closed coproduct params to be invisible to the lens — DESIGN §5 fail-open)
- complexity_linearity_audit_project.rs: all crate::non_fold_residue_project:: → crate::cli_run::
- complexity_linearity_audit.rs (bin): import non_fold_residue_* from v1_compiler::cli_run

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* class-3 thin bridge: move non_fold classification to complexity_linearity_audit_project, add perturb-RED witness

Gate 1 — perturb-RED witness: dsl/test/claim/non_fold_residue_witness_test.dag
  - non_fold_residue_clean_holds(): unrostered==0 && stale==0 — flips RED if any unrostered site appears
  - non_fold_residue_universe_is_nonempty(): count>0 — discriminant proving scanner is live (not vacuously green)

Gate 2 — thin bridge: cli_run.rs now gathers raw facts only
  - Removed from cli_run.rs: NON_FOLD_MIGRATION_DEBT_ROSTER, NonFoldRosterBucket enum,
    non_fold_residue_roster_bucket, migration_debt_live_count, irreducible_live_count,
    migration_debt_roster_slots, irreducible_roster_slots
  - Added to cli_run.rs: non_fold_residue_live_sites() and non_fold_residue_roster_size()
    (raw fact accessors — no classification)
  - Moved to complexity_linearity_audit_project.rs: NON_FOLD_MIGRATION_DEBT_ROSTER,
    NonFoldRosterBucket (private), nfr_roster_bucket() (private), classification counts;
    RosterFictionReport gains migration_debt_roster_slots + irreducible_roster_slots fields
  - complexity_linearity_audit.rs bin: uses fiction.* fields instead of direct cli_run imports

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* restore doc_reachability_tests module dropped in merge conflict resolution

The merge that absorbed doc_reachability_project retirement (e22b13a) clobbered the
6 doc_reachability_tests unit controls (reachable_set_flags_orphan_node,
reachable_set_inert_cluster_stays_unreached, reachable_set_transitive_chain,
markdown_link_targets_basic, dangling_detection_flags_missing_md_only, bind_md_refs_basic)
by placing non_fold_residue_tests in the same slot. Both mods are now siblings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* port roster_partition_covers_every_entry_without_overlap invariant test

Migration-debt sub-roster subset check + partition sum + live-sites
partition — all three assertions from the deleted non_fold_residue_project.rs
now live in complexity_linearity_audit_project (where both rosters are in scope).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* drop stale eval_bind_node_eval from non_fold_residue roster

eval_bind_node_eval's wildcard arm was dissolved in #5996 (exhaustive
RuntimeBehaviorInterpreter match); the existing test already asserted it
should not fire syntactic_match_wildcard_arm. Remove it from both
NON_FOLD_RESIDUE_ROSTER (cli_run) and NON_FOLD_MIGRATION_DEBT_ROSTER
(complexity_linearity_audit_project) so stale_roster_count() == 0 and
the floor witnesses pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* WIP: HAND lens E: retire non_fold_residue_project.rs — lens .dag owns verdict

* merge origin/main: absorb bcbf464 (record_emit) + 0567321 (ci_floor fix)

Takes main's witness update (== int_min(conservative_fallback, exec_w)) over
our interim <= patch; the real function change (remove int_min from plan_spawn_width)
landed in #6070 on main.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* merge origin/main: absorb inert_carrier_project retirement (f92a4a6)

Inserts the inert carrier census block (cli_run.rs: 75 helper lines + 191
struct/compute/pub/tests lines) before our NFR block's doc-reachability
section. Drops the now-dead module_path_index::inert_carrier_census and
module_path_index::non_fold_residue_census imports from
complexity_linearity_audit.rs (both replaced by cli_run paths or the
fiction-report fields).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* drop accidental MODULE.bazel from PR scope

Temporary BuildBuddy marker committed via a merge; absent from main.
Unrelated to non_fold_residue retirement.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix witness oracle: universe_is_nonempty uses coproduct_universe_count not count

non_fold_residue_count() = live residue sites (drains to 0 as debt migrates).
non_fold_residue_coproduct_universe_count() = closed-coproduct type universe
(the fail-open oracle: zero means the corpus walk found nothing).

Sibling witnesses follow this pattern; matches the lens authority at
src/v2/lens/non_fold_residue_test.dag:14-15.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* cargo fmt: remove trailing blank line in cli_run.rs inert carrier block

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* merge origin/main: absorb unwired-model census generalization (#6078)

#6078 generalized the inert-carrier census to the broader unwired-model
census and moved doc-utility fns (DOC_PLAN_ROOTS, doc_universe, etc.)
to be shared between the two census blocks. Take main's header and
struct name (UnwiredModelData); remove the duplicate doc-utility
definitions that were previously in the doc-reachability section only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* WIP: HAND lens E: retire non_fold_residue_project.rs — lens .dag owns verdict

* ci_floor_plan: restore int_min clamp on zero-budget fallback width

The zero-budget path (cgroup unreadable) previously returned
int_min(conservative_fallback_width, execution_corpus_spawn_width()).
The prior commit dropped int_min to fix a witness inconsistency
introduced by #6079, but that constitutes a semantic change orthogonal
to this PR's scope.

Restore the clamp and update both witnesses to check
int_min(conservative_fallback, exec_w) instead of fallback directly
— function and witnesses now consistently agree, without changing the
clamped-at-exec_w behavior.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(test): ignore func_env semantic oracle — baseline commit GC'd from GitHub

5722326 was from a squash-merged PR branch and no longer exists on
GitHub's server; fetch-depth:0 can only fetch reachable objects, so CI
fails on fresh runner workspaces. Marking ignored is more honest than the
prior fake-pass-via-workspace-cache behaviour.

Re-baseline path: run capture_func_env_semantic_oracle against a tagged
reachable commit, update func_env_semantic_baseline.json, restore the
#[test] attribute.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(merge): resolve cli_run.rs conflict — NFR + languages + extdeps census all present; restore oracle test

The auto-committer left raw conflict markers in cli_run.rs (brace
mismatches at lines 7059 and 7340). Resolved by placing NFR census
(our block, from cec6d1f) before the languages-consumer census and
extdeps-shape-transport-policy census that landed in main via #6038
and #6043. All four census blocks now in correct order: NFR →
languages → inert-carrier → extdeps-shape-transport-policy.

Removed the #[ignore] on func_env_whole_corpus_semantic_oracle:
main already re-based the test to db559b4 which IS reachable
from origin/main (confirmed via git branch -r --contains).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(nfr-census): port synthetic RED/GREEN detection unit tests into cli_run.rs

The deleted non_fold_residue_census.rs carried 8 discriminating controls
that proved the lexical detector does not false-RED/GREEN. The parallel
inert_carrier fold kept its controls; this ports the equivalent set into
the new cli_run.rs nfr_tests module:

  coproduct_index_finds_sums_not_records
  red_control_wildcard_over_closed_coproduct_is_residue
  green_control_total_fold_is_not_residue
  green_control_wildcard_over_open_domain_is_not_residue
  green_control_field_placeholder_underscore_is_not_a_wildcard_arm
  nested_match_wildcard_is_attributed_to_its_own_match
  green_control_wildcard_and_slashes_inside_string_literal_are_ignored
  red_control_real_wildcard_survives_an_in_string_decoy

The corpus-pinning test (external_access_throttle.dag) is omitted:
that file no longer exists in the corpus.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* style: cargo fmt (trailing blank line in nfr_tests module)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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