chore: activate worktree PR review flow [t_7c5ff17b] #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "kanban/t_7c5ff17b-worktree-pr-cutover"
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?
Kanban-Board: multi-alt
Kanban-Task: t_7c5ff17b
Goal and scope
Activate the mandatory per-task worktree → Forgejo PR → independent review/merge lifecycle for unfinished multi-alt cards. Preserve the audited pre-worktree baseline and operational state on migration reruns.
Changed files
docs/WORKFLOW.md— mandatory worktree, PR, independent review and squash-merge policy.kanban/migrate_worktree_pr.py— one-time idempotent unfinished-card migration and durable migration boundary.kanban/tests/test_worktree_pr_workflow.py— copied-board blocked/review/running preservation and exact marker regressions, including split-line rejection.kanban/webhooks/multi-alt-review-dispatch.py— allowlisted PR event filter with exact same-line Board and Task markers.kanban/webhooks/multi-alt-review-nudge.py— duplicate-safe review dispatcher nudge.Verification at exact head
Head:
35c96fa0c1bf7158ee4f4df9270061f6d91dec5dpython3 -m unittest discover -s kanban/tests -v— 2/2 passed.python3 -m py_compile kanban/migrate_worktree_pr.py kanban/webhooks/multi-alt-review-dispatch.py kanban/webhooks/multi-alt-review-nudge.py— passed./tmp/zig-toolchain/zig-x86_64-linux-0.16.0/zig fmt --check build.zig src tests profiles— passed with Zig 0.16.0./tmp/zig-toolchain/zig-x86_64-linux-0.16.0/zig build test --summary all— 17/17 steps, 59/59 tests passed./tmp/zig-toolchain/zig-x86_64-linux-0.16.0/zig build test -Doptimize=ReleaseSafe --summary all— 17/17 steps, 59/59 tests passed./tmp/zig-toolchain/zig-x86_64-linux-0.16.0/zig build -Doptimize=ReleaseSafe --summary all— 19/19 steps passed.git diff --check— passed.multi-alt-review-dispatch.pySHA-256 are both401ac0e0fdad029dbc8d7061a392fb0cf161206365b236e488cb7b13b6f7cc19.Compatibility and provenance
This is orchestration glue only; it does not change package-origin, RPM/APT, artifact, installer, or stable-promotion semantics. Every migrated card retains repository, branch, worktree and review provenance through its durable migration event.
Residual risk and rollback
Forgejo does not permit the PR owner to submit a formal
REQUEST_CHANGESreview, so the independent reviewer records a clearly labelled COMMENT verdict before the Kanban transition. The gateway dispatcher remains paused during cutover. Rollback is to revert this PR and restore the preserved Kanban DB/profile configuration from the pre-cutover backup/ZFS snapshot; no stable artifacts are published by this change.Review verdict: REQUEST CHANGES
Reviewed exact head
2fbc58942fb5b23c689122caac2ffc567d24a747againstmain(613b33213047782414669c2d45447a5213a62f7c). Two blocking correctness/contract defects remain.1. Migration is not safe to rerun
kanban/migrate_worktree_pr.py:59-64,95-121selects every non-done card on every invocation and unconditionally rewrites operational state totodo, clears claim/run/session/block/failure fields, and recomputes the worker assignment from the current unfinished-card ordering. In an isolated copy of the real board, changingt_023b0788toblocked/needs_inputand rerunning the advertised idempotent migration changed it totodoand erased the blocker and diagnostic. A later accidental rerun can therefore silently unblock gated work, terminate review/rework provenance, or change ownership.Required: make already-migrated cards a true no-op (for example, use the migration event/cutover state as a guard), preserve post-cutover
blocked/running/reviewstate, and add an isolated regression test proving reruns do not mutate already-migrated cards.2. Webhook accepts PRs without the mandatory board marker
The deployed filter
/root/.hermes/profiles/webhook/scripts/multi-alt-review-dispatch.py:19,40-49validates onlyKanban-Task. A synthetic allowed-repo/main/kanban payload containingKanban-Task: t_023b0788but noKanban-Board: multi-altstill invoked both the Kanban comment and review-nudge paths. This contradicts the mandatory two-marker contract and the PR claim that exact handoff metadata is enforced.Required: require an anchored exact
Kanban-Board: multi-altline, reject missing/wrong/duplicate board markers, and add a regression test for these cases. Keep the deployed filter and its reviewable source in sync.Checks that passed
python3 -m py_compile,git diff --check, and Zig 0.16.0fmt --checkpassed.zig build test --summary all: 17/17 steps, 59/59 tests.REQUEST CHANGES — review round 2 at exact head
a60e1534884ff124d8ebfc5c9d4a3c9fee1da81eBlocking findings:
kanban/webhooks/multi-alt-review-dispatch.py:19-20does not enforce exact single-line PR markers. Both regexes use\s*, which includes newlines. Independent execution showed thatKanban-Board:\nmulti-altandKanban-Task:\nt_023b0788each still invoke both the comment and nudge subprocesses. These are not the exact anchored markers required by the workflow and by the prior change request. Restrict whitespace to horizontal whitespace on the same line (or parse lines exactly) and add regression cases for split-line markers. Keep deployed and versioned copies byte-identical.kanban/tests/test_worktree_pr_workflow.py:30-76only persists oneblockedcard. The prior requested regression explicitly required copied-DB coverage forblocked,review, andrunningoperational state. Independent copied-DB execution confirms the implementation currently preserves all three, but that contract is not encoded in the submitted regression. Add distinct review/running cases so future changes cannot regress them silently.Verified passing at this head: exact PR/base/branch/body markers; full 5-file diff; Python 2/2 tests and py_compile; migration preservation in an independent copied DB for blocked/review/running; Zig 0.16.0 fmt, 59/59 tests, ReleaseSafe 19/19; 57/57 board mappings and unique branches; profile configuration; deployed webhook SHA-256 equality; protected
mainplus active PR hooks in all five repositories. Forgejo reports no commit statuses or Actions runs for this exact head.APPROVED — independent review of exact head
35c96fa0c1bf7158ee4f4df9270061f6d91dec5dContract audit completed after two change-request rounds. The migration is a no-op for already migrated cards and copied-DB regressions preserve blocked, review, and running operational state. PR webhook markers are exact, unique, same-line
Kanban-Board: multi-altandKanban-Task: t_<8 hex>values; missing, wrong, duplicate, and split-line markers are rejected. Versioned/deployed dispatch and nudge scripts are byte-identical.Independent verification:
origin/main...HEAD; 5 changed files, no whitespace errors;py_compilepassed;SHA256SUMSverifies all repository bundles/patches and the pre-cutover Kanban DB;mainprotection and active review webhook are present in all five allowed repositories;Residual risk: Forgejo uses the same
hermesidentity for PR ownership and review, so it may reject formal self-approval; in that case this COMMENT is the clearly labelled approval evidence. Stable artifact promotion remains excluded and requires the separate human gate.