-
Notifications
You must be signed in to change notification settings - Fork 16
fix(prism): keep BYOK seal on measure Err + hard-pin 1×5090 #153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
f413540
ca8abe8
e8c5adb
373b93f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -134,10 +134,24 @@ versioned descriptor). Trust `/v1/recipe`, not marketing chart labels. | |||||||||||||||||
| - If your hotkey **leaves the metagraph**, the watcher reopens your slot(s) | ||||||||||||||||||
| automatically — resubmit under your new uid. | ||||||||||||||||||
| - Infra failures (Lium pod, review/similarity/LLM infra) **auto-retry up to 3 | ||||||||||||||||||
| times**; cheat / rejected verdicts are terminal. After an infra failure | ||||||||||||||||||
| (`ChallengeInternal`), you may **resubmit within 30 minutes** (new POST or | ||||||||||||||||||
| `POST /v1/submissions/{id}/retry`). After 30 minutes the slot stays blocked | ||||||||||||||||||
| until your hotkey leaves the metagraph. | ||||||||||||||||||
| times**; harness `EVAL_FAIL` (miner/model code) is terminal for that attempt | ||||||||||||||||||
| and is **not** auto-retried. Cheat / rejected verdicts are terminal. After an | ||||||||||||||||||
| infra failure (`ChallengeInternal`), you may **recover within 30 minutes** | ||||||||||||||||||
| via `POST /v1/submissions/{id}/retry` with **`X-Lium-Api-Key`** (required on | ||||||||||||||||||
| live when another GPU rent is needed). After 30 minutes the slot stays | ||||||||||||||||||
| blocked until your hotkey leaves the metagraph. | ||||||||||||||||||
|
|
||||||||||||||||||
| ### Retry vs re-POST | ||||||||||||||||||
|
|
||||||||||||||||||
| | Action | When | Headers | | ||||||||||||||||||
| |--------|------|---------| | ||||||||||||||||||
| | Re-POST the **same** ZIP | Always safe | Same as submit | Returns `200 already-queued` — **no new GPU run**; does not recover a failed row | | ||||||||||||||||||
| | `POST /v1/submissions/{id}/retry` | Row status is **`failed`** only | **`X-Lium-Api-Key`** on live (infra recovery); admin Bearer for operator non-infra retries | Requeues measure; wrong/missing Lium key → `400 missing_lium_api_key` | | ||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
fd -t f | while IFS= read -r file; do
if rg -q '\b(normalize_lium_api_key|reset_for_retry|require_miner_lium)\b' "$file"; then
printf '\n== %s ==\n' "$file"
rg -n -C 8 '\b(normalize_lium_api_key|reset_for_retry|require_miner_lium)\b' "$file"
fi
doneRepository: BaseIntelligence/base Length of output: 14008 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== retry handler =='
sed -n '400,515p' crates/prism-challenge/src/api.rs
printf '%s\n' '== Lium payer API and call sites =='
rg -n -C 12 'validate|payer_vault|miner_lium_key|LIUM_API_KEY|charge|bill|payment|lium' crates/prism-lium-payer crates/prism-challenge/src crates/prism-challenge/tests 2>/dev/null || true
printf '%s\n' '== documentation route references =='
rg -n -C 5 'submissions/.*/retry|missing_lium_api_key|invalid.*lium|Lium-Api-Key' docs/external-miner docs crates 2>/dev/null || trueRepository: BaseIntelligence/base Length of output: 50378 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== retry table context =='
sed -n '136,158p' docs/external-miner/prism.md
printf '%s\n' '== payer factory and backend selection =='
sed -n '150,225p' crates/prism-lium-payer/src/lib.rs
rg -n -C 18 'fn backend_for|backend_for\(' crates/prism-challenge/src/orchestrator.rs crates/prism-lium-payer/src
printf '%s\n' '== focused retry/key tests and docs =='
rg -n -C 8 'post_retry|missing_lium_api_key|retry.*202|retry.*ACCEPTED|X-Lium-Api-Key' crates/prism-challenge/tests docs/external-miner/prism.mdRepository: BaseIntelligence/base Length of output: 20944 Align the invalid-key response claim with the handler. The retry handler checks only for a non-empty key. A wrong non-empty key can pass normalization, reset the failed row, and return 🧰 Tools🪛 markdownlint-cli2 (0.23.2)[warning] 149-149: Table column count (MD056, table-column-count) 🤖 Prompt for AI Agents |
||||||||||||||||||
| | `/retry` on non-failed | — | — | `409 not_failed` — hotkey or Bearer alone does not change that | | ||||||||||||||||||
|
Comment on lines
+148
to
+150
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Add the missing The header and separator define three columns, but each changed row contains four cells. MD056 reports this mismatch. Renderers can omit or misalign the result guidance. Proposed table fix-| Action | When | Headers |
-|--------|------|---------|
+| Action | When | Headers | Result |
+|--------|------|---------|--------|📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.23.2)[warning] 148-148: Table column count (MD056, table-column-count) [warning] 149-149: Table column count (MD056, table-column-count) [warning] 150-150: Table column count (MD056, table-column-count) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||||||||||||||
|
|
||||||||||||||||||
| Do **not** expect `X-Miner-Hotkey` or admin Bearer alone to fund a new Lium | ||||||||||||||||||
| pod. Seal TTL is ≥36h and master re-seals on measure + heartbeats; the key is | ||||||||||||||||||
| kept across measure Err so auto-/miner-retry can re-rent without a new submit. | ||||||||||||||||||
|
|
||||||||||||||||||
| ## Anti-copy rule (patch / delta) | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Remove the BYOK vault entry after terminal
EVAL_FAIL.EVAL_FAILcannot retry, butfinish_measureretains its miner Lium credential because it retains entries for every measurement error. Remove the entry in the terminal branch, while retaining it for recoverable infrastructure failures.crates/prism-challenge/src/orchestrator.rs#L382-L395: remove the payer-vault entry afterfail_terminalhandlesEVAL_FAIL.crates/prism-orphan/src/terminal.rs#L134-L139: keep the generic retain-on-error behavior only for failures that can retry.docs/PRISM.md#L82-L84: state that vault retention applies to recoverable measurement errors, not terminalEVAL_FAIL.As per coding guidelines, treat normative documentation—including architecture files, frozen specifications, threat and operator-security documents, completeness status, runbooks, and
external-miner/—as the source of truth for contracts, operations, and status.📍 Affects 3 files
crates/prism-challenge/src/orchestrator.rs#L382-L395(this comment)crates/prism-orphan/src/terminal.rs#L134-L139docs/PRISM.md#L82-L84🤖 Prompt for AI Agents
Source: Coding guidelines