Repository navigation
fix(GenesisHub): a link's commit range that ends in commits the PR's checkout has not pushed yet opens that range from the checkout, with a note, instead of the whole MR - #595
Conversation
|
🐉 eve review — ✅ APPROVE · 2 findings
run Previous runs (2)
|
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 3 minutes. View limit details
Comment |
There was a problem hiding this comment.
🐉 eve review — 🟡 Review comments
9a3f2be· 3 actionable findings · reviewed by find codex/gpt-6.1-sol, verify codex/gpt-6-luna · view run ↗
| Severity | Count |
|---|---|
| 🟡 Medium | 2 |
| 🔵 Low | 1 |
Blast radius
git(+) → 3 dependent(s) outside this PR: src/macos/GenesisTools/Sources/Host/App/ChildEnvironment.swift, src/macos/GenesisTools/Sources/Parts/Hub/Hub/HubWorktrees.swift, src/macos/GenesisTools/Sources/Parts/Hub/Hub/HubComponents.swift- graph truncated by caps — dependents above are a lower bound
ℹ️ Claims vs diff — 6 claims could not be checked from the diff (c1, c2, c3, c4, c5, c6).
Review fixes 2026-10-26 02:07 from GPT-6.1 Sol judged by Claude Opus 5.5 (fable-judge)Round 1. 3 open threads (eve 3, CodeRabbit 0). 3 fixed, 0 rejected, 0 already done. Full PR self-review found no additional defects. Only the PR's three existing Swift files changed. Commit 437ff28 completed before the lead changed this worker to fixes only. Swift tests: not run (the lead verifies at integration). Count only unpushed commits within the linked inclusive range (eve-bot-lovinka)
Discard superseded local lookups before applying either outcome (eve-bot-lovinka)
Isolate fixture commits from machine signing and hooks (eve-bot-lovinka)
Threads: t1 accepted · t2 accepted · t3 accepted |
There was a problem hiding this comment.
🐉 eve review — ✅ Approved
437ff28· 0 actionable findings · reviewed by find codex/gpt-6.1-sol, verify codex/gpt-6-luna · view run ↗
…checkout has not pushed yet opens that range from the checkout, with a note, instead of the whole MR
437ff28 to
4c75a85
Compare
There was a problem hiding this comment.
🐉 eve review — 🟡 Review comments
4c75a85· 2 actionable findings · reviewed by find codex/gpt-6.1-sol + codex/gpt-6-luna, verify codex/gpt-6-luna · view run ↗
| Severity | Count |
|---|---|
| 🟡 Medium | 1 |
| 🔵 Low | 1 |
Blast radius
git(+) → 3 dependent(s) outside this PR: src/macos/GenesisTools/Tests/HubMenuButtonTests.swift, src/macos/GenesisTools/Tests/HubPollGateTests.swift, src/macos/GenesisTools/Tests/ReviewVersionsTests.swift- graph truncated by caps — dependents above are a lower bound
| } catch { | ||
| return nil | ||
| } | ||
| let data = out.fileHandleForReading.readDataToEndOfFile() |
There was a problem hiding this comment.
⚡ Performance | 🟡 Medium · confidence 92/100
Bound the local git subprocess waits with a deadline
The new local lookup blocks on both readDataToEndOfFile() and waitUntilExit() without any deadline or cancellation. Moving this to a detached task protects the UI thread, but a stalled git process (for example on an unavailable filesystem) leaves the link unresolved indefinitely, and subsequent links can accumulate more blocked tasks and children. Invalidating rangeLookup only discards the eventual answer; it does not stop the process. This violates the project review-memory rule that every wait needs a deadline and an explicit expiry outcome. Bound the entire subprocess operation, terminate/reap it on expiry, and surface a lookup failure rather than leaving it pending.
🧩 Analysis
Grep evidence: readDataToEndOfFile\(|waitUntilExit\(|HubLocalCommits.resolve
There was a problem hiding this comment.
Accepted. The follow-up will bound the local git subprocess waits with a deadline. The pull request was merged after its fix rounds, so this finding waits for a follow-up, and this thread stays open until then.
| let pushed = Set(shas[1 ... 2]) | ||
| let range = try XCTUnwrap(try? HubLocalCommits.resolve( | ||
| ends: [String(shas[2].prefix(10)), String(shas[4].prefix(10))], repo: repo, head: pushedHead, pushed: pushed).get()) | ||
| XCTAssertEqual(range, HubLocalCommits(first: shas[2], last: shas[4], count: 3, unpushed: 2, title: "commit 4")) |
There was a problem hiding this comment.
🧪 Tests | 🔵 Low · confidence 93/100
Test application of a resolved local range to the review
The new fixture verifies HubLocalCommits.resolve, and the other new test verifies request-token invalidation, but neither exercises showLocalCommits. Consequently the user-visible half of this fix—the PR-base versus first-parent scope choice, PRLinkedRange pushed-sha marking, and informational notice—is not asserted. Existing rangeScope tests exercise the separate forge-listed path, not the new implementation. Add model-level coverage applying local results for a range starting at the PR's first commit, a later pushed commit, and a local-only commit, asserting scope, linkedRange.shas, and notice.isError/count. These are explicit promises in the PR description and can regress while the resolver fixture continues passing.
🧩 Analysis
Grep evidence: showLocalCommits|testALinkRangeOfUnpushedCommitsResolvesFromTheCheckout|testANewPRLinkDiscardsBothOutcomesOfAnOlderLocalLookup
There was a problem hiding this comment.
Accepted. The follow-up will test application of a resolved local range to the review. The pull request was merged after its fix rounds, so this finding waits for a follow-up, and this thread stays open until then.
A hub link such as
commit=<from>..<to>can name commits an agent made but did not push yet. The forge does not list them, so the hub fell back to the whole PR. Now it looks in the PR's checkout first.What it changes
HubLocalCommits.resolvereads both ends from the checkout's git, off the main thread. It accepts the range only when the last commit descends from the PR's pushed head, and the first is one of the PR's commits or comes after that head. A commit from before the PR would show the base's changes, so it is refused.rangeScopefollows). The commits list marks the pushed commits the range covers.This commit was split out of #590. It was written on the unified branch against the older
linkedRange: DiffScope?, so on master it is adapted toPRLinkedRange(scope plus the shas it marks).Checks
swift test --package-path src/macos/GenesisTools --disable-build-manifest-caching --filter HubLogicTests: 63 tests, 0 failures, includingtestALinkRangeOfUnpushedCommitsResolvesFromTheCheckout.check-commits.ts: 1 commit, 0 to fix. Personal-data probe: no matches.