sandcastle: @coa/schema backend, ClientConfig and submission schemas (#8) #21

Merged
matou-build-agent merged 1 commit from agent/issue-8 into main 2026-08-28 17:09:29 +00:00

Plan Task 4. Adds backend, ClientConfig (with FIXTURE_CLIENT_CONFIG) and submission schemas to @coa/schema, with tests.

Ref #8

Plan Task 4. Adds backend, ClientConfig (with FIXTURE_CLIENT_CONFIG) and submission schemas to @coa/schema, with tests. Ref #8
Plan Task 3 (docs/superpowers/plans/2026-08-27-coa-phase-0-1.md). New workspace
package packages/schema (@coa/schema) — the single source of truth for what a
submission is:

- brand.ts: BrandSchema/Brand, SLUG_RE, HEX_RE
- features.ts: FeaturesSchema/Features, TOGGLEABLE_FEATURES; identity forced true,
  .strict() rejects unknown keys
- onboarding.ts: OnboardingSchema/Onboarding, ApprovalSchema/Approval,
  APPROVAL_MODES; endorsements modes require required 1–20; info pages capped at 3
- index.ts re-exports all three

Decision: the pinned slug regex accepts a 1-char slug but the plan's pinned test
rejects "a". Kept SLUG_RE byte-for-byte as pinned and added a .min(2) length guard
on the slug field so both the "regex is exactly X" clause and the test pass; aligns
with the spec's "2–40 chars". Ruled two-way-door on #7.

Verify: pnpm -r typecheck && pnpm -r test exit 0 (22/22 schema tests green);
pnpm-lock.yaml updated in the same commit. STATUS.md advanced to "Phase 1 started".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
sandcastle: @coa/schema backend, ClientConfig and submission schemas (#8)
All checks were successful
ci / seam (pull_request) Successful in 14s
b45f88d022
Plan Task 4: adds the phase-1 validation contract to packages/schema.

- backend.ts: BackendSchema discriminated union (self-hosted http(s) url with
  trailing slash stripped | shared with feeAcknowledged:true).
- client-config.ts: ClientConfigSchema mirroring matou-app clientConfig.ts,
  requires >=1 witness oobi and >=1 anysync node; FIXTURE_CLIENT_CONFIG.
- submission.ts: SubmissionSchema {brand,onboarding,features,backend};
  LOGO_MIME, LOGO_MAX_BYTES. features.identity fills to true via the schema.
- index.ts: re-export the three new modules.
- Tests: backend/client-config/submission (11 cases). pnpm -r typecheck && test pass.
- STATUS.md: Task 4 (#8) landed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
matou-build-agent force-pushed agent/issue-8 from b45f88d022
All checks were successful
ci / seam (pull_request) Successful in 14s
to 00937a4106
All checks were successful
ci / seam (pull_request) Successful in 13s
2026-08-28 16:51:44 +00:00
Compare
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/coa!21
No description provided.