Skip to content

feat(registry): thread validated --stage into the snapshot CLI (L4469)#233

Merged
cipher813 merged 2 commits into
mainfrom
feat/registry-stage-cli
Jun 2, 2026
Merged

feat(registry): thread validated --stage into the snapshot CLI (L4469)#233
cipher813 merged 2 commits into
mainfrom
feat/registry-stage-cli

Conversation

@cipher813
Copy link
Copy Markdown
Owner

What

Completes the model-registry manual-ops surface for the champion/challenger arc. The CLI exposed --stage only as a --list filter; the snapshot path always recorded stage=None, so a manually-backfilled model was invisible to the Phase-1 shadow runner (inference/stages/shadow_versions.py enumerates stage="challenger").

Now --stage:

  • carries argparse choices=VALID_STAGES validation (champion/challenger/archived), and
  • threads into snapshot_to_registry(..., stage=...) on the snapshot path.

snapshot_to_registry already accepted the stage kwarg and is tested — this just wires the operator CLI to it. Promotion still goes through --promote (copies the bundle + demotes the prior champion); --stage champion on a fresh snapshot is intentionally only a recorded label, not a promotion.

Why now (context discovered this session)

While verifying #3 ("build the shadow runner"), I found the shadow runner is already shipped (#228, merged 6/2) and enabled-by-default (SHADOW_VERSIONS_ENABLED=True, staged in the inference pipeline). The real gap is that the registry has only the 8-model champion — the 6/2 off-cycle retrain archived to weights/meta/archive/2026-06-02/ but its archive is an incomplete contract (no manifest.json / feature_list.json), so it is not registrable (the registry refuses incomplete contracts by design). The first registrable challenger is the 6/6 Saturday retrain (with the #227 capture-gap now on main, it auto-registers). This --stage flag is what lets an operator manually register a challenger from the CLI when the auto-capture is ever missed — the documented CF2 mitigation. (The ROADMAP CF2 line that says "the 6/2 retrain registers the first challenger" is now stale — correction filed in the alpha-engine-config docs PR.)

Tests

  • CLI threads --stage challenger into the snapshot call; argparse rejects an invalid stage.
  • test_registry_snapshot.py: 12 passed.

No S3 schema/path change; additive operator surface.

🤖 Generated with Claude Code

cipher813 and others added 2 commits June 2, 2026 14:29
The CLI exposed --stage only as a --list FILTER; the snapshot path always
recorded stage=None, so a manually-backfilled model was invisible to the
Phase-1 shadow runner (which enumerates stage="challenger"). The
challenger-first mitigation in ROADMAP CF2 — `python -m model.registry
... --stage challenger` to register a model the Saturday auto-capture
missed — therefore could not actually register a shadow-runnable
challenger from the CLI.

Now --stage (a) carries argparse choices=VALID_STAGES validation and
(b) threads into snapshot_to_registry on the snapshot path. Promotion
still goes through --promote (copies the bundle + demotes the prior
champion); --stage champion on a fresh snapshot is intentionally just a
recorded label, not a promotion. snapshot_to_registry already accepted
the stage kwarg + is tested; this wires the operator surface to it.

Tests: CLI threads --stage challenger into the snapshot call; argparse
rejects an invalid stage. Suite green (test_registry_snapshot 12 passed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cipher813 cipher813 merged commit c3978d6 into main Jun 2, 2026
1 check passed
@cipher813 cipher813 deleted the feat/registry-stage-cli branch June 2, 2026 21:40
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