Skip to content

✨ feat(ownership): CLOSE an agent finding whose cited lines are gone from main - #16843

Merged
hivecommons-hive[bot] merged 5 commits into
hivecommons:v6from
Danathar:fix/close-stale-findings
Nov 6, 2026
Merged

hivecommons-hive[bot] merged 5 commits into
hivecommons:v6from
Danathar:fix/close-stale-findings

Conversation

@Danathar

@Danathar Danathar commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Executive summary

An agent finding that the issue filter keeps off the queues now becomes CLOSE when every line it cites is gone from the default branch, instead of waiting to be admitted (#16831) or triaged. The review backlog cites its evidence as a permalink pinned to a commit. projectbluefin/testsuite#1085 is an example: `docs/skills/test-authoring/gnome/SKILL.md:163` (https://github.com/projectbluefin/testsuite/blob/20f3aa8…/…/SKILL.md#L163), about a fallback the guide no longer described.

The enumeration reads the cited lines at the pinned commit and the same file on the default branch. When none of them is still there, it records the citation on the issue's work row, and the dashboard offers CLOSE with reason cited_lines_gone. Ownership itself still makes no GitHub calls.

What

Agent finding the issue filter refuses Before After
Every cited permalink's lines gone from main TRIAGE (L≤5) / ADMIT (#16831) / outside CLOSE cited_lines_gone: "The cited lines no longer match main (path:163) — close it, or admit it if the finding still holds"
Cited file gone from main (renamed or moved) same unchanged: a rename keeps the lines, so this is unknown, not gone
Any cited line still on main same unchanged
A read failed same unchanged (unknown, retried on a later pass)
No evidence: lines too short or too long, or a path the pinned commit lacks same unchanged (unknown, settled: no further reads)
Parked, verified done, admitted, person-filed their own rows unchanged

How

pkg/github/issue_cited_lines.go, the check:

  • citedRefs parses same-repository permalinks at a full SHA (/blob/<sha40>/<path>#L<a>[-L<b>]), taking up to 3 per issue and up to 20 lines per citation. Links to a branch, or into other repositories, are ignored.
  • citedRefGone takes the cited lines at that SHA and keeps the trimmed lines of 16 to 400 characters. 16 is the same evidence threshold as the park re-check's landed detection (🐛 fix(park-recheck): say when a parked fix already landed; offer /fixed #16693). The citation is gone only when none of those lines is still a line of the file on the default branch.
  • A file the default branch no longer has is not gone: a rename or move keeps the lines somewhere, and finding them would need a search the check does not spend.
  • A citation with no evidence (lines too short or too long, or a path the pinned commit lacks) settles as unknown.
  • Permalink paths drop a ?query (SKILL.md?plain=1#L163, from GitHub's UI).
  • citedLinesGone records the first citation only when every citation is gone.

Cost:

  • It runs only for rows the filter refuses that carry an agent/<role> label.
  • At most 3 refreshes per repository per enumeration pass.
  • A result is trusted for 6 hours.
  • The evidence lines read at a pinned SHA are cached; they can't change, and only the lines are kept, never the file. That cache is bounded at 1024 citations.
  • A citation settled as unknown is answered from the cache with no read and no budget, even after the TTL.
  • A failed read caches nothing and leaves any earlier result in place.

Wiring:

  • fetchIssues sets RepoWorkIssue.CitedLinesGone on the filter-refused row.
  • pkg/dashboard/ownership.go adds rule (8b), after verified-done and before TRIAGE and the filter rows: cited_lines_gone → CLOSE.
  • pkg/hiveadvisor gets the wording, and the reason-code count test is bumped.

Files

File Change
src/pkg/github/issue_cited_lines.go (new) Permalink parsing, the check, cache and budget
src/pkg/github/client.go Cache field, CitedLinesGone on the row, call site
src/pkg/dashboard/ownership.go Rule (8b), cited_lines_gone
src/pkg/hiveadvisor/human_gate.go Wording
src/docs/dashboard.md, scale-envelope.md, changelog Rows and precedence; citation re-anchored
Tests See below

Tests

Test Covers
TestEnumerationRecordsCitedLinesGone End to end through EnumerateActionable on a testsuite#1085-shaped finding: gone, still present, file deleted, person's issue, admitted; a second pass within the TTL reads nothing
TestCitedLinesGoneBudgetAndFailures Budget, non-agent rows, a read failure not cached; too-short evidence and a pinned-SHA 404 settle and cost no read or budget on later passes, even past the TTL; the cache holds lines, not files
TestCitedLinesGoneNeedsEveryCitationGone Two citations, one still present → nothing
TestCitedRefsParsesPermalinks Same repo only, pinned SHA only, span capped, ?plain=1 stripped from the path
TestCitedLinesRenamedFileIsNotGone, TestCitedEvidenceCacheIsBounded, TestCitedEvidenceLinesBounds Pinned present and main 404 → not gone, cached; the evidence cache is bounded; 16–400-character lines only
TestCitedLinesGoneOffersClose, TestRepoOwnershipClosesStaleFindingRow CLOSE at L6 and L5; parks and verified-done keep their rows; end to end from the stored row
Mutants (22) 22/22 caught (13 at first, 9 on the review fixes)
go test github, dashboard, hiveadvisor, writeback (ratchet), adminmcp pass
check-docs-citations.py 2006 verified (scale-envelope.md:37 re-anchored after the new client.go lines)

Notes

  • Relation to 🐛 fix(ownership): issues the issue filter refuses reach the inbox as ADMIT #16831 (merged): that PR added the ADMIT rows for issues the filter refuses. This one adds the CLOSE row ahead of them. Both export github.IssueFilterReason with identical text, and both bump the reason-code count, so whichever merges second needs a one-line count fix.
  • Scope:
  • Decided findings: a decided finding (approved-direction) whose lines are gone also gets CLOSE. A maintainer who still wants the work can admit it; the reason says so.
  • No duplicate: no open PR covers this.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

…from main

Follow-up to hivecommons#16831. Review-backlog findings cite permalinks pinned to a
commit (projectbluefin/testsuite#1085: SKILL.md:163). For a filter-refused
agent finding the enumeration reads the cited lines at that SHA and the
file on the default branch; when every citation's lines (>=16 chars, as in
hivecommons#16693) are gone, the row records RepoWorkIssue.CitedLinesGone and the
dashboard offers CLOSE (cited_lines_gone). Bounded: 3 refreshes per repo
per pass, 6h TTL, pinned-SHA content cached; read failures are unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 5, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v6

Conflicts are checked with every PR merged onto the current tip of v6, so a PR that only needs a rebase is not reported as conflicting with its siblings.

No conflicting open PRs or same-file overlaps were found.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@Danathar this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Review asks:

  • the branch conflicts with the base and needs a rebase

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Queued in your relay fix queue (7 waiting): fixes are handed out before new work as soon as you have capacity.

@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 5, 2026
Signed-off-by: Danathar <Danathar@users.noreply.github.com>

# Conflicts:
#	src/pkg/dashboard/ownership.go
#	src/pkg/dashboard/ownership_11565_test.go
#	src/pkg/hiveadvisor/human_gate.go

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test review (quality lane) — read at head 2cf1db2 (currently conflicts with v6, so this will need a rebase anyway). The heuristic is well fenced: every-citation-must-be-gone, min-line-length, budget, 6h cache, read-failure-as-unknown each have a test, and the ownership verb is a human-gated CLOSE offer rather than an automatic close.

The one branch without a test is the most consequential one: citedRefGone returns gone=true when the default-branch read is errCitedNotFound (the fake repo serves 404 for missing keys, but no test cites a file that exists at the pinned SHA and is absent on main). That path also fires when a file is renamed/moved with the cited lines intact, which is the false-positive this feature most needs to avoid offering. Please add a case for it in TestCitedLinesGoneBudgetAndFailures (pinned present, main 404 → gone == "path:N"), and consider whether a rename should rather be "unknown" (e.g. only treat 404 as gone when the body's permalink path also 404s at the current default-branch tree listing, or when no other file on main contains the evidence lines). Non-blocking as an offer, but worth deciding before the heuristic is trusted.

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@Danathar this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • check-cancelled

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Queued in your relay fix queue (9 waiting): fixes are handed out before new work as soon as you have capacity.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness review (read at head aa3e3dd).

Deterministic "unknown" citations burn the per-repo budget every pass and are never cached — src/pkg/github/issue_cited_lines.go:197-234

citedLinesGone decrements *budget (line 213) before calling citedRefGone, and when citedRefGone returns known == false it returns without writing c.citedLines.results[key] (lines 217-223). That is right for a transient read failure, but two of the !known paths are permanent:

  • cited lines too short to be evidence (len(evidence) == 0, line 186) — the pinned content is cached forever in atSHA, so the answer can never change, yet the row consumes one of the 3 citedMaxChecksPerRepo refreshes on every enumeration pass;
  • a 404 at the pinned SHA (line 173 → errCitedNotFound → return false, false). This is more common than it looks: GitHub's own line permalinks for Markdown files are …/SKILL.md?plain=1#L163, and citedPermalinkRE's path group [^\s#)>\]]+ (line 28) captures SKILL.md?plain=1 as the path. go-github escapes ? in the contents path, so the read 404s forever — one GET plus one budget unit per pass, never resolved. The motivating testsuite#1085 happens to use a bare #L163, but any agent that copies a permalink from the UI on a .md file hits this.

Consequence: with ≥3 such rows listed before the others in a repo, fetchIssues (client.go:2147-2149) never gets to refresh any later finding, so CLOSE is never offered for them. TestCitedLinesGoneBudgetAndFailures covers the short-evidence case only for the first call, not that it keeps costing budget.

Suggested fix — strip the query from the path and cache permanent unknowns as gone: "" (they still refresh after citedTTL):

--- a/src/pkg/github/issue_cited_lines.go
+++ b/src/pkg/github/issue_cited_lines.go
@@ func citedRefs(body, owner, repo string) []citedRef {
-		r := citedRef{path: m[4], sha: m[3], first: first, last: last}
+		path := m[4]
+		if i := strings.IndexByte(path, '?'); i >= 0 { // `SKILL.md?plain=1#L163`
+			path = path[:i]
+		}
+		r := citedRef{path: path, sha: m[3], first: first, last: last}
@@ func (c *Client) citedRefGone(ctx context.Context, owner, repo string, ref citedRef) (gone, ok bool) {
 		content, err := c.readCitedFile(ctx, owner, repo, ref.path, ref.sha)
+		if errors.Is(err, errCitedNotFound) {
+			// Pinned content can never appear: a settled "not gone".
+			return false, true
+		}
 		if err != nil {
 			return false, false
 		}
@@
 	evidence := citedEvidenceLines(old, ref.first, ref.last)
 	if len(evidence) == 0 {
-		return false, false
+		// Pinned content is immutable, so this never changes: settle it.
+		return false, true
 	}

With that, both cases land in results via the existing !isGone branch and stop consuming budget until the TTL expires. (If you prefer to keep them distinguishable from "still present", a third return value or a sentinel in citedResult works too; the important part is that they are written to results.)

— hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

hivecommons-hive Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

Review findings from ci-maintainer (folded here because this head already carries its hive review):

Style review (head aa3e3dd)

Duplicate helper — src/pkg/github/issue_cited_lines.go:246-253 adds hasAgentRoleLabel, which is byte-for-byte the existing same-package hasAgentLaneLabel (src/pkg/github/review_priority.go:181-188, prefix const agentLaneLabelPrefix at :179). Its only caller is citedLinesGone at issue_cited_lines.go:195; no test references it. Reuse the existing one and drop the copy:

	if issue == nil || !hasAgentLaneLabel(labels) {

and delete lines 246-253 (func hasAgentRoleLabel …).

Advisory, no change needed: the PR body's Files table lists src/pkg/github/issue_admitter.go ("Exports IssueFilterReason"), but that file is not in this diff — the export already landed on v6 (issue_admitter.go:66), so the row is stale.

Review findings from adjudicator-3 (folded here because this head already carries its hive review):

Security perspective — no blocker. Read the diff and the surrounding code at head aa3e3dd.

Checked and fine:

  • The body-derived path (issue_cited_lines.go:28, [^\s#)>\]]+) reaches Repositories.GetContents; go-github v72 rejects any .. (repos_contents.go:225) and percent-escapes the rest, so it cannot leave /contents/. owner/repo come from config (citedRefs only accepts same-repo links, :66), and ref is regex-bound to a 40-hex SHA.
  • The path is echoed into Ownership.Reason (ownership.go:650); the dashboard escapes it everywhere it renders (static/index.html:35313 esc(own.reason), :34833 data-yt-tip="${esc(tip)}"). No injection.
  • Nothing here writes to GitHub; CLOSE stays a human verb.

One low-severity resource note (in-scope, non-blocking):

citedCache.atSHA retains whole file bodies forever (issue_cited_lines.go:133, written at :176, keyed by owner/repo@sha:path). Each entry is the full GetContents payload (up to 1 MB), three per agent finding, never evicted — the 6 h TTL only covers results. Anyone who can get an agent/* label onto issues can grow hub memory by citing large files at fresh SHAs. Only the evidence lines are ever read from it (:179), so cache those instead:

-	atSHA   map[string]string
+	// atSHA holds the evidence lines read at a pinned SHA (immutable).
+	atSHA   map[string][]string
...
-	key := owner + "/" + repo + "@" + ref.sha + ":" + ref.path
+	key := owner + "/" + repo + "@" + ref.sha + ":" + ref.display()
 	c.citedLines.mu.Lock()
-	old, cached := c.citedLines.atSHA[key]
+	evidence, cached := c.citedLines.atSHA[key]
 	c.citedLines.mu.Unlock()
 	if !cached {
 		content, err := c.readCitedFile(ctx, owner, repo, ref.path, ref.sha)
 		if err != nil {
 			return false, false
 		}
-		old = content
+		evidence = citedEvidenceLines(content, ref.first, ref.last)
 		c.citedLines.mu.Lock()
 		if c.citedLines.atSHA == nil {
-			c.citedLines.atSHA = map[string]string{}
+			c.citedLines.atSHA = map[string][]string{}
 		}
-		c.citedLines.atSHA[key] = old
+		c.citedLines.atSHA[key] = evidence
 		c.citedLines.mu.Unlock()
 	}
-	evidence := citedEvidenceLines(old, ref.first, ref.last)
 	if len(evidence) == 0 {

Review findings from reviewer-2 (folded here because this head already carries its hive review):

Read pkg/github/issue_cited_lines.go in full plus its callers (client.go fetchIssues filtered branch, dashboard/ownership.go decideIssueOwnership/decideRepoOwnership, hiveadvisor/human_gate.go), and the two new test files, at adc-free head fdd9a73 on top of v6. go build of pkg/github, pkg/dashboard, pkg/hiveadvisor and gofmt are clean (go test is not runnable from this pod; CI was still in progress when I read it).

The check itself looks correct to me. The things I specifically verified:

  • Only filter-refused rows get the read: the call sits in the !issueFilter.Admits(labels) branch (client.go:2152-2154), after every other hold/park continue, so reporter-confirmation, hold and park rows never pay for it.
  • hasAgentLaneLabel (review_priority.go:182) and the dashboard's issueAgentRole (bands.go:581) agree on the agent/ prefix, so the row that gets CitedLinesGone set is the same row (8b)/(9b) treat as an agent finding.
  • Budget is per-fetchIssues call and never decremented on a cache hit or a settled-empty citation; an unreadable or budget-exhausted row returns the cached value and stores nothing, so a transient 5xx cannot flip a row to CLOSE or poison the 6h cache (issue_cited_lines.go citedLinesGone). The settled-empty short circuit happens before the budget check, which is the right order.
  • Any single citation still present breaks the loop with gone = "" — "every permalink gone", not "any".
  • Default-branch 404 is settled "not gone", so a rename/move cannot produce a false CLOSE.

One ordering question (low), for a maintainer:

ownership.go:649 returns cited_lines_gone → CLOSE before (9b) at ownership.go:666-668, which is the only place approved-direction is honoured on a filter-refused row. So an agent finding a maintainer has already decided with approved-direction (the exact case #16831 added decided_not_admitted for), whose cited lines have since moved on main, now surfaces as CLOSE … or admit it if the finding still holds instead of ADMIT. The row text leaves the door open, but it asks the person to re-make a decision they already recorded. If that is not intended, moving the citedLinesGone check below the labels[ownershipLabelApprovedDirection] branch (or guarding it with !labels[ownershipLabelApprovedDirection], as (9) does) keeps the decided row at ADMIT. TestCitedLinesGoneOffersClose does not cover an approved-direction label, so the current precedence is unpinned either way.

Not a blocker; everything else I read matches the PR body and the dashboard.md rows.

Review findings from reviewer (folded here because this head already carries its hive review):

Read the diff against the tree at the PR head (pkg/github/issue_cited_lines.go, client.go around fetchIssues, pkg/dashboard/ownership.go, pkg/hiveadvisor/human_gate.go) and built the three packages. The decision logic looks correct to me: citedLinesGone returns "" unless every cited permalink is gone (issue_cited_lines.go:228-237 — any still-present ref breaks with gone = ""), an unreadable ref keeps the previous result instead of deciding, lines shorter than parkLandedMinLine never count as evidence, and the check is scoped to filtered rows carrying an agent/ label with a per-repo refresh budget. Rule (8b) sits after parking and verified-done and before the acknowledge/admit rules (ownership.go:646-651), which matches the stated intent.

Two notes, neither blocking:

  • citedCache.atSHA is unbounded (issue_cited_lines.go:133,176, low). It stores full file contents keyed by (sha, path) and is never pruned, unlike issueClaimCache, which resets at issueClaimCacheMax (issue_claims.go:30). Growth is slow (≤ 3 refreshes × 3 refs per repo per pass, and 6h TTL reuses entries), but on a long-lived hub serving many repos this grows for the process lifetime. A size cap like the claim cache's, or dropping atSHA entries once the issue's result is recorded, would close it.
  • Permalinks pinned to an unmerged branch (info, open question). A finding that cites blob/<sha> from a PR head that never merged will read as "gone from main" even though the lines were never on main. The CLOSE text already says "or admit it if the finding still holds", so a maintainer can tell, but it may be worth a sentence in docs/dashboard.md.

Note the PR carries conflicts-with-open-pr; I have not identified which PR, so a rebase may be needed before CI settles at aa3e3dd (several checks CANCELLED, tide PENDING).

stage 080-awaiting-merge-admission → 072-returned-to-contributor: conflicting

Evidence bundle `#16843fdd9a73` sha256:dd38ae505ac202627d6f8f8beaf2238df4991ac726d774492744dc5018e640d6 — download from the dashboard or `hivectl review evidence #16843`.

@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 6, 2026
Danathar and others added 2 commits November 5, 2026 19:08
Signed-off-by: Danathar <Danathar@users.noreply.github.com>

# Conflicts:
#	src/docs/scale-envelope.md
#	src/pkg/github/client.go
…Es a rename

Hive review on hivecommons#16843:
- quality: a file gone from main is unknown, not gone (a rename keeps the
  lines); test pinned-present/main-404.
- correctness: a pinned-SHA 404 or evidence too short is settled once and
  costs no further read or budget; `?query` is stripped from permalink
  paths (`SKILL.md?plain=1#L163`).
- style: reuse hasAgentLaneLabel.
- security: cache only the evidence lines (16-400 chars) at a pinned SHA,
  bounded at 1024 citations, never whole files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@Danathar

Danathar commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the reviews. All four are addressed in 6447144, on top of a v6 merge (82fbfdd) that resolves the conflicts with #16811.

  • quality, a file gone from main: agreed, that was a false CLOSE on a rename or move. A file the default branch no longer has now counts as unknown, not gone, and the answer is cached. I didn't add any search call. New test: TestCitedLinesRenamedFileIsNotGone (cited file present at the pinned SHA, 404 on main → not gone, and the second pass reads nothing).
  • correctness, unknowns that burn budget: fixed as you suggested. A 404 at the pinned SHA, or cited lines too short or too long to count, is now recorded once. Later passes answer it from the cache with no read and no budget, even after the TTL. ?query is stripped from the path, so SKILL.md?plain=1#L163 reads SKILL.md. Tests: in TestCitedLinesGoneBudgetAndFailures, plus the ?plain=1 case in TestCitedRefsParsesPermalinks.
  • ci-maintainer, duplicate helper: hasAgentRoleLabel is removed and hasAgentLaneLabel is used instead. I also dropped the stale issue_admitter.go row from the Files table.
  • adjudicator-3, the cache keeps whole files: it now keeps only the evidence lines, keyed by owner/repo@sha:path:lines. Lines must be 16–400 characters, and the cache is capped at 1024 citations (TestCitedEvidenceCacheIsBounded, TestCitedEvidenceLinesBounds).

I broke the changed logic in 9 ways and the tests caught all 9. github, dashboard, hiveadvisor, writeback and adminmcp tests pass, as do dashboard-gen-check and the docs references.

overlayfs-exec-guard on run 42128906980 was cancelled, not failed, and the new head runs it again.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read issue_cited_lines.go against the v6 tree (hasAgentLaneLabel at review_priority.go:182, parkLandedMinLine at issue_park_recheck_landed.go:35, go-github v72 GetContents/GetContent). The decision logic is conservative in the right directions — a missing path at the pinned SHA, a file gone from main, and short/long lines all settle to "not gone" — and the ownership wiring only populates citedLinesGone on the !Admits branch (client.go:2152-2154), so step (8b) in decideIssueOwnership cannot fire for an admitted issue. Looks correct to me, with one low finding:

A permanent read error is treated as transient and re-spends the per-repo budget every pass. readCitedFile returns fc.GetContent() (issue_cited_lines.go:195); for a file over 1 MB go-github's GetContent returns unsupported content encoding: none on every call (repos_contents.go:94-95 in v72). citedRefGone maps any non-404 error to settled=false (:215-216, :230), and citedLinesGone then returns without storeCitedResult, so nothing is cached. The pass has already done *budget-- (:269) with citedMaxChecksPerRepo = 3 (:43). One agent finding citing a large generated file therefore consumes a third of the repository's budget on every enumeration forever, and the other findings behind it in iteration order wait proportionally longer. Consider settling a GetContent encoding error as "no evidence" (it is as permanent as a 404), or caching an unsettled result with a shorter TTL.

Not a defect, just a note for the reader: the result cache is keyed on owner/repo#N (:248) for citedTTL = 6h, so a body edit that adds or changes a citation is not noticed for up to six hours. That seems like an acceptable trade for a close-recommendation surface.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit c7fe7f1 into hivecommons:v6 Nov 6, 2026
68 of 69 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @Danathar holds role owner and GitHub permission maintain on repo; CI green at fdd9a73.

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

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant