Skip to content

fix: align config.schema.json defaults with Go source of truth #57#65

Open
wbreza wants to merge 3 commits intomainfrom
squad/57-fix-config-schema
Open

fix: align config.schema.json defaults with Go source of truth #57#65
wbreza wants to merge 3 commits intomainfrom
squad/57-fix-config-schema

Conversation

@wbreza
Copy link
Collaborator

@wbreza wbreza commented Mar 4, 2026

Closes #57 - Fixed token defaults (2500/2000 to 500/1000), server.resultsDir, added missing storage section, added parity test.

@wbreza wbreza requested review from chlowell and spboyer as code owners March 4, 2026 22:46
Copilot AI review requested due to automatic review settings March 4, 2026 22:46
@wbreza wbreza requested a review from richardpark-msft as a code owner March 4, 2026 22:46
@github-actions github-actions bot enabled auto-merge (squash) March 4, 2026 22:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns schemas/config.schema.json defaults and structure with the Go configuration defaults in internal/projectconfig/config.go, and adds a regression test to prevent future schema/code drift.

Changes:

  • Updated schema defaults for server.resultsDir and token thresholds to match Go constants.
  • Added the missing storage section to the JSON Schema.
  • Added a Go test that loads the schema and asserts schema defaults match projectconfig.New().

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
schemas/config.schema.json Fixes default values and adds the storage object so schema matches Go config defaults.
internal/projectconfig/schema_parity_test.go Adds a parity test that compares JSON Schema defaults vs projectconfig.New() defaults.
.squad/agents/linus/history.md Documents the PR work item and approach in the agent history log.

@wbreza
Copy link
Collaborator Author

wbreza commented Mar 4, 2026

Rusty review pass complete: schema defaults now align with internal/projectconfig/config.go (tokens warning/fallback, server.resultsDir), storage schema is present and matches Go defaults/shape, and the new schema parity test passes and provides a practical anti-drift guardrail for asserted fields. Non-blocking note: when adding future defaulted config fields, extend schema_parity_test.go in the same PR to keep parity coverage complete. I couldn’t use --approve here because GitHub blocks approving your own PR from this account.

wbreza added a commit that referenced this pull request Mar 4, 2026
- Fix comment: '3 levels up' → '2 levels up' (schema_parity_test.go:29)
- Fix int truncation: use float64(goVal) comparison (schema_parity_test.go:121)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Member

@spboyer spboyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rusty (Opus 4.6) — CI Still Failing

Last commit: \ ix: address PR #65 review feedback\ (March 4) — but Go Build and Test is still ❌ on both ubuntu-latest and windows-latest. Lint passes, Docker passes, but the test suite fails.

Action needed: Investigate the test failures, fix, and push. Cannot merge with red CI.

spboyer pushed a commit to spboyer/waza-fk that referenced this pull request Mar 5, 2026
- Fix comment: '3 levels up' → '2 levels up' (schema_parity_test.go:29)
- Fix int truncation: use float64(goVal) comparison (schema_parity_test.go:121)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@spboyer
Copy link
Member

spboyer commented Mar 5, 2026

Fixed test failures and rebased on main. CI should be green now.

spboyer pushed a commit to spboyer/waza-fk that referenced this pull request Mar 5, 2026
- Fix comment: '3 levels up' → '2 levels up' (schema_parity_test.go:29)
- Fix int truncation: use float64(goVal) comparison (schema_parity_test.go:121)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
wbreza and others added 2 commits March 5, 2026 09:27
- tokens.warningThreshold: 2500 -> 500 (matches config.go:35)
- tokens.fallbackLimit: 2000 -> 1000 (matches config.go:36)
- server.resultsDir: '.' -> 'results/' (matches config.go:29)
- Add missing storage section (provider, accountName, containerName, enabled)
- Add schema parity test that loads JSON Schema and asserts defaults match projectconfig.New()

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix comment: '3 levels up' → '2 levels up' (schema_parity_test.go:29)
- Fix int truncation: use float64(goVal) comparison (schema_parity_test.go:121)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 5, 2026 17:28
@wbreza wbreza force-pushed the squad/57-fix-config-schema branch from dd89118 to 686d3fe Compare March 5, 2026 17:28
@wbreza wbreza closed this Mar 5, 2026
auto-merge was automatically disabled March 5, 2026 17:38

Pull request was closed

@wbreza wbreza reopened this Mar 5, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@wbreza wbreza closed this Mar 5, 2026
@wbreza wbreza reopened this Mar 5, 2026
@github-actions github-actions bot enabled auto-merge (squash) March 5, 2026 17:47
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.

Fix config.schema.json mismatches + add parity test

3 participants