feat(evidence): PW-G005 + PW-G006 — required test + sandbox evidence gates by PR class #106

Closed
opened 2026-06-23 07:21:27 +02:00 by claude · 1 comment
Collaborator

Materializes gaps PW-G005 (required test evidence) + PW-G006 (sandbox evidence) from docs/status.html. Inspiration for codex — not a rigid spec.

The vision

A PR's class should declare what proof it needs. Docs-only: maybe nothing. A logic change: required unit/integration evidence bound to the exact head. A runtime/infra change that can't be proven statically: sandbox/preview execution evidence. Patchwarden consumes the evidence (test results, sandbox smoke output) as artifacts and holds the PR until the class's required proof is present-and-current-for-head.

Why it matters

This is how autonomy scales past trivial PRs: "green because tests/sandbox proved it for this head," not "green because nobody objected." It's also the natural extension of the contract-run's existing required-checks notion — from "a check ran" to "the right kind of proof exists for this change class."

Inspiration — possible shapes

  • G005: per-class required-evidence policy (TOML) — e.g. runtime→integration+smoke, core→unit. Evidence "counts" only when status=success AND bound to head_sha (mirror the runtime-repair evidence-counting discipline). Missing/stale → hold.
  • G006: a sandbox-evidence artifact contract (preview/ephemeral-env run → result JSON) the contract consumes; the execution lives in CI/iskra (not in Patchwarden — Patchwarden only consumes the evidence, per D20).
  • Both compose into the Contract Run as modules/required-evidence, reusing the existing required_checks + module-stack machinery.

Hard boundaries (safety, not design)

  • Patchwarden consumes evidence; it never runs sandboxes or tests itself (no network/execution — D20). Execution is CI/iskra's job.
  • Evidence must be head-bound + success to count; stale/missing → fail-closed hold.
  • stdlib-only core; keep schema/examples/tests in sync if a new artifact shape lands.

The HOW is yours

You define the per-class policy shape, the sandbox-evidence contract, and where execution is produced. Sequence G005 (static tests, simpler) before G006 (sandbox) if that helps.

Status / refs

  • D21/M2: new gate classes → M2-gated backlog; the required-checks extension is closer to hardening. Confirm with operator before building net-new classes.
  • Refs: PW-G005/PW-G006 · src/patchwarden/contract_run.py (required_checks), runtime_repair.py (evidence-counting pattern), core_modules.py · docs/operations/pr-passage-contracts.md.

Created by claude from the status.html gap ledger (2026-06-23). Executor: codex.

> Materializes gaps **PW-G005** (required test evidence) + **PW-G006** (sandbox evidence) from `docs/status.html`. Inspiration for codex — **not** a rigid spec. ## The vision A PR's *class* should declare what proof it needs. Docs-only: maybe nothing. A logic change: required **unit/integration** evidence bound to the exact head. A runtime/infra change that can't be proven statically: **sandbox/preview** execution evidence. Patchwarden consumes the evidence (test results, sandbox smoke output) as artifacts and holds the PR until the class's required proof is present-and-current-for-head. ## Why it matters This is how autonomy scales past trivial PRs: "green because tests/sandbox proved it for *this* head," not "green because nobody objected." It's also the natural extension of the contract-run's existing required-checks notion — from "a check ran" to "the *right kind* of proof exists for this change class." ## Inspiration — possible shapes - **G005:** per-class required-evidence policy (TOML) — e.g. `runtime`→integration+smoke, `core`→unit. Evidence "counts" only when status=success AND bound to head_sha (mirror the runtime-repair evidence-counting discipline). Missing/stale → hold. - **G006:** a sandbox-evidence artifact contract (preview/ephemeral-env run → result JSON) the contract consumes; the *execution* lives in CI/iskra (not in Patchwarden — Patchwarden only consumes the evidence, per D20). - Both compose into the Contract Run as modules/required-evidence, reusing the existing `required_checks` + module-stack machinery. ## Hard boundaries (safety, not design) - Patchwarden **consumes** evidence; it never runs sandboxes or tests itself (no network/execution — D20). Execution is CI/iskra's job. - Evidence must be **head-bound + success** to count; stale/missing → fail-closed hold. - stdlib-only core; keep schema/examples/tests in sync if a new artifact shape lands. ## The HOW is yours You define the per-class policy shape, the sandbox-evidence contract, and where execution is produced. Sequence G005 (static tests, simpler) before G006 (sandbox) if that helps. ## Status / refs - **D21/M2:** new gate classes → M2-gated backlog; the required-checks *extension* is closer to hardening. Confirm with operator before building net-new classes. - Refs: PW-G005/PW-G006 · `src/patchwarden/contract_run.py` (required_checks), `runtime_repair.py` (evidence-counting pattern), `core_modules.py` · `docs/operations/pr-passage-contracts.md`. Created by claude from the status.html gap ledger (2026-06-23). Executor: codex.
Collaborator

Addressed by #111 as the first Patchwarden-side/read-only slice.

Close basis: patchwarden evidence-check now evaluates PR-class test/sandbox evidence artifacts, requires successful evidence bound to the target head, and Contract Run can consume satisfied exact-head evidence. CI/Iskra evidence production and sandbox execution remain external follow-up work tracked as PW-G005/PW-G006 in the status artifacts and docs/operations/vision-gap-issue-disposition.md.

Addressed by #111 as the first Patchwarden-side/read-only slice. Close basis: `patchwarden evidence-check` now evaluates PR-class test/sandbox evidence artifacts, requires successful evidence bound to the target head, and Contract Run can consume satisfied exact-head evidence. CI/Iskra evidence production and sandbox execution remain external follow-up work tracked as PW-G005/PW-G006 in the status artifacts and `docs/operations/vision-gap-issue-disposition.md`.
Sign in to join this conversation.
No labels
agent/claude-code
agent/codex
agent/gemini
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
area:business-model
area:competitive
area:discovery
area:forgejo
area:metrics
area:product-strategy
area:v0-core
cagan-grade-approved
client:platform
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
kind:artifact
kind:decision
kind:dogfood
kind:epic
kind:implementation
kind:research
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
priority:p0
priority:p1
priority:p2
priority:p3
ready-for-agent
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
size/large
size/medium
size/small
size/tiny
size/unknown
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:blocked-on-discovery
status:cagan-grade-review-pending
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:needs-operator-decision
status:operator-needed
status:parked
tier:0-anchor
tier:0-platform-substrate
tier:1-core
tier:1-iskra-value-layer
tier:2-supporting
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
wave:1-foundation
wave:2-positioning
wave:3-validation
wave:4-economics
wave:5-operating
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pdurlej/patchwarden#106
No description provided.