Skip to content
This repository was archived by the owner on Jul 2, 2026. It is now read-only.

chore: extract marketplace schemas into domain-colocated file - #1137

Closed
corvid-agent wants to merge 3 commits into
mainfrom
chore/schema-decompose-marketplace
Closed

corvid-agent wants to merge 3 commits into
mainfrom
chore/schema-decompose-marketplace

Conversation

@corvid-agent

Copy link
Copy Markdown
Collaborator

Summary

First incremental PR for #1134 — decompose server/lib/validation.ts into domain-colocated Zod schema files.

  • Extracted 11 marketplace/pricing/trial schemas (95 LOC) into server/lib/schemas/marketplace.ts
  • Re-exported from validation.ts for full backward compatibility — no consumer changes required
  • Updated server/routes/marketplace.ts to import directly from the new location (demonstrates target pattern)
  • Updated specs/lib/infra.spec.md with new file and schema documentation

Approach

server/lib/schemas/ is the new home for domain-colocated schemas. This avoids converting flat route files into directories and stays within the established server/lib/ convention. Future PRs will extract additional domains (schedules, workflows, agents, etc.) following this same pattern.

Validation

  • bun x tsc --noEmit --skipLibCheck — passes
  • bun test — 7375 pass, 0 fail
  • bun run spec:check — 146/146 specs, 384/384 file coverage (100%)

Test plan

  • TypeScript compilation passes
  • All 7375 tests pass (including existing validation.test.ts marketplace schema tests)
  • Spec check 100% coverage
  • Route-registry and test files continue working via re-export

🤖 Generated with Claude Code

corvid-agent and others added 2 commits March 15, 2026 19:01
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
First incremental step of schema decomposition: move marketplace,
pricing tier, and trial Zod schemas from the monolithic validation.ts
into server/lib/schemas/marketplace.ts. Re-export from validation.ts
for backward compatibility. Update marketplace route to import directly
from the new location.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
github-actions[bot]
github-actions Bot previously approved these changes Mar 16, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All CI checks passed (tsc, tests) across ubuntu, macos, and windows.

Move the parent task existence check before the network call to
fetchPrBody in createVerificationTasks. This avoids unnecessary gh CLI
calls when the parent task doesn't exist and fixes the CI timeout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All CI checks passed (tsc, tests) across ubuntu, macos, and windows.

@codecov

codecov Bot commented Mar 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.82353% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
server/work/verification.ts 80.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@corvid-agent

Copy link
Copy Markdown
Collaborator Author

Superseded by #1139 which has been merged.

@corvid-agent
corvid-agent deleted the chore/schema-decompose-marketplace branch April 3, 2026 06:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant