Fixes the regressions the 5-specialist + red-team + Claude/Codex adversarial
pass found in the F1–F21 changes, each with a test:
- Keyless upgrade hint pointed at `config set embedding_model`, which config.ts
hard-refuses as a schema-sizing no-op — now names the working re-init recipe
(`gbrain init --force --pglite --embedding-model <id>`), zero-key AND multi-key
paths.
- Multi-key TTY picker offered "continue keyless" but the caller aborted on it —
now honors keyless like the zero-key path.
- Detached update-refresh spawn used a `/gbrain$/` basename check that misfires
for a renamed/official-named compiled binary (`gbrain-darwin-arm64`) and
prepends the /$bunfs entrypoint — now detects dev-vs-compiled by the runtime
basename (bun|node) so the refresh always runs.
- `bootstrap status` reported the wire phase "done" on a hooks-only receipt
(host CLI missing at wire time) — now "partial" with a re-run hint, so a
resuming agent doesn't trust a false complete.
- Post-repair MCP mismatch re-verifies and aborts instead of blessing a
registration a racing writer may have re-claimed.
- probeOpenAICompat's abort timer now spans the body read (was cleared before
it), so a stalled `/v1/models` body can't hang init past the 1s cap.
- Centralized the 4-copy stale-cache upgrade predicate into
`pendingUpgradeVersion`; UPGRADE_AVAILABLE gains a GBRAIN_FORCE_UPGRADE_MARKER
override for PTY-based agent harnesses.
- Mode picker's expansion-key gate adds GEMINI_API_KEY; picker prompt is
article-aware ("an embedding" / "a chat"); dead `!brainEmpty` clause removed;
migrate.ts try/finally widened + stamp failures named in quiet mode.
- DX harness: credential copies scrubbed even on SIGINT/interrupt (+chmod 600),
child process TREE reaped on teardown, advisory made fail-open, KEY_MAP typed
as a literal union.
New tests: migrate quiet-replay, self-upgrade pending predicate + negative
cache cases, bootstrap 127/scoped-remove/broken-settings dispatch, interview
invalidation flag, verify tour-withheld-on-FAIL, init keyless/supabase/multi-key,
init-nudge branches, ai-probes model parsing. Regenerated flag registry +
template-repo.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>