feat(review): audit-trail rework comment -- the ticket tells its own story (Closes #310) #313

Merged
joshtronic merged 1 commit from agent/310-audit-trail into master 2026-07-01 21:04:37 +00:00
Collaborator

What this does

Adds the rework leg of the per-ticket audit trail (#310). The review side already logs model + effort + verdict on every verdict (since #308/#312); the bot`s rework was silent. Now each rework round posts:

🔧 Rework — round N (automated)

Addressed the review on claude-opus-4-8 at effort xhigh — 2 new commit(s).

So the ticket conversation, read top to bottom, IS the journey: review (opus@high) → REQUEST_CHANGES🔧 rework round 1 (opus@high)review (opus@high) → REQUEST_CHANGES🔧 rework round 2 (opus@xhigh)review (opus@high) → APPROVE → merged. Read a task, see how it went.

Notes

  • Reuses the cached PR_REWORK_ROUND / PR_REWORK_EFFORT from the #308 ladder — no new state, no new calls.
  • Non-critical path: its a PR comment, best-effort (a failed post logs a warning, never blocks the rework). check-syncgreen,bash -n` clean.
  • This PR dogfoods #308: its a bot PR on a validated repo, so the live effort-laddered reviewer reviews it (opus, effort highat round 0) — watch the review comment for the(effort: high)` line.

Deferred (not blockers — say if you want them)

  • A consolidated single-comment "run log" table (true at-a-glance) rather than interleaved comments — a nicer v2.
  • Initial-work provenance (the issue-work run`s model/effort) on PR-open — the one journey step still not logged.

Closes #310.

## What this does Adds the **rework leg** of the per-ticket audit trail (#310). The review side already logs model + effort + verdict on every verdict (since #308/#312); the bot`s **rework was silent**. Now each rework round posts: > ### 🔧 Rework — round N _(automated)_ > Addressed the review on `claude-opus-4-8` at **effort xhigh** — 2 new commit(s). So the ticket conversation, read top to bottom, IS the journey: `review (opus@high) → REQUEST_CHANGES` → `🔧 rework round 1 (opus@high)` → `review (opus@high) → REQUEST_CHANGES` → `🔧 rework round 2 (opus@xhigh)` → `review (opus@high) → APPROVE` → merged. Read a task, see how it went. ## Notes - Reuses the cached `PR_REWORK_ROUND` / `PR_REWORK_EFFORT` from the #308 ladder — no new state, no new calls. - **Non-critical path**: it`s a PR comment, best-effort (a failed post logs a warning, never blocks the rework). `check-sync` green, `bash -n` clean. - **This PR dogfoods #308**: it`s a bot PR on a validated repo, so the live effort-laddered reviewer reviews it (opus, effort `high` at round 0) — watch the review comment for the `(effort: high)` line. ## Deferred (not blockers — say if you want them) - A **consolidated single-comment "run log" table** (true at-a-glance) rather than interleaved comments — a nicer v2. - **Initial-work provenance** (the issue-work run`s model/effort) on PR-open — the one journey step still not logged. Closes #310.
feat(review): audit-trail rework comment -- the ticket tells its own story (igor#310)
All checks were successful
Lint / check-sync (push) Successful in 5s
Lint / check-sync (pull_request) Successful in 4s
c9279382b0
Post a per-round rework comment on the PR recording model + effort +
commit count, so a glance at the ticket shows the whole journey. Pairs with
the review comments (which log model + effort + verdict since #308) to form
the trail: review -> rework -> review -> ... -> merged/escalated.

Placed where the rework produces commits (PR_NEW > 0), reusing the cached
PR_REWORK_ROUND / PR_REWORK_EFFORT from the #308 ladder. Best-effort (a
failed post never blocks the rework). Non-critical path -- it's a comment,
not a merge gate.

Closes #310.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011KXPafSYJPY6XkWHHk1Lfs
Author
Collaborator

🤖 Review — COMMENT (automated)

CI for c9279382: success

Small, focused, best-effort change: posts one PR comment per rework round recording round number, a model name, effort, and commit count. Scope is tight (~12 lines), CI is green, no CI-config touches, and the post is genuinely non-blocking (2>/dev/null || log warning). One semantic concern keeps me from a clean APPROVE.

  • Model/effort mismatch in the audit line (bin/tick.sh, new block). The comment reads "Addressed the review on ${AGENT_MODEL_REVIEW} at effort ${PR_REWORK_EFFORT}". It mixes the review model (AGENT_MODEL_REVIEW) with the rework effort (PR_REWORK_EFFORT). For an audit entry whose stated purpose is "which model did the rework and at what effort," attributing it to the reviewer's model looks like a mislabel — a reader would reasonably expect the rework agent's model here, not the reviewer's. If the intent is "addressed the review that was authored by model X," the phrasing is at least ambiguous. Worth a human confirming this is the variable you meant, and tightening the wording either way.

  • Variable scope is unverifiable from the diff. PR_REWORK_ROUND, PR_REWORK_EFFORT, AGENT_MODEL_REVIEW, PR_REPO, PR_NUMBER, and forgejo_comment are all assumed live at this point. The description says they're cached from the #308 ladder, which is plausible, but I can't confirm from the shown lines. If any are unset, the failure mode is a benign ugly/empty comment (not a block), given the best-effort guard.

  • No tests. Expected for a shell comment-posting side effect; bash -n/check-sync green per the description and CI is success. Not a blocker, just noting there's no automated coverage of the message contents.

Nothing here is a hard contract violation, but the review-vs-rework variable mix is a real "is this what you meant?" that deserves a human glance before merge.


Independent review by the harness on claude-opus-4-8 (effort: high). The human reviewer is requested once Igor has reviewed; a human still merges.

### 🤖 Review — `COMMENT` _(automated)_ CI for `c9279382`: **success** Small, focused, best-effort change: posts one PR comment per rework round recording round number, a model name, effort, and commit count. Scope is tight (~12 lines), CI is green, no CI-config touches, and the post is genuinely non-blocking (`2>/dev/null || log warning`). One semantic concern keeps me from a clean APPROVE. - **Model/effort mismatch in the audit line (`bin/tick.sh`, new block).** The comment reads "Addressed the review on `${AGENT_MODEL_REVIEW}` at **effort ${PR_REWORK_EFFORT}**". It mixes the *review* model (`AGENT_MODEL_REVIEW`) with the *rework* effort (`PR_REWORK_EFFORT`). For an audit entry whose stated purpose is "which model did the rework and at what effort," attributing it to the reviewer's model looks like a mislabel — a reader would reasonably expect the rework agent's model here, not the reviewer's. If the intent is "addressed the review that was authored by model X," the phrasing is at least ambiguous. Worth a human confirming this is the variable you meant, and tightening the wording either way. - **Variable scope is unverifiable from the diff.** `PR_REWORK_ROUND`, `PR_REWORK_EFFORT`, `AGENT_MODEL_REVIEW`, `PR_REPO`, `PR_NUMBER`, and `forgejo_comment` are all assumed live at this point. The description says they're cached from the #308 ladder, which is plausible, but I can't confirm from the shown lines. If any are unset, the failure mode is a benign ugly/empty comment (not a block), given the best-effort guard. - **No tests.** Expected for a shell comment-posting side effect; `bash -n`/`check-sync` green per the description and CI is `success`. Not a blocker, just noting there's no automated coverage of the message contents. Nothing here is a hard contract violation, but the review-vs-rework variable mix is a real "is this what you meant?" that deserves a human glance before merge. --- <sub>Independent review by the harness on `claude-opus-4-8` (effort: high). The human reviewer is requested once Igor has reviewed; a human still merges.</sub> <!-- review sha=c9279382b08dfe5f2cbc9e399b7627378e9cf7d7 verdict=COMMENT ci=success -->
igor added spent time 2026-07-01 20:53:32 +00:00
37 seconds
joshtronic approved these changes 2026-07-01 21:04:32 +00:00
joshtronic deleted branch agent/310-audit-trail 2026-07-01 21:04:37 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
2 participants
Notifications
Total time spent: 37 seconds
igor
37 seconds
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
joshtronic/igor!313
No description provided.