feat(core): publish sql record catalog - #82
Conversation
|
Warning Review limit reached
Next review available in: 21 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe Core record catalog now includes SQL tables, columns, primary keys, portable types, database-specific mappings, bounded string keys, and safe-integer validation. Tests cover all 19 records and 74 fields across PostgreSQL, MySQL, and SQLite. ChangesCore SQL catalog
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant CoreRecords
participant SqlRecord
participant DatabaseResolvers
participant CatalogTests
CoreRecords->>SqlRecord: define 19 records with SQL metadata
SqlRecord->>DatabaseResolvers: resolve PostgreSQL, MySQL, and SQLite columns
DatabaseResolvers-->>CatalogTests: return table and field signatures
CatalogTests->>CoreRecords: validate 74 fields, keys, bounds, and public types
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.changeset/blue-agents-store.md:
- Line 5: Update the changeset entry to add one sentence documenting the
validation tightening: numeric fields now reject negative or non-integer values,
and string key fields reject values exceeding 95 code points, causing writes
with such values to fail validation after upgrading.
In `@packages/core/src/store-records.ts`:
- Line 234: Apply coreStringKeyMaxCodePoints to every identifier reference field
in the store-record definitions: branch.threadId and branch.head,
message.threadId and message.parent, run.threadId, run.branchId, and
run.admittedHead, plus toolCall.parentToolCallId. Extend optionalStringField to
accept and enforce the optional maximum parameter, matching requiredStringField,
so all referenced identifiers share the 95-code-point limit.
- Around line 188-201: Update coreStringKeyField so it accepts only the field
name and schema type, constructs the bounded string schema internally using
coreStringKeyMaxCodePoints, and reuses that schema for both select validation
and the SQL column definition. Remove the duplicated bound argument from all
call sites while preserving the existing mysql.varchar length and field
behavior.
In `@packages/core/test/sql-catalog.test.ts`:
- Around line 164-196: Add coverage counters to the test around
expectedCoreCatalogSignatures, incrementing one when the :text:max95 branch runs
and another when the :integer branch runs; after traversal, assert each counter
is greater than zero so both bounded schema checks are proven to execute.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 81c61e89-af36-430b-a3a2-b722b9b324ae
📒 Files selected for processing (4)
.changeset/blue-agents-store.mdpackages/core/README.mdpackages/core/src/store-records.tspackages/core/test/sql-catalog.test.ts
Summary
@commissary/corechangesetTesting
pnpm run verifypnpm --filter @commissary/core testCloses #63
Summary by CodeRabbit
New Features
Bug Fixes
Tests