Skip to content

fix(config): config unset --dry-run writes nothing, hides credentials - #3512

Merged
dan-petty merged 7 commits into
mainfrom
fix/3218-config-unset-dry-run
Nov 4, 2026
Merged

dan-petty merged 7 commits into
mainfrom
fix/3218-config-unset-dry-run

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

A dry run of devops config unset now writes nothing: no config change, no backup and no audit record. It prints the removal as a unified diff that shows each credential as ***REDACTED***, also a credential that a comment line holds. Before, --dry-run removed the key. The diff comes from the redacted text on both sides, so no credential leaves through it.

Closes #3218

Change: openspec/changes/archive/2026-11-04-3218-config-unset-with-dry-run-deletes/

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/config Settings, OS Keyring, environment variables, and defaults labels Nov 4, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Fail-to-pass proof: uv run devops ci fail-to-pass --base origin/main ran tests/commands/test_config.py and tests/config/test_config_key_removal.py. On base, 6 tests failed and 34 passed. On the branch, all 40 pass.

Failing on base:

  • test_config_unset_dry_run_prints_the_removal_and_writes_nothing
  • test_config_unset_dry_run_of_a_credential_prints_the_placeholder_not_the_value
  • test_a_dry_run_of_a_credential_removal_shows_the_placeholder_not_the_value
  • test_a_dry_run_of_a_block_scalar_credential_removal_hides_each_line_of_it
  • test_a_dry_run_of_a_section_removal_hides_each_credential_in_it
  • test_a_dry_run_hides_the_value_that_a_comment_line_also_holds

After the review: scoped run of tests/commands/test_config.py and tests/config passed (220 tests). openspec validate --specs passed (172 items).

Review fixes applied: public name write_history.redact_credentials, spec wording for the credential set, and the diff field text now says that line numbers count the redacted text.

@dan-petty
dan-petty marked this pull request as ready for review November 4, 2026 20:40
@dan-petty
dan-petty merged commit b3280ba into main Nov 4, 2026
19 checks passed
@dan-petty
dan-petty deleted the fix/3218-config-unset-dry-run branch November 4, 2026 20:59
dan-petty-release Bot added a commit that referenced this pull request Nov 4, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.56.0](v0.55.4...v0.56.0)
(2026-11-04)


### Features

* **k8s:** GPU thresholds set embedding-only and per-GPU tiers
([#3509](#3509))
([67d3f47](67d3f47)),
closes [#3501](#3501)


### Bug Fixes

* **ci:** refuse a replay that proves nothing about the fix
([#3514](#3514))
([719a697](719a697))
* **config:** config unset --dry-run writes nothing, hides credentials
([#3512](#3512))
([b3280ba](b3280ba))
* **roadmap:** a stop carries a typed class and the failed check
([#3513](#3513))
([3437b9e](3437b9e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/config Settings, OS Keyring, environment variables, and defaults type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(config): config unset with --dry-run deletes the key

1 participant