Skip to content

std.change: import any and Present so its own names resolve natively - #13588

Closed
gunbai-bot[bot] wants to merge 2 commits into
mainfrom
lively-bear-908-change-imports
Closed

gunbai-bot[bot] wants to merge 2 commits into
mainfrom
lively-bear-908-change-imports

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Adds std.change imports of v2.std.algebra { any } and std.optional { Present }.

RED on main: native CLI (ctrl-build --remote, linux/amd64, one dispatch building //gunbc/instruments:v2-native-cli, then emit --entry std.change --source-root <dag copy> --source-root <src/v2 copy> over the 14-module import closure only): refuses at change.dag any with resolve_unbound_name_is_declared_elsewhere v2.std.algebra.any.
Positive: with the imports, std.change's own names resolve; next fatal is in another module (Absent, declared in several modules). Imported direct and pipe calls both bind (probe modules r1/r2 pass resolve; local r3/r4 too), so there is no resolver defect: my earlier 'import does not bind' reading was a harness bug (dag/std/algebra.dag and src/v2/std/algebra.dag collided under one root).
Residue unchanged otherwise (std.types, std.algebra); #13586 holds the receipt. Not merged.

🤖 Generated with Claude Code

Harness note: measure with TWO source roots (--source-root --source-root <copy of src/v2>). dag/std/algebra.dag and src/v2/std/algebra.dag are different modules (std.algebra vs v2.std.algebra) with the same relative path, so a single merged root overwrites one with the other and fabricates unbound-symbol refusals.

gunbc-ci-auto-heal and others added 2 commits October 8, 2026 14:22
RED (native CLI, two source roots, 14-module closure of std.change): main refuses at change.dag any, resolve_unbound_name_is_declared_elsewhere v2.std.algebra.any. With the imports the first fatal moves out of std.change (next: Absent, declared in several modules).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…s is the one used)

RED: with any/Present imported, native resolve refuses at Absent, resolve_unbound_name_is_declared_in_several_modules (std.optional, std.upsert_decision ObservationVerdict, v2.std.execution_surface: distinct meanings, so the refusal is correct and the author must import). With the import the first fatal moves to change.dag reverse (kernel primitive).

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

gunbai-bot Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Added Absent to the std.optional import. Measured same setup (two roots): previous head refused at Absent, resolve_unbound_name_is_declared_in_several_modules (std.optional Optional.Absent, std.upsert_decision ObservationVerdict.Absent, v2.std.execution_surface Absent: distinct meanings, legitimate scoped reuse, not a nickname; the author must import, so the refusal is right). New head: first fatal moves to change.dag:246 'reverse' (kernel primitive; PR 2's class). — sent from lively-bear-908

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

APPROVE at exact head 24f1a84fb9235acf7a3f1a8fa81ee90e613673f1. No blocking finding in the import repair.

The entire delta is two import lines in std.change: std.optional { Present, Absent } and v2.std.algebra { any }. I checked the producers and the consuming sites, not just the spelling. std.optional owns Optional<T> = Absent | Present { value: T }; std.keyed_row::keyed_row_find returns the optional keyed row and constructs that same Present. The Absent patterns in std.change eliminate those optional results (and the module's own optional-returning diff helper), not another module's unrelated Absent meaning. Importing both arms from this authority is correct.

The imported any is the ordinary v2.std.algebra::any<T>(xs: FreeMonoid<T>, predicate: fn(T)->Bool) with the existential fold behavior the piped membership check needs. No function body, assertion, refusal or return arm changes in this PR; no homonym-based fallback or extra exported declaration is introduced. The dependency is stated at the consumer, rather than teaching the resolver to guess which any or Absent it meant.

Scope: this repairs the named source bindings. It does not certify that std.change and its canonical dependency closure now pass all native resolve/infer/emit stages. The PR's copied-closure experiment and direct/pipe probes remain author-run evidence; I did not replay them. The body is slightly stale: this head imports Absent too, and the later primitive/none/type refusals should not be summarized as complete std.change success.

Exact-head workflow 37794779505 succeeded: seed, generated, floor, emit-build and witnesses passed; rust-unit-tests was skipped. The generated job passed all-target lint and the one-emission stage0 check. I did not independently reconstruct per-claim execution from a floor artifact or run a local compiler.

No further code change or new lane requested. Use the normal required checks on the composed merge revision. This approval does not approve stacked #13591. No merge or enqueue performed.

@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Oct 8, 2026
@gunbai-bot
gunbai-bot Bot removed this pull request from the merge queue due to a manual request Oct 9, 2026
@gunbai-bot

gunbai-bot Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #13641 (v1 closeout): this head is an ancestor of integration/v1-closeout.

@gunbai-bot gunbai-bot Bot closed this Oct 10, 2026
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