Skip to content

fix(revise): cut guidance slices at 150 comments and pin item ids - #161

Merged
mmaclay merged 3 commits into
mainfrom
fix/guidance-slice-size
Dec 5, 2026
Merged

mmaclay merged 3 commits into
mainfrom
fix/guidance-slice-size

Conversation

@mmaclay

@mmaclay mmaclay commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Origin: #147 (revise prepare 2026-12, libera_utils and libera_cdk guidance slices)
Sandbox: the extractor, Opus, on the public harvest fixture. (1) Two slices of 90 and 96 comments, two repeats per variant: guidance_check refusals main 0, branch 0; recall main 44/48 and 43/48, branch 43/48 twice. (2) The fixture doubled to 372 comments and cut as each variant cuts, main 294 + 78, branch 144 + 150 + 78: refusals 0 on both, 217 and 216 items, evenly split across the two halves. Main's 294-comment slice took 569 s; the branch's longest took 360 s. Neither run reproduced #147's refusals or time-outs.
Canary: none yet

Ticket: #147

Motivation

In the December revision, seven of 13 guidance slices of 200 to 280 comments hit the 10-minute request limit and wrote nothing. Every slice re-cut to about 150 finished. Of the slices that finished, nine were refused by guidance_check.py, mostly for two reasons:

  • five for a comments_read count one or two short;
  • two for a quote attached to the neighboring comment's id, still refused after one send-back and re-attached by hand.

Each refusal costs the driver a send-back or a manual fix. #147 asked for smaller slices, ids taken from the quoted comment, and a count that is not done by hand.

Change Summary

  • revise cuts guidance slices at about 150 comments, down from 300. A pull request past 150 is still a slice alone.
  • A one-PR slice that writes nothing, as one that times out does, is not sent back, since it would time out again. It is named as not read.
  • The driver gives each extractor its slice's comment count, which it already has from the cut, and the extractor copies it into comments_read.
  • The extractor takes an item's comment_id, url, author and authorship from the entry whose body it copied the quote from, and finds the quote there again before writing.

Used by: nothing outside this repository

Departures

  • guidance_check.py's MAX_SLICE stays 300. The recorded benchmark run reads its 186 comments as one slice, and three tests pin it. The driver enforces the 150 cut. The check still refuses a multi-PR slice past 300.

Details

Design decisions

  • The count comes from the driver because the extractor has only Read and Write and no way to count except by hand. The driver already counts every list to make the cut, and that is the same total guidance_check.py compares against.

What changed

  • skills/revise/harvest.md, "Guidance": the cut, the count passed, and the lone-slice time-out.
  • agents/guidance-extractor.md: the count input, ids from the quoted entry, comments_read copied.
  • README.md, skills/revise/SKILL.md: 150 in place of 300.
  • sandbox/README.md: the benchmark run is given its 186-comment count.
  • Versions: revise 2.27.0.

Testing

Run: bash tests/checks.sh

  • The evidence runs are in the Sandbox line above. Time grows about 2 s a comment on this fixture, so main's 300 cut ends near the 10-minute limit on short comments and past it on the longer ones a real repository has, while 150 leaves about 4 minutes of room. The branch costs about 7% more per run, from the extra slice. Both variants lost a few labels from themes T3 and T9 against the recorded one-slice run (48/48). This looks like an effect of cutting into slices, since main and the branch lost the same ones, so smaller slices may cost a little recall on themes that span them. Not shown: whether the id and count wording cuts refusals on real slices of 100 to 150 comments. The next revision's prepare will show that.
  • Downstream: none.

🤖 Generated with Claude Code. AI assistance level: 5/5 (not read by a person).

mmaclay and others added 3 commits December 4, 2026 08:33
- Cut slices at about 150 comments: slices of 200 or more timed out
  and wrote nothing; a pull request past 150 is a slice alone and is
  not sent back when it writes nothing
- Give each extractor its slice's comment count to copy into
  comments_read
- Take an item's ids from the entry its quote was copied from, and
  find the quote there again before writing

Closes #147

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Leave a one-PR slice past 150 that wrote nothing unsent, since it
  would time out again, and name it with what was not read
- Say the benchmark run is given its 186-comment count as one slice

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mmaclay
mmaclay marked this pull request as ready for review December 5, 2026 00:31
@mmaclay
mmaclay merged commit 5e5345b into main Dec 5, 2026
1 check passed
@mmaclay
mmaclay deleted the fix/guidance-slice-size branch December 5, 2026 00:31
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.

1 participant