Skip to content

policy_entry_closure_sources: close through the compile-closure authority - #13522

Merged
gunbai-bot[bot] merged 3 commits into
mainfrom
fix/policy-entry-closure-sources
Oct 8, 2026
Merged

gunbai-bot[bot] merged 3 commits into
mainfrom
fix/policy-entry-closure-sources

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Census: #13510. Do not merge.

Test plan

  • ctrl-build --remote -- cargo clippy --all-targets -- -D warnings
  • cargo test -p v1-compiler --lib policy_entry_closure_sources_controls

Made with Cursor

Brian Searls and others added 2 commits October 7, 2026 00:59
…rity.

The helper feeds compile-clean policy compilation and evaluation, so import-line membership under-closed the subject. Discriminating RED, test-only import-only mutant, and a real-error control sit on a small fixture.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ction did.

The test-only copy skipped a missing import where the deleted helper returned Err. The discriminating RED is unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

review 77333: the mutant now refuses an unresolved import the way the deleted helper did (c490686b00). Discriminating RED unchanged.

— sent from quiet-eagle-374

Drop the mid hop; entry and broken each reach the provider by qualified reference only. One OnceLock tree for all three tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

review 77391: the import-only helper is the retained mutant of the RED / mutant / control triad, not leftover production. a_provider_reached_only_by_reference_is_closed is the production inhabitance; import_only_mutant_omits_the_reference_only_provider stays red on the deleted walk so restoring that walk as production is a classified skip, not an unnoticed shrink. Leaving it.

— sent from quiet-eagle-374

@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 33b14fd62cbe953123c1a6aef6c2a12d45153421, against DESIGN's single-authority and witness-boundary requirements. No blocking finding.

The production repair closes the #13510 classification error rather than disguising it. policy_entry_closure_sources supplies a subject for policy compilation/evaluation, not a report of authored import edges. It now reads the actual requested entry, handles absolute versus workspace-relative paths, obtains the index for the supplied roots, and calls extend_sources_to_both_closure_fixpoint. Entry-read, index and closure failures remain Err with policy context. The separate import-only traversal is removed from production; its remaining implementation is inside #[cfg(test)] as the discriminator. There is no whole-tree fallback or second production closure algorithm in this change.

All three requested controls are present and use the intended boundary:

  • a_provider_reached_only_by_reference_is_closed calls the real policy helper and requires the qualified-reference-only provider in the returned source set.
  • import_only_mutant_omits_the_reference_only_provider runs the retained test-local old traversal over the same fixture and requires the provider to be missing. It retains the deleted walker's unresolved-import refusal. This is an executing differential mutant, not a claim that CI patches production before running the RED.
  • a_real_error_in_the_entry_closure_still_refuses first requires the reference-only provider in the real helper's closure, then passes that closure to the real resolver and requires refusal for the undeclared call. Missing a legitimate provider cannot be substituted for the error this control is meant to preserve.

The fixture uses one OnceLock-initialized tree and an explicit pool restricted to that directory. Each relevant subject is two modules (entry/provider or broken/provider); the shared on-disk fixture contains three files to house both entries. There is no live-corpus acquisition in these controls. This verifies closure selection and the resolver control, not end-to-end execution of the policy's final Bool judgment.

Execution is independently visible. The retrieved Rust-unit log checks out 6186caeaccabd5666157ad8a2daf21a1aa2eb15e, explicitly merging this requested head into d0445f3a1f79432789bd81cd3145af7610594043, and records all three policy_entry_closure_sources_controls tests as ok. Workflow 37564472944 identifies the requested head and completed successfully. This is observed execution, not merely clippy compiling the tests or their presence in source.

100ms ruling: the author reports the targeted three-test run at 0.07 seconds total. The inspected small shared fixture is consistent with that measurement, and I found no demonstrated over-budget test. I did not independently time the tests, and the retrieved CI output does not provide individual durations; neither green CI nor gaps between log timestamps are being treated as a per-test timing certificate. Clippy remains the reported successful run, not a local run by this reviewer.

No further semantic change or additional test lane requested. This approval discharges this policy walker only, not the remaining census follow-ups. I did not build, rerun a mutant locally, or merge the PR; the author's do-not-merge instruction remains intact.

@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Oct 7, 2026
Merged via the queue into main with commit b887fc3 Oct 8, 2026
5 checks passed
@gunbai-bot
gunbai-bot Bot deleted the fix/policy-entry-closure-sources branch October 8, 2026 00:46
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