Skip to content

test(config): guard example field coverage - #36

Draft
adity982 wants to merge 1 commit into
streamcoreai:mainfrom
adity982:agent/check-config-example-drift
Draft

test(config): guard example field coverage#36
adity982 wants to merge 1 commit into
streamcoreai:mainfrom
adity982:agent/check-config-example-drift

Conversation

@adity982

Copy link
Copy Markdown

Closes #29

What changed

  • Reflect over Config and collect every full dotted TOML path.
  • Parse active and commented sections/keys from config.toml.example.
  • Fail with a sorted list of fields that are not documented by the example.

Scope correction

Current main already contains the commented [pgvector] block and its fields from 9c533b4c, so this PR deliberately does not duplicate Part 1. The remaining drift guard was confirmed with the maintainer in the issue thread.

Why

config.toml.example is the copyable configuration reference. This test makes a newly added config field fail loudly until the example documents it, while preserving the project's intentionally commented optional settings.

Validation

go test ./internal/config
PASS

go vet ./internal/config
PASS

git diff --check
PASS

The branch was rebased onto current upstream/main. The only conflict was the import block in internal/config/config_test.go; the resolution preserves both upstream's new unknown-key tests and this PR's example-drift test, and the focused checks above were rerun after resolution.

Signed-off-by: Aditya Datta <crazyme07071996@gmail.com>
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.

[pgvector] is missing from config.toml.example — document it and add a drift test

1 participant