Repository navigation
fix(dev-agent): recognize an explanatory comment as a legitimate triage stop - #545
libravault-pipeline-bot[bot] wants to merge 1 commit into
Conversation
…ge stop The "Force-classify risk and advance to QA" guard's triage no-PR branch only accepted a status label (ready-for-dev/in-progress/needs-info) as evidence dev-agent legitimately stopped without opening a PR. It never checked for an explanatory comment, so a run that correctly left status:triage untouched per the issue's own instructions (issue #532) and posted a comment explaining why got misread as the #207 zero-signal malfunction: a spurious status:needs-info plus a comment falsely claiming no explanation was posted. Adds a "Record pre-agent timestamp" step before "Run dev agent" and, in the label-check's else branch, checks for any issue comment created after that timestamp before falling through to the malfunction path. Closes #544.
QA verification — PR #545 vs issue #544Checklist vs issue #544's "Fix" / "Suggested approach"
Tests / verification
Summary: the core #532 repro (issue's own comment-only legitimate stop) is fixed correctly, but the fix introduces a new failure mode that undermines the issue's explicit requirement to preserve #207 zero-signal malfunction detection, and ships with no regression test as AGENTS.md requires. Sending back to the dev agent to guard QA verdict: FAIL |
| QA failed its first round — routing back to the dev agent for one automated retry. |
|
This PR's own diff modifies |
|
Human-merge sweep: this PR modifies |
|
Human-merge sweep: this PR touches |
|
Human-merge sweep: reviewed. The fix is scoped correctly and matches the described #532 repro (timestamp-gated comment check before falling through to the #207 zero-signal malfunction path); verification is static (YAML parse + shellcheck) since this workflow has no dedicated test harness, consistent with how prior fixes to this same guard step (#207/#210/#231/#233/#236/#254/#401) were validated. However this PR's only change is to |
Summary
The
dev-agent.yml"Force-classify risk and advance to QA" guard step'striage no-PR branch only accepted a status label
(
status:ready-for-dev/status:in-progress/status:needs-info) asevidence that dev-agent legitimately stopped at triage without opening a
PR. It never checked for an explanatory comment instead — which is
exactly what happens on an issue whose own body tells dev-agent to leave
the labels alone (e.g. "leave at triage, this needs a human with infra
access").
Live-tested on issue #532: dev-agent correctly triaged the issue,
determined it was out of scope, left
status:triageuntouched per theissue's own instructions, and posted a comment explaining why. The guard
step then misread that as the #207 zero-signal malfunction (no PR, no
expected label) and force-added
status:needs-infoplus a commentfalsely claiming no explanation was posted.
Approach
id: pre-agent-time) rightbefore "Run dev agent", capturing
date -u +%Y-%m-%dT%H:%M:%SZ. Placedimmediately before the agent step (rather than derived from the job/run
start) so a slow guard/app-token/drift-check sequence ahead of it can't
produce a false negative, and guarded with the same
steps.guard.outputs.skip != 'true'condition the app-token step uses, so it always runs whenever"Run dev agent" is reachable.
else(no expected label present), beforefalling through to the dev-agent.yml: agent can complete 'successfully' while taking no action at all #207 malfunction path, now also checks whether
any issue comment was created after that timestamp
(
gh issue view --json comments, filtered oncreatedAt). If oneexists, treats it as a legitimate stop with an explanation and does
not add
status:needs-infoor post the contradictory "no comment"message. The original dev-agent.yml: agent can complete 'successfully' while taking no action at all #207 zero-signal detection (no PR, no label, no
comment) is unchanged for the genuine malfunction case.
Risk / sensitive path
This PR's only change is to
.github/workflows/dev-agent.yml, which is asensitive_pathsentry in.github/agent-policy.yml—classify_pr_risk.pywill force
risk:highon this diff regardless of size, and it needshuman review/merge same as prior workflow-file fixes (e.g. #454).
Verification
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/dev-agent.yml'))"— parses cleanly.run:block, substituted its${{ }}expressionswith placeholders, and ran
bash -n(syntax OK) andshellcheck(no newwarnings beyond the expected "expression is constant" noise from the
placeholder substitution, which also appears identically on every
pre-existing
${{ steps.*.outcome }}comparison in this same file).run:bash (unlike the standalone scripts under
.github/scripts/, which dohave
test_*.shcompanions) — every prior fix to this same guard step(dev-agent.yml: agent can complete 'successfully' while taking no action at all #207, dev-agent/qa-agent/principal-review: async subagent delegation stalls forever in CI (no notification mechanism) #210, Pipeline workflows silently mislabel a PR if the guard step itself fails, not just the agent step #231, Release-variant unit tests are broken by construction:
./gradlew testfails #233, dev-agent.yml's triage-crash branch strips status:in-progress but not status:ready-for-dev #236, Agent pipeline silently no-ops on stale PR branches: workflow-file drift trips GitHub's OIDC validation, producing a misleading "no verdict" message #254, Self-modifying-workflow PRs can never pass their own agent stage's OIDC self-check — rebase does not fix it #401) was validated the same way:static syntax checking plus a live run, referenced by issue number in
the step's own comments. This PR follows that established precedent;
a real live re-run against a libravault.xyz missing security response headers and security.txt #532-shaped issue (comment posted, no
label change, no PR) is the actual end-to-end confirmation, same as
those prior fixes.
Also flagged, not in scope for this PR
Issue #532 itself is still left mislabeled (
status:triage+status:needs-infosimultaneously) with a comment thread that inaccuratelysays no comment was posted. Per the issue's "Also needs cleanup" section,
that's a human/follow-up cleanup once this guard fix lands, not something
for dev-agent to touch automatically.
Closes #544.