feat: split site config core and custom #86

Merged
erik merged 1 commit from feat/task-86cba98c-site-config-core-custom into main 2026-06-02 12:29:00 -05:00
Owner

Summary\n- Change site config API responses to return data.core and data.custom.\n- Add SQLite persistence for JSON-compatible custom site config.\n- Update PATCH /site-config to accept core and/or custom updates while preserving core validation.\n- Update OpenAPI, docs, API tests, config tests, migration tests, and CLI handling for the new shape.\n\n## Verification\n- npm exec --workspace @slugkit/template-site -- vitest run --config ../../vitest.config.ts src/api/tests/site-config.test.ts src/config/tests/site-config.test.ts src/api/tests/routes.test.ts src/db/tests/migrations.test.ts\n- npm exec --workspace @slugkit/cli -- vitest run --config ../vitest.config.ts src/tests/commands.test.ts\n- npm run typecheck\n- npm test\n- npm run lint\n- ./scripts/pre-pr.sh\n\nTask: #task-86cba98c

## Summary\n- Change site config API responses to return data.core and data.custom.\n- Add SQLite persistence for JSON-compatible custom site config.\n- Update PATCH /site-config to accept core and/or custom updates while preserving core validation.\n- Update OpenAPI, docs, API tests, config tests, migration tests, and CLI handling for the new shape.\n\n## Verification\n- npm exec --workspace @slugkit/template-site -- vitest run --config ../../vitest.config.ts src/api/__tests__/site-config.test.ts src/config/__tests__/site-config.test.ts src/api/__tests__/routes.test.ts src/db/__tests__/migrations.test.ts\n- npm exec --workspace @slugkit/cli -- vitest run --config ../vitest.config.ts src/__tests__/commands.test.ts\n- npm run typecheck\n- npm test\n- npm run lint\n- ./scripts/pre-pr.sh\n\nTask: #task-86cba98c
feat: split site config core and custom
All checks were successful
CI / build-lint-test (pull_request) Successful in 31s
8672148c7c
Task: #task-86cba98c
Author
Owner

PR Review

Summary

Reviewed PR #86 for task task-86cba98c. The changes split the site config API into data.core and data.custom, persist JSON-compatible custom config in SQLite, update PATCH handling for core and/or custom, preserve core validation, update OpenAPI/docs, and update API/config/CLI/migration tests.

Acceptance criteria

  • GET /api/v1/site-config returns { data: { core: ..., custom: ... } }.
  • Existing site config fields are available under data.core.
  • PATCH /api/v1/site-config can update core fields.
  • PATCH /api/v1/site-config can update custom key/value data.
  • Custom config persists across reads.
  • Invalid core fields still return validation errors.
  • OpenAPI documents the core + custom schema.
  • Relevant tests and checks pass.

Blocking issues

None.

Warnings

None.

Verification reviewed

  • Targeted site-config/config/routes/migration tests passed.
  • Targeted CLI command tests passed.
  • npm run typecheck passed.
  • npm test passed.
  • npm run lint passed.
  • ./scripts/pre-pr.sh passed.
  • Forgejo CI status is success for commit 8672148c7ca66b48690a90a296bc8c7b867a9e87.

Verdict

Approved. Ready for human merge approval.

PR Review Worker Result

  • pr: open
  • review: approved
  • pr_comment: posted
  • task_comment: posted
  • blocking_issues: 0
  • warnings: 0
  • criteria_total: 8
  • criteria_met: 8
  • criteria_missing: 0
## PR Review ### Summary Reviewed PR #86 for task `task-86cba98c`. The changes split the site config API into `data.core` and `data.custom`, persist JSON-compatible custom config in SQLite, update PATCH handling for `core` and/or `custom`, preserve core validation, update OpenAPI/docs, and update API/config/CLI/migration tests. ### Acceptance criteria - [x] `GET /api/v1/site-config` returns `{ data: { core: ..., custom: ... } }`. - [x] Existing site config fields are available under `data.core`. - [x] `PATCH /api/v1/site-config` can update `core` fields. - [x] `PATCH /api/v1/site-config` can update `custom` key/value data. - [x] Custom config persists across reads. - [x] Invalid `core` fields still return validation errors. - [x] OpenAPI documents the `core + custom` schema. - [x] Relevant tests and checks pass. ### Blocking issues None. ### Warnings None. ### Verification reviewed - Targeted site-config/config/routes/migration tests passed. - Targeted CLI command tests passed. - `npm run typecheck` passed. - `npm test` passed. - `npm run lint` passed. - `./scripts/pre-pr.sh` passed. - Forgejo CI status is `success` for commit `8672148c7ca66b48690a90a296bc8c7b867a9e87`. ### Verdict Approved. Ready for human merge approval. PR Review Worker Result - pr: open - review: approved - pr_comment: posted - task_comment: posted - blocking_issues: 0 - warnings: 0 - criteria_total: 8 - criteria_met: 8 - criteria_missing: 0
erik merged commit 95aad8c52c into main 2026-06-02 12:29:00 -05:00
erik deleted branch feat/task-86cba98c-site-config-core-custom 2026-06-02 12:29:00 -05:00
Sign in to join this conversation.
No description provided.