feat(ci): wire Ollama review-run + post-findings --execute into patchwarden-client-dry-run workflow #523
Labels
No labels
W6d-automerge-calibration
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
automerge-candidate
class/security-sensitive
cutover-gate
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
iterating
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
large-impact
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
meta
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
needs-operator-decision
needs-triage
not-ready
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
operator-emotional
owner-attention
phase/02
phase/03
priority:p0
priority:p1
priority:p2
priority:p3
proposed
ready-for-agent
ready-for-operator
recovery
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
risk/exposure
risk/process
risk/product
risk/runtime
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:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tier/full
tier/lite
tier/stacked
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pdurlej/platform#523
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?
Goal
Wire Patchwarden CLI capabilities that already exist on
mainofpdurlej/patchwarden(since PR #49 + #50) into the existing platform dry-run workflow. Today the workflow uses--model-id deterministic(stub, never calls Ollama) and never posts to PR. After this issue, it calls real Ollama for review and posts the findings as a PR comment.This is wiring of existing capability, not new feature work — explicitly legalized under
pdurlej/patchwardenD21 (M2 gate amendment, 2026-05-27).Context — why now
Operator-side mental-model discovery during the
pdurlej/patchwarden2026-05-27 session revealed that today's dogfood loop is ~30% of the operator's mental model. Three luki:review-runuses--model-id deterministic, never calls Ollama (this issue).post-findings --executeNOT wired in workflow — workflow only uploads artifacts, never speaks to the PR (this issue).pdurlej/patchwarden, parked under M2 per D21.This issue closes luki 1 + 2. Luka 3 stays parked.
Scope
Edit
.forgejo/workflows/patchwarden-client-dry-run.yml:Change 1 —
review-runuses real Ollama lane configReplace stub flags with lane-driven flags so Patchwarden's existing live-model path (PR #49) actually runs.
Today (stub):
After: generate
pr-metadata.jsonfrom event payload (using existingpr-files.txt), pass--lane-config + --pr-metadata-file + --diff-file. Lane-derived reviewer-id / model-id / model-version / prompt-version are taken frompolicies/platform.v0.toml:Change 2 — add
post-findings --executestep (gated on Patchwarden source available)After
resolve-findings, add:The
FORGEJO_TOKENis read bypatchwarden.forgejo_clientfrom the env (seesrc/patchwarden/forgejo_client.py:_config). No code change in Patchwarden needed.Change 3 — update permissions
Top-level workflow
permissions:(or thedry-runjob specifically) needspull-requests: writeso thePOST /issues/{pr_number}/commentscall succeeds:Acceptance criteria
--model-idflag removed;--lane-configpresent pointing atpolicies/platform.v0.tomlfrom the cloned Patchwarden source dir.--pr-metadata-file+--diff-fileflags both present, pointing at files generated in thecollect-diffjob (already exists).post-findings --executestep exists, gated onsteps.patchwarden.outputs.status != 'not_configured'.permissionsincludespull-requests: write.docs/change with W6d-automerge-calibration label), workflow runs end-to-end, real Ollama gets called (visible in workflow log:model_used: kimi-k2.6:cloudor fallbackgemma4:31b-cloudin the review-artifact JSON), PR receives a Patchwarden comment with the rendered findings (or "No Patchwarden findings to render." if model returned[]).fail_on_missing: true(default perplatform.v0.toml),review-runexits 2, workflow fails, no comment posted. Verify in log thatOllamaClientErrorpropagated.No-go (per D21 in pdurlej/patchwarden)
docs/operations/pyfallow-integration-plan.mdin patchwarden) covers the eventual integration shape.policies/platform.v0.toml. Lane config already has the rightrepo_pattern_sanitylane withkimi-k2.6:cloudprimary +gemma4:31b-cloudfallback +fail_on_missing: true.safe_docs_statusclassification — that's a policy schema expansion, parked under M2 per D21.main.permissions: contents: write— onlypull-requests: writeis needed.Pre-flight check (operator)
Before Codex starts, verify:
FORGEJO_TOKENrepo secret exists in platform repo and has scope to post comments on issues/PRs (write:issueor equivalent).Rollout discipline
W6d-automerge-calibrationlabel).Spec sources
pdurlej/patchwarden#49—review-run --lane-config / --pr-metadata-file / --diff-fileend-to-end path, including soft/hard-fail behavior perlane.fail_on_*flags.pdurlej/patchwarden#50—post-findings --executebehavior,--executeflag semantics, exit codes on Forgejo errors.pdurlej/patchwarden#54—resolve-findingsnow consumesruntime_metadata.error_kindfrom review-artifact (Swiss Cheese Layer 8 fix). If Ollama soft-fails, resolver surfaces asoft_fail_review_unreliableblocker.pdurlej/patchwarden#55— D20 architectural lint enforces that Patchwarden never calls Forgejo merge or APPROVED.post-findingsuses only/issues/{pr}/commentsendpoint.pdurlej/patchwarden#57— D21 M2 gate amendment that explicitly permits this workflow wiring.pdurlej/patchwarden:docs/operations/platform-dogfood.md— current loop documentation (will need an update PR in patchwarden once this lands).pdurlej/patchwarden:docs/operations/code-vs-vision-snapshot-2026-05-27.md— Bet 2 ratio reasoning + gap analysis.pdurlej/patchwarden:policies/platform.v0.toml— lane config the workflow will point at.Created 2026-05-27 by
claude(pdurlej/patchwarden dedicated thread) as Wizji-Wartości Wave step D3. Operator (pdurlej) hands off to codex for implementation per cousin-family lane discipline.