fix(justfile): supply MOKOSH_OIDC_CLIENT_ID placeholder in down teardown (MAPPS-159) #146

Merged
David merged 2 commits from fix/MAPPS-159-down-oidc-client-id-placeholder into main 2026-06-16 12:02:52 +02:00
Owner

Problem

The down recipe runs docker compose --file compose.yml --file compose.dev-sso.yml down --remove-orphans inside a defensive with-env { HOST_IP, USER } block so teardown interpolates even without a populated .env. But the merged config declares three ${VAR:?} required vars: HOST_IP, USER, and MOKOSH_OIDC_CLIENT_ID. The block covered the first two but not the third. mokosh-apps has no ensure-env recipe and does not auto-generate .env; MOKOSH_OIDC_CLIENT_ID is pasted in manually after just register-client. So on a fresh clone (or before client registration) just down / just restart aborted with required variable MOKOSH_OIDC_CLIENT_ID is missing a value.

Fix

Add a harmless placeholder for MOKOSH_OIDC_CLIENT_ID to the down recipe's with-env, matching how HOST_IP is already handled. Teardown only identifies and removes resources, so the placeholder value is irrelevant. restart inherits the fix via its down dependency.

Verification

just --justfile justfile --list parses. Audited the full :? set in the merged compose.yml + compose.dev-sso.yml: the only required vars are HOST_IP, USER, MOKOSH_OIDC_CLIENT_ID, all now provided by the defensive block.

Part of a cross-repo sweep of the same family of defect originating in the cleanup.just governance template (GOV-9). Siblings: PMS-307 (mokosh-server, PR #238), PB-4 (backup, PR #19), ROCI-7 (roci, PR #16).

🤖 Generated with Claude Code

## Problem The `down` recipe runs `docker compose --file compose.yml --file compose.dev-sso.yml down --remove-orphans` inside a defensive `with-env { HOST_IP, USER }` block so teardown interpolates even without a populated `.env`. But the merged config declares three `${VAR:?}` required vars: `HOST_IP`, `USER`, and `MOKOSH_OIDC_CLIENT_ID`. The block covered the first two but not the third. mokosh-apps has no `ensure-env` recipe and does not auto-generate `.env`; `MOKOSH_OIDC_CLIENT_ID` is pasted in manually after `just register-client`. So on a fresh clone (or before client registration) `just down` / `just restart` aborted with `required variable MOKOSH_OIDC_CLIENT_ID is missing a value`. ## Fix Add a harmless placeholder for `MOKOSH_OIDC_CLIENT_ID` to the `down` recipe's `with-env`, matching how `HOST_IP` is already handled. Teardown only identifies and removes resources, so the placeholder value is irrelevant. `restart` inherits the fix via its `down` dependency. ## Verification `just --justfile justfile --list` parses. Audited the full `:?` set in the merged `compose.yml` + `compose.dev-sso.yml`: the only required vars are `HOST_IP`, `USER`, `MOKOSH_OIDC_CLIENT_ID`, all now provided by the defensive block. Part of a cross-repo sweep of the same family of defect originating in the `cleanup.just` governance template (GOV-9). Siblings: PMS-307 (mokosh-server, PR #238), PB-4 (backup, PR #19), ROCI-7 (roci, PR #16). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(justfile): supply MOKOSH_OIDC_CLIENT_ID placeholder in down teardown
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 51s
77b319fc4b
The down recipe set HOST_IP and USER defensively in its with-env so teardown interpolates even without a populated .env, but the merged compose.yml + compose.dev-sso.yml also declares `${MOKOSH_OIDC_CLIENT_ID:?}` as required. Since mokosh-apps has no ensure-env / .env autogen and that var is pasted in manually after `just register-client`, `just down` (and `just restart`) aborted with "required variable MOKOSH_OIDC_CLIENT_ID is missing a value" on a fresh clone or before client registration, defeating the recipe's own defensive intent.

Add a harmless placeholder for MOKOSH_OIDC_CLIENT_ID alongside HOST_IP and USER. Teardown only identifies and removes resources, so the value is irrelevant. restart inherits the fix via its down dependency.

#MAPPS-159

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merge branch 'main' into fix/MAPPS-159-down-oidc-client-id-placeholder
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 1m2s
9a4140bef7
David merged commit e05dc51af6 into main 2026-06-16 12:02:52 +02:00
David deleted branch fix/MAPPS-159-down-oidc-client-id-placeholder 2026-06-16 12:02:53 +02:00
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-apps!146
No description provided.