Skip to content

chore(pds): extract invalidRecordError helper in repo.ts#17

Merged
ascorbic merged 3 commits into
mainfrom
claude/lexicon-validation-mutations-7iVS8
Dec 28, 2025
Merged

chore(pds): extract invalidRecordError helper in repo.ts#17
ascorbic merged 3 commits into
mainfrom
claude/lexicon-validation-mutations-7iVS8

Conversation

@ascorbic
Copy link
Copy Markdown
Owner

Reduces duplication for InvalidRecord error responses across
createRecord, putRecord, and applyWrites endpoints.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

claude and others added 3 commits December 28, 2025 07:36
Replaces empty validator with actual schema validation using official
Bluesky lexicon JSON files vendored from the atproto repository.

Changes:
- Added update-lexicons.sh script to fetch official schemas from GitHub
- Vendored 16 lexicon schemas (core, feed, actor, graph, richtext, embed)
- Updated validation.ts to load all schemas with proper dependencies
- Added 11 Bluesky-specific validation tests (all passing)
- Tree-shakeable: only JSON files imported, no large dependencies

Schemas loaded:
- Core: com.atproto.repo.strongRef, com.atproto.label.defs
- Feed: app.bsky.feed.{post, like, repost, threadgate}
- Actor: app.bsky.actor.profile
- Graph: app.bsky.graph.{follow, block, list, listitem}
- Richtext: app.bsky.richtext.facet
- Embed: app.bsky.embed.{images, external, record, recordWithMedia}

All 19 tests passing (8 validation tests + 11 Bluesky tests).
- Use LexiconDoc type instead of any in validation.ts
- Add vite/client types to tsconfig for import.meta.glob
- Format firehose test and add proper sequencer typing
- Remove unused echo from update-lexicons script
- Remove unused dependencies from lockfile

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reduces duplication for InvalidRecord error responses across
createRecord, putRecord, and applyWrites endpoints.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
atproto-pds f817d84 Dec 28 2025, 07:38 AM

@ascorbic ascorbic changed the title refactor(pds): extract invalidRecordError helper in repo.ts chore(pds): extract invalidRecordError helper in repo.ts Dec 28, 2025
@ascorbic ascorbic enabled auto-merge (squash) December 28, 2025 07:39
@ascorbic ascorbic merged commit a050eae into main Dec 28, 2025
3 of 4 checks passed
@ascorbic ascorbic deleted the claude/lexicon-validation-mutations-7iVS8 branch December 28, 2025 07:39
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.

2 participants