Skip to content

feat(design): auto-enqueue active harnesses each round - #124

Merged
echobt merged 1 commit into
mainfrom
feat/design-auto-enqueue-active
Aug 12, 2026
Merged

feat(design): auto-enqueue active harnesses each round#124
echobt merged 1 commit into
mainfrom
feat/design-auto-enqueue-active

Conversation

@echobt

@echobtechobt commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Round loop now auto-enqueues every eligible active harness (latest per hotkey) into each open round with that round’s shared prompt (RunOrigin::Scheduled), idempotent if already queued.
  • Eliminated harnesses stay skipped; daily scheduled quota remains the runaway-scheduler guard (manual POST /v1/harness still charges the manual bucket for the initial next-round schedule).
  • Admin POST /v1/admin/rounds/current/requeue shares the same enqueue helper; miner-facing docs (DESIGN_CHALLENGE.md, docs/external-miner/) updated for the new behavior.

Test plan

  • cargo test -p design-http --lib (includes auto_enqueue_queues_all_active_same_prompt_idempotent)
  • cargo clippy -p design-http -p design-challenge --all-targets -- -D warnings
  • cargo run -p xtask -- loc-cap / design-check / external-docs-check
  • CI green on PR
  • After merge: public design-challenge miner docs updated in parallel (rounds auto-enqueue wording)

Summary by CodeRabbit

  • New Features

    • Active harnesses are now automatically scheduled when each new round opens.
    • Automatic scheduling supports retries, skips eliminated harnesses, and avoids duplicate runs.
    • Manual requeueing uses the same scheduling behavior as automatic round processing.
    • Submission and scheduled-execution quotas are now handled separately.
  • Documentation

    • Clarified scheduling rules, quota behavior, retries, cooldowns, and troubleshooting guidance.

Keep the full eligible field competing every open round with the shared
prompt so admin rating is not stuck waiting on miner re-POSTs.
@coderabbitai

coderabbitaiBot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adds shared batch enqueueing for eligible active harnesses. The round orchestrator and admin requeue endpoint use this helper. Tests verify prompt sharing, elimination skips, and idempotency. Documentation defines the updated scheduling and quota behavior.

Changes

Active harness enqueue flow

Layer / File(s)Summary
Batch enqueue helper and validation
crates/design-http/src/api.rs, crates/design-http/src/lib.rs
The shared helper schedules eligible active harnesses, returns scheduled and skipped results, and is re-exported. Tests verify shared prompts, elimination exclusion, and idempotency.
Round loop and admin requeue integration
crates/design-challenge/src/orchestrator.rs, crates/design-http/src/api.rs
The round loop auto-enqueues active harnesses after ensuring each round. The admin current-round requeue endpoint delegates to the same helper.
Scheduling and quota documentation
docs/DESIGN_CHALLENGE.md, docs/external-miner/design.md, docs/external-miner/troubleshoot.md
The documentation describes automatic enqueueing, elimination skips, retry behavior, idempotency, and separate manual and scheduled quotas.

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

Sequence Diagram(s)

sequenceDiagram
participant RoundOrchestrator
participant enqueue_active_harnesses_for_round
participant DesignStore
RoundOrchestrator->>DesignStore: ensure round exists
RoundOrchestrator->>enqueue_active_harnesses_for_round: enqueue eligible active harnesses
enqueue_active_harnesses_for_round->>DesignStore: schedule harness runs
DesignStore-->>RoundOrchestrator: return scheduled and skipped outcomes
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly and concisely describes the main change: automatically enqueueing active harnesses for each design round.
Docstring Coverage✅ PassedDocstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/design-auto-enqueue-active

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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/design-challenge/src/orchestrator.rs`:
- Around line 251-263: Update the successful result handling around
enqueue_active_harnesses_for_round in the orchestrator flow to inspect
result.skipped and emit a warning for each skipped harness. Include the harness
ID, miner hotkey, round ID, and skip reason in each warning, while preserving
the existing batch-level error logging for Err results.
In `@crates/design-http/src/api.rs`:
- Around line 467-492: Update schedule_harness_for_round to compare the
harness’s existing run IDs against the complete selected prompt set, rather than
treating any existing run as fully scheduled. Create runs only for missing
prompts and return the complete run set after repair, or ensure failures roll
back newly inserted runs so partial prompt sets are not persisted; keep
enqueue_active_harnesses_for_round’s reporting behavior unchanged.
- Around line 462-466: The public miner documentation is missing updates for the
changed scheduling behavior. Update the corresponding public design-challenge
miner repository and the miner-facing documentation under docs/external-miner/
to describe automatic scheduling, elimination handling, per-(harness, round)
idempotency, and scheduled-quota behavior.
- Around line 1661-1667: Update the test around the runs-to-prompts assertions
to group prompt IDs into a BTreeSet for each harness_id instead of storing only
one prompt_id per harness. For both harnesses, assert that the collected sets
exactly equal the selected prompt set for rid, preserving the existing
harness-count validation.
In `@docs/external-miner/design.md`:
- Around line 108-123: Update the public miner documentation in
BaseIntelligence/design-challenge to describe automatic round enqueueing and
separate manual and scheduled quotas. Replace the outdated
three-prompts-per-round and 10-daily-runs statements with the contract’s one
shared prompt per round, 10 manual runs, and 20 scheduled runs, and synchronize
the corresponding documentation between both repositories.
In `@docs/external-miner/troubleshoot.md`:
- Around line 12-13: Update the “Active harness but no runs this round”
troubleshooting entry to include cases where the harness is not the latest
active harness for its hotkey and where scheduled quota prevented enqueueing.
Add checks for the latest harness, GET /v1/quota/{hotkey}, and the requeue
response’s skipped.reason.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2e77e41a-5eb8-4d0d-97e2-056713449ff8

📥 Commits

Reviewing files that changed from the base of the PR and between a6685ba and 99e49e2.

📒 Files selected for processing (6)
  • crates/design-challenge/src/orchestrator.rs
  • crates/design-http/src/api.rs
  • crates/design-http/src/lib.rs
  • docs/DESIGN_CHALLENGE.md
  • docs/external-miner/design.md
  • docs/external-miner/troubleshoot.md

Comment on lines +251 to +263
// Open the round, then auto-enqueue every eligible active harness
// with this round's shared prompt (Scheduled origin; idempotent).
let _ = self.ensure_round(rid).await;
let _ = self.current_epoch();
if let Err(e) = enqueue_active_harnesses_for_round(
self.store.as_ref(),
rid,
self.cfg.netuid,
self.current_epoch(),
)
.await
{
warn!(error = %e, round = rid, "auto-enqueue failed");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Log skipped harnesses from automatic enqueueing.

enqueue_active_harnesses_for_round returns Ok when individual harnesses fail scheduling. This branch logs only batch-level failures. Scheduled-quota exhaustion and per-harness store errors therefore leave runs absent without an operational signal.

Inspect result.skipped and emit a warning with the harness ID, miner hotkey, round ID, and reason.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@crates/design-challenge/src/orchestrator.rs` around lines 251 - 263, Update
the successful result handling around enqueue_active_harnesses_for_round in the
orchestrator flow to inspect result.skipped and emit a warning for each skipped
harness. Include the harness ID, miner hotkey, round ID, and skip reason in each
warning, while preserving the existing batch-level error logging for Err
results.

Comment on lines +462 to +466
/// Schedule every eligible active harness into `rid` ([`RunOrigin::Scheduled`]).
///
/// Latest active harness per hotkey (`list_active_harnesses`); eliminated rows
/// are omitted. Idempotent per `(harness, round)`. Used by the round loop and
/// by `POST /v1/admin/rounds/current/requeue`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Update the public miner documentation before merge.

This change modifies automatic scheduling, elimination handling, idempotency, and scheduled-quota behavior. The PR objective states that the parallel public design-challenge miner documentation update is pending. Update that repository before merge.

As per coding guidelines, “When a challenge product or public API changes, update the corresponding public miner repository and docs/external-miner/ so miner-facing documentation remains current.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@crates/design-http/src/api.rs` around lines 462 - 466, The public miner
documentation is missing updates for the changed scheduling behavior. Update the
corresponding public design-challenge miner repository and the miner-facing
documentation under docs/external-miner/ to describe automatic scheduling,
elimination handling, per-(harness, round) idempotency, and scheduled-quota
behavior.

Source: Coding guidelines

Comment on lines +467 to +492
pub async fn enqueue_active_harnesses_for_round(
store: &dyn DesignStore,
rid: u64,
netuid: u16,
epoch: u64,
) -> Result<EnqueueRoundResult, String> {
let harnesses = store
.list_active_harnesses(rid)
.await
.map_err(|e| e.to_string())?;
let mut out = EnqueueRoundResult::default();
for harness in &harnesses {
match schedule_harness_for_round(store, harness, rid, netuid, epoch, RunOrigin::Scheduled)
.await
{
Ok(run_ids) => {
out.scheduled
.push((harness.id.clone(), harness.miner_hotkey.clone(), run_ids));
}
Err(e) => {
out.skipped
.push((harness.id.clone(), harness.miner_hotkey.clone(), e));
}
}
}
Ok(out)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Repair partial prompt sets before reporting a harness as scheduled.

A failure after one insert_run can leave a partial prompt set. On retry, schedule_harness_for_round returns every existing run when it finds any run for the harness. The helper then reports that harness as scheduled, but the missing prompts remain absent.

Make schedule_harness_for_round compare existing run IDs with the complete selected prompt set. Create only the missing runs, or fail without persisting a partial set.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@crates/design-http/src/api.rs` around lines 467 - 492, Update
schedule_harness_for_round to compare the harness’s existing run IDs against the
complete selected prompt set, rather than treating any existing run as fully
scheduled. Create runs only for missing prompts and return the complete run set
after repair, or ensure failures roll back newly inserted runs so partial prompt
sets are not persisted; keep enqueue_active_harnesses_for_round’s reporting
behavior unchanged.

Comment on lines +1661 to +1667
let prompts: BTreeMap<_, _> = runs
.iter()
.map(|r| (r.harness_id.clone(), r.prompt_id.clone()))
.collect();
assert_eq!(prompts.len(), 2);
let prompt_ids: std::collections::BTreeSet<_> = prompts.values().cloned().collect();
assert_eq!(prompt_ids.len(), 1, "all harnesses share the round prompt");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Assert the complete prompt set for each harness.

BTreeMap<harness_id, prompt_id> keeps only one prompt ID per harness. The assertion can pass when other runs use different prompt IDs.

Collect a BTreeSet of prompt IDs per harness. Assert that both sets equal the selected prompt set for rid.

Proposed test change
- let prompts: BTreeMap<_, _> = runs- .iter()- .map(|r| (r.harness_id.clone(), r.prompt_id.clone()))- .collect();- assert_eq!(prompts.len(), 2);- let prompt_ids: std::collections::BTreeSet<_> = prompts.values().cloned().collect();- assert_eq!(prompt_ids.len(), 1, "all harnesses share the round prompt");+ let expected: std::collections::BTreeSet<_> = select_prompts_for_round(rid)+ .unwrap()+ .into_iter()+ .map(|p| p.id)+ .collect();+ for harness_id in [&a.id, &b.id] {+ let actual: std::collections::BTreeSet<_> = runs+ .iter()+ .filter(|run| run.harness_id == *harness_id)+ .map(|run| run.prompt_id.clone())+ .collect();+ assert_eq!(actual, expected, "{harness_id} must receive the round prompt set");+ }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@crates/design-http/src/api.rs` around lines 1661 - 1667, Update the test
around the runs-to-prompts assertions to group prompt IDs into a BTreeSet for
each harness_id instead of storing only one prompt_id per harness. For both
harnesses, assert that the collected sets exactly equal the selected prompt set
for rid, preserving the existing harness-count validation.

Comment on lines +108 to 123
## Submission gating (1-max) + auto round enqueue

- Your hotkey must be **registered on the subnet** (metagraph). Unknown hotkey
→ `403 hotkey_not_in_metagraph`. Intake uses a bulk metagraph cache with a
**15 minute** fail-closed TTL (`503 metagraph_unavailable` → retry shortly).
- **One accepted submission per hotkey** and **one sandbox attempt** for that
submission. While yours is `registered` / `blocked` / `rejected`, a
*different* harness gets `409 submission_gated`. Re-POSTing the **identical**
bundle is always safe (idempotent `200 already-queued`).
- After your attempt finishes (score, cheat, admin reject, or unscored
timeout), you cannot submit again on the same hotkey until that hotkey
**leaves the metagraph** and you register a **new UID** (same hotkey is fine).
- Infra auto-retries on the *same* run id (up to 3) are not a new attempt.
- **One accepted submission per hotkey**. While yours is `registered` /
`blocked` / `rejected`, a *different* harness gets `409 submission_gated`.
Re-POSTing the **identical** bundle is always safe (idempotent
`200 already-queued`).
- After a **terminal** outcome that closes gating (cheat / admin reject /
unscored timeout / budget exhaustion), you cannot submit a **new** digest on
the same hotkey until that hotkey **leaves the metagraph** and you register a
**new UID** (same hotkey is fine).
- Infra auto-retries on the *same* run id (up to 3) are not a new schedule.
- `env_vars` are **locked at submission**; changing them means a new digest,
which requires a free slot.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- target file and relevant files ---'
git ls-files | rg '(^|/)(design\.md|AGENTS\.md|.*external.*doc.*|.*design.*challenge.*)$'| head -200
printf'%s\n''--- target file size ---'
wc -l docs/external-miner/design.md
printf'%s\n''--- target lines 80-155 ---'
sed -n '80,155p' docs/external-miner/design.md
printf'%s\n''--- public repository references ---'
rg -n -i --glob '*.md' --glob '*.yml' --glob '*.yaml' --glob '*.toml' --glob '*.json''design-challenge|external-miner|external-docs-check|public miner'.| head -250
printf'%s\n''--- repository remotes and branch ---'
git remote -v
git branch --show-current

Repository: BaseIntelligence/base

Length of output: 38130


🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- local synchronization guidance ---'
sed -n '25,58p' docs/AGENTS.md
sed -n '38,56p' AGENTS.md
printf'%s\n''--- external docs checker outline/relevant rules ---'
ast-grep outline xtask/src/external_docs_check.rs
rg -n -C 5 'design|public|mirror|protocol_version|external-miner' xtask/src/external_docs_check.rs | head -240
printf'%s\n''--- public repository metadata ---'
curl -fsSL https://api.github.com/repos/BaseIntelligence/design-challenge \
| jq '{full_name,default_branch,archived,pushed_at}'printf'%s\n''--- public repository root ---'
curl -fsSL https://api.github.com/repos/BaseIntelligence/design-challenge/git/trees/HEAD?recursive=1 \
| jq -r '.tree[]?.path'| rg -i '(^|/)(readme|design|docs|miner|example)'| head -200
printf'%s\n''--- public README candidates ---'forpathin README.md readme.md docs/README.md docs/design.md design.md;do
url="https://raw.githubusercontent.com/BaseIntelligence/design-challenge/HEAD/$path"
status=$(curl -L -sS -o /tmp/public-doc -w '%{http_code}'"$url")if [ "$status"= 200 ];thenecho"### $path"
sed -n '1,240p' /tmp/public-doc
fidone

Repository: BaseIntelligence/base

Length of output: 18285


🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- local synchronization guidance ---'
sed -n '25,58p' docs/AGENTS.md
sed -n '38,56p' AGENTS.md
printf'%s\n''--- external docs checker outline/relevant rules ---'
ast-grep outline xtask/src/external_docs_check.rs
rg -n -C 5 'design|public|mirror|protocol_version|external-miner' xtask/src/external_docs_check.rs | head -240
printf'%s\n''--- public repository metadata ---'
curl -fsSL https://api.github.com/repos/BaseIntelligence/design-challenge \
| jq '{full_name,default_branch,archived,pushed_at}'printf'%s\n''--- public repository root ---'
curl -fsSL 'https://api.github.com/repos/BaseIntelligence/design-challenge/git/trees/HEAD?recursive=1' \
| jq -r '.tree[]?.path'| rg -i '(^|/)(readme|design|docs|miner|example)'| head -200
printf'%s\n''--- public README candidates ---'forpathin README.md readme.md docs/README.md docs/design.md design.md;do
url="https://raw.githubusercontent.com/BaseIntelligence/design-challenge/HEAD/$path"
status=$(curl -L -sS -o /tmp/public-doc -w '%{http_code}'"$url")if [ "$status"= 200 ];thenecho"### $path"
sed -n '1,240p' /tmp/public-doc
fidone

Repository: BaseIntelligence/base

Length of output: 18285


🏁 Script executed:

#!/bin/bashset -e
base='https://raw.githubusercontent.com/BaseIntelligence/design-challenge/HEAD'forpathin docs/submit.md docs/rounds-and-scoring.md docs/api.md docs/troubleshoot.md;doecho"### $path"
curl -L -fsSL "$base/$path"|
rg -n -i -C 4 'gate|gated|metagraph|registered|blocked|rejected|terminal|digest|already-queued|round|enqueue|quota|manual|scheduled|env_vars|environment|retry|uid|hotkey|submission'||truedoneprintf'%s\n''--- public tree via raw known pages ---'forpathin docs/submit.md docs/rounds-and-scoring.md docs/api.md;do
status=$(curl -L -sS -o /tmp/public-check -w '%{http_code}'"$base/$path")printf'%s %s\n'"$status""$path"done

Repository: BaseIntelligence/base

Length of output: 12985


🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- local normative contract and implementation references ---'
rg -n -i -C 5 'submission_gated|metagraph_unavailable|15 minute|15-minute|auto.?enqueue|latest active|manual|scheduled|PROMPTS_PER_ROUND|ROUND_SECS|8640|env_vars|new UID|new uid|terminal|budget exhaustion' \
docs/DESIGN_CHALLENGE.md crates bins | head -320
printf'%s\n''--- target diff/status ---'
git status --short
git diff --stat -- docs/external-miner/design.md
git diff -- docs/external-miner/design.md | sed -n '1,260p'printf'%s\n''--- focused public/local claim comparison ---'
python3 - <<'PY'from pathlib import Pathimport subprocess, urllib.requestlocal = Path("docs/external-miner/design.md").read_text()base = "https://raw.githubusercontent.com/BaseIntelligence/design-challenge/HEAD/"public = {}for name in ("docs/submit.md", "docs/rounds-and-scoring.md", "docs/api.md", "docs/troubleshoot.md"): public[name] = urllib.request.urlopen(base + name).read().decode()claims = { "submission gate": ("submission_gated",), "metagraph cache TTL": ("15 minute", "15-minute", "couple of minutes"), "automatic enqueue": ("auto-enqueues", "auto-enqueue", "round-loop"), "manual quota": ("Manual", "manual"), "scheduled quota": ("Scheduled", "scheduled"), "scheduled cap": ("cap **20**", "cap 20"), "one prompt": ("PROMPTS_PER_ROUND = 1", "1 shared prompt"), "three prompts": ("3 prompts per round",), "daily 10 runs": ("10 sandboxed runs", "10 runs/day"), "new UID": ("new UID", "new uid"),}for label, needles in claims.items(): lhits = [n for n in needles if n.lower() in local.lower()] phits = [f"{name}:{n}" for name, body in public.items() for n in needles if n.lower() in body.lower()] print(f"{label}: local={lhits or ['absent']}; public={phits or ['absent']}")PY

Repository: BaseIntelligence/base

Length of output: 27443


🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- local normative contract and implementation references ---'
rg -n -i -C 5 'submission_gated|metagraph_unavailable|15 minute|15-minute|auto.?enqueue|latest active|manual|scheduled|PROMPTS_PER_ROUND|ROUND_SECS|8640|env_vars|new UID|new uid|terminal|budget exhaustion' \
docs/DESIGN_CHALLENGE.md crates bins | head -320
printf'%s\n''--- target diff/status ---'
git status --short
git diff --stat -- docs/external-miner/design.md
git diff -- docs/external-miner/design.md | sed -n '1,260p'printf'%s\n''--- focused public/local claim comparison ---'
python3 - <<'PY'from pathlib import Pathimport urllib.requestlocal = Path("docs/external-miner/design.md").read_text()base = "https://raw.githubusercontent.com/BaseIntelligence/design-challenge/HEAD/"public = {}for name in ("docs/submit.md", "docs/rounds-and-scoring.md", "docs/api.md", "docs/troubleshoot.md"): public[name] = urllib.request.urlopen(base + name).read().decode()claims = { "submission gate": ("submission_gated",), "metagraph cache TTL": ("15 minute", "15-minute", "couple of minutes"), "automatic enqueue": ("auto-enqueues", "auto-enqueue", "round-loop"), "manual quota": ("Manual", "manual"), "scheduled quota": ("Scheduled", "scheduled"), "scheduled cap": ("cap **20**", "cap 20"), "one prompt": ("PROMPTS_PER_ROUND = 1", "1 shared prompt"), "three prompts": ("3 prompts per round",), "daily 10 runs": ("10 sandboxed runs", "10 runs/day"), "new UID": ("new UID", "new uid"),}for label, needles in claims.items(): lhits = [n for n in needles if n.lower() in local.lower()] phits = [f"{name}:{n}" for name, body in public.items() for n in needles if n.lower() in body.lower()] print(f"{label}: local={lhits or ['absent']}; public={phits or ['absent']}")PY

Repository: BaseIntelligence/base

Length of output: 26985


Synchronize the public Design miner documentation before merge.

Update BaseIntelligence/design-challenge to document automatic round enqueueing and separate manual / scheduled quotas. Its current documentation also conflicts with the contract: it states three prompts per round and 10 daily runs, while the contract defines one shared prompt and 10 manual plus 20 scheduled runs. Keep both repositories synchronized.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/external-miner/design.md` around lines 108 - 123, Update the public
miner documentation in BaseIntelligence/design-challenge to describe automatic
round enqueueing and separate manual and scheduled quotas. Replace the outdated
three-prompts-per-round and 10-daily-runs statements with the contract’s one
shared prompt per round, 10 manual runs, and 20 scheduled runs, and synchronize
the corresponding documentation between both repositories.

Source: Coding guidelines

Comment on lines +12 to +13
| `409 schedule` "daily manual run quota exceeded" | Manual anti-spam cap (10/day) — round-loop auto-enqueue does **not** spend it | `GET /v1/quota/{hotkey}` → `manual.remaining`; wait until next UTC day |
| Active harness but no runs this round | Rare race / restart before auto-enqueue; or eliminated cooldown | Wait for the round tick / ask ops `admin/rounds/current/requeue`; check `eliminated_until_round` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Document all expected no-run causes for an active harness.

Line [13] omits two valid cases: the harness is not the latest active harness for its hotkey, or the scheduled quota blocked enqueueing. Add checks for the latest harness, GET /v1/quota/{hotkey}, and the requeue response’s skipped.reason.

Proposed documentation update
-| Active harness but no runs this round | Rare race / restart before auto-enqueue; or eliminated cooldown | Wait for the round tick / ask ops `admin/rounds/current/requeue`; check `eliminated_until_round` |+| Active harness but no runs this round | Not the latest active harness for the hotkey, scheduled quota blocked, rare restart/race, or elimination cooldown | Check the latest harness, `GET /v1/quota/{hotkey}`, and `eliminated_until_round`; then wait for the round tick or ask ops `admin/rounds/current/requeue` and inspect `skipped.reason` |
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
|`409 schedule` "daily manual run quota exceeded" | Manual anti-spam cap (10/day) — round-loop auto-enqueue does **not** spend it |`GET /v1/quota/{hotkey}``manual.remaining`; wait until next UTC day |
| Active harness but no runs this round |Rare race / restart before auto-enqueue; or eliminated cooldown |Wait for the round tick / ask ops `admin/rounds/current/requeue`; check `eliminated_until_round`|
|`409 schedule` "daily manual run quota exceeded" | Manual anti-spam cap (10/day) — round-loop auto-enqueue does **not** spend it |`GET /v1/quota/{hotkey}``manual.remaining`; wait until next UTC day |
| Active harness but no runs this round |Not the latest active harness for the hotkey, scheduled quota blocked, rare restart/race, or elimination cooldown |Check the latest harness, `GET /v1/quota/{hotkey}`, and `eliminated_until_round`; then wait for the round tick or ask ops `admin/rounds/current/requeue` and inspect `skipped.reason`|
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/external-miner/troubleshoot.md` around lines 12 - 13, Update the “Active
harness but no runs this round” troubleshooting entry to include cases where the
harness is not the latest active harness for its hotkey and where scheduled
quota prevented enqueueing. Add checks for the latest harness, GET
/v1/quota/{hotkey}, and the requeue response’s skipped.reason.

@echobt
echobt merged commit 6fff157 into mainAug 12, 2026
4 checks passed
Sign up for freeto 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

@echobt