fix(schema): review-artifact rejects soft-fail runtime_metadata + add missing finding-resolution schema #72
Labels
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pdurlej/patchwarden#72
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
PR #71 (gemini, closes #62) wired
jsonschema.validate()against real CLI outputs and immediately surfaced two real contract drifts. Per #62's discipline, #71 did NOT loosen the schemas — it documented the gaps viaassertRaises(ValidationError). This issue tracks the actual fix.Drift 1 —
review-artifact.schema.jsonrejects soft-failruntime_metadataPR #54 (Swiss Cheese Layer 8) made
review_runemitruntime_metadatawitherror_kind,error_detail,fell_back,model_usedon the soft-fail path. Butspec/schemas/review-artifact.schema.jsonpredates #54 and rejects these fields (likelyadditionalProperties: falseonruntime_metadata, or the property isn't modeled at all).Effect: a legitimate soft-fail review artifact fails its own schema. The schema is stricter than the code it's supposed to describe.
Fix: extend
review-artifact.schema.jsonto modelruntime_metadataincluding the soft-fail fields (error_kindenum:transport|unparseable,error_detailstring,fell_backbool,model_usedstring). Match the actual shape emitted byreview_run.py+resolve_findings.py(SOFT_FAIL_KINDS).Drift 2 —
finding-resolution.schema.jsonis missingresolve_findings()emitsschema_version: "patchwarden.finding_resolution.v1"but there is nospec/schemas/finding-resolution.schema.json. #71 had to validate the registry schema in that slot instead.Fix: add
spec/schemas/finding-resolution.schema.jsonmodelling theresolve_findings()output (verdict PASS/HOLD, findings[], blockers[] incl. thesoft_fail_review_unreliableshape, target, registry_id/version). Add aspec/schemas/examples/finding-resolution.*.jsonexample to match convention.After the fix
assertRaises(jsonschema.ValidationError)cases intests/test_artifact_schema_contract.pyto positivejsonschema.validate()calls.Constraints
src/patchwarden/(jsonschema is test-only, landed in #71's test extras).spec/schemas/(policy_governance class) — it's a deliberate contract fix, so route through normal operator review. NOT aschema_versionbump (still.v1; we're making the schema match what.v1already emits).Spec sources
spec/schemas/review-artifact.schema.jsonsrc/patchwarden/review_run.py(soft-failruntime_metadata),src/patchwarden/resolve_findings.py(SOFT_FAIL_*)tests/test_artifact_schema_contract.py(the assertRaises cases to flip)Filed 2026-06-08 by claude after supervising gemini's #62 PR. Good first issue for a cousin — clear, bounded, test-backed.