š fix: an ask's run counts the owner's batch answer too
Builds State #357 of P-40, the gap #356 left. Closes #357.
What was wrong
The ask's run (#356) checked the owner's answers on the issue itself, but
not the owner's batch answer on the Approvals issue
(Decision: approve #N ā¦). That answer's own run sweeps only issues
already labelled needs-owner. So if a batch answer landed while the
ask's run was still going, the issue was labelled afterwards, and the label
stayed on until the hourly sweep.
What changes
src/asks.ts:answeredSincenow also reads the Approvals issue's
comments since the ask, where the settings name one. It does this only
after the issue's own answers find nothing. It counts an owner's batch
answer made after the ask whose first line names the ask's issue
(batchAnswers) and that no one but owners edited (ownersAlone). For
aProposal:, the issue is the one its first line names, as the sweep
reads it. As before, it checks before labelling and again after. If
GitHub cannot find the Approvals issue, that counts as no answer.- README and a Record in
docs/decisions.md.
No guard file changes.
Evidence
New tests in src/asks.test.ts, "the owner's batch answer on the
Approvals issue (#357)". Four failed before the change:
- A batch answer after the ask leaves the issue unlabelled.
- One that lands between the check and the label is taken off after
labelling. - A proposal counts the batch answer for the issue its first line names,
not the one it is on. - An agent's batch answer, one older than the ask, one naming other
issues, and one the agent edited all still label the issue. - A 404 Approvals issue labels the issue, and the Approvals issue is not
read when the issue itself already has an answer.
pnpm check passes: 1716 of 1716 tests and 87 of 87 script tests under
the 95/95/90 gate (asks.ts 100% lines, 96.68% branches, 100%
functions), pins, pariksha, build, smoke.
š¤ Generated with Claude Code
Summary by cubic
Fixes the ask's run so it also counts the owner's batch answer on the Approvals issue, closing a race where an issue stayed labelled needs-owner until the hourly sweep. Previously the run read only the owner's approved label, Decision: comment, and š on the ask; a batch answer landing during the run was missed.
The Approvals issue is read only when the issue's own answers find none, and a 404 counts as no answer. For a Proposal:, the answer counts for the issue its first line names, as the sweep reads it.