Skip to content

P6.x: read handler/provider given clauses via IR readers, not raw ast::CapRef - #1204

Open
accuser wants to merge 1 commit into
mainfrom
p6-agent-service-given-wiring
Open

P6.x: read handler/provider given clauses via IR readers, not raw ast::CapRef#1204
accuser wants to merge 1 commit into
mainfrom
p6-agent-service-given-wiring

Conversation

@accuser

@accuser accuser commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Summary

#1187 slice 1 of the follow-on completion plan: add lower_handler_given_ir (sibling of lower_provider_given_ir, bynk-emit/src/ir/lower.rs) and convert every given-consumption site that feeds a deps-type or cross-context decision to read the CapRefIr it produces, instead of walking bynk_syntax::ast::CapRef directly.

Converted sites:

  • project.rs's plan_agent_given_deps and EmitProjectCtx::agent_method_givens
  • emitter.rs's HandlerShared::agent_given_caps_used / record_agent_call / agent_given_caps_used() accessor
  • emitter/emit.rs's effective_given, build_deps_object_ty_with_surface, cap_ref_ty (plus the provider given-to-deps-type call site, which now goes through lower_provider_given_ir too)
  • emitter/workers.rs's worker_cross_caps

ast_importers stays at 8 — both emitter.rs/emitter/emit.rs/emitter/workers.rs were already counted for other reasons — but the real AST coupling at every one of these sites is gone.

Test plan

  • cargo build --workspace
  • cargo clippy --workspace --all-targets
  • cargo fmt --all -- --check
  • BYNK_BLESS=1 cargo test -p bynkc --test e2e bless_positive_fixtures — zero fixture diff
  • cargo test -p bynkc --test tsc_verify — real tsc --strict, all 6 pass
  • cargo test --workspace — full suite, including greenfield_status_table_is_current

🤖 Generated with Claude Code

…::CapRef

#1187 slice 1 (of the follow-on plan): add lower_handler_given_ir (sibling
of lower_provider_given_ir), and convert every given-consumption site that
feeds a deps-type or cross-context decision to read the CapRefIr it
produces instead of walking bynk_syntax::ast::CapRef directly —
project.rs's plan_agent_given_deps and EmitProjectCtx::agent_method_givens,
emitter.rs's agent_given_caps_used/record_agent_call, emitter/emit.rs's
effective_given/build_deps_object_ty_with_surface/cap_ref_ty (plus the
provider-given call site it shares), and emitter/workers.rs's
worker_cross_caps. ast_importers stays at 8 (both files were already
counted for other reasons), but the real AST coupling is gone at every one
of these sites.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions
github-actions Bot marked this pull request as ready for review August 14, 2026 22:33
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