Skip to content

feat(enroll): bootstrap token phase provisions the three broker token files (#12898) - #12970

Merged
dezren39 merged 1 commit into
mainfrom
lane-gp/12898-bootstrap-fleet-tokens
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
lane-gp/12898-bootstrap-fleet-tokens

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Summary

Closes the remaining slice of #12898: the bootstrap token phase now self-provisions the three shared broker token files on every seat.

  • scripts/muse/bootstrap.sh: new provision_broker_token step in the token phase fetches fleet.secrets-broker-token, fleet.queue-broker-token, fleet.laptop-agent-token from BWS by name (published from the laptop's server files 2026-11-22, per the route decision on enroll: no provisioning path for the three broker token files on non-muse seats (secrets/queue/shell legs) #12898) and writes them 0600 to ~/tools/{secrets-broker,queue-broker,laptop-agent}-token, whitespace-normalized to exactly one token line — the laptop files' byte shape. Values are never printed, logged or put in argv.
  • A BWS name the seat's token cannot see is a warning, not a failure: enrollment continues and the check phase names the legs that stay down. This keeps bootstrap green for a seat whose BWS access doesn't include the fleet project yet, while every seat that can see the names self-provisions.
  • Header doc for the token phase updated to match.

Evidence

  • New scripts/tests/test_muse_bootstrap_tokens.py runs the real script (--only token) in a throwaway HOME against a fake bws serving a fixture secret list: all three files provisioned byte-exact at 0600 (including a fixture value carrying a trailing newline), secret values absent from stdout/stderr, a missing name warns and continues with the other two provisioned, and a rerun is idempotent. 3 passed.
  • Existing test_fleet_bootstrap.py muse-bootstrap tests still pass; bash -n clean; bootstrap.sh --help exits 0.

Start Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

… files (#12898)

The token phase of scripts/muse/bootstrap.sh now fetches the shared
broker tokens from BWS by name — fleet.secrets-broker-token,
fleet.queue-broker-token, fleet.laptop-agent-token, published from the
laptop's server files on 2026-11-22 — and writes them 0600 to
~/tools/{secrets-broker,queue-broker,laptop-agent}-token. A fresh
non-muse seat previously had no provisioning path for these files at
all: its secrets/queue/shell legs stayed down until an operator copied
the files by hand. A BWS name the seat's token cannot see is a warning,
not a failure, so enrollment continues and the check phase names the
legs that stay down. Values are never printed.

Test: scripts/tests/test_muse_bootstrap_tokens.py runs the real script
(--only token) in a throwaway HOME against a fake bws — all three files
provisioned byte-exact at 0600, a missing name warns and continues, and
a rerun is idempotent. 3 passed.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c77c52eb-bbb4-449c-92e5-2952b593b0cf
Commits

Reviewing files that changed from the base of the PR and between d0dc4d7 and 446ea9a.

Files selected for processing: 2

  • scripts/muse/bootstrap.sh
  • scripts/tests/test_muse_bootstrap_tokens.py
  • 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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T06:08:10.168587Z 446ea9a PR opened
ℹ️ 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.

@dezren39
dezren39 merged commit 353f24a into main Nov 23, 2026
2 checks passed
@dezren39
dezren39 deleted the lane-gp/12898-bootstrap-fleet-tokens branch November 23, 2026 06:07
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