Skip to content

fix(prism-lium): abort rent when rent_gpu_count > 1 - #238

Open
echobt wants to merge 2 commits into
mainfrom
cursor/abort-rent-gpu-count-0ecd
Open

fix(prism-lium): abort rent when rent_gpu_count > 1#238
echobt wants to merge 2 commits into
mainfrom
cursor/abort-rent-gpu-count-0ecd

Conversation

@echobt

@echobt echobt commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Hard-abort Lium POST /rent when rent_gpu_count exceeds the requested width (InstanceSpec.gpu_count / Proof HarvestLimits.gpu_count, default 1).

Prod 2026-09-08 rented an 8× NVIDIA B200 (rent_gpu_count=8) then hit CREATION_FAILED. The previous abort only covered 8× 5090. NCU / whole-host B200 rent_count(1)→8 was still posted.

  • Skip (do not POST) any candidate with rent_gpu_count > spec.gpu_count, then continue so a later split 8× B200 can still rent 1×.
  • Solo oversize inventory still errors with the abort message; no HTTP rent body with gpu_count=8.
  • Idle split 8× B200 with available_gpu_count still rents .
  • provision_refuses_8x_b200_when_requesting_one proves the 8× NCU path is refused.
  • provision_skips_ncu_upsell_and_rents_split_1x covers Greptile P1 (2× NCU + split 8× → rent 1×).

Did not invent digests, touch FORCE_SIM/StubWin, or change prod pins.

Greptile

Every PR is reviewed by Greptile before merge. Config: .greptile/.

  • Greptile has reviewed this PR; findings are fixed or answered
  • If the bot was silent, I commented @greptileai review

Test plan

  • cargo test -p prism-lium -p prism-lium-types
  • cargo fmt --all -- --check
  • cargo clippy -p prism-lium -p prism-lium-types --all-targets -- -D warnings

Risk

Proof harvest will not POST NCU / whole-host upsells that exceed the requested GPU count. A later split-capable offer in the same candidate set can still rent 1×. No deploy pin or emission change.

Naming

I did not rename BASE_* environment variables, deployed host paths
(/opt/base, /run/base, …), GHCR baseintelligence/base package names, or
base-*-v1 cryptographic domain tags, unless this PR’s purpose is a coordinated
cutover documented in docs/NAMING.md.

Open in Web Open in Cursor 

Refuse POST /rent when rent_count exceeds the requested width so an
8× B200 NCU/whole-host upsell cannot run on a 1× Proof harvest pin.

Co-authored-by: Mathis <echobt@users.noreply.github.com>
@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown

Greptile Summary

This PR generalizes the LIUM pre-rent guard so provisioning refuses any whole-host GPU count greater than the requested width and adds coverage for 2× and 8× NCU B200 offers.

  • Prevents oversized B200 and 5090 rent requests from reaching POST /rent.
  • Preserves one-GPU rental from explicitly split-capable B200 hosts.
  • Updates offer-width documentation and provisioning tests.
  • The new hard return can prematurely reject a candidate set containing a later valid split offer and bypasses no-capacity recovery.

Confidence Score: 4/5

The PR is not safe to merge until an oversized candidate is handled without skipping later valid offers and exhausted candidates retain no-capacity recovery semantics.

The rent guard successfully prevents oversized POST bodies, but its immediate generic error can turn an otherwise satisfiable or recoverable capacity condition into a permanent provisioning failure.

Files Needing Attention: crates/prism-lium/src/client.rs

Important Files Changed

Filename Overview
crates/prism-lium/src/client.rs Generalizes the pre-POST over-width guard and adds B200 refusal tests, but aborts the entire candidate loop on the first oversized offer.
crates/prism-lium-types/src/types.rs Updates documentation to explain that whole-host NCU rent counts can exceed the requested width and are refused by the client.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[List and sort matching offers] --> B[Examine next candidate]
  B --> C{rent_count > requested?}
  C -->|Yes, current implementation| D[Return generic API error]
  D --> E[Later valid offers skipped]
  D --> F[Not classified as no-capacity]
  C -->|No| G[POST requested rent]
  G --> H[Wait for running pod]
Loading

Reviews (1): Last reviewed commit: "fix(prism-lium): abort rent when rent_gp..." | Re-trigger Greptile

Comment thread crates/prism-lium/src/client.rs Outdated
Do not POST rent_gpu_count > requested, but continue the candidate
loop so a later split 8× B200 can still rent 1×.

Co-authored-by: Mathis <echobt@users.noreply.github.com>
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.

2 participants