Skip to content

fix(prism): queue submits when lium b200s sell out - #176

Merged
echobt merged 1 commit into
mainfrom
feat/prism-queue-lium-capacity
Aug 20, 2026
Merged

fix(prism): queue submits when lium b200s sell out#176
echobt merged 1 commit into
mainfrom
feat/prism-queue-lium-capacity

Conversation

@echobt

@echobt echobt commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Lium no_capacity / sold-out / no matching 1× B200 offer requeues the submission (no retry_count burn, not Score(0)) instead of failing closed.
  • Miner-facing note: B200s are currently out of capacity on Lium; this job is queued until an offer appears. (events + error_detail; intake + GET /v1/status carry the queue policy).
  • Template-permission / auth / bad ZIP still fail (Lium already retries a rentable template once). BYOK unchanged. Next claim_next tick retries rent; failed sold-out rows are recovered by the existing 429 recovery loop.

Test plan

  • no_capacity → stays queued + B200 note; second tick still queued
  • 400 template permission → failed (auto_retry_max: 0)
  • Happy-path sim orchestrator still terminates
  • Intake 202 includes capacity policy note; /v1/status has lium_capacity_note

Summary by CodeRabbit

  • New Features

    • Submissions encountering temporary capacity shortages or sold-out B200 hardware are now re-queued automatically.
    • Capacity retries do not consume retry attempts and include a capacity-specific status note.
    • Status responses now expose capacity guidance through lium_capacity_note.
  • Bug Fixes

    • Authentication, permission, invalid ZIP, and other terminal failures remain correctly excluded from capacity retry handling.
  • Documentation

    • Updated orchestration and API documentation to describe capacity-based retries and status reporting.

@echobt
echobt merged commit 11f5963 into main Aug 20, 2026
1 of 3 checks passed
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cc8d6b97-97f5-4da0-98ee-c6071260bc69

📥 Commits

Reviewing files that changed from the base of the PR and between 9b5b373 and 8a55fdd.

📒 Files selected for processing (8)
  • bins/prism-challenge/src/main.rs
  • crates/lium-rent-pool/src/lib.rs
  • crates/prism-challenge/src/api.rs
  • crates/prism-challenge/src/orchestrator.rs
  • crates/prism-challenge/tests/e2e_orchestrate_sim.rs
  • crates/prism-store/src/store.rs
  • docs/PRISM.md
  • docs/external-miner/prism.md

📝 Walkthrough

Walkthrough

Lium capacity failures now use dedicated classification and recovery behavior. Affected submissions remain queued, do not consume retry attempts, record capacity details, and expose the policy through API responses and documentation. Authentication, permission, ZIP, and other non-capacity failures remain terminal.

Changes

Lium capacity recovery

Layer / File(s) Summary
Capacity classification and recovery policy
crates/lium-rent-pool/src/lib.rs
Adds capacity-policy constants and classifiers for capacity versus authentication or permission failures. No-capacity failures recover immediately.
Queued retry orchestration and validation
crates/prism-challenge/src/orchestrator.rs, crates/prism-challenge/tests/e2e_orchestrate_sim.rs, bins/prism-challenge/src/main.rs, crates/prism-store/src/store.rs
Capacity retries preserve retry counts, record capacity metadata, and keep submissions queued. Tests cover capacity requeues and terminal template-permission failures.
Capacity status and external behavior
crates/prism-challenge/src/api.rs, docs/PRISM.md, docs/external-miner/prism.md
Accepted responses and /v1/status expose the capacity policy. Documentation describes queued B200 capacity handling and terminal non-capacity failures.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SubmissionAPI
  participant Orchestrator
  participant LiumRentPool
  participant PrismStore
  SubmissionAPI->>Orchestrator: Process queued submission
  Orchestrator->>LiumRentPool: Classify provisioning failure
  LiumRentPool-->>Orchestrator: Return no_capacity
  Orchestrator->>PrismStore: Requeue without consuming retry
  Orchestrator-->>SubmissionAPI: Return queued status and capacity note
Loading
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/prism-queue-lium-capacity

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant