š fix: Needs you counts a re-added slice's answers after its re-addition
Slice: #99
Builds State #207 of P-40, found by Cubic on #206 (README.md:541) and filed there. Closes #207.
What changes
src/asks.ts: each owed ask carries asince, the ask's own time by default. For aProposal:for the issue itself (a slice's addition, including one whose first line names no#N), the sweep reads the issue's own timeline and raisessinceto its latestparent_issue_addedevent, when that is later. ADecision:, a š and a batch answer on Approvals each count only aftersince, as the work rules count them after the slice's latest addition. So a slice taken out and added again, whose old proposalproposedoes not repost, stays on Needs you until the owner says so again.- The timeline is read only when such a proposal is owed, and a 404 reads as no addition. A State's drop proposal and a
Needs you:ask keep their own times. - README: the sentence #206 added about this gap now says what the sweep does. A Record in
docs/decisions.md.
One difference from the work rules, noted here rather than decided: readSlice also counts the work item's sub_issue_added events that name no issue (a private repository's workflow token reads them that way). The sweep reads only the slice's own parent_issue_added events, which that token reads in full, so it trails the work rules only where GitHub records an addition on the work item and not on the slice.
Evidence
pnpm check passes: typecheck, 1071 of 1071 tests under the 95/95/90 gate (asks.ts 100% lines, 97.36% branches, 100% functions), build, smoke.
New test in src/asks.test.ts, "one proposal at a time (#203)" āŗ "counts an answer to a slice's addition only after the slice was last added (#207)", each case through both the hourly sweep and the comment event on Approvals:
- re-added at 04:00 after the proposal at 01:00: a š at 03:00 ā waits; at 06:00 ā cleared.
- a
Decision:at 03:00 ā waits; at 06:00 ā cleared. - the batch at 05:00 ā cleared after a re-addition at 04:00, waits after one at 06:00.
- a š on State #30's drop at 03:00 still counts (the floor is the slice's alone), and an addition before the proposal changes nothing.
Every older test leaves the timeline unrouted (a 404), so they pin the no-addition path.
The version isn't bumped here; 0.5.36 follows, then athya_mono pins it.
š¤ Generated with Claude Code
Summary by cubic
Fixes the sweep counting answers to a re-added slice's proposal from before the slice was added again, which wrongly cleared needs-owner while the work rules still owed the decision.
What changes
- A proposal for the issue itself counts a
Decision:, š, or batch answer only after the issue's latestparent_issue_addedevent, read from its timeline only when such a proposal is owed; a 404 reads as no addition. - A State's drop proposal and a
Needs you:ask keep their own times. README.mdanddocs/decisions.mddocument the behavior and the one remaining difference from the work rules: the sweep reads only the slice's own events, missing additions GitHub records only on the work item.
Evidence
pnpm checkpasses; a new test insrc/asks.test.tscovers š,Decision:, batch, and State-drop cases through both the hourly sweep and the Approvals comment event, with older tests pinning the no-addition path.