Skip to content

fix: refresh GitHub issues with fewer conversation requests - #254

Merged
vjovanov merged 2 commits into
mainfrom
fix/issue-252
Nov 5, 2026
Merged

vjovanov merged 2 commits into
mainfrom
fix/issue-252

Conversation

@vjovanov

@vjovanov vjovanov commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #252

A github-issues source using updated_within_days: 0 to keep quiet open work previously read the same conversation repeatedly when authored, open and participating searches overlapped, making a separate request for each read. The unchanged source now deduplicates valid answers by repository and issue number before reading comments, then fills GraphQL alias batches of at most 20 distinct conversations.

This implements the existing cheapest-refresh requirement clarified in §FS-001-forge-interface.8.3 docs/functional-spec/FS-001-forge-interface.md:584: read each distinct conversation at most once per fetch, fill bounded batches, and preserve the conversations and facts the feed needs. Distinct old closed conversations still get read in these batches.

Quiet open conversations, recent closed loose ends and old conversations retained by open runtime work remain available. Search questions, shared bounds, limits, completeness checks and visibility policy are preserved, with no new option. Author precedence and first-seen payload/order remain intact; equal issue numbers in different repositories stay distinct. Comment normalization, message identities/order, the last 30 comments, first 50 reactions per comment and configured host handling are preserved. comments: false and issues without comments make no comment requests. The manual now describes the batched reads.

Unavailable conversations leave their issues intact. Partial responses retain successful siblings even when gh exits unsuccessfully; failed or malformed batches do not prevent later batches from being read or trigger per-issue retries.

The original offline fixture measured the following total gh calls per refresh, with identical counts on cold and warm runs:

Closed issues Before After Comment batches after
40 84 5 3
240 466 17 13

The warm slope fell from 1.91 to 0.06 calls per added closed issue, below the accepted 0.25 bound. Quiet open work and its conversations, plus yesterday's unanswered closed issue under Recent, are preserved. These are offline fixture measurements.

The specification and three failing regressions were committed first in f945de9d0d; fb73ae0985 delivers the implementation, enables all three and repairs two existing integration fixtures to answer the requested aliases for the correct issues. Both major review findings are resolved, with none outstanding.

The three enabled regressions in E2E-065-issue-comment-batches pin:

  • Cold/warm cost and actual conversation retention, including an old closed matter retained through real cached facts and the existing status/session seam.
  • Filled 20/20/6 batches for 46 distinct conversations, cross-repository identity, roles, payloads, reactions, host handling and comments disabled.
  • Missing/null aliases, partial failed exits, whole-request failures and malformed JSON, preserving issues and available sibling/later-batch conversations without fallback reads.

Local validation on fb73ae0985 passed the original reproducer and all six gate commands (READY: yes):

  • pre-commit run --all-files: formatting, warnings-as-errors locked all-target build, locked all-target Rust tests, Python, CI-pinned grund and content checks.
  • Explicit Python integration discovery: 113 tests passed; boundary and parity checks passed.
  • CI-pinned grund 0.18.0 fmt --check passed.
  • A second cargo test --all-targets --locked with symlinked TMPDIR passed, including all three issue-252 regressions with none ignored and all 53 feed_test cases.

Hosted CI and merge verification remain for ship. The generated workflow summary covers recorded invocations before shipping.

AI workflow: `rhei`, 11 agent invocations across 1 model; 7 tasks completed, 9 in progress.
  1. github-issues-agent-grounds-ephor-252-implement-d9052d2a.ticket supervising (visit 1) — cdx, openai/gpt-6.1-sol — 2m23s — 708.8k in / 4.7k out
  2. github-issues-agent-grounds-ephor-252-implement-d9052d2a.ticket supervising (visit 2) — cdx, openai/gpt-6.1-sol — 4m02s — 1.1M in / 9.0k out
  3. github-issues-agent-grounds-ephor-252-implement-d9052d2a.ticket.specify specify — cdx, openai/gpt-6.1-sol — 14m03s — 6.4M in / 29.6k out
  4. github-issues-agent-grounds-ephor-252-implement-d9052d2a.ticket supervising (visit 3) — cdx, openai/gpt-6.1-sol — 1m30s — 449.7k in / 3.4k out
  5. github-issues-agent-grounds-ephor-252-implement-d9052d2a.ticket.implement implement — cdx, openai/gpt-6.1-sol — 8m15s — 2.3M in / 16.6k out
  6. github-issues-agent-grounds-ephor-252-implement-d9052d2a.ticket supervising (visit 4) — cdx, openai/gpt-6.1-sol — 1m50s — 507.0k in / 4.6k out
  7. github-issues-agent-grounds-ephor-252-implement-d9052d2a.ticket.review-1 review — cdx, openai/gpt-6.1-sol — 7m01s — 2.0M in / 15.9k out
  8. github-issues-agent-grounds-ephor-252-implement-d9052d2a.ticket supervising (visit 5) — cdx, openai/gpt-6.1-sol — 1m46s — 515.5k in / 4.4k out
  9. github-issues-agent-grounds-ephor-252-implement-d9052d2a.ticket.fix-1 fix — cdx, openai/gpt-6.1-sol — 6m50s — 2.0M in / 13.7k out
  10. github-issues-agent-grounds-ephor-252-implement-d9052d2a.ticket supervising (visit 6) — cdx, openai/gpt-6.1-sol — 2m55s — 1.0M in / 6.0k out
  11. github-issues-agent-grounds-ephor-252-implement-d9052d2a.ticket supervising (visit 7) — cdx, openai/gpt-6.1-sol — 1m46s — 703.1k in / 3.8k out
Accounting Value
cost $4.79
total tokens 17.9M
input tokens (incl. cache) 17.8M
input cache read 16.8M
input cache write -
output tokens (incl. cache) 111.6k
output cache read -
output cache write -
coverage Complete

Collect distinct issue answers before hydration and fill bounded GraphQL
comment batches. Match existing fixture responses to each requested alias
and repository/issue identity.

Realizes §FS-001-forge-interface.8.3.
@vjovanov vjovanov changed the title spec: bound GitHub issue conversation reads by distinct batches fix: refresh GitHub issues with fewer conversation requests Nov 5, 2026
@vjovanov
vjovanov marked this pull request as ready for review November 5, 2026 18:19
@vjovanov
vjovanov requested a review from kimeta November 5, 2026 18:19
@vjovanov
vjovanov merged commit 68602c8 into main Nov 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant