Skip to content

Report the repository and revision on Hub lookup errors - #603

Merged
lukealonso merged 1 commit into
NVIDIA:mainfrom
salignatmoandal:fix/hub-revision-error-context
Nov 29, 2026
Merged

lukealonso merged 1 commit into
NVIDIA:mainfrom
salignatmoandal:fix/hub-revision-error-context

Conversation

@salignatmoandal

@salignatmoandal salignatmoandal commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Why

When a Hugging Face revision lookup fails with HTTP 404 during core acquisition, Flare reports the status without the repository or revision. Orbit adds the agent name, but the operator still has to find which reference the agent attempted to resolve. This is the diagnostic gap reported in #489.

What changed

In flare/src/hub.rs, add the attempted repository@revision to the final HTTP 404 returned by primary core resolution. Attach the original Hub error as the cause. The resolver completes its existing retry and -tp1 fallback decisions before the diagnostic adds context.

Benefit

An operator can identify the reference involved in the failure from the error message. The message retains HTTP 404 without assigning a cause to that status.

Evidence

On Linux ARM64, the strengthened HTTP fixture test failed on the baseline because the 404 lacked owner/model@revision. After the change, both resolution failure tests passed, as did the eight tests selected by --lib revision, including signed core installation and refresh via the -tp1 alias.

The full Flare crate suite passed in release mode on Linux ARM64 (242 passed, 4 ignored). git diff --cached --check passed.

The tests used a temporary checkout with the Flare lockfile aligned to the deepseek-recipe revision already pinned by Helios. The repository lockfile is outside this change. The complete Orbit CLI workflow was not run.

When Hugging Face returns HTTP 404 during core acquisition, the
diagnostic omits the repository and revision. Orbit supplies the agent
name, leaving the operator without the attempted model reference.

Add the attempted repository and revision to a final HTTP 404 in
primary core resolution and retain the Hub error as its cause. Apply
the context after the resolver completes its retry and alias decisions.

Operators can identify which reference failed while retaining the
original HTTP status.

The strengthened HTTP fixture test failed before the fix and passed
after it on Linux ARM64. The signed-core alias test passed. The full
Flare release suite passed with 242 tests and four ignored, using a
temporary checkout with the stale Flare lockfile aligned to the
Helios deepseek-recipe pin. The Orbit CLI workflow was not run.

Design-Signed-Off-By: Codex (GPT-6); design-review=2e5b
Signed-off-by: Mawen Salignat-Moandal <mwnslgt@gmail.com>
@flare-autobot

Copy link
Copy Markdown
Collaborator

A case file has been opened for 603.
Case File Intake Report

Future reviews will auto-run 90 minutes after code updates are pushed.

  • Re-review sooner: Call @flare-autobot after push.
  • Opt-out: Include #autobot:ignore in the PR or any comment.

@flare-autobot flare-autobot added triage:review Proposed change needs code review; this does not imply merge readiness. bug Something isn't working labels Nov 29, 2026
@flare-autobot

Copy link
Copy Markdown
Collaborator

Autobot Review

Full Review · Value Proposition · Case File

Recommendation: Ready To Merge

PR #603 is a small, correct, low-risk diagnostic fix that adds the attempted repository@revision to terminal HTTP 404 errors in resolve_primary_target (flare/src/hub.rs:3427-3441), directly addressing the bare-404 gap reported in #489 without altering retry or -tp1 fallback behavior. Before or alongside merge, delete the unused private RevisionLookupError type and add a double-404 -tp1 fallback test.

  • Blockers: 0 · Should fix: 1 · Subtract/Simplify: 1 · Nits: 0
Walkthrough
  • flare/src/hub.rs:3398-3419: Adds private RevisionLookupError wrapping repository, revision, and source: Box<dyn std::error::Error> with Display (cannot resolve {repository}@{revision}: {source}) and Error::source().
  • flare/src/hub.rs:3427-3441: Wraps terminal ApiError::RequestError(ureq::Error::StatusCode(404)) errors returned by resolve_revision inside resolve_primary_target (which serves download_for_model_at at :434, acquire_update via :13955, Orbit's download_watched, and test fetch_primary_with_progress at :3480), leaving non-404 errors untouched.
  • flare/src/hub.rs:8620-8622: Extends permanent_resolution_failures_are_not_retried to assert owner/model@{revision} is present in the formatted error when status == 404.
Merge Risk: Low · up to a3ec4b6
  • Isolated error-path change: Confined to a single .map_err on the terminal HTTP 404 path of resolve_primary_target (flare/src/hub.rs:3427-3441), off the serving, CUDA-graph, and token-generation hot paths.
  • No control-flow or contract impact: resolve_revision's transient retry (with_transient_retry, flare/src/hub.rs:5476-5493) and -tp1 alias fallback (flare/src/hub.rs:3382-3391) still execute before wrapping; non-404 errors pass through unchanged, and no downstream caller downcasts ApiError or inspects .source() (only PublisherKeyRequired is downcast in flare/src/controller.rs:1306 and flare-cli/src/hub.rs:66, 75, 139).
  • No concurrency, I/O, or memory regression: No locks, shared state, or AcquisitionProgress counters are touched; zero allocations occur on the success path, and only short String formatting occurs on a failing 404 lookup.
Pre-merge checks: ✅ 3 passed · ⚠️ 1 warnings
  • ✅ Security / malicious screen: Pure error-text formatting on repo.url() and repo.revision(); no tokens, headers, or credentials are interpolated, and no prompt-injection or suspicious instructions appear in the PR or diff.
  • ✅ Charter & value fit: Minimal, model-agnostic operator diagnostic fix in the right layer (flare/src/hub.rs) for a concrete bug surfaced in docs: state what a cold peer needs to stage a core #489; no new flags, dependencies, or public API surface.
  • ✅ Related / duplicate / conflict check: No conflicting or duplicate open PRs; complements core: recognize all known Ampere and Blackwell GPU platforms and unify Orbit revision matching #598's expanded PLATFORMS list and f5ce5534 (Manage prepared core updates in WinUI #591)'s acquire_update flow (flare/src/hub.rs:13941-13969).
  • ⚠️ Tests & verification evidence: Author reports passing release-mode flare tests on Linux ARM64 (242 passed, 4 ignored) with a local-only lockfile alignment for deepseek-recipe and no full Orbit CLI run; no automated CI check run is attached to a3ec4b6, and the -tp1 double-404 fallback path lacks a unit test (see Should Fix).

Have your agent review the Full Review for complete verified findings, file:line citations, and suggested changes.

To opt out, include #autobot:ignore in your post or comment.

@flare-autobot

Copy link
Copy Markdown
Collaborator

Autobot Review

Full Review · Value Proposition · Case File

Recommendation: Changes Requested

Places error context at the right call site (resolve_primary_target) with zero hot-path or concurrency impact, but adds 22 lines of unused typed-error boilerplate, restricts annotation to HTTP 404 while leaving 401/403 unnamed, and leaves the -tp1 fallback-exhausted path untested.

  • Blockers: 0 · Should fix: 2 · Subtract/Simplify: 1 · Nits: 1
Walkthrough
  • flare/src/hub.rs:3398-3419: Adds a private RevisionLookupError struct implementing Display (cannot resolve {repository}@{revision}: {source}) and std::error::Error::source().
  • flare/src/hub.rs:3427-3441: Wraps resolve_revision(api, repo, progress) in resolve_primary_target with .map_err(...), downcasting the boxed error to ApiError::RequestError(ureq::Error::StatusCode(404)) and boxing RevisionLookupError with repo.url() and repo.revision() while passing all other errors through unchanged.
  • flare/src/hub.rs:8620-8622: Strengthens permanent_resolution_failures_are_not_retried to assert that the status == 404 cases (gb10-tp1 and custom) include owner/model@{revision} in the formatted error.
Merge Risk: Low · up to a3ec4b6
  • Isolated error-path scope: Only resolve_primary_target in flare/src/hub.rs:3421-3449 changes, executing once on an already-failed revision lookup with zero effect on successful acquisitions, retry policy (transient_hub_error at flare/src/hub.rs:5460-5472), or -tp1 fallback ordering (resolve_revision at flare/src/hub.rs:3381-3393).
  • No public, wire, or concurrency blast radius: RevisionLookupError is private, no downstream code in flare/ or flare-cli/ downcasts to ApiError or parses the lookup error text (content_failure at flare/src/hub.rs:5497-5506 is unaffected), and no locks, shared state, or on-disk formats are touched.
Pre-merge checks: ✅ 3 passed · ⚠️ 1 warnings
  • ✅ Security / malicious screen: Purely local stderr error formatting on an existing 404 path; no external execution, untrusted input handling, or credential exposure.
  • ✅ Charter & value fit: Addresses a concrete, reproducible diagnostic defect (docs: state what a cold peer needs to stage a core #489) in the model-agnostic Hub acquisition layer with minimal surface area.
  • ✅ Related / duplicate / conflict check: No overlapping PRs or conflicting commits on main since branch point; complements core: recognize all known Ampere and Blackwell GPU platforms and unify Orbit revision matching #598's expanded PLATFORMS list (helios/src/core/naming.rs:15-18).
  • ⚠️ Tests & verification evidence: No automated CI checks ran on a3ec4b6; results are author-reported on Linux ARM64 using a temporary checkout realigning flare/Cargo.lock:597-600 to helios/Cargo.toml:35-37 (deepseek-recipe), with Orbit CLI end-to-end flow unrun (both limitations honestly disclosed).

Have your agent review the Full Review for complete verified findings, file:line citations, and suggested changes.

To opt out, include #autobot:ignore in your post or comment.

@lukealonso
lukealonso merged commit 493f24c into NVIDIA:main Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working triage:review Proposed change needs code review; this does not imply merge readiness.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants