Skip to content

Load current selected preflight checker from source - #5050

Merged
Mister-Meeseeks merged 3 commits into
CrocSwap:mainfrom
JoyboyBrian:brian/r7-selected-source-only
Oct 23, 2026
Merged

Mister-Meeseeks merged 3 commits into
CrocSwap:mainfrom
JoyboyBrian:brian/r7-selected-source-only

Conversation

@JoyboyBrian

Copy link
Copy Markdown
Contributor

The current selected orientation and selected-CI named-record preflight can report success using stale verify_selected_result bytecode even when their visible checker source would reject a changed selected input. -B disables cache writes but still permits those reads. Load the checker source with runpy.run_path at both mutable entry points, retaining the original module names, file/root context, guards, errors and output schemas.

The regression builds real timestamp and unchecked-hash checker caches, restores the exact current source bytes and mtime, and exercises both actual entry boundaries under normal Python and -O. With base callers, the six methods expose eight source-drift false accepts and two accepts of invalid current checker source. With this change, all reject correctly; eight valid-cache controls still pass and checker source/time/cache bytes remain untouched. A separate disposable 527-file actual selected-closure probe confirms the same eight drift cases and eight positive controls.

Validation on macOS 27.0 arm64, CPython 3.12.7:

  • New regression: 6 methods / 20 child scenarios pass under normal and optimized containing interpreters.
  • Affected selected tests: 52 tests, 4 skips, under normal and optimized Python; orientation tests: 13 tests under each mode.
  • Existing onboarding suite: 385 tests, 18 platform skips, pass.
  • Both current CLIs pass under normal and optimized Python; the complete selected-CI JSON report matches canonical base, including its existing trigger advisory.
  • A committed five-file Git-free, read-only export passes the six cache regressions in both modes with an empty PATH; all exported bytes remain unchanged.

This repairs the two current mutable import boundaries. The checker itself, frozen selected driver, historical callers, selected record and source pins are unchanged. The official selected Make target already has a direct-source checker prerequisite and fresh export; no bypass of its complete replay is claimed. No native Linux/Windows run, historical scientific suite, full construction replay, Lean or Docker run was performed locally. This is source-binding evidence, not a new bound or theorem proof.

Exact base pins, commands, caller scope, evidence and open next questions are in docs/research/selected-source-loading.md. Canonical investigation and overlap/claim: #4458 (comment).

Credit Mihir Srivastava for the productive-helper orientation and complete fixture, Douglas Colkitt and the retained selected-record/source-guard contributors, and Sagar Thakrar for the existing selected-CI guard. JoyboyBrian, with substantial OpenAI Codex assistance. Apache-2.0.

Submission refresh: canonical main 4c0a359d88f22f05189d51f48387750b801a45d4; governing guidance, selected record and this contribution's source inputs remain unchanged from the scientific base. Fresh overlap covers 309 open PR bodies, 4,156 Discussion records and all 6,760 local notes with complete reported pagination/inventory. New public deltas were checked; this remains advisory text coverage, excluding arbitrary diffs and unpublished work.

@Mister-Meeseeks
Mister-Meeseeks merged commit 9269eea into CrocSwap:main Oct 23, 2026
2 checks passed
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.

2 participants