Repository navigation
Studio: show what changed in llama.cpp updates - #10117
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e33cc5de40
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if identities & old_identities or identities & seen: | ||
| continue |
There was a problem hiding this comment.
Preserve distinct PRs that share a tracking issue
When two different change bullets link their own PRs but also reference the same tracking issue, the second bullet is discarded because any overlap between their identity sets is treated as proof that they are duplicates. For example, identities {pr:#1, issue:#99} and {pr:#2, issue:#99} intersect even though they represent separate changes, so the banner silently omits PR #2 and undercounts total_changes; shared secondary references should not override distinct primary PR identities.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changing this. I ran _identities over all 140 published release bodies in unslothai/llama.cpp: 195 identities, every one of them pr:, no issue: identity has ever been produced, and no two bullets within a release body share an identity.
The bodies are generated by .github/workflows/unsloth-prebuilt.yml in that repo, which emits one /pull/ link plus that same PR's commit URL per bullet and never an /issues/ link. The {pr:#1, issue:#99} / {pr:#2, issue:#99} overlap therefore has no input that produces it. Splitting identities into primary and secondary would add branching to the one hot path here for a shape the release format cannot emit.
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Most installs cannot be compared at all. Replaying all 139 published unslothai/llama.cpp releases through the comparison, 8160 of the 9591 possible (installed -> target) pairs return None, because 85 of those releases predate the itemised bullet body introduced in b9625-mix-2d6bd50. Every one of those users opened the panel, was told "Could not compare these releases.", and was offered a Retry that forces two uncached GitHub lookups and can never succeed. Separate the permanent case from the recoverable one. The backend now reports notes_not_itemised when the installed release predates the bullet format, and the panel renders that as a plain statement with no Retry. Only the installed side can be permanently uncomparable: a target without a usable body is the newest release, so that stays recoverable and keeps its Retry. The empty payload also carries release_url now, so a failed comparison still offers a way to read the notes on GitHub, matching what the desktop release-notes panel already does. Also in the comparison: - A missing or blank target body fails closed instead of reporting a successful comparison with zero changes. A prose-only target still means "this build carries nothing", which is a real statement. - seen is updated only for bullets that are actually shown, so a bullet discarded for having no summary can no longer suppress a later real bullet citing the same PR. - Pull URLs, issue URLs and textual repo#N refs share one ref: namespace. GitHub numbers issues and pull requests from the same sequence, so splitting them could only ever produce false negatives. - _entry uses rfind for the " ([" metadata boundary. The generator always appends metadata last, and a PR title containing " ([" was truncating its own summary. And around the fetch: - A repo segment of only dots is rejected. "." is inside the repo character class, so "owner/.." passed the shape check and would walk out of /repos/ on any normalizing proxy. - force_refresh is floored at one fetch per key per 30s, so holding down Retry no longer spends the user's GitHub quota two calls at a time. - The success TTL uses a monotonic clock, and an entry past its TTL is no longer resurrected by a recent failure. - The response read is capped at 4 MiB, and IncompleteRead is caught: it is an HTTPException, not an OSError, so a truncated response escaped to direct callers. Frontend: the panel guard also checks changelogAvailable, so an install that becomes a source build while the panel is open cannot leave it on screen with no way to close it. External links go through openLink(), since a bare target=_blank has nowhere to go in the Tauri webview. Link keys include the index, because a bullet may cite the same URL twice. Verified against the real release history: all 9591 pairs produce byte-identical output before and after, so no live comparison changes. The full studio backend suite reports the same 551 pre-existing failures and errors with and without this change, and the focused suites go from 74 to 86 passing. Frontend typecheck, build and 6248 tests pass; ruff and the Python floor linter are clean, and the module still imports and runs on 3.9 through 3.13.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2aefa0789f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| forced_at = _release_forced_at.get(key) | ||
| if forced_at is not None and now - forced_at < FORCE_REFRESH_MIN_INTERVAL_SECONDS: | ||
| force_refresh = False |
There was a problem hiding this comment.
Coalesce concurrent forced release lookups
When two clients force-refresh the same uncached tag concurrently, the first records _release_forced_at before its network request finishes, while the second merely changes force_refresh to False; because neither the success nor failure memo exists yet, that second request still falls through to _fetch_release. Consequently, simultaneous retries or multiple open Studio tabs can each issue their own GitHub request despite the advertised rate floor, potentially exhausting the unauthenticated API limit; the suppressed caller should reuse or await the in-flight lookup rather than proceed on a cache miss.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changing this. The trace is right: on a cold key the second caller sets force_refresh = False, finds no memo and no failure entry, and falls through to _fetch_release. But the outcome is one duplicate GET per concurrent client, bounded by the number of open tabs, and both writers store the same body, so nothing is lost, truncated or misreported.
Coalescing means a per-key lock or condition held across a 5s network call on a request thread, which is a real hazard for a panel that is opened by hand. FORCE_REFRESH_MIN_INTERVAL_SECONDS is a floor on repeated retries from one client, which is the case that actually recurs, and it is not documented as a hard cap on concurrent callers.
Worth noting the floor is already the weaker constraint: at one forced fetch per key per 30s across the two keys, sustained clicking is 240 requests per hour against an unauthenticated budget of 60, with or without this race.
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 490d3cd7f4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| result = changelog_for_update( | ||
| repo, | ||
| installed_full, | ||
| latest, | ||
| force_refresh = force_refresh, |
There was a problem hiding this comment.
Compare changes for the release macOS will install
On macOS systems where the newest prebuilt requires a newer OS, the update path deliberately leaves the release unpinned so the installer can walk back to an older compatible release, but this comparison always uses the newest freshness tag. The panel can therefore advertise carries present only in the incompatible release even though clicking Update installs an older build; resolve and compare the same compatible release selected by the macOS installer.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changing this here, but the underlying inconsistency is real and I do not want it lost.
The macOS walk-back is exactly as you describe (pin_release_tag = None if sys.platform == "darwin" else wanted_tag, with the comment saying a pin would disable it). But the target it can disagree with is not something this PR chose: _llama_only_status publishes latest_tag straight from check_prebuilt_freshness, which resolves the newest published release with no host-compatibility filter, and this PR touches neither llama_cpp_freshness.py nor freshness_flow.py nor _llama_only_status. So on such a host the banner headline already reads installed -> newest while Update installs an older build, on main today.
The changelog panel renders the same pair as the headline above it. Resolving the compatible release only inside the panel would make the card contradict itself while leaving the headline wrong, so the fix belongs in the status path, where both would pick it up. That is a separate change with its own macOS testing, not something to fold in here.
Flagging it rather than closing it: worth its own issue against the status resolution.
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Captured before/after screenshots of what this PR changes on screen, from two isolated Studio installs: BEFORE is the PR's merge base Both sides stub the same four update endpoints in the browser ( ExpandedCollapsedNeither half is rescaled. The width difference you can see is this PR's own Numbers read from the same servers that were photographed:
On the red CINone of the five failing checks are caused by this PR:
I also re-reviewed the four commits pushed after One observation below the bar, no change requested: |
|
Cross-platform result, run on a staging repo so it does not sit in the org queue. Each leg installs and runs this PR's own suites (
The single Windows failure is Two other staging jobs went red for infrastructure reasons rather than code: the Playwright leg failed in |
Every one of these let a broken input pass the very test that exists to catch it, reproduced before and after. The empty-list matcher compared an unordered pair, so `0 < jobKeys.length` (unmounts the panel exactly when there ARE jobs) and the always-true `0 <= jobKeys.length` both satisfied it. The accepted shapes are now spelled out with their operands in order. The floor scan only knew `min-h-[calc(`, so an ungated `min-h-52`, `min-h-[204px]` or `min-h-full` produced no literals and the component returned unchecked, taking the `grow` assertion with it. It now reads any `min-h-` token except `min-h-0`, which is the opposite of a floor. A `getText()` keeps its quotes, so the token boundary has to strip them or the start anchor never matches. An inline `minHeight` cannot be gated by a class and is rejected outright. The gate accepted a predicate that rendered any element at all. `changelogAvailable` renders the changelog toggle and is true while the panel is still closed, so a floor gated on it reserves the panel's height on every collapsed card, which is #10117 exactly. The predicate must now render the notes or changelog panel itself. The rail enumeration read only literal children of an anchored div, so a card reaching the Tauri rail through {children} was invisible. Nothing is missed today, since those three are also listed in the browser rail, but a desktop-only card would be, and a suite that under-covers silently is the failure this file exists to prevent. It now also collects every `positioned={false}` call site. The browser probe treated only `position: static` as in flow. `relative` and `sticky` still take part in normal layout, so a card that added `relative` to anchor a control would drop out of the per-card dead-space check and out of the download card count. Only `absolute` and `fixed` are out of flow; all three call sites in that file now say so.
Two regressions in the bottom-right overlay rail shipped to main and had to be undone by hand. Neither failed a test on the way in. #9849 dropped `jobKeys.length === 0` from the Downloads panel's early return, so a fresh install carried a download FAB on the corner with nothing behind it. Reverted by #10298. #10117 copied the desktop updater's min-h floor onto the llama.cpp banner while making its changelog render only once opened, so the card reserved 204.2px and painted 147.3px and the stack sat 64.9px off the corner. Fixed by #10229. Both suites ran on #10117 and both passed. No fixture produced the empty-notes state; every geometric check read the outer slot, which is the element carrying the floor; and the source suite was edited in the same commit to assert the floor was present, turning the bug into a pinned contract. Adds two fast node tests that run on every frontend PR on ubuntu and windows, inside the existing npm test step, for about a second between them: - download-panel-not-permanent.test.ts matches the guard through the AST and evaluates the whole condition three-valued with the empty test pinned true, so an inverted or partial guard cannot satisfy it. - overlay-rail-floor-gating.test.ts enumerates the rail's children out of provider.tsx and applies a rule rather than a spelling: a floor may only be reserved when the thing it protects is on screen. Both gates resolve against the components that actually render the shared notes layout root. In the browser suite the dead-space probe now runs over every flowed card instead of two named banners, the corner is measured off the bottom-most painted surface rather than the rail's padding box, and the Downloads overlay is checked absent by exact card count. Both rails carry a data-testid so the probe can find the rail when no banner is up. Every check was verified to fail at the commits that shipped the bugs, and seven mutations across two review rounds are confirmed caught.


Summary
Add an expandable "Show what's new" section to Studio's llama.cpp update banner.
Studio reads the exact installed and target tags, fetches their release descriptions from
unslothai/llama.cppby default, and compares the bullet entries. These release descriptions are cumulative, so showing the target release alone would repeat older carried patches. The banner displays only entries added in the newer build.Implementation
GET /api/llama/update-changelogendpoint, fetched only when the section opens and kept separate from the update status poll.Screenshots
Desktop
Mobile
The captures use a real seven-item comparison between published llama.cpp releases, not placeholder release notes.
Verification
LlamaUpdateBanner.Scope