Skip to content

Move native source acquisition into the typed filesystem fold - #12391

Merged
briansrls merged 3 commits into
mainfrom
native-filesystem-fold
Sep 27, 2026
Merged

briansrls merged 3 commits into
mainfrom
native-filesystem-fold

Conversation

@briansrls

@briansrls briansrls commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Native source acquisition lived in rendered Rust driver text. The CLI and eval driver now use gunbc.source_root_read over the existing Filesystem.Read/Filesystem.List service and typed listing/read outcomes. Missing roots, failed listings, and unreadable bytes produce located refusals instead of an incomplete ingest. The CLI main binds the service and calls v2_cli_main once; witness construction remains in source_authority.

The traversal exposed two missing native realizations. Effectful tail self-calls now use the existing loop lowering with fixed service bindings; non-tail recursion admission reads the same derived effect fact as emission. Native crate assembly now preserves the emitted Cargo manifest’s dependencies and features instead of overwriting them with the foundation-only roster, which omitted Tokio. Permanent controls cover both defects.

Validation at final head 6a09b68e85b:

  • Compiler, Clippy, and the complete emit-build detector job passed. Self-host accepted its clean root and refused its poison specimen. The built native CLI emitted the fixture’s Rust and refused no-entry, missing-root, and unreadable-source controls with the expected exit status and located causes.
  • Whole-population required-regen planned/executed/adjudicated all 161 mirrors, reported first_generation_equal=true, and exited 0 (616.948 seconds).
  • All 10 focused witnesses, all six tests against actual emitted filesystem code, and all 23 native build-adapter tests passed. Both filesystem files passed the floor’s provider predicate after converting ambiguous bare helpers to receiver methods.
  • All required PR checks passed, including the witness measurement with zero blockers and generated-artifact freshness. Enqueued with expected head 6a09b68e85b47bf06dd23e0c9c3435477c27f14f.

Scope: this removes only the filesystem portion of source_root_eval_driver_seed_growth; its remaining obligations keep the row live. The legacy content-only filesystem_read helper remains. The six acquisition tests are local qualification; the CLI controls also run in the existing non-required emit-build detector job. This does not establish generation-two compiler correctness.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-27T01:16:16.740427Z 5c3d566 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5c3d566a76

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/v1/05_emit_rust.dag
let body_scope = fold(uses, init: body_scope, f: (s, u) =>
extend_scope(scope: s, name: resource_use_name_at(n: u, source_indices: si), resolved: resource_use_resource(n: u), provenance: SubValueUnknown)
)
let use_tco = is_tco_eligible(id: DeclaredCallableIdentity { owner_module_path: scope.module_name, decl_name: name }, body: body, registry: registry, source_indices: si)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Resolve tail self-calls by callee identity

When an effectful function has a function-valued parameter or local binding with the same name as the enclosing declaration, inference treats a call through that binding as LocallyBoundCall, but is_tco_eligible and emit_typed_tco_body recognize self-calls by spelling alone. For example, an effectful fn run(run: fn(Int) -> Int, n: Int) { run(n) } now bypasses the recursion refusal and is lowered into a loop instead of invoking the callback, potentially looping forever or assigning call arguments to the enclosing function's incompatible parameter slots. Use the call semantics' declared target identity, not the callee text, before enabling this effectful TCO path.

Useful? React with 👍 / 👎.

@briansrls
briansrls added this pull request to the merge queue Sep 27, 2026
Merged via the queue into main with commit f5b3f82 Sep 27, 2026
5 checks passed
@briansrls
briansrls deleted the native-filesystem-fold branch September 27, 2026 08:35
briansrls pushed a commit that referenced this pull request Sep 27, 2026
#12391's modeled filesystem acquisition is on main, so the two changes that
touch the emitted driver area meet here rather than racing: modeled acquisition
plus modeled demand scheduling and observation.

A merge commit rather than a rebase, so the published checkpoint 44419a1 and
every head the receipt cites stay reachable and unrewritten.

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

# Conflicts:
#	src/v1/stage0/src/v1_compiler_emit_rust.rs
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