Skip to content

Validate set index typeArgs and strip cloud settings in ObsessionDB#85

Merged
KeKs0r merged 1 commit intomainfrom
marc/validate-set-index-type
Mar 11, 2026
Merged

Validate set index typeArgs and strip cloud settings in ObsessionDB#85
KeKs0r merged 1 commit intomainfrom
marc/validate-set-index-type

Conversation

@KeKs0r
Copy link
Contributor

@KeKs0r KeKs0r commented Mar 6, 2026

Summary

  • Type-level validation: SkipIndexDefinition now requires typeArgs for set, tokenbf_v1, ngrambf_v1 index types. Bare set without args is a compile error. Runtime validation provides a safety net for edge cases.
  • ObsessionDB enhancement: Plugin now strips storage_policy from table settings during migration to local ClickHouse (non-ObsessionDB targets), improving local development experience.
  • Introspection fix: Refactored index type parsing to properly narrow discriminated union types.
  • Docs update: Updated schema DSL reference and skill examples to show required typeArgs for parameterized index types.

Test plan

  • Typecheck passes (all packages)
  • All 95 unit tests pass, 1 skip
  • New test validates set without typeArgs is caught by validation
  • 5 new tests verify storage_policy stripping behavior (with other settings, as sole setting, with Shared engine, non-cloud settings preserved)

🤖 Generated with Claude Code

feat(plugin-obsessiondb): strip storage_policy from table settings for local dev
docs: update skip index examples and documentation with typeArgs

- SkipIndexDefinition now requires typeArgs for set, tokenbf_v1, ngrambf_v1
  (type-level validation + runtime safety check)
- ObsessionDB plugin strips cloud-only settings (storage_policy) during
  migration to standard ClickHouse
- Fix index type parsing in ClickHouse introspection for proper narrowing
- Update all docs and skill examples to include typeArgs: '0' for set indexes
- Add 5 new tests for storage_policy stripping behavior

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@KeKs0r KeKs0r merged commit a52a2b2 into main Mar 11, 2026
2 checks passed
@KeKs0r KeKs0r deleted the marc/validate-set-index-type branch March 11, 2026 07:42
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