feat(cli): fold bootstrap-infisical/clients/qa subcommands into mokosh-server (PMS-494) #369

Merged
Claude-Run merged 1 commit from feat/PMS-494-fold-bootstrap-subcommands-into-server into main 2026-06-26 09:30:04 +02:00
Member

Re-home the three operator features that previously lived only in the
mokosh-bootstrap binary so they survive that binary's removal (PMS-493):
bootstrap-infisical (first-run Infisical setup), clients register (OAuth/OIDC
client registration), and qa-seed / qa-teardown (QA walkthrough dataset, PMS-331).

Decision: fold all three into the mokosh-server binary as subcommands. None are
obsolete - each is still wired to a just recipe or used as QA tooling - so dropping
was not an option, and a separate binary would just recreate what PMS-493 removes.

The logic moves into a new library module (src/cli.rs); main.rs inspects argv before
starting the HTTP server and runs the one-shot task instead when the first token is
bootstrap-infisical, clients, qa-seed, or qa-teardown. Each feature keeps its original
env-var contract and fail-closed guards verbatim: qa-* still refuse any tenant not marked
is_qa, the public/confidential client-type and auth-method validation is unchanged, and
the CLI path loads .env.infisical then .env so credentials never hit the command line.

provision-roles is intentionally untouched - it relocates into server startup under PMS-489.

The register-client, register-bunyip-client, register-lets-chat-client and
infisical-bootstrap recipes now invoke cargo run --bin mokosh-server instead of
--bin mokosh-bootstrap.

#PMS-494

Re-home the three operator features that previously lived only in the mokosh-bootstrap binary so they survive that binary's removal (PMS-493): bootstrap-infisical (first-run Infisical setup), clients register (OAuth/OIDC client registration), and qa-seed / qa-teardown (QA walkthrough dataset, PMS-331). Decision: fold all three into the mokosh-server binary as subcommands. None are obsolete - each is still wired to a just recipe or used as QA tooling - so dropping was not an option, and a separate binary would just recreate what PMS-493 removes. The logic moves into a new library module (src/cli.rs); main.rs inspects argv before starting the HTTP server and runs the one-shot task instead when the first token is bootstrap-infisical, clients, qa-seed, or qa-teardown. Each feature keeps its original env-var contract and fail-closed guards verbatim: qa-* still refuse any tenant not marked is_qa, the public/confidential client-type and auth-method validation is unchanged, and the CLI path loads .env.infisical then .env so credentials never hit the command line. provision-roles is intentionally untouched - it relocates into server startup under PMS-489. The register-client, register-bunyip-client, register-lets-chat-client and infisical-bootstrap recipes now invoke cargo run --bin mokosh-server instead of --bin mokosh-bootstrap. #PMS-494
feat(cli): fold bootstrap-infisical/clients/qa subcommands into mokosh-server (PMS-494)
All checks were successful
E2E / Playwright against staging (pull_request) Successful in 25s
Check / fmt + clippy + build + tests (pull_request) Successful in 1m21s
Integration / integration tests (pull_request) Successful in 6m58s
Create release / Create release from merged PR (pull_request) Successful in 1s
bf8a0d6b21
Re-home the three operator features that previously lived only in the
mokosh-bootstrap binary so they survive that binary's removal (PMS-493):
bootstrap-infisical (first-run Infisical setup), clients register (OAuth/OIDC
client registration), and qa-seed / qa-teardown (QA walkthrough dataset, PMS-331).

Decision: fold all three into the mokosh-server binary as subcommands. None are
obsolete - each is still wired to a just recipe or used as QA tooling - so dropping
was not an option, and a separate binary would just recreate what PMS-493 removes.

The logic moves into a new library module (src/cli.rs); main.rs inspects argv before
starting the HTTP server and runs the one-shot task instead when the first token is
bootstrap-infisical, clients, qa-seed, or qa-teardown. Each feature keeps its original
env-var contract and fail-closed guards verbatim: qa-* still refuse any tenant not marked
is_qa, the public/confidential client-type and auth-method validation is unchanged, and
the CLI path loads .env.infisical then .env so credentials never hit the command line.

provision-roles is intentionally untouched - it relocates into server startup under PMS-489.

The register-client, register-bunyip-client, register-lets-chat-client and
infisical-bootstrap recipes now invoke cargo run --bin mokosh-server instead of
--bin mokosh-bootstrap.

#PMS-494
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!369
No description provided.