Skip to content

fix(validation): preserve Clippy unavailable error before command start - #34

Draft
ITSGJY wants to merge 2 commits into
mainfrom
fix/1363-validation-clippy-prestart
Draft

ITSGJY wants to merge 2 commits into
mainfrom
fix/1363-validation-clippy-prestart

Conversation

@ITSGJY

@ITSGJY ITSGJY commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Problem

When native cargo-clippy is absent, the Runner preserves validation_tool_unavailable and command state NotStarted. Previously, the missing validation progress made Registry reject the terminal evidence. The original commit fixed Runner progress, but Server project_validate still collapsed the valid prestart evidence to validation_unavailable and returned a partial terminal output inconsistent with the closed JSON Schema.

Changes (isolated from yyjeqhc#1362)

  1. Runner (local_shell.rs): on command-configuration failure, supply canonical zero-completed-step validation_progress without claiming a command started.
  2. Server (src/tool_runtime/validation.rs): when a project_validate Job terminal proves NotStarted, preserve the exact allowlisted validation_tool_unavailable failure kind and its actionable message. Preserve existing validation_plan_stale precedence and generic validation_unavailable fallback. Emit the existing full terminal error receipt required by the closed output contract, using only actual Job/validation-handoff evidence.
  3. Contract (crates/webcodex-tool-contracts/src/registry/output_schemas/testing.rs): allow that one stable canonical failure kind only on the project_validate terminal-not-started output branch.
  4. Regressions: Runner isolated-PATH missing-Clippy test; new Registry-mediated Server project_validate / MCP-context negative result and strict output-Schema test; schema branch test includes the new code.

Evidence and review

  • RED on the earlier Server implementation: actual project_validate failure kind incorrectly validation_unavailable.
  • GREEN after Server+contract fix: project_validate yields execution_state=not_started, command_started=false, command_completed=false, failure_kind=validation_tool_unavailable, and passes strict model-visible output schema validation.
  • Targeted Server 1/1, output contract 1/1, Runner missing-Clippy 1/1, all passed.
  • Related Runner/Server/schema tests + formatting and diff checks: 114 passed, 0 failed in the extended local command chain.
  • Independent AGY official ACP source-only review: APPROVE for supplied final patch; a speculative concern about wrapped error-code text was checked against webcodex-core::runner_protocol::validation_infrastructure_failure_code and the Runner constant. Exact-only matching is the established typed protocol and fails conservatively for unknown text.
  • Requested additional Codex review was attempted with read-only/max configuration, but its provider returned "Your workspace is out of credits", so there is NO new completed Codex approval of this supplemental patch. The original PR's previous Codex review remains historical evidence, not a replacement.
  • Current head: d1a1180fd0e2518e4b0faafed31c8d971bccae35. Latest full Fork PR CI: https://github.com/ITSGJY/webcodex/actions/runs/42158063126 (SUCCESS: 14 successful Jobs, 4 intentionally skipped by risk classifier, 0 failures, 0 pending; exact head verified). Prior full CI run 42044831639 passed for the original head 03ed3222 but does not validate the new supplement.

No changes to yyjeqhc#1362; no upstream PR, merge, deployment or restart. Draft, awaiting owner approval and final CI/Codex review evidence.

Final acceptance check (2026-11-06)

GitHub Actions run 42158063126 completed success on d1a1180fd0e2518e4b0faafed31c8d971bccae35, including full Server Rust, Code Mode + receipts, Runner, Workspace, Contract, MCP conformance, Windows and macOS Core. Local targeted tests and extended 114-test regression suite passed; final branch worktree clean.

Outstanding requested gate: a new independent Codex review could not complete: provider returned Your workspace is out of credits. The original-head Codex review and separate source-limited AGY ACP review remain recorded, but neither is misrepresented as a completed Codex review of this final commit. This PR intentionally remains Draft for owner review and an independent Codex retry after credits are available.

ITSGJY commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Independent Codex Coding Agent Review completed on commit 03ed3222. It found the Clippy-specific prestart receipt contract consistent with the Registry and Server not_started classification; preparation is complete before any steps launch, making completed=0 accurate. Review noted adjacent generic executable-resolution paths on Windows/Cargo/Go still return plain-text errors (not changed by this patch) and that Runner snapshot coverage should ideally be extended through real Registry/Server integration. No in-scope P1 blocker was identified. Fork PR CI run 42044831639 is success: 14 success, 4 intentionally skipped, 0 failures. No upstream PR/production deployment performed; awaiting owner approval.

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