Skip to content

Stage selection: fail closed without explicit dev; fix cpu alias and remote spellings - #326

Merged
SamGu-NRX merged 1 commit into
obv/burst14-bs-stage-selectionfrom
gpt-burst/1022z-bs-297-stage-guard
Oct 22, 2026
Merged

SamGu-NRX merged 1 commit into
obv/burst14-bs-stage-selectionfrom
gpt-burst/1022z-bs-297-stage-guard

Conversation

@SamGu-NRX

Copy link
Copy Markdown
Owner

Zephyrus task Z3. Fixes the open review threads on #297: the dev guard, remote truth spellings, the cpu alias and marker-delivery coverage.

Dev guard (P1). stage_selection.py treated a missing or blank SMP_ENVIRONMENT as dev. Settings reads those same values as prod, so an unconfigured production process could still mix real and stand-in stages. Now only an exact dev passes, matching Settings.unknown_environment_is_prod (backend/server/orchestrator/stage_selection.py:88-97).

Remote truth (P2). The refusal compared HSS_ORCH_MODAL_REMOTE to "1" only, while load_orch also accepts true, yes and on in any case. The refusal now uses the same _flag parser from server/orchestrator/config.py (stage_selection.py:80-87).

cpu alias (P1, two threads). dense is out of the alias: on packets with no LiDAR and no injected points it falls back to π³/MoGe/DA3 weights on CUDA (server/dense/run.py _acquire_cloud). It can still be listed by name. The alias is also refused while VISION_EXTERNAL_CALLS is true, because then reads and criteria call a paid vision model (stage_selection.py:105-113). Listing reads by name with vision on is still allowed.

Marker delivery (P2). The journey test used to filter run.artifacts after the run. It now wraps the result stub and records which impl/*.json files reach the result stage's work dir: all 11 upstream markers, and not impl/result.json. This tightens a test and fixes no bug, so it passes on the parent as well.

Docs updated: backend/docs/real-cpu-stages.md and the alias and guard lines in PR.md.

Tests. backend/server/orchestrator/tests/test_stage_selection.py, run with cd backend && OMP_NUM_THREADS=1 uv run pytest -q server/orchestrator/tests/test_stage_selection.py:

  • New tests against the parent's stage_selection.py: 19 failed, 24 passed. The failures cover unset, blank and miscased SMP_ENVIRONMENT; runner import without dev; true, yes and on remote spellings; dense in the alias; and the alias with vision on. A few parametrized cases (remote 1, Dev) fail only because the new messages quote the raw value.
  • After the fix: 43 passed.

Full suite. cd backend && uv sync --locked && OMP_NUM_THREADS=1 uv run pytest -q. pytest-xdist isn't installed, so I dropped -n 2.

  • Parent 098d8fdf: 5 failed, 1522 passed, 16 skipped, 14 errors (47 min on a loaded machine).
  • This branch: 4 failed, 1552 passed, 16 skipped, 14 errors.
  • Both runs show the same 4 server/eval/tests/test_gates.py failures and 14 tests/test_capture_cold_restart.py errors that [obvious-fleet] Backend: per-stage real selection with implementation markers #297 documents as the base baseline. The parent's fifth failure, server/packet/tests/test_round2.py::test_many_missing_files_stay_linear, is a timing test. It failed with load average near 40 and passed on this branch.

uv run ruff check . passes. uv run ruff format --check . flags only server/orchestrator/tests/test_greptile_followup.py, which is already on #297 and which this PR does not touch.

Left open. An explicit dense listing gets no refusal, and it fails at run time with input_missing:weights when it lacks weights.

🤖 Generated with Claude Code

HSS_ORCH_REAL_STAGES treated a missing or blank SMP_ENVIRONMENT as dev,
while Settings reads the same values as prod. An unconfigured production
process could therefore mix real and stand-in stages. Only an exact "dev"
now passes, matching Settings.

The remote refusal compared HSS_ORCH_MODAL_REMOTE to "1" only; load_orch
also accepts true/yes/on in any case. It now uses the same _flag parser.

The cpu alias no longer includes dense, which falls back to model weights
on photo-only packets, and is refused while VISION_EXTERNAL_CALLS is on,
since reads and criteria would then make paid calls.

The journey test now checks the markers the result stage receives in its
work dir, rather than filtering run.artifacts after the run.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cecc439e-b9a3-491f-bae1-38dba1860b66

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions github-actions Bot added the size:L 100-499 effective changed lines. label Oct 22, 2026
@SamGu-NRX

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T19:18:45.976903Z d915427 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: d9154276d7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@SamGu-NRX
SamGu-NRX marked this pull request as ready for review October 22, 2026 19:16
@SamGu-NRX
SamGu-NRX merged commit 5546656 into obv/burst14-bs-stage-selection Oct 22, 2026
5 checks passed
@codemetrics-ai

Copy link
Copy Markdown

Note

Review skipped

Codemetrics is installed on this repository, but it hasn't been added to your team yet.

To enable AI code reviews for this repo, go to your dashboard and add BaseScanning to your team's repositories.

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

Labels

size:L 100-499 effective changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant