Conversation
…n-gate # Conflicts: # internal/database/migrations/migrations_test.go
Reject duplicate filesystem Lexicon IDs, return reliable Lexicon timestamps, and cover existing-row migration upgrades. Bound CAR error details and apply the remaining focused test, formatting, and operator-documentation fixes.
Filter endorsement closure inputs to valid records and align local API smoke checks with raw validation metadata and typed visibility.
…n-gate # Conflicts: # .agents/skills/hyperindex/references/schema-reference.md # cmd/hyperindex/main.go # internal/graphql/schema/builder.go # internal/graphql/schema/builder_test.go # internal/graphql/subscription/handler.go # internal/graphql/subscription/handler_test.go # internal/graphql/subscription/pubsub.go
validation: add record validation gate
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
Greptile SummaryThe PR introduces a fixed startup Lexicon snapshot and record-validation gate, restricting typed GraphQL and subscription behavior to valid records while preserving raw diagnostic access.
|
| Filename | Overview |
|---|---|
| cmd/hyperindex/main.go | Establishes one startup Lexicon snapshot, performs validation reconciliation before serving, and shares the validator across ingestion paths. |
| internal/validation/validator.go | Implements local record validation and Lexicon fingerprinting for persisted validation metadata. |
| internal/validationrefresh/scheduler.go | Reclassifies stored records against the startup validator through a paged reconciliation workflow. |
| internal/graphql/schema/builder.go | Applies validation visibility constraints to generated typed GraphQL operations and relationships. |
| internal/database/repositories/records.go | Extends record persistence and querying with validation metadata and filtering support. |
| internal/graphql/subscription/handler.go | Filters typed subscription events according to current and pre-delete validation state. |
| internal/database/migrations/migrations.go | Registers the new validation metadata, Lexicon JSON, and paging-index migrations across supported databases. |
| Dockerfile | Bundles pinned helper Lexicons into the runtime image and configures their default directory. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Load filesystem Lexicons] --> C[Merge startup snapshot]
B[Load database Lexicons] --> C
C --> D[Build validator and GraphQL registry]
D --> E[Refresh stored validation metadata]
E --> F[Start typed GraphQL and subscriptions]
D --> G[Validate newly ingested records]
G --> H[(Raw record storage)]
H --> I{Validation status valid?}
I -->|Yes| J[Typed GraphQL and typed events]
I -->|No| K[Generic records, search, and raw events]
Reviews (2): Last reviewed commit: "Merge pull request #133 from GainForest/..." | Re-trigger Greptile
| svc.validator, err = validation.NewValidatorFromLexiconBytes(savedLexicons) | ||
| if err != nil { | ||
| return nil, fmt.Errorf("failed to build startup Lexicon snapshot: %w", err) | ||
| } |
There was a problem hiding this comment.
Startup guidance remains stale
The fixed startup Lexicon snapshot and validation-refresh workflow change configuration and migration behavior, but AGENTS.md still omits the restart-only application model and startup refresh requirements, leaving future operational and maintenance work based on stale repository guidance.
Context Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Bundle the workscope CEL Lexicon dependency
No description provided.