Add a command to clear the selected runtime config source #1464

Closed
opened 2026-07-15 16:16:46 +00:00 by coilyco-ops · 2 comments
Member

Problem

Ward can select runtime config through WARD_CONFIG_REF, and newer setup flows make local config paths easier to create and point at. There is no first-class way to drop that selected config and intentionally return to the baked/default config source. Operators currently have to remember where the value came from and edit shell, env, or local config state by hand.

Need

Add a guarded command that clears the selected runtime config source and reports what changed. The command should make it obvious whether ward will now use the baked/default bundle, a local file, or an inherited environment value.

Acceptance

  • Ward exposes a command such as ward config drop, ward config unset, or equivalent.
  • The command clears any ward-owned local config source state without deleting unrelated operator preferences.
  • The command refuses to pretend success when WARD_CONFIG_REF is still set by the current process environment.
  • The command prints the resulting config-source summary.
  • Tests cover the local-file case, the env-var-still-set case, and the already-default case.

Context

This came up while rolling back from a bad release artifact and trying to validate a known-good ward build against a real downstream config bundle. A safe drop/reset path would make config-source experiments reversible without hand-editing host state.

## Problem Ward can select runtime config through `WARD_CONFIG_REF`, and newer setup flows make local config paths easier to create and point at. There is no first-class way to drop that selected config and intentionally return to the baked/default config source. Operators currently have to remember where the value came from and edit shell, env, or local config state by hand. ## Need Add a guarded command that clears the selected runtime config source and reports what changed. The command should make it obvious whether ward will now use the baked/default bundle, a local file, or an inherited environment value. ## Acceptance - Ward exposes a command such as `ward config drop`, `ward config unset`, or equivalent. - The command clears any ward-owned local config source state without deleting unrelated operator preferences. - The command refuses to pretend success when `WARD_CONFIG_REF` is still set by the current process environment. - The command prints the resulting config-source summary. - Tests cover the local-file case, the env-var-still-set case, and the already-default case. ## Context This came up while rolling back from a bad release artifact and trying to validate a known-good ward build against a real downstream config bundle. A safe drop/reset path would make config-source experiments reversible without hand-editing host state.
Author
Member

WARD-WORKFLOW: done

details

review: skipped - the in-container review gate was intentionally skipped because the temporary ward default is pending brokered QA.

workflow: merge-remote-main; review summary: skipped - in-container review gate intentionally skipped because the temporary ward default is pending brokered QA.

implemented ward config drop with unset/reset aliases. It clears top-level config-ref from ~/.ward/config.yaml through a YAML node edit that preserves other local preferences, reports the resulting source, and exits non-zero when WARD_CONFIG_REF is still inherited. Added coverage for local-file, env-still-set, already-default, and root command exposure.

felt: straightforward once the old config-ref history was recovered; the main subtlety was preserving unrelated YAML and being honest about env precedence.

confidence: high on the command behavior. Focused tests, vet, lint, and commit hooks passed.

surprises: full ward exec test is blocked in this container by TestBuildUpPlanTailnet expecting Linux host-net while the environment resolves the sidecar path. Post-push Forgejo promote run 2490 for a26c8839 also reported failure after 1m44s.

follow-ups: inspect the promote run log and the host-net/sidecar expectation outside this issue.

WARD-WORKFLOW: done ✅ <details><summary>details</summary> review: skipped - the in-container review gate was intentionally skipped because the temporary ward default is pending brokered QA. workflow: merge-remote-main; review summary: skipped - in-container review gate intentionally skipped because the temporary ward default is pending brokered QA. implemented `ward config drop` with `unset`/`reset` aliases. It clears top-level `config-ref` from `~/.ward/config.yaml` through a YAML node edit that preserves other local preferences, reports the resulting source, and exits non-zero when `WARD_CONFIG_REF` is still inherited. Added coverage for local-file, env-still-set, already-default, and root command exposure. felt: straightforward once the old `config-ref` history was recovered; the main subtlety was preserving unrelated YAML and being honest about env precedence. confidence: high on the command behavior. Focused tests, vet, lint, and commit hooks passed. surprises: full `ward exec test` is blocked in this container by `TestBuildUpPlanTailnet` expecting Linux host-net while the environment resolves the sidecar path. Post-push Forgejo promote run 2490 for `a26c8839` also reported failure after 1m44s. follow-ups: inspect the promote run log and the host-net/sidecar expectation outside this issue. </details>
Author
Member

WARD-WORKFLOW: reservation-released

release details

Run finished with WARD-WORKFLOW: done ✅.

ward container reap released container engineer-codex-ward-1464 (--harness codex): the terminal outcome supersedes the reservation, so a later redispatch no longer needs --override-reservation.

— Codex, via ward agent

<!-- ward-agent-reservation-released --> WARD-WORKFLOW: reservation-released <details><summary>release details</summary> Run finished with `WARD-WORKFLOW: done ✅`. `ward container reap` released container `engineer-codex-ward-1464` (`--harness codex`): the terminal outcome supersedes the reservation, so a later redispatch no longer needs `--override-reservation`. </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
Sign in to join this conversation.
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
coilyco-flight-deck/ward#1464
No description provided.