Skip to content

fix(prism): WTA emission, pre-pod screens, 8 concurrent evals - #85

Merged
echobt merged 7 commits into
mainfrom
fix/prism-wta-precheck-concurrency
Aug 8, 2026
Merged

fix(prism): WTA emission, pre-pod screens, 8 concurrent evals#85
echobt merged 7 commits into
mainfrom
fix/prism-wta-precheck-concurrency

Conversation

@echobt

@echobt echobt commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Restore Prism winner-take-all: apply_wta after competition credits so only one hotkey gets Prism's 50% share (prod had 3 positive Score leaves → soft allocation).
  • Fail-fast before Lium rent: copy gate → static METRICS_JSON/telemetry hooks → AST similarity.
  • Scale PRISM_MAX_CONCURRENT_EVALS to 8 (CLI/compose defaults + env-prod.yml); orchestrator spawns N semaphore-gated workers.

Evidence (before)

Live epoch 24369 prism leaves: champion 5HK8… 177155, challenger 5CY9… 111595, arch-owner 5HHL… 111595 → proportional weights 0.221/0.139/0.139 of subnet (plus design). See docs/evidence/prism-wta-2026-08-08.md.

Test plan

  • cargo test -p prism-registry -p prism-emit -p challenge-agentic -p prism-challenge
  • CI green
  • Deploy prism-challenge (digest-only); confirm PRISM_MAX_CONCURRENT_EVALS=8
  • After next epoch emit + seal: exactly one prism hotkey with non-zero prism share in /v1/weights/latest

Summary by CodeRabbit

  • New Features

    • Added pre-run screening for copied, suspicious, or disallowed submissions before resource provisioning.
    • Added checks for hardcoded metrics output and missing telemetry hooks.
    • Increased default concurrent evaluation capacity from 1 to 8.
  • Scoring Improvements

    • Updated competition scoring so only the highest positive result receives credit, with consistent tie-breaking.
  • Bug Fixes

    • Improved rejection handling with clear zero-score outcomes and no unnecessary resource allocation.

Collapse competition credits to a single Score leaf so Prism's 50% share
goes to one winner; fail static/similarity cheats before Lium rent; scale
orchestrator workers to 8 on prod.
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@echobt, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cb8ca07d-c73e-4440-b586-17fae0ca0c37

📥 Commits

Reviewing files that changed from the base of the PR and between a5935e4 and 63288fc.

📒 Files selected for processing (14)
  • crates/challenge-agentic/src/lib.rs
  • crates/challenge-agentic/src/sim.rs
  • crates/challenge-ast/src/lib.rs
  • crates/challenge-ast/src/source_cheats.rs
  • crates/prism-challenge/src/leaf_emit.rs
  • crates/prism-challenge/src/lib.rs
  • crates/prism-challenge/src/orchestrator.rs
  • crates/prism-challenge/src/submit.rs
  • crates/prism-challenge/tests/arch_competition.rs
  • crates/prism-challenge/tests/cheat_arch_copy.rs
  • crates/prism-challenge/tests/cheat_metrics.rs
  • crates/prism-challenge/tests/copy_gate.rs
  • crates/prism-challenge/tests/e2e_orchestrate_sim.rs
  • crates/prism-challenge/tests/e2e_sim_pipeline.rs
📝 Walkthrough

Walkthrough

Changes

The PR moves Prism anti-cheat checks before pod provisioning, adds shared static source checks, applies winner-take-all scoring during epoch emission, and raises default concurrent evaluations from 1 to 8.

Pre-pod anti-cheat screening

Layer / File(s) Summary
Shared static source checks
crates/challenge-agentic/src/lib.rs, crates/challenge-agentic/src/static_checks.rs, crates/challenge-agentic/src/sim.rs
Adds static detection for hardcoded METRICS_JSON= output and missing telemetry hooks. The simulator uses the shared telemetry predicate.
Pre-pod screening flow
crates/prism-challenge/src/orchestrator.rs, docs/PRISM.md
Runs copy, static-source, and AST-similarity checks before pod rental. Rejections use terminal Score(0) updates.
Pre-pod rejection tests
crates/prism-challenge/tests/cheat_arch_copy.rs, crates/prism-challenge/tests/cheat_metrics.rs, crates/prism-challenge/tests/copy_gate.rs
Tests require Rejected status, zero score, and no pod allocation for copied or hardcoded-metrics submissions.

Winner-take-all Prism emission

Layer / File(s) Summary
Winner-take-all rule
crates/prism-registry/src/competition.rs, crates/prism-registry/src/lib.rs
Adds and exports apply_wta. The highest positive score wins. Lexicographically smallest hotkeys win ties.
Epoch leaf integration
crates/prism-emit/src/lib.rs, crates/prism-emit/tests/epoch_semantics.rs
Applies WTA after competition aggregation and before signed leaf construction. Tests update carried, same-epoch, and competition-credit cases.
Emission rules and evidence
docs/COMPLETENESS.md, docs/PRISM.md, docs/external-miner/prism.md, docs/evidence/prism-wta-2026-08-08.md
Documents WTA emission, tie-breaking, epoch behavior, and the related incident evidence.

Evaluation concurrency defaults

Layer / File(s) Summary
Runtime concurrency configuration
bins/prism-challenge/src/main.rs, crates/prism-pipeline/src/config.rs
Changes application, production, and live-smoke defaults to eight concurrent evaluations.
Deployment environment defaults
deploy/compose/env-prod.yml, deploy/env/prism-challenge.env.example, docker-compose.yml, docs/runbooks/prism-enable-lium-and-emission.md
Sets deployment defaults to eight and documents capacity-based reduction guidance.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Submission
  participant Orchestrator
  participant StaticChecks
  participant SimilarityCheck
  participant PodRental
  Submission->>Orchestrator: submit architecture and training sources
  Orchestrator->>StaticChecks: check source cheats and telemetry hooks
  Orchestrator->>SimilarityCheck: compare architecture sources
  SimilarityCheck-->>Orchestrator: pass or copied verdict
  Orchestrator->>PodRental: provision pod after screening passes
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the three primary changes: WTA emission, pre-pod screening, and increased evaluation concurrency.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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 fix/prism-wta-precheck-concurrency

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.

@coderabbitai coderabbitai Bot 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: 7

🧹 Nitpick comments (1)
docs/runbooks/prism-enable-lium-and-emission.md (1)

9-10: 🚀 Performance & Scalability | 🔵 Trivial

Add a capacity preflight before enabling eight workers.

Line [9] raises a billable production default. Add a preflight that records Lium lease-pool capacity and verifies that it can support PRISM_MAX_CONCURRENT_EVALS=8 before rollout.

🤖 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/runbooks/prism-enable-lium-and-emission.md` around lines 9 - 10, Add a
preflight step before enabling the documented production default of
PRISM_MAX_CONCURRENT_EVALS=8 that records the available Lium lease-pool capacity
and verifies it is at least eight concurrent evaluations; require this check to
pass before rollout and retain the existing guidance to reduce the worker count
when capacity is insufficient.
🤖 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/challenge-agentic/src/static_checks.rs`:
- Around line 23-26: Format the static_source_cheat function signature in
crates/challenge-agentic/src/static_checks.rs using cargo fmt --all, then verify
the CI-equivalent formatting gate passes.
- Around line 50-56: Update training_has_telemetry_hooks to parse training_py
with the existing AST support and require executable report and
finish_evaluation call nodes on an allowed telemetry object, rather than
matching raw substrings that comments can spoof. Preserve the accepted telemetry
access forms, and add a regression test demonstrating that comment-only or
non-executable text does not satisfy the check.

In `@crates/prism-challenge/src/orchestrator.rs`:
- Around line 545-558: Handle the result of store.apply in the rejection path
instead of discarding it. In the surrounding method, propagate or retry any
state-write error and only update the gating record to Rejected after the
rejection row has persisted successfully; preserve the existing rejection patch
and StageEvent behavior.

In `@crates/prism-emit/src/lib.rs`:
- Around line 211-212: Filter the map returned by
prism_registry::competition_scores to hotkeys in expected.participants before
passing it to prism_registry::apply_wta, while preserving the existing WTA and
signed-set flow. Add a test covering an expected lower-scoring hotkey alongside
a higher-scoring outside hotkey, verifying the expected participant remains
eligible and receives the correct result.

In `@crates/prism-pipeline/src/config.rs`:
- Around line 12-13: Connect PrismConfig’s max_concurrent_evals value from
PrismConfig::production()/live_smoke() through the CLI/default path used by
spawn_orchestrator, replacing the unrelated Cli::max_concurrent_evals source.
Preserve explicit configuration overrides while ensuring the documented profile
default of 8 is applied when no override is provided.

In `@docker-compose.yml`:
- Line 208: Remove the duplicate PRISM_MAX_CONCURRENT_EVALS service-level
entries from docker-compose.yml (208-208) and deploy/compose/env-prod.yml
(52-53). Preserve the CLI default and deploy/env/prism-challenge.env as the
supported configuration sources so operator overrides are not overwritten.

In `@docs/PRISM.md`:
- Around line 44-48: Update the opening workflow overview in PRISM.md to match
the state machine: run the copy gate, static telemetry/cheat screen, and
similarity screen before pod provisioning, then perform the LLM/agentic review
after post-pod metrics and quality checks. Remove or revise any wording that
places LLM review before similarity or requires telemetry hooks at that earlier
stage.

---

Nitpick comments:
In `@docs/runbooks/prism-enable-lium-and-emission.md`:
- Around line 9-10: Add a preflight step before enabling the documented
production default of PRISM_MAX_CONCURRENT_EVALS=8 that records the available
Lium lease-pool capacity and verifies it is at least eight concurrent
evaluations; require this check to pass before rollout and retain the existing
guidance to reduce the worker count when capacity is insufficient.
🪄 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: 4fc66d32-37dc-4a61-9f2b-c880df8293e6

📥 Commits

Reviewing files that changed from the base of the PR and between 32dd2d2 and ef56732.

📒 Files selected for processing (21)
  • bins/prism-challenge/src/main.rs
  • crates/challenge-agentic/src/lib.rs
  • crates/challenge-agentic/src/sim.rs
  • crates/challenge-agentic/src/static_checks.rs
  • crates/prism-challenge/src/orchestrator.rs
  • crates/prism-challenge/tests/cheat_arch_copy.rs
  • crates/prism-challenge/tests/cheat_metrics.rs
  • crates/prism-challenge/tests/copy_gate.rs
  • crates/prism-emit/src/lib.rs
  • crates/prism-emit/tests/epoch_semantics.rs
  • crates/prism-pipeline/src/config.rs
  • crates/prism-registry/src/competition.rs
  • crates/prism-registry/src/lib.rs
  • deploy/compose/env-prod.yml
  • deploy/env/prism-challenge.env.example
  • docker-compose.yml
  • docs/COMPLETENESS.md
  • docs/PRISM.md
  • docs/evidence/prism-wta-2026-08-08.md
  • docs/external-miner/prism.md
  • docs/runbooks/prism-enable-lium-and-emission.md

Comment thread crates/challenge-agentic/src/static_checks.rs Outdated
Comment thread crates/challenge-agentic/src/static_checks.rs Outdated
Comment on lines 545 to +558
let _ = self
.store
.apply(
&row.id,
&StatePatch {
status: Some(Stage::Rejected),
final_score: Some(FinalScore::Score(0)),
similarity: Some(similarity),
error_detail: Some(format!(
"copy gate: architecture clones {} (bps={})",
hit.nearest_id, hit.similarity_bps
)),
similarity,
error_detail: Some(error_detail),
..StatePatch::default()
},
Some(&StageEvent {
stage: Stage::Rejected,
detail: Some(serde_json::json!({
"gate": "copy_created_at",
"nearest_id": hit.nearest_id,
"similarity_bps": hit.similarity_bps,
"byte_identical": hit.byte_identical,
})),
detail,

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

Do not ignore the rejection state-write failure.

If store.apply fails, this method still returns as handled and can set the gating record to Rejected. The submission row can then remain non-terminal while the miner cannot retry.

Propagate or retry the store error. Set the gating terminal state only after the rejection row persists.

🤖 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/prism-challenge/src/orchestrator.rs` around lines 545 - 558, Handle
the result of store.apply in the rejection path instead of discarding it. In the
surrounding method, propagate or retry any state-write error and only update the
gating record to Rejected after the rejection row has persisted successfully;
preserve the existing rejection patch and StageEvent behavior.

Comment on lines +211 to +212
let by_miner =
prism_registry::apply_wta(prism_registry::competition_scores(batch, arch_owners));

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 | ⚡ Quick win

Filter to expected participants before WTA.

competition_scores can contain a hotkey that is absent from expected.participants. If that hotkey has the highest score, apply_wta selects it, and lines 215-226 omit it from the signed set. Every eligible lower-scoring participant then receives Score(0).

Filter the competition map to expected hotkeys before calling apply_wta. Add a test with one expected lower-scoring hotkey and one higher-scoring outside hotkey.

Proposed fix
+    let expected_hotkeys: BTreeSet<String> = expected
+        .participants
+        .iter()
+        .map(|participant| hex::encode(participant.hotkey))
+        .collect();
     let by_miner =
-        prism_registry::apply_wta(prism_registry::competition_scores(batch, arch_owners));
+        prism_registry::apply_wta(
+            prism_registry::competition_scores(batch, arch_owners)
+                .into_iter()
+                .filter(|(hotkey, _)| expected_hotkeys.contains(hotkey))
+                .collect(),
+        );
📝 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
let by_miner =
prism_registry::apply_wta(prism_registry::competition_scores(batch, arch_owners));
let expected_hotkeys: BTreeSet<String> = expected
.participants
.iter()
.map(|participant| hex::encode(participant.hotkey))
.collect();
let by_miner =
prism_registry::apply_wta(
prism_registry::competition_scores(batch, arch_owners)
.into_iter()
.filter(|(hotkey, _)| expected_hotkeys.contains(hotkey))
.collect(),
);
🤖 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/prism-emit/src/lib.rs` around lines 211 - 212, Filter the map returned
by prism_registry::competition_scores to hotkeys in expected.participants before
passing it to prism_registry::apply_wta, while preserving the existing WTA and
signed-set flow. Add a test covering an expected lower-scoring hotkey alongside
a higher-scoring outside hotkey, verifying the expected participant remains
eligible and receives the correct result.

Comment on lines +12 to 13
/// Global concurrent Lium evals (horizontal scale; prod default 8).
pub max_concurrent_evals: u32,

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 | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

ast-grep outline crates/prism-pipeline/src/config.rs \
  --items all --type function --match 'production|live_smoke'

rg -n -P '\bmax_concurrent_evals\b|PrismConfig::(production|live_smoke)|spawn_orchestrator' \
  bins crates tests

Repository: BaseIntelligence/base

Length of output: 1205


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '--- crates/prism-pipeline/src/config.rs ---\n'
sed -n '1,90p' crates/prism-pipeline/src/config.rs

printf '\n--- bins/prism-challenge/src/main.rs relevant sections ---\n'
sed -n '1,110p' bins/prism-challenge/src/main.rs
sed -n '430,530p' bins/prism-challenge/src/main.rs

printf '\n--- Config and PrismConfig references ---\n'
rg -n -P 'PrismConfig|config\.rs:.*PrismConfig|\.production\(|\.live_smoke\(|PrismConfig::(production|live_smoke)' bins crates --glob '!**/.git/**'

Repository: BaseIntelligence/base

Length of output: 250


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- crates/prism-pipeline/src/config.rs ---'
sed -n '1,90p' crates/prism-pipeline/src/config.rs

echo
echo '--- bins/prism-challenge/src/main.rs relevant sections ---'
sed -n '1,110p' bins/prism-challenge/src/main.rs
sed -n '430,530p' bins/prism-challenge/src/main.rs

echo
echo '--- Config and PrismConfig references ---'
rg -n -P 'PrismConfig|config\.rs:.*PrismConfig|\.production\(|\.live_smoke\(|PrismConfig::(production|live_smoke)' bins crates --glob '!**/.git/**'

Repository: BaseIntelligence/base

Length of output: 11179


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- prism-pipeline pipeline.rs ---'
sed -n '1,220p' crates/prism-pipeline/src/pipeline.rs

echo
echo '--- prism-challenge lib references ---'
sed -n '1,120p' crates/prism-challenge/src/lib.rs

echo
echo '--- all PrismConfig::production/livesim/sim call sites with context ---'
rg -n -C 3 'PrismConfig::(production|live_smoke|sim)\(\)' crates/prism-challenge crates/prism-pipeline --glob '!**/.git/**'

Repository: BaseIntelligence/base

Length of output: 10391


Avoid diverging concurrency defaults.

PrismConfig::production()/live_smoke() set max_concurrent_evals = 8, but spawn_orchestrator reads Cli::max_concurrent_evals instead of the Prism profile. Connect the profile to the CLI/default path so the documented production default is not silently masked by an unrelated CLI/env value.

🤖 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/prism-pipeline/src/config.rs` around lines 12 - 13, Connect
PrismConfig’s max_concurrent_evals value from
PrismConfig::production()/live_smoke() through the CLI/default path used by
spawn_orchestrator, replacing the unrelated Cli::max_concurrent_evals source.
Preserve explicit configuration overrides while ensuring the documented profile
default of 8 is applied when no override is provided.

Comment thread docker-compose.yml
OPENROUTER_API_KEY_FILE: /run/base/openrouter/api_key
BASE_CHALLENGE_GATEWAY_ENDPOINT: ${BASE_CHALLENGE_GATEWAY_ENDPOINT:-http://gateway:8080}
PRISM_MAX_CONCURRENT_EVALS: "${PRISM_MAX_CONCURRENT_EVALS:-1}"
PRISM_MAX_CONCURRENT_EVALS: "${PRISM_MAX_CONCURRENT_EVALS:-8}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'Files matching compose/env:\n'
git ls-files | rg '(^|/)(docker-compose\.yml|compose\.ya?ml|env-prod\.ya?ml|prism-challenge\.env|compose|compose\.)' || true

printf '\ndocker-compose.yml around relevant lines / service env declarations:\n'
if [ -f docker-compose.yml ]; then
  nl -ba docker-compose.yml | sed -n '180,225p'
  printf '\nOccurrences of PRISM_MAX_CONCURRENT_EVALS in docker-compose.yml:\n'
  rg -n 'PRISM_MAX_CONCURRENT_EVALS|deploy/env/prism-challenge\.env|env_file' docker-compose.yml
fi

printf '\ndeploy/compose/env-prod.yml around relevant lines:\n'
if [ -f deploy/compose/env-prod.yml ]; then
  nl -ba deploy/compose/env-prod.yml | sed -n '1,120p'
  printf '\nOccurrences of PRISM_MAX_CONCURRENT_EVALS in deploy/compose/env-prod.yml:\n'
  rg -n 'PRISM_MAX_CONCURRENT_EVALS|deploy/env/prism-challenge\.env|env_file' deploy/compose/env-prod.yml
fi

printf '\nOccurrences of deploy/env/prism-challenge.env across repo:\n'
rg -n 'deploy/env/prism-challenge\.env|prism-challenge\.env' . || true

Repository: BaseIntelligence/base

Length of output: 665


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'docker-compose.yml relevant sections:\n'
awk 'NR>=170 && NR<=230 {printf "%6d  %s\n", NR, $0}' docker-compose.yml

printf '\nOccurrences in docker-compose.yml:\n'
grep -nE 'PRISM_MAX_CONCURRENT_EVALS|deploy/env/prism-challenge\.env|env_file' docker-compose.yml || true

printf '\ndeploy/compose/env-prod.yml relevant sections:\n'
awk 'NR>=40 && NR<=65 {printf "%6d  %s\n", NR, $0}' deploy/compose/env-prod.yml

printf '\nOccurrences in deploy/compose/env-prod.yml:\n'
grep -nE 'PRISM_MAX_CONCURRENT_EVALS|deploy/env/prism-challenge\.env|env_file' deploy/compose/env-prod.yml || true

printf '\nprism-challenge env files:\n'
for f in deploy/env/prism-challenge.env.example deploy/env/prism-challenge.env deploy/compose/env-local.yml deploy/compose/env-staging.yml deploy/compose/role-master.yml deploy/compose/role-validator.yml; do
  if [ -f "$f" ]; then
    printf '\n=== %s ===\n' "$f"
    grep -n 'PRISM_MAX_CONCURRENT_EVALS' "$f" || true
  fi
done

printf '\nPRISM_MAX_CONCURRENT_EVALS all occurrences:\n'
grep -RIn 'PRISM_MAX_CONCURRENT_EVALS' . || true

Repository: BaseIntelligence/base

Length of output: 6519


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'docker-compose service list / includes / prism-challenge all occurrences:\n'
grep -nE '^[[:space:]]*(includes|services|prism-challenge|BASE_PRISM|max_concurrent|PRISM_MAX_CONCURRENT|PRISM_MAX)' docker-compose.yml || true

printf '\ndeploy/compose files top-level composition references:\n'
for f in deploy/compose/*.yml; do
  [ -f "$f" ] || continue
  printf '\n=== %s ===\n' "$f"
  grep -nE '^[[:space:]]*(includes|extends|services|prism-challenge|max_concurrent|PRISM_MAX_CONCURRENT)' "$f" || true
done

Repository: BaseIntelligence/base

Length of output: 786


Remove the duplicate PRISM_MAX_CONCURRENT_EVALS entries.

docker-compose.yml and deploy/compose/env-prod.yml both define PRISM_MAX_CONCURRENT_EVALS in environment, and Compose resolves in-file environment after env_file, so these values override operator settings from deploy/env/prism-challenge.env. Keep the CLI default plus deploy/env/prism-challenge.env as the documented dial-down path, and remove the duplicate service-level entry.

📍 Affects 2 files
  • docker-compose.yml#L208-L208 (this comment)
  • deploy/compose/env-prod.yml#L52-L53
🤖 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 `@docker-compose.yml` at line 208, Remove the duplicate
PRISM_MAX_CONCURRENT_EVALS service-level entries from docker-compose.yml
(208-208) and deploy/compose/env-prod.yml (52-53). Preserve the CLI default and
deploy/env/prism-challenge.env as the supported configuration sources so
operator overrides are not overwritten.

Source: Coding guidelines

Comment thread docs/PRISM.md
Comment on lines +44 to +48
Queued --> Rejected: pre-pod screens (copy gate / static cheat / similarity)
Queued --> Provisioning: worker claims + pre-pod screens pass
Provisioning --> Running: pod SSH + harness up
Running --> Reviewing: METRICS_JSON collected
Reviewing --> AgenticReview: arch-only similarity + quality
Reviewing --> AgenticReview: quality + post-pod agentic

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 | 🟡 Minor | ⚡ Quick win

Align the opening workflow description with the state machine.

The opening overview still says that LLM review occurs before similarity and enforces telemetry hooks. The changed state machine now runs static telemetry and similarity screens before pod provisioning.

Update the overview so the normative document has one screening order.

As per coding guidelines, treat normative documentation as the source of truth for contracts and operations.

🤖 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/PRISM.md` around lines 44 - 48, Update the opening workflow overview in
PRISM.md to match the state machine: run the copy gate, static telemetry/cheat
screen, and similarity screen before pod provisioning, then perform the
LLM/agentic review after post-pod metrics and quality checks. Remove or revise
any wording that places LLM review before similarity or requires telemetry hooks
at that earlier stage.

Source: Coding guidelines

@echobt
echobt merged commit 175750d into main Aug 8, 2026
3 checks passed
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