Skip to content

test(docs): bind task validation errors to current validators - #1101

Merged
sidneyswift merged 1 commit into
mainfrom
codex/task-validation-docs-contract
Oct 22, 2026
Merged

sidneyswift merged 1 commit into
mainfrom
codex/task-validation-docs-contract

Conversation

@sidneyswift

@sidneyswift sidneyswift commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

When a developer follows the task reference, POST currently describes an integer error plus message, and PATCH requires missing_fields even for malformed JSON. Bind the corrected shared 400 documentation to the real POST/PATCH validators with synthetic malformed-JSON and wrong-type examples, pre-authentication/header checks, and a valid title-only PATCH control.

This companion changes the published fixture, regression test and contributor notes. It does not change API behavior. Marketing #223 authors the two corrected response definitions and examples; its source pin must follow the actual accepted API merge. Related: recoupable/mono#318 and recoupable/mono#360. The separate schedule-syntax implementation in #1100 is outside this change.

Validation: 225 contract tests; response-constructor type check; repository lint and scoped formatting pass. The full-project type check still reports exactly the same 211 inherited diagnostics; no new diagnostic was introduced. Tests use actual validators with mocked authentication and fenced networking; no stored task or hosted schedule is exercised.


Summary by cubic

Binds the published POST/PATCH task 400 error documentation to the real request validators. The docs previously described an integer error plus message, and PATCH required missing_fields even for malformed JSON; the corrected shared schema returns a string error and omits missing_fields for invalid JSON. No API behavior changes.

  • Adds publishedTaskValidation.test.ts comparing the published schemas and examples against the actual validators with malformed-JSON and wrong-schedule-type bodies, pre-auth and header checks, and a valid title-only PATCH control.
  • Updates the fixture and contributor notes; the Marketing source pin must follow the accepted API merge, and the separate schedule-syntax implementation in Reject malformed task schedules before database and scheduler calls #1100 stays out of scope.
  • Runs 225 contract tests with no new type-check diagnostics.

Written for commit e669682. Summary will update on new commits.

View guided diff Turn on auto-fix

@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
api Ready Ready Preview Oct 22, 2026 1:28am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: recoupable/api/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f7f2e98d-b387-4f67-af14-37e03422bb2f
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sidneyswift
sidneyswift marked this pull request as ready for review October 22, 2026 01:55
@sidneyswift
sidneyswift merged commit e47d32e into main Oct 22, 2026
6 checks passed

This branch was successfully deployed

1 active deployment
Preview — e669682c Deployed Oct 22, 2026 by vercel[bot]
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