Explore scratchpad · NVIDIA/hyperflare-inference #603

Raw Markdown for agents: https://autobot.eidonix.com/p/7a46abe5-79a6-44ed-90af-642f61222a2f.md

#1 [high] Change: #603 adds RevisionLookupError context to Hub 404 in flare/src/hub.rs

PR #603 (salignatmoandal, FIRST_TIME_CONTRIBUTOR), head a3ec4b6e, base main, 1 file +41/−1, flare/src/hub.rs only. No comments, no reviews, no CI checks on head.

Diff, three parts (pr_diff, read at head):

  1. New private struct RevisionLookupError { repository, revision, source } with Display = "cannot resolve {repository}@{revision}: {source}" and Error::source() returning the wrapped error (flare/src/hub.rs:3398-3419).
  2. In resolve_primary_target (flare/src/hub.rs:3421-3449), the existing resolve_revision(api, repo, progress)? becomes .map_err(|source| ...): if source.downcast_ref::<ApiError>() is Some(ApiError::RequestError(e)) with e being ureq::Error::StatusCode(404), it boxes RevisionLookupError { repository: repo.url(), revision: repo.revision().to_owned(), source }; otherwise it returns the original error unchanged (flare/src/hub.rs:3427-3441).
  3. Test permanent_resolution_failures_are_not_retried (flare/src/hub.rs:8601-8625) gains, inside its existing loop over [("gb10",401),("gb10-tp1",404),("custom",404)], an extra assertion for status == 404: the message must contain owner/model@{revision} (flare/src/hub.rs:8620-8622).

Mechanism notes: the crate's Result alias is Box<dyn std::error::Error> (flare/src/hub.rs:29), so the wrapping has to go through a boxed error and downcast_ref::<ApiError>(); this is the first place in flare that downcasts ApiError (only other downcasts in flare are PublisherKeyRequired: flare/src/controller.rs:1306, flare/src/hub.rs:6965,7038). repo.url() yields owner/model, not the full Hub URL. Display output includes the original hf-hub ApiError text, so the string still contains the HTTP 404 status: message shape is cannot resolve owner/model@gb10: <hf-hub ApiError>.

#2 [high] Reach: only one of three resolution call sites gets the new context

resolve_revision (flare/src/hub.rs:3374-3396) has exactly two callers in the tree (search_code resolve_revision):

Other 404-producing Hub lookup that #603 does not touch: RevisionClient::revision (flare/src/hub.rs:2130-2151) hits /api/models/{repository}/revision/{rev} with its own -tp1 fallback at :2142; its 404 stays a bare ureq::Error::StatusCode(404). Used by scan_revisions (:2153-2182), which swallows errors (let Ok(remote) = ... else { continue }), and by the CLI/desktop update check (flare-cli/src/cache_commands.rs:272 check_core_updates). So error-message quality for the update-check 404 rests on the refresh_model_at format string, not on the new struct.

Consequence: the PR's benefit statement ("an operator can identify the reference involved") holds for flare download/flare run/flare acquire and Orbit agent DOWNLOAD, not for the update check path (which already had it) — the description does not say it is scoped to primary core resolution, though "final HTTP 404 returned by primary core resolution" does imply it.

#3 [high] Why: the cited gap #489 is an open docs PR whose reviewer asked for that very clause to be removed

PR #603 body cites a single source: the gap "reported in #489" (read_item 489). #489 is an open docs PR by lemassykoi (FIRST_TIME_CONTRIBUTOR), "docs: state what a cold peer needs to stage a core", +10/−1 in docs/multi-host.md, opened 2026-11-23, last updated 2026-11-29 03:32, labels documentation/triage:review, with CHANGES_REQUESTED from original-el8 on 2026-11-28.

Where the 404 gap appears in #489: its "Why" second paragraph — Resolution fails with RequestError(StatusCode(404)), naming neither repository nor ref, so an operator cannot tell a missing revision from a private or absent repository (evidence: flare download <repo> --revision gb10 → RequestError(StatusCode(404)); --revision main worked; repo's only branch is main). That text was added at docs/multi-host.md:288-290 of the #489 branch.

Critically, #489's reviewer asked for that clause to be REMOVED from the docs PR: original-el8's point 3 says the bare HTTP 404 reporting gap "is an unresolved defect and belongs in docs/TODO.txt rather than present-state architecture documentation (per AGENTS.md)". The Autobot review of #489 (2026-11-24) said the same: ":288-290 — the 404 clause is a defect report. AGENTS.md:57-60 routes those to docs/TODO.txt. → Move it there with a close condition (flare/src/hub.rs:2443 (not opened) should wrap like :1620)". So #603 is the code fix for a defect that a reviewer told #489's author to file as a TODO rather than document. #603 does not touch docs/TODO.txt or docs/multi-host.md, and #489 is not updated to note that #603 closes its clause.

No GitHub issue exists for the gap: searches for "404 revision repository error name", "hub resolution diagnostic error context repository", "RequestError StatusCode 404" returned only #489 (search_items). So the "why" rests on one paragraph in an open docs PR by a different first-time contributor, plus that reviewer's remark — not on a maintainer-filed issue, though AGENTS.md:165-169 requires a contribution to address "an explicit maintainer request, a demonstrated defect, a measured performance or memory problem, or inaccurate documentation". A demonstrated defect exists (#489's reproduction, and the same shape is reachable from flare download/flare run), but it was demonstrated by a contributor, not a maintainer.

#5 [high] Research summary

Case file for PR #603 "Report the repository and revision on Hub lookup errors" (salignatmoandal, FIRST_TIME_CONTRIBUTOR; head a3ec4b6e, base main; flare/src/hub.rs only, +41/−1; no comments, no reviews, no CI checks on head). Four scratchpad notes record the change, the call-site reach, the #489 provenance, and the documentation delta.

What it does. Adds a private RevisionLookupError { repository, revision, source } (flare/src/hub.rs:3398-3419) whose Display is cannot resolve {repository}@{revision}: {source}, and wraps the 404 from primary core resolution in resolve_primary_target (flare/src/hub.rs:3427-3441): if the boxed error downcasts to ApiError::RequestError(ureq::Error::StatusCode(404)), it boxes the new type around repo.url() and repo.revision(); every other error passes through untouched. Retry and the gb* → -tp1 fallback stay in resolve_revision (flare/src/hub.rs:3374-3396), so the message names the originally requested revision even when the alias was tried. The test permanent_resolution_failures_are_not_retried (flare/src/hub.rs:8601-8625) gains, for its 404 cases only, an assertion that the message contains owner/model@{revision}.

Undeclared reach limits (high). resolve_revision has two callers. Only resolve_primary_target is wrapped; refresh_model_at (flare/src/hub.rs:2279-2280) already had hand-written context (cannot check {repo}@{revision} for updates: ...; the local version is unchanged, flattened to a String, cause chain lost), and the separate RevisionClient::revision path (flare/src/hub.rs:2130-2151, its own -tp1 retry at :2142, errors swallowed by scan_revisions at :2171) still returns a bare ureq::Error::StatusCode(404). So the benefit is scoped to flare download/flare run acquisition, acquire_watched, acquire_update, and the Orbit agent's DOWNLOAD handler (flare-cli/src/hub.rs:53, flare-cli/src/orbit/agent.rs:125); the description says "primary core resolution" but never says the update-check path was already covered and remains unwrapped, nor that the new struct exists for one call site. Also undeclared: this is the first ApiError downcast in flare (the only other downcasts are PublisherKeyRequired: flare/src/controller.rs:1306 (not opened), flare/src/hub.rs:6965,7038), and repo.url() is a plain owner/model, not a Hub URL.

Why (high). The sole cited source is #489, an open docs PR by another first-time contributor (lemassykoi, +10/−1 in docs/multi-host.md). Its "Why" second paragraph reports exactly this: flare download <repo> --revision gb10 → RequestError(StatusCode(404)), "naming neither repository nor ref, so an operator cannot tell a missing revision from a private or absent repository". That clause is at docs/multi-host.md:288-290 of the #489 branch, and #489's reviewer (original-el8, CHANGES_REQUESTED 2026-11-28, point 3) and the Autobot review of #489 both told its author to move it out of the architecture docs into docs/TODO.txt per AGENTS.md:57-60. #603 is therefore the code remedy for a clause a reviewer asked to be filed as a TODO; nothing in docs/TODO.txt records the gap (no match for 404/revision/resolution), and #489 was not updated to point at #603. No GitHub issue exists for the gap (searches for "404 revision repository error name", "hub resolution diagnostic", "RequestError StatusCode 404" return only #489). No maintainer request is on record; AGENTS.md:165-169 asks a contribution to address a maintainer request, demonstrated defect, measured problem, or bad docs.

Related work. Nothing overlaps the diff: no commit on main since the branch point (44f59df) touches flare/src/hub.rs, and the only PRs sharing that file are #177 (open, Windows CI/cache fixes, conflicted), #591, #531, #493 (all merged) — different concerns, so no conflict. #598 (merged 2026-11-29, hours before) is the nearest topical neighbour: it expanded PLATFORMS from 6 to 19 and widened which gb*/ga* revisions pass tp1_revision_alias (flare/src/hub.rs:3363-3365), which is exactly the retry decision #603 wraps; it also documents the gb* -tp1 rule at docs/cli-design.md:920-934 and notes in its own limitations that repositories without a published platform branch return HTTP 404 — so #598 increases the population of 404s that #603 makes readable. #407 (merged) is prior art in the same spirit: its failed download "raises FetchError that names the repository, file and revision". Nothing is superseded or undone.

People / community. Author has two other open PRs from the same day (#601, #602; both docs/small), zero merged, no history in flare/src; the people who actually commit in flare/src are Luke Alonso (62), jasonc (17), Eugene Rakhmatulin (12). No community engagement at all on #603 yet — no comments, no reactions, no checks.

Project fit. Lines up with the charter/AGENTS "bad docs"/demonstrated-defect and "smallest footprint" principles and with the repo-prose skill's requirement that errors state their referent (errors are explicitly in scope, .agents/skills/repo-prose/SKILL.md:10-11 (not opened)). Tension: AGENTS.md routes unresolved defects to docs/TODO.txt (the path #489's reviewer chose), and #603 adds a bespoke error type and first-of-its-kind downcast for one call site; the same context could have been produced in resolve_revision for both callers. No docs/ file specifies the new message text (docs/cli-design.md:920-934 and 1060-1072 describe the 404 retry and the update check but not the message), so an operator-facing behaviour change carries no documentation delta.

Claims and evidence. Claim: fixture test failed on baseline because the 404 lacked owner/model@revision; after the change both resolution failure tests and eight --lib revision tests passed; full Flare suite 242 passed / 4 ignored in release on Linux ARM64; git diff --cached --check passed. Backing: the diff's test assertion is visible and would indeed fail on main (main has no such text at flare/src/hub.rs:3404). Not backed/limitations the author states honestly: the run used a temporary checkout with the Flare lockfile realigned to the deepseek-recipe revision pinned by Helios, because flare/Cargo.lock is stale on main (flare/Cargo.lock:597-600 pins 6d09e9b…, helios/Cargo.toml:35-37 and helios/Cargo.lock:617-619 pin 70be62f…) — the same limitation #598 reported; the Orbit CLI workflow was not run, so the end-to-end message an operator sees through Orbit (flare-cli/src/orbit/controller.rs:1093-1108, at(node, error) at :2533-2536 prefixes only the node name) is unverified. No CI on the head commit, so none of this is independently reproduced.

Reach. Affects stderr text only for flare download, flare run, flare acquire, the WinUI update path, and Orbit agent downloads; adds no flags, defaults, config, dependency, or on-disk format change, and the error type is private (struct, not pub), so no interface or compatibility surface. Diagnosis quality, not behaviour: an operator now sees which owner/model@revision failed, and the message still carries HTTP 404 without asserting whether the cause is a missing ref, a private repo, or a typo.

Process. Ready for review, opened and last updated 2026-11-29 (same day), one commit a3ec4b6e, no labels, no reviewers assigned, no CI checks, no conversation — nothing for a reviewer to have engaged with yet, and no Design-Signed-Off-By/rebase question raised as on sibling PRs.

#6 [high] Related work: no overlapping PR; #598 brain shortly before widens the 404 population

Nothing overlaps the #603 diff. search_history(path=flare/src/hub.rs) shows the latest commits there are f5ce5534 (#591 WinUI core updates, 2026-11-28), 28bd5047 (#531 publisher-key import, 2026-11-25), 21b2eae3 (Luke Alonso, HTTP/2 downloads, 2026-11-23); the orientation packet's "commits since branch point touching changed files: none" matches. items_touching(flare/src/hub.rs) lists only #603 (open), #177 (open, Windows CI + cache file identity, merge-conflicted since 2026-11-13), #591, #531, #493 (merged) — all different concerns, no conflict, nothing stacked, superseded or reversed.

Nearest topical neighbour: #598 (merged 2026-11-29 13:30, same day, hours before #603 was opened) expanded helios/src/core/naming.rs::PLATFORMS from 6 to 19 entries and unified Orbit revision matching; it also updated the gb* -tp1 404 retry documentation (docs/cli-design.md:920-934) and its own limitations state "Repositories that do not yet publish a branch for a newly recognized platform return HTTP 404 until builds for that platform are published". Mechanically #598 widens the input to tp1_revision_alias (flare/src/hub.rs:3363-3365, revision.starts_with("gb") && PLATFORMS.contains(&revision)), i.e. it increases the population of 404s that #603 renders readable — #603 builds on it rather than conflicting.

Prior art in spirit: #407 (merged), whose PR text says a failed download "raises FetchError that names the repository, file and revision and says how to seed the hub cache" — the same class of diagnostic improvement in a different path.

Superseded-by-nothing: the older refresh_model_at message (flare/src/hub.rs:2279-2280) already names {repo}@{revision} but as a flattened String, so #603 is consistent with it rather than duplicating or undoing it.

#4 [medium] Reach: no documentation change, and docs/ never specifies the resolution failure message

Docs the change arguably should have touched, and did not (docs are in-repo specification, per AGENTS.md:52-60 and repo-prose skill lines 26-29 "documentation is a present-state specification"):

So #603 is an error-message shape change with no documentation delta: a printed message that the docs do not quote is arguably fine to leave undocumented, but the operator-facing workflow the PR says it helps (#489's flare orbit run ORG/MODEL --revision gb10, docs/multi-host.md:280-286) is documented and now behaves differently in its error path.

#7 [medium] People and community: first-time contributor, no engagement, area owned by Luke Alonso

Author: salignatmoandal (code name Mawen Salignat-Moandal per commit a3ec4b6e), GitHub association FIRST_TIME_CONTRIBUTOR, 0 merged and 0 closed items in 180 days, two other open PRs both opened 2026-11-29: #601 "Expose Selene metrics on the Docker host loopback" and #602 "Correct PID namespace guidance for Selene's TLS Compose example" (+3/−2 docs; Autobot review of #602 returned Ready To Merge on 2026-11-29 15:03). So this is a contributor landing three small, separate, well-scoped fixes in one day — none in flare/src before #603.

People who normally work in flare/src (orientation packet, last 180 days): Luke Alonso (62 commits), jasonc (17), Eugene Rakhmatulin (12). Recent hub.rs work is Luke Alonso's (#598 was his, merged the same day), plus eugr on publisher-key/Windows download flows (#493, #531, #591).

Community engagement on #603: none. pr_comments returned "No comments"; no reviews, no reactions, no labels, no assignees, no CI checks on head a3ec4b6e, opened and last updated 2026-11-29 (same day). Compare #489, the PR #603 cites: it has three comments, an Autobot review, and a CHANGES_REQUESTED from collaborator original-el8 — that is where the discussion of this defect currently lives, not on #603.

The charter treats priority contributors (@voipmonitor, @original-el8, @lukealonso) as carrying extra weight and requires reviews to spell out what is missing; nothing here has been reviewed by them.