Skip to content

desk hub admin test: root add's flake was a device id starting with '-' - #417

Merged
SSFSKIM merged 1 commit into
masterfrom
root-add-flake
Oct 31, 2026
Merged

SSFSKIM merged 1 commit into
masterfrom
root-add-flake

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 31, 2026

Copy link
Copy Markdown
Owner

The flake, named

The root add cases in apps/desk-hub/test/deploy/admin.test.ts failed together in four CI runs (41234184004, 41132779213, 40881002422, 40847569515). The throw behind exit 2 was Node's parseArgs:

admin: Unknown option '-e'. To specify a positional argument starting with a '-', place it at the end of the command after '--', as in '-- "-e"

The describe's app device id is keyId(channel.pub), base64url of a SHA-256 prefix, so its first character is uniform over 64 symbols and one id in 64 starts with -. The test passed that id bare (root add <id>, remove-device <id>), admin.ts's strict parseArgs read it as an option, and runAdmin returned 2. The four cases after it need the root that add would have made, so they failed with it. Load had nothing to do with it:

  • The file only ever runs in shard unit 2/4, which is why every failure was there.
  • The workerd the stream ended lines in two of the runs come from log.test.ts, session-plane.test.ts and reconnect.test.ts in the same shard. Those tests end streams on purpose.

This is a test bug, not a product bug. deploy/README.md documents the verbs as root add -- <id> and remove-device -- <id>. The app's Settings copy prints deployment admin root add -- <id>. The file's own case "takes a device id that starts with '-' after --" pins exit 2 for the bare form. The production acceptance's device ids carry a fixed o10-p- prefix.

The change

  • The app's device id goes after -- in the four calls that pass it (the declined add, the add, the already-a-root refusal, the removal), as the README writes the verbs.
  • Every runAdmin status in the root add describe is asserted with the run's stderr as its vitest message, so any status that isn't the expected one names its error.

Evidence

  • Forced id starting with -, unfixed: 4 of 4 runs fail with the CI signature exactly. The same five cases fail with the same assertion texts (expected 2 to be 1, expected 2 to be +0, [ Array(1) ] vs [ …(2) ], not-root-signed, one root key where two were expected), and the first one now prints the Unknown option line above.
  • Forced id starting with -, fixed: 3 of 3 runs pass.
  • Natural ids under load, unfixed (4 parallel runs of the describe beside 2 busy loops): 84 runs completed before the architect's quiet window stopped the loop. 1 failed, and its id was -rW6IRrpE2CgTYd87xR_AQ. The 83 runs with other ids all passed.
  • Gate: class 1a on the pool, run 41237427742, green. admin.test.ts passed 41/41 in unit 2/4, and the run's tree is this head's tree.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)

…vice id (a random key id, one in 64 starting with '-') goes after `--` as README.md writes the verbs, where it went bare and parseArgs took it for an unknown option (exit 2, then the four cases after it); each status in the describe asserted with the run's stderr as its message

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@SSFSKIM
SSFSKIM merged commit 7329ad6 into master Oct 31, 2026
SSFSKIM added a commit that referenced this pull request Oct 31, 2026
…id starting with '-' (PR #417, master 7329ad6); its tracker row closed

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@SSFSKIM
SSFSKIM deleted the root-add-flake branch November 8, 2026 19:51
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