fix(register): st_register honors configured faction, not hardcoded COSMIC (v2.9.4)#58
Merged
Merged
Conversation
…oded COSMIC (v2.9.4) Closes #57. st_register defaulted faction to the literal "COSMIC". At the 2026-07-12 wipe, the agent auto-re-registered (the 4113 error prompts "re-register", no faction passed) and minted a COSMIC agent — clobbering _recover's configured-DOMINION registration (recover_from_reset correctly uses faction()). Whichever token saved last won, so the operator's pre-wipe DOMINION switch was defeated regardless of the race; we landed in the crowded default faction (which saturated within ~35 min). Fix: st_register's faction defaults to the CONFIGURED faction() (then COSMIC as the ultimate fallback for brand-new users), so EVERY registration path — agent tool call and supervisor recovery alike — honors the operator's Starting Faction, and the race becomes harmless (both paths register the same faction). 3 tests (test_register_faction.py): omitted faction → configured (DOMINION); explicit faction still overrides; unconfigured → COSMIC fallback preserved. Full suite 342 green. Follow-up (noted in #57): the double-register still mints a suffixed call sign (PROTOTRADER-98) because both paths register — cosmetic now that faction is correct; an idempotency guard (skip re-register when the current token is already valid) would also keep the clean call sign. Separate: v2.9.x call-sign-persist. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow. |
There was a problem hiding this comment.
QA Audit — PR #58 | fix(register): st_register honors configured faction, not hardcoded COSMIC (v2.9.4)
VERDICT: PASS
CI Status
- test: in_progress ⏳
Diff Review
tools.py:st_registerfaction default changed from"COSMIC"→"", resolved via_config_faction()with COSMIC ultimate fallback — correct logictest_register_faction.py: 3 tests cover all paths (configured → DOMINION, explicit override, unconfigured → COSMIC)protoagent.plugin.yaml: version bump 2.9.3 → 2.9.4
Observations
- LOW: CI still settling — approve-on-green policy promotes this to APPROVED once terminal-green
— Quinn, QA Engineer
|
Submitted COMMENT review on #58. |
|
✅ CI went terminal-green with no blockers on the prior review — promoting it to APPROVED per the approve-on-green policy (#748). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #57.
The bug that lost the wipe
st_registerdefaultedfaction="COSMIC"(a literal). At the 2026-07-12 wipe we had pre-configured DOMINION to escape COSMIC's crowded home system. Recovery raced:_recover→recover_from_resetregistered PROTOTRADER@DOMINION correctly (it usesfaction()).st_register(the 4113 error message prompts "re-register", no faction passed) minted PROTOTRADER-98@COSMIC — the tool default — and its token overwrote the DOMINION one.The faction was doomed either way: the agent's path never honored the config. We landed in COSMIC, whose new system saturated within ~35 min — the exact dead-end the switch was meant to avoid.
Fix
st_register's faction now defaults to the configuredfaction()(then COSMIC as the ultimate fallback for brand-new users). Every registration path — agent tool call and supervisor recovery — honors the operator's Starting Faction, so the race is harmless (both register the same faction).One line where it mattered:
Tests
test_register_faction.py(3): omitted faction → configured DOMINION; explicit faction overrides; unconfigured → COSMIC fallback preserved. Full suite 342 green, ruff clean.Follow-ups (in #57)
Cosmetic now that faction is correct: the double-register still mints a suffixed call sign (both paths register) — an idempotency guard (skip re-register when the current token is already valid) would keep the clean call sign. Separately: call-sign-persist (
set_call_signis in-process only).🤖 Generated with Claude Code