Skip to content

fix(config): persist dev server configuration - #1029

Open
pcbeingused333 wants to merge 1 commit into
launchdarkly:mainfrom
pcbeingused333:fix/c3652-config-settings
Open

pcbeingused333 wants to merge 1 commit into
launchdarkly:mainfrom
pcbeingused333:fix/c3652-config-settings

Conversation

@pcbeingused333

@pcbeingused333 pcbeingused333 commented Nov 16, 2026 •

Copy link
Copy Markdown

The config --set command reports success for port, cors-enabled, cors-origin, and sync-once, but discards their values.
The configuration structure omits these fields, and its update method does not assign them.
This also removes manually saved values when another configuration field changes.

Add the missing fields and update cases. Use boolean pointers to preserve an explicit false, as the existing boolean fields do.
Keep the port as a string to match the dev server flag.
Reject invalid boolean values with the same errors as the existing boolean configuration fields.

Testing and validation

go test ./internal/config ./cmd/config

Regression tests cover both boolean values, YAML and JSON output, reloads, and updates to another configuration field.
They also cover invalid boolean values. The new tests fail before the fix.

This change was prepared with AI assistance.


Note

Overview
Fixes config --set so dev server options (port, cors-enabled, cors-origin, sync-once) are actually stored on Config and survive YAML/JSON marshal, reload, and updates to other keys—previously these keys validated as valid but had no struct fields or Update cases, so values were dropped.

Adds the four fields (booleans as *bool so explicit false is preserved; port as string) with the same boolean parsing and error messages as existing config flags. New tests cover round-trips for true/false, YAML and JSON output, reload, and invalid boolean rejection.

Reviewed by Cursor Bugbot for commit 46f04aa. Bugbot is set up for automated code reviews on this repo. Configure here.

@pcbeingused333
pcbeingused333 requested a review from a team as a code owner November 16, 2026 18:54
@pcbeingused333
pcbeingused333 requested review from tiffanylphan and removed request for a team November 16, 2026 18:54
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