Skip to content

feat: validate runtime config patching#184

Open
alan-provable wants to merge 1 commit into
Agentpay-Org:mainfrom
alan-provable:alan/issue-163-config-validation
Open

feat: validate runtime config patching#184
alan-provable wants to merge 1 commit into
Agentpay-Org:mainfrom
alan-provable:alan/issue-163-config-validation

Conversation

@alan-provable

Copy link
Copy Markdown
Contributor

Summary

Closes #163.

Adds eventLogCap to the writable runtime config surface and rejects unknown PATCH /api/v1/config keys with a structured 400 invalid_request response. This keeps misspelled config names from looking like successful no-op updates while preserving the existing success shape for valid updates.

The patch also trims the current in-memory audit log when eventLogCap is lowered, honors the updated cap for later events, documents the writable config keys in the README, and covers non-integer, zero/negative, and over-limit values.

Validation

  • git diff --check origin/main..HEAD
  • npm run build
  • npm run lint
  • npm test passed with 95 tests, run with local-listen permission for Supertest ephemeral ports

Notes

The route remains an in-memory runtime config API. Unknown keys are rejected atomically before any valid key is applied.

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.

Allow PATCH /api/v1/config to tune eventLogCap and surface rejected unknown keys

1 participant