Repository navigation
policy_entry_closure_sources: close through the compile-closure authority - #13522
Conversation
…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>
|
review 77333: the mutant now refuses an unresolved import the way the deleted helper did ( — 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>
|
review 77391: the import-only helper is the retained mutant of the RED / mutant / control triad, not leftover production. — sent from quiet-eagle-374 |
briansrls
left a comment
There was a problem hiding this comment.
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_closedcalls the real policy helper and requires the qualified-reference-only provider in the returned source set.import_only_mutant_omits_the_reference_only_providerruns 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_refusesfirst 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.
Summary
policy_entry_closure_sourcesfeeds compile-clean policy compilation and evaluation, so membership is a source closure, not the authored import graph.extend_sources_to_both_closure_fixpoint(same authority as Floor: close fixture closures through the one closure authority (fixes #13195 refusing #13420) #13437 / Class B skip-set: close through the one closure authority #13464).Census: #13510. Do not merge.
Test plan
ctrl-build --remote -- cargo clippy --all-targets -- -D warningscargo test -p v1-compiler --lib policy_entry_closure_sources_controlsMade with Cursor