Skip to content

fix: preserve invalid configuration during automatic updates - #151

Merged
roodboi merged 1 commit into
nextfrom
fix/config-write-safety-next
Oct 7, 2026
Merged

roodboi merged 1 commit into
nextfrom
fix/config-write-safety-next

Conversation

@roodboi

@roodboi roodboi commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Automatic config updates could replace malformed JSON or non-object values with a new object, losing the existing settings. Updates now reject those files before writing and report the affected path with repair guidance, without echoing config contents. Read failures also refuse the update; only a genuinely missing file initializes a new config. Valid updates continue to preserve unrelated fields.

This is the bounded config-write safety prerequisite for the native configuration work. It does not add schema-version handling, change config formats, or migrate runtime state. Existing read-only fallback behavior is unchanged.

Validation: Bun 1.4.2; 37 focused config/env tests passed, including all three writer entry points, an unreadable-but-writable file, and a real CLI refusal. Full typecheck and check passed (CLI tasks executed; unchanged DB tasks reused cache). The compiled current-branch CLI independently rejected malformed config, preserved its bytes, and omitted its contents from diagnostics. Full test gate passed: CLI 2,091 passed, 68 skipped, 0 failed; unchanged DB test task reused cache (2 passed). Skips are the existing optional integration prerequisites and do not qualify native runtime behavior.

Release intent: patch correction to automatic settings persistence; no migration required.

Refs https://linear.app/hackdance/issue/HACK-1218


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@linear-code

linear-code Bot commented Oct 7, 2026

Copy link
Copy Markdown

HACK-1218

@roodboi
roodboi merged commit 0f10a68 into next Oct 7, 2026
9 checks passed
@roodboi
roodboi deleted the fix/config-write-safety-next branch October 7, 2026 01:19
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