Skip to content

fix(strands-command): fail bug-verifier runs that apply no label or comment#77

Open
JackYPCOnline wants to merge 1 commit into
strands-agents:mainfrom
JackYPCOnline:fix/bug-verifier-write-guard
Open

fix(strands-command): fail bug-verifier runs that apply no label or comment#77
JackYPCOnline wants to merge 1 commit into
strands-agents:mainfrom
JackYPCOnline:fix/bug-verifier-write-guard

Conversation

@JackYPCOnline

Copy link
Copy Markdown
Contributor

Motivation

A bug-verify run can finish green while doing nothing to the issue. The agent describes applying a deferred triage label in its report, but never actually calls add_issue_labels. Since the deferred-write record is only written inside the tool, no write_operations.jsonl is produced, finalize finds no artifact to replay, and the issue ends up with no label and no comment — with no error surfaced anywhere. Observed on harness-sdk#3216: all jobs succeeded, the agent reported "Labels applied: bug-needs-info (deferred)", yet nothing landed.

What this does

Adds a post-run guard for bug-verifier sessions. A run must end up applying a label or comment to the issue, or it fails (non-zero exit).

  • Tracks write-tool invocations for the current run (the truthful signal, since in read-only mode the write is deferred and not yet on the issue when the agent exits).
  • Session resumption is preserved: a resumed run that legitimately writes nothing passes if a triage label from a prior run already exists on the issue.
  • Only bug-verifier is affected; other modes return early.

Out of scope

Does not address the SOP wording that nudges the model to narrate a deferred write instead of calling the tool, nor the case where a label is applied but doesn't exist in the repo (fails later in write_executor). Happy to follow up separately.

…omment

A bug-verify run could finish green while applying nothing to the issue:
the agent described a deferred triage label in its report without ever
invoking add_issue_labels. Because the deferred-write record is only written
when the tool is actually called, no write_operations artifact was produced,
finalize had nothing to replay, and the issue got no label or comment -- with
no error anywhere.

Track write-tool invocations and, for bug-verifier sessions, fail the run
unless it applied a label or comment this run, or (for a resumed session) a
triage label from a prior run already exists on the issue. Session resumption
is preserved.
@JackYPCOnline

JackYPCOnline commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

/strandly-the-agent is this fix correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants