Skip to content

feat(evidence): reuse exact validation evidence - #129

Merged
Nobodyworld merged 8 commits into
mainfrom
feat/exact-evidence-reuse
Aug 1, 2026
Merged

feat(evidence): reuse exact validation evidence#129
Nobodyworld merged 8 commits into
mainfrom
feat/exact-evidence-reuse

Conversation

@Nobodyworld

@Nobodyworld Nobodyworld commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Completed

Issue #121 was completed by owner-authorized squash merge of this PR.

final PR head: 410ab710785699b02a93f304fbb868ffdeb01a7a
squash merge / current main: 7587a77a32e07f180d21cec65881c7868afa0e4d
base: 709b84dfe0dc101bdc79de562a95d1db713315f3
Commitlint: 30663586952 — success
CI: 30663586953 — success
connector re-review: 4834317108 — no remaining blocker

Delivered behavior

  • never remains the compatible default and executes fresh.
  • allow_exact reuses only after exact identity matching and source-worker marker/artifact proof; failed proof falls back fresh at most once under the same live lease.
  • require_exact never invokes validation and returns a bounded non-success result when exact verified evidence is unavailable.
  • Every reuse creates a distinct auditable run linked to immutable source evidence.
  • Database metadata alone cannot establish reuse success.
  • Source artifacts remain local and are never copied, uploaded, mutated, deleted, or retention-extended because of reuse.
  • Candidate lookup is bounded, deterministic, and fail-closed.

Final evidence

  • focused server correction suites: 86 passed;
  • focused worker correction suites: 31 passed, 2 platform-specific skips, with the Windows junction test executed;
  • full pytest: 513 passed, 5 skipped;
  • strict browser: 2 passed, zero skips;
  • coverage: 91% aggregate; all 16 configured thresholds passed;
  • pip check, pre-commit, TODO policy, Ruff, Black, Mypy, Bandit, pip-audit, Gitleaks, Lychee, public-hygiene, clean-tree, and git diff --check passed;
  • no known dependency vulnerabilities and no leaks across 236 commits;
  • all required hosted lint, typecheck, test, security, Secrets audit, Link check, Coverage, and Browser UI jobs succeeded.

Review corrections

Initial connector review 4831588385 identified two narrow blockers. Both were resolved before merge:

  1. inconsistent source work-order/run/provenance rows fail closed and skip to an older valid exact source or unavailable;
  2. the Windows junction regression reaches the actual junction/reparse filesystem check and returns source_artifact_unsafe.

This merge does not add cost routing, MCP, browser/RPA workers, automatic approval, automatic merge, or artifact-byte transfer.

@Nobodyworld Nobodyworld left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Connector review of exact head 2766d428b6917872fd5be0465baa2b2cd011e3f3 found two actionable blockers before PR #129 can be marked ready.

  1. Fail-closed source consistency is incomplete (server/execution/service.py, _validated_reuse_candidate). Candidate lookup requires a succeeded/fresh source run, but final structural validation does not require the joined source work order to be succeeded and does not reject inconsistent fresh-run provenance columns (reused_from_run_id, source_evidence_fingerprint, or retained candidate metadata). A malformed/inconsistent database row can therefore pass more of the exact-source path than the issue's fail-closed contract permits. Require source run/work-order/provenance consistency explicitly and add regressions proving each inconsistency is skipped in favor of an older valid candidate or yields unavailable.

  2. The Windows junction test does not reach junction verification (client/python/tests/test_execution_worker_evidence.py, test_reuse_rejects_junctioned_source_artifact). It changes only the candidate artifact path while result.json still contains the original evidence, so the verifier exits at source_result_identity_mismatch before _assert_no_reparse_ancestry examines the junction. Rebuild the matching marker-bound result/evidence/candidate for the junction path and assert the bounded unsafe-artifact disposition produced by the filesystem check. Preserve the POSIX symlink proof.

Also reconcile .agent/execplans/011_exact_evidence_reuse.md: its Progress and Outcomes still say push/hosted validation are pending. Record the final hosted IDs in the PR review record or explain the non-self-referential evidence convention in the plan while marking delivery complete.

No broader product change is requested. Preserve never, allow_exact, require_exact, the existing lease model, and all current trust boundaries. Keep the PR draft and unmerged.

@Nobodyworld Nobodyworld left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final connector re-review of exact head 410ab710785699b02a93f304fbb868ffdeb01a7a is complete.

The two blockers from review 4831588385 are resolved:

  1. Candidate validation now requires mutually consistent succeeded work-order/run state, fresh provenance with no source linkage or retained candidate metadata, and authoritative joined-row refresh. Seven malformed-source variants skip closed to an older valid exact source or return unavailable without mutating malformed rows.
  2. The Windows junction regression rebuilds matching marker-bound evidence and candidate metadata, reaches the junction-aware safe-path check, and asserts source_artifact_unsafe; it no longer exits at an earlier identity mismatch.

The living ExecPlan uses the established non-self-referential workflow convention. Exact corrected-head workflows are green: Commitlint 30663586952 and CI 30663586953; lint, typecheck, test, security, Secrets audit, Link check, Coverage, and Browser UI tests all succeeded. No review threads remain.

No remaining technical, security, documentation, public-hygiene, or validation blocker was found. GitHub does not permit self-approval by the PR author, so this verdict is recorded as a COMMENT review. PR #129 may be marked ready, but must remain unmerged until a separate exact-head owner authorization.

@Nobodyworld
Nobodyworld marked this pull request as ready for review August 1, 2026 08:43
@Nobodyworld
Nobodyworld merged commit 7587a77 into main Aug 1, 2026
9 checks passed
@Nobodyworld
Nobodyworld deleted the feat/exact-evidence-reuse branch August 1, 2026 09:36
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