Skip to content

fix(runner): recheck project validation after preparation - #30

Draft
ITSGJY wants to merge 1 commit into
mainfrom
fix/962-validation-postprepare-fence
Draft

ITSGJY wants to merge 1 commit into
mainfrom
fix/962-validation-postprepare-fence

Conversation

@ITSGJY

@ITSGJY ITSGJY commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Why

A queued project_validate Job checks its retained Project recipe before preparing the local process. Shell profile initialization and tool probes can then change source inputs such as Cargo.lock or go.mod. The final pre-spawn source fence previously applied only to native Node validation, leaving other Project adapters able to start a stale plan.

Change

  • Reuse the existing validation::project::fence after all profile/tool/command preparation for every provenance-bearing Project Validation Job.
  • Keep source-of-truth, canonical plan identity and stale failure classification in the existing Runner planner/fence, with no additional parser or state field.
  • Keep direct/specialist validations without Project provenance on their existing path, and preserve the Node recheck.

The profile initialization may already have run before a validation_plan_stale failure; the guarantee is that the main validation child is not launched with a stale plan. The recheck is not an atomic filesystem snapshot.

Regression evidence

A deterministic fixture prepares temporary Rust and Go Projects and uses a local shell profile to alter the recipe inputs during the gap between the two fences. A fake validation executable distinguishes actual native execution from earlier profile/tool preparation.

  • RED, baseline main@2bac8248: Rust project_validate(check) with a profile-mutated Cargo.lock incorrectly completed and launched cargo check.
  • GREEN, c41d6c35: Rust and Go stale-source scenarios now fail with validation_plan_stale and NotStarted; no-drift controls execute once.
  • Runner project_validation suite: 30 passed, 0 failed.
  • Rust Clippy related suite: 5 passed, 0 failed.
  • cargo fmt --all -- --check and git diff --check: passed.
  • Independent read-only Codex review: no actionable P1/P2 findings; Windows/macOS behavior awaits fork CI.

Scope

Two Runner files only: job_manager/local_shell.rs and job_manager_tests/project_validation.rs. No new public schema/capability, validation action, workflow scheduler, executable source, retry policy or Project source-truth implementation.

Refs #962.

Fork GitHub Actions on exact commit c41d6c358778776cd324cbfcfdd06b76e22c32a1: success, run 39749691838 — 14 jobs passed, 0 failed, 4 path-skipped. Linux Runner/Server/workspace/tooling, Windows Runner/Core, macOS native Core, Contracts and MCP Conformance all 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.

1 participant