Skip to content

fix(ci): principal-review-agent files an issue for every CONFIRMED finding - #375

Merged
libravault-xyz merged 1 commit into
devfrom
fix/principal-review-file-issues
Aug 20, 2026
Merged

libravault-xyz merged 1 commit into
devfrom
fix/principal-review-file-issues

Conversation

@libravault-xyz

Copy link
Copy Markdown
Collaborator

Summary

PR #368's own review found a genuine, structural finding (opening dev-agent's PR early would re-trigger full JVM/iOS CI on every intermediate push) that was fixed in the same PR before merge — but never got filed as its own numbered issue, unlike almost every other real bug this pipeline has caught live (see issue #244, #254, #311, etc. are all over the workflow comments). Filed retrospectively as #373 (closed, linked to the fix) at the user's request, and this PR codifies filing one going forward as standard practice for principal-review-agent.

Change

Any finding at CONFIRMED severity — the same bar that already forces human-merge — now also gets filed as a GitHub issue via gh issue create, regardless of whether it's fixed inline in the same round, needs separate follow-up, or a human decides not to act on it. Search-first to avoid duplicates; close-with-link if already fixed by the time of filing; reference the new issue number back in the review comment. PLAUSIBLE/nit-level findings are explicitly excluded — reserved for the same bar that already forces a human to look, not every review comment.

Review notes

  • .claude/agents/principal-review-agent.md matches agent-policy.yml's sensitive_paths (.claude/agents/**) — risk:high/human-merge expected.
  • No workflow (.github/workflows/principal-review.yml) changes needed: issues: write is already granted to that job, and Bash is already unrestricted in --allowedTools — verified before assuming a workflow change was required, same lesson fix(ci): open dev-agent's PR early as a checkpoint, not as its last step #368 itself already demonstrated once.
  • Persona-only change; no behavior change to risk classification, auto-merge/human-merge routing, or anything else in the existing flow.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

…nding

Real finding from PR #368's own review went undocumented anywhere but
that PR's now-merged review thread: opening dev-agent's PR early would
re-trigger full JVM/iOS CI on every intermediate push, a real cost given
this pipeline's iOS build minutes are already its scarcest resource
(confirmed live, same session: PR #355's QA run got skipped outright for
"pipeline at capacity"). Fixed in the same PR before merge, but never
got the numbered-issue treatment this repo's own workflow comments lean
on everywhere else (`see issue #244`, `#254`, `#311`, ...) — filed
retrospectively as #373, closed with a link to the fix.

This codifies that as standard practice going forward: any finding at
CONFIRMED severity (the same bar that already forces human-merge) now
also gets filed as a GitHub issue, independent of whether it's fixed
inline in the same PR/round, needs separate follow-up, or a human
decides not to act on it. A review comment disappears from easy view
the moment its PR merges; a numbered issue doesn't.

`issues: write` is already granted to principal-review.yml's job — no
workflow changes needed, this is a persona-only addition, same shape as
#368's dev-agent fix turning out narrower than first assumed once the
actual permissions/triggers were checked instead of guessed at.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions github-actions Bot added the risk:high Touches a sensitive path or exceeds diff-size threshold — always human merge label Aug 20, 2026
@libravault-pipeline-bot libravault-pipeline-bot Bot added the status:needs-review QA passed, awaiting principal-review-agent label Aug 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR was opened outside the automated pipeline (author isn't libravault-pipeline-bot[bot]) and doesn't link an issue (no Closes #N-style line in its body), so there's no acceptance criteria for qa-agent.yml to verify against — it would otherwise sit with no risk/status label and nothing downstream would pick it up (see issue #223's actual history, and issue #343 for this issue-less case specifically). This deterministic backstop (pr-intake.yml) classified its risk and applied status:needs-review to route it straight to principal review.

@github-actions

Copy link
Copy Markdown
Contributor

Pipeline is at capacity (3/3 active runs) — skipping this review run. Re-apply status:needs-review once activity settles, or re-trigger manually via workflow_dispatch.

@github-actions

Copy link
Copy Markdown
Contributor

📱 iOS Build Status: PASSED

✅ iOS Simulator Build & Unit Tests - success
✅ Android Core Modules - success

iOS UI tests run in a separate, informational job and are not reflected above — check "iOS UI Tests (informational)" for those.

View run details

@libravault-xyz libravault-xyz added status:needs-review QA passed, awaiting principal-review-agent and removed status:needs-review QA passed, awaiting principal-review-agent labels Aug 20, 2026 — with Claude
@github-actions

Copy link
Copy Markdown
Contributor

Principal review — PR #375

Verdict: human-merge (routing purely on risk:high; no CONFIRMED findings against the change itself).

What I verified

  • Diff scope: gh pr diff 375 confirms the change is exactly what the description claims — a single additive section ("Documenting real findings") inserted into .claude/agents/principal-review-agent.md, no other files touched. Persona prose only, no logic/workflow changes.
  • Risk label: .github/agent-policy.yml's sensitive_paths includes .claude/agents/**, so risk:high is correctly forced regardless of diff size (34 lines, well under the 400-line threshold — size isn't why this is high-risk). Checked the label timeline via the issues timeline API: risk:high was applied at 19:20:28Z, right after the PR's only commit (19:18:48Z) — no later commits landed, so the label isn't stale and doesn't need re-running through classify_pr_risk.py.
  • Issue dev-agent's early-draft-PR checkpoint re-triggers full JVM/iOS CI on every intermediate push #373: exists, CLOSED/COMPLETED, and its body matches the PR description's account exactly (dev-agent's early-draft-PR checkpoint from fix(ci): open dev-agent's PR early as a checkpoint, not as its last step #368 re-triggering JVM/iOS CI on every intermediate push, fixed in the same PR, filed retrospectively). Not a fabricated citation.
  • #244, #311 (cited as prior examples of "see issue #N" pipeline findings): both exist and are closed, consistent with the claim.
  • Workflow permissions claim: principal-review.yml already grants issues: write (line 47) and its --allowedTools is unrestricted Bash (line 242, no scoping to specific gh subcommands) — so gh issue create/gh issue list --search from this new instruction will actually work without a workflow change. No workflow file was touched, and none was needed.
  • AGENTS.md: its testing requirements are scoped to code changes; this is a docs/persona-only edit, which the doc's own "trivial changes... exempt" carve-out covers. No test-coverage gap here.
  • CI: JVM Tests, iOS App Build & Test, and PR Intake all SUCCESS on the current (only) commit.
  • No new networking dependency, no other sensitive-path touches beyond the one already flagged, no status:blocked on the PR or (as best I can tell) its context.

Content read

The new "Documenting real findings" section is internally consistent with the rest of the persona: it hooks off the same CONFIRMED-severity bar that already forces human-merge, explicitly excludes PLAUSIBLE/nit findings, and its dedup/close-with-link/back-reference steps are concrete enough to follow without further judgment calls. No correctness issues found in the prose itself.

One unrelated observation, not a finding against this PR

The working tree in this review environment currently has uncommitted local modifications to .claude/agents/dev-agent.md and .claude/agents/human-merge-sweep-agent.md (and, before I read it, to this same principal-review-agent.md — reverting exactly this PR's addition) that are not part of PR #375's actual diff and predate this review session. gh pr diff/gh pr view --json files confirm the real PR only touches principal-review-agent.md, so this doesn't reflect on the PR's content — flagging only so a human can sanity-check why this checkout has dirty state outside the PR being reviewed.

No CONFIRMED findings, so no issue filed per this PR's own new policy — routing to human-merge solely because .claude/agents/** is a sensitive path.

@github-actions github-actions Bot added status:needs-human-merge Principal review done, requires human merge decision and removed status:needs-review QA passed, awaiting principal-review-agent labels Aug 20, 2026
@libravault-xyz
libravault-xyz merged commit fffb347 into dev Aug 20, 2026
15 checks passed
@libravault-xyz
libravault-xyz deleted the fix/principal-review-file-issues branch August 20, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:high Touches a sensitive path or exceeds diff-size threshold — always human merge status:needs-human-merge Principal review done, requires human merge decision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant