-
-
Notifications
You must be signed in to change notification settings - Fork 11
feat(policy): post-update policies #275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded@ymc9 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 17 minutes and 8 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
WalkthroughAdds a "post-update" policy operation and replaces Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60–90 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
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 |
|
Claude finished @ymc9's task —— View job PR Review: Post-Update Policies ✅This PR implements post-update policies, which allow validation rules to be applied after database updates occur. The implementation adds support for Review SummaryOverall Assessment: GOOD - Well-implemented feature with comprehensive testing, but has some areas requiring attention. ✅ Strengths
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces post-update policies feature, allowing validation of entity states after database updates. The implementation replaces the previous future() function with before() to access pre-update values and adds support for 'post-update' operations in policy rules.
- Replaced
future()function withbefore()for accessing pre-update entity values - Added 'post-update' operation support to policy system with default allow behavior
- Implemented comprehensive test coverage for post-update policy scenarios
Reviewed Changes
Copilot reviewed 19 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/runtime/test/schemas/petstore/schema.zmodel | Updated policy rule to use before() instead of future() |
| packages/runtime/test/schemas/petstore/schema.ts | Generated schema update reflecting the before() function change |
| packages/runtime/test/policy/crud/post-update.test.ts | Comprehensive test suite for post-update policy functionality |
| packages/runtime/src/utils/expression-utils.ts | New expression visitor utility for traversing AST nodes |
| packages/runtime/src/plugins/policy/utils.ts | Added utility to detect before() invocations |
| packages/runtime/src/plugins/policy/types.ts | Updated policy operation types to include 'post-update' |
| packages/runtime/src/plugins/policy/policy-handler.ts | Core implementation of post-update policy validation logic |
| packages/runtime/src/plugins/policy/plugin.ts | Simplified plugin interface by removing unused transaction parameter |
| packages/runtime/src/plugins/policy/expression-transformer.ts | Added transformation logic for before() function calls |
| packages/runtime/src/client/options.ts | Updated type definitions to include extended CRUD operations |
| packages/runtime/src/client/crud/operations/base.ts | Fixed update operation to properly handle query execution |
| packages/runtime/src/client/contract.ts | Added CRUD_EXT type including 'post-update' operation |
| packages/language/src/zmodel-scope.ts | Updated scope resolution from future() to before() |
| packages/language/src/zmodel-linker.ts | Updated type linking for before() function |
| packages/language/src/validators/expression-validator.ts | Added validation to prevent relation field access from before() |
| packages/language/src/validators/attribute-application-validator.ts | Updated validators to support 'post-update' operation and before() function |
| packages/language/src/utils.ts | Renamed function from isFutureInvocation to isBeforeInvocation |
| packages/language/res/stdlib.zmodel | Updated standard library to replace future() with before() function |
| TODO.md | Added new TODO item for accessing tables not in schema |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
🧹 Nitpick comments (14)
packages/runtime/src/client/contract.ts (1)
226-230: Add re-export ofCRUD_EXTin public barrel
Addexport { CRUD_EXT } from './contract';to your public barrel file (e.g.,packages/runtime/src/client/index.ts) so external consumers can import it directly.packages/language/src/zmodel-scope.ts (1)
166-167: Update stale comment:future()→before()The code now checks
isBeforeInvocation, but the comment still mentionsfuture().Apply:
- // deal with member access from `auth()` and `future() + // deal with member access from `auth()` and `before()`packages/runtime/src/client/options.ts (1)
33-33: Consider updating the docstring to reflect 'post-update'The comment says “The CRUD operation being performed” but the type now includes 'post-update'. Minor doc tweak to avoid confusion.
- * The CRUD operation being performed + * The operation being performed (CRUD plus 'post-update')packages/runtime/src/client/crud/operations/base.ts (2)
771-775: Optional: also route createMany(ReturnData=true) through executeQuery for consistencyFor symmetry with updateMany, consider using the wrapper to get queryIds and uniform error handling.
- const idFields = requireIdFields(this.schema, model); - const result = await query.returning(idFields as any).execute(); - return result as Result; + const idFields = requireIdFields(this.schema, model); + const finalQuery = query.returning(idFields as any); + const result = await this.executeQuery(kysely, finalQuery, 'createMany'); + return result.rows as Result;
1194-1197: Optional: widen makeContextComment to CRUD_EXT for future-proofingEven though this file currently passes 'update'/'delete' etc., widening the type avoids friction if 'post-update' context comments are added later.
-import { TransactionIsolationLevel, type CRUD } from '../../contract'; +import { TransactionIsolationLevel, type CRUD_EXT } from '../../contract'; ... - private makeContextComment(_context: { model: GetModels<Schema>; operation: CRUD }) { + private makeContextComment(_context: { model: GetModels<Schema>; operation: CRUD_EXT }) {packages/language/src/validators/attribute-application-validator.ts (1)
169-170: Document that ‘all’ excludespost-update
Add a comment or update the API docs to state that'all'covers create/read/update/delete but does not includepost-update, which must be specified separately.packages/runtime/src/plugins/policy/expression-transformer.ts (1)
441-443: Tiny simplification: drop redundant null coalescing for auth member argvalueMemberAccess always returns a ValueNode. You can simplify.
- const valNode = this.valueMemberAccess(this.auth, arg as MemberExpression, this.authType); - return valNode ? eb.val(valNode.value) : eb.val(null); + const valNode = this.valueMemberAccess(this.auth, arg as MemberExpression, this.authType) as ValueNode; + return eb.val(valNode.value);packages/runtime/test/policy/crud/post-update.test.ts (1)
96-127: before() semantics well-covered; consider one more negativeAdd a test asserting that using before() outside a 'post-update' rule is rejected early by validation.
I can add the test scaffold if you want.
packages/language/res/stdlib.zmodel (5)
666-668: Doc string: include 'post-update' in allowed operationsReflect new operation in the parameter docs.
- * @param operation: comma-separated list of "create", "read", "update", "delete". Use "all" to denote all operations. + * @param operation: comma-separated list of "create", "read", "update", "post-update", "delete". Use "all" to denote all operations.
684-686: Doc string: include 'post-update' for deny as wellMirror allow() doc change.
- * @param operation: comma-separated list of "create", "read", "update", "delete". Use "all" to denote all operations. + * @param operation: comma-separated list of "create", "read", "update", "post-update", "delete". Use "all" to denote all operations.
679-679: Field-level @Allow: should it support 'post-update'?Currently completion hints exclude 'post-update'. If field-level post-update policies are supported, add it for symmetry; otherwise, consider documenting that it’s intentionally unsupported.
-attribute @allow(_ operation: String @@@completionHint(["'create'", "'read'", "'update'", "'delete'", "'all'"]), _ condition: Boolean, _ override: Boolean?) +attribute @allow(_ operation: String @@@completionHint(["'create'", "'read'", "'update'", "'post-update'", "'delete'", "'all'"]), _ condition: Boolean, _ override: Boolean?)
695-695: Field-level @deny: mirror the decision for 'post-update'Keep hints consistent with @Allow.
-attribute @deny(_ operation: String @@@completionHint(["'create'", "'read'", "'update'", "'delete'", "'all'"]), _ condition: Boolean) +attribute @deny(_ operation: String @@@completionHint(["'create'", "'read'", "'update'", "'post-update'", "'delete'", "'all'"]), _ condition: Boolean)
188-197: currentOperation doc: include 'post-update'Update narrative to reflect expansion.
- * "all" operation is expanded to "create", "read", "update", and "delete" rules, + * "all" operation is expanded to "create", "read", "update", "post-update", and "delete" rules,packages/runtime/src/plugins/policy/policy-handler.ts (1)
139-160: Complex but necessary SQL construction for before-update table.The VALUES table construction with proper type casting is well-implemented. This approach allows efficient in-database comparison between before and after states.
Consider adding a comment explaining the structure of this generated SQL for future maintainers, as the nested node creation is quite complex.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (19)
TODO.md(1 hunks)packages/language/res/stdlib.zmodel(3 hunks)packages/language/src/utils.ts(1 hunks)packages/language/src/validators/attribute-application-validator.ts(3 hunks)packages/language/src/validators/expression-validator.ts(2 hunks)packages/language/src/zmodel-linker.ts(2 hunks)packages/language/src/zmodel-scope.ts(2 hunks)packages/runtime/src/client/contract.ts(1 hunks)packages/runtime/src/client/crud/operations/base.ts(1 hunks)packages/runtime/src/client/options.ts(2 hunks)packages/runtime/src/plugins/policy/expression-transformer.ts(4 hunks)packages/runtime/src/plugins/policy/plugin.ts(1 hunks)packages/runtime/src/plugins/policy/policy-handler.ts(14 hunks)packages/runtime/src/plugins/policy/types.ts(2 hunks)packages/runtime/src/plugins/policy/utils.ts(2 hunks)packages/runtime/src/utils/expression-utils.ts(1 hunks)packages/runtime/test/policy/crud/post-update.test.ts(1 hunks)packages/runtime/test/schemas/petstore/schema.ts(1 hunks)packages/runtime/test/schemas/petstore/schema.zmodel(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
{packages,samples,tests}/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place packages only under
packages/,samples/, ortests/
Files:
packages/runtime/src/plugins/policy/plugin.tspackages/language/src/zmodel-scope.tspackages/language/src/utils.tspackages/runtime/test/schemas/petstore/schema.tspackages/runtime/src/client/contract.tspackages/language/src/zmodel-linker.tspackages/runtime/src/client/crud/operations/base.tspackages/runtime/src/plugins/policy/policy-handler.tspackages/runtime/src/plugins/policy/types.tspackages/runtime/src/plugins/policy/expression-transformer.tspackages/runtime/src/client/options.tspackages/language/src/validators/expression-validator.tspackages/runtime/test/policy/crud/post-update.test.tspackages/language/src/validators/attribute-application-validator.tspackages/runtime/src/utils/expression-utils.tspackages/runtime/test/schemas/petstore/schema.zmodelpackages/runtime/src/plugins/policy/utils.tspackages/language/res/stdlib.zmodel
**/schema.ts
📄 CodeRabbit inference engine (CLAUDE.md)
The generated TypeScript schema should be named
schema.ts
Files:
packages/runtime/test/schemas/petstore/schema.ts
**/schema.zmodel
📄 CodeRabbit inference engine (CLAUDE.md)
Name ZModel schema files
schema.zmodel
Files:
packages/runtime/test/schemas/petstore/schema.zmodel
🧬 Code graph analysis (15)
packages/runtime/src/plugins/policy/plugin.ts (2)
packages/runtime/src/client/plugin.ts (1)
OnKyselyQueryArgs(188-193)packages/runtime/src/plugins/policy/policy-handler.ts (1)
PolicyHandler(62-990)
packages/language/src/zmodel-scope.ts (2)
packages/language/src/utils.ts (1)
isBeforeInvocation(449-451)packages/runtime/src/plugins/policy/utils.ts (1)
isBeforeInvocation(158-160)
packages/language/src/utils.ts (4)
packages/runtime/src/plugins/policy/utils.ts (1)
isBeforeInvocation(158-160)packages/language/src/ast.ts (2)
AstNode(4-4)AstNode(66-71)packages/language/src/generated/ast.ts (1)
isInvocationExpr(542-544)packages/sdk/src/model-utils.ts (1)
isFromStdlib(85-88)
packages/runtime/test/schemas/petstore/schema.ts (1)
packages/runtime/src/schema/expression.ts (1)
ExpressionUtils(16-120)
packages/language/src/zmodel-linker.ts (2)
packages/language/src/utils.ts (1)
isBeforeInvocation(449-451)packages/runtime/src/plugins/policy/utils.ts (1)
isBeforeInvocation(158-160)
packages/runtime/src/client/crud/operations/base.ts (2)
packages/runtime/src/plugins/policy/policy-handler.ts (1)
kysely(70-72)packages/runtime/src/client/executor/zenstack-query-executor.ts (1)
kysely(60-62)
packages/runtime/src/plugins/policy/policy-handler.ts (7)
packages/runtime/src/client/plugin.ts (1)
ProceedKyselyQueryFunction(195-195)packages/runtime/src/client/query-utils.ts (3)
requireField(38-56)requireIdFields(63-70)requireModel(25-31)packages/runtime/src/plugins/policy/utils.ts (6)
conjunction(49-67)isBeforeInvocation(158-160)trueNode(21-23)falseNode(28-30)disjunction(69-87)buildIsFalse(127-139)packages/runtime/src/utils/expression-utils.ts (1)
ExpressionVisitor(15-58)packages/sdk/src/schema/expression.ts (1)
MemberExpression(27-31)packages/common-helpers/src/tiny-invariant.ts (1)
invariant(4-14)packages/runtime/src/client/contract.ts (2)
CRUD_EXT(219-219)CRUD_EXT(229-229)
packages/runtime/src/plugins/policy/types.ts (1)
packages/runtime/src/client/contract.ts (2)
CRUD_EXT(219-219)CRUD_EXT(229-229)
packages/runtime/src/plugins/policy/expression-transformer.ts (6)
packages/sdk/src/schema/schema.ts (2)
SchemaDef(10-18)GetModels(109-109)packages/runtime/src/client/contract.ts (2)
CRUD_EXT(219-219)CRUD_EXT(229-229)packages/sdk/src/schema/expression.ts (1)
MemberExpression(27-31)packages/language/src/utils.ts (1)
isBeforeInvocation(449-451)packages/runtime/src/plugins/policy/utils.ts (1)
isBeforeInvocation(158-160)packages/common-helpers/src/tiny-invariant.ts (1)
invariant(4-14)
packages/runtime/src/client/options.ts (1)
packages/runtime/src/client/contract.ts (2)
CRUD_EXT(219-219)CRUD_EXT(229-229)
packages/language/src/validators/expression-validator.ts (2)
packages/language/src/generated/ast.ts (3)
MemberAccessExpr(546-551)MemberAccessExpr(553-553)isDataModel(391-393)packages/language/src/utils.ts (1)
isBeforeInvocation(449-451)
packages/runtime/test/policy/crud/post-update.test.ts (1)
packages/runtime/test/policy/utils.ts (1)
createPolicyTestClient(14-25)
packages/language/src/validators/attribute-application-validator.ts (2)
packages/language/src/utils.ts (1)
isBeforeInvocation(449-451)packages/runtime/src/plugins/policy/utils.ts (1)
isBeforeInvocation(158-160)
packages/runtime/src/utils/expression-utils.ts (1)
packages/sdk/src/schema/expression.ts (9)
LiteralExpression(12-15)ArrayExpression(17-20)FieldExpression(22-25)MemberExpression(27-31)BinaryExpression(39-44)UnaryExpression(33-37)CallExpression(46-50)ThisExpression(52-54)NullExpression(56-58)
packages/runtime/src/plugins/policy/utils.ts (1)
packages/runtime/src/schema/expression.ts (1)
ExpressionUtils(16-120)
🪛 markdownlint-cli2 (0.18.1)
TODO.md
104-104: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
🪛 Biome (2.1.2)
packages/runtime/src/utils/expression-utils.ts
[error] 17-27: The function should not return a value because its return type is void.
The function is here:
'void' signals the absence of value. The returned value is likely to be ignored by the caller.
(lint/correctness/noVoidTypeReturn)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: build-test (20.x, sqlite)
- GitHub Check: build-test (20.x, postgresql)
- GitHub Check: claude-review
🔇 Additional comments (35)
packages/runtime/test/schemas/petstore/schema.ts (1)
95-95: Update policy now uses before(); matches intentCondition enforces name/category unchanged and unsold state. Looks correct for the “only orderId may change” rule.
Confirm the runtime translator recognizes
before()(e.g.,isBeforeInvocationin policy utils) in this context and tests cover attempts to changename/category.packages/runtime/src/client/contract.ts (1)
216-220: Approved: CRUD_EXT applied consistently
Verified that all downstream usages import and useCRUD_EXT, and no explicit'create' | 'read' | 'update' | 'delete'unions remain outside the base type definition.packages/runtime/test/schemas/petstore/schema.zmodel (1)
39-39: Approve migration to before()
No remainingfuture()usages detected; approving the switch tobefore().packages/language/src/utils.ts (1)
449-451: Approve before() helper; verify no legacyfuture()orisFutureInvocationusage remains
Please manually confirm that all references tofuture()andisFutureInvocationhave been removed (e.g. search.tsfiles underpackages/**, excluding build artifacts).packages/runtime/src/plugins/policy/plugin.ts (1)
25-28: Signature alignment withPolicyHandler.handlelooks goodDropping
transactionand forwarding{ query, client, proceed }matcheshandle(node, proceed). No other changes needed here.If there are other
RuntimePluginimplementations in the repo, please verify they’ve adopted the sameOnKyselyQueryArgsshape to prevent runtime mismatches.packages/language/src/zmodel-scope.ts (1)
173-175: Correct resolution forbefore()member accessResolving
before()to the containing model viacreateScopeForContainingModelis consistent with the new semantics.packages/runtime/src/plugins/policy/types.ts (1)
1-13: AdoptingCRUD_EXTforPolicyOperationis consistent with post-updateType surface is updated as expected;
PolicyOperation = CRUD_EXT | 'all'reads clean.Please confirm that places expanding
'all'to concrete ops now include'post-update'(e.g., any helper that normalizes operations usesCRUD_EXTconstants).packages/runtime/src/plugins/policy/utils.ts (1)
158-160: UtilityisBeforeInvocationis simple and correctLeverages
ExpressionUtils.isCalland checks function name'before'. Matches language-layer helper and keeps concerns local to runtime.packages/runtime/src/client/options.ts (1)
4-4: Type surface updated to CRUD_EXT — looks rightImporting CRUD_EXT aligns this module with the new operation union including 'post-update'. No issues spotted.
packages/language/src/validators/expression-validator.ts (2)
14-16: Import additions are consistent with the new ruleBringing in MemberAccessExpr and isBeforeInvocation is necessary for the added validation path. Looks good.
Also applies to: 22-26
64-67: No tests found for before() member-access edge cases
Found no existing test cases covering nested before() chains. Please add/confirm tests for:
before().user.idbefore().users(before()).userpackages/language/src/validators/attribute-application-validator.ts (1)
26-27: Import swap to isBeforeInvocation — alignedMatches the repo-wide rename from future() to before(). No issues.
packages/runtime/src/client/crud/operations/base.ts (1)
1299-1302: Confirmed return shape matches consumer usage
Callers of updateMany(..., returnData=true) use the returned rows array (e.g.,updateResult.map(...)for IDs), so returningresult.rowsis correct.packages/runtime/src/plugins/policy/expression-transformer.ts (4)
23-23: Importing CRUD_EXT — LGTMContract type switch aligns with new operation. No concerns.
53-53: Import isBeforeInvocation — LGTMBrings in the runtime-level predicate needed for before() handling.
58-58: Context.operation typed to CRUD_EXT — LGTMMatches the widened operation domain.
455-459: auth() member access path — LGTMDirectly resolves against runtime auth object, consistent with existing semantics.
packages/runtime/test/policy/crud/post-update.test.ts (5)
4-19: Default allow semantics — LGTMConfirms no explicit post-update rule ⇒ updates proceed.
20-46: Allow + Deny interplay — LGTMCovers both rejection paths and state rollback verification.
65-95: Relational condition coverage — LGTMGood check of post-update with nested relation delete altering the predicate domain.
129-168: Skipped QB test: track and unblockPlease open/link an issue for the “transaction issue,” and add a TODO with the issue number so it doesn’t get lost.
170-189: Negative: relation access from before() — LGTMAsserts the precise error string; keep message consistent in validator.
If the validator message changes, update this test accordingly.
packages/language/res/stdlib.zmodel (2)
669-669: @@Allow completion hint updated — LGTM
687-687: @@deny completion hint updated — LGTMpackages/runtime/src/plugins/policy/policy-handler.ts (11)
114-119: LGTM! Good defensive programming for post-update policy check.The conditional loading of before-update entities only when needed (i.e., when post-update policies exist) is an efficient approach that avoids unnecessary database queries.
226-243: Well-structured before-update data loading.The method efficiently loads only the necessary fields for post-update policy evaluation. Good optimization to return early when no fields are needed.
252-260: Clean implementation of field collection using visitor pattern.The anonymous class extending
ExpressionVisitoris a nice use of the visitor pattern. The invariant check ensuresbefore()is only used with scalar field access, which prevents misuse.
180-186: Correct validation of post-update policy compliance.The count-based validation efficiently checks if all updated rows pass the post-update policy without needing to fetch all the data.
209-219: Important correction for mutation result shape.This method correctly handles the case where the implementation adds a returning clause internally (for ID fields) but the original query didn't request any returned data. This maintains the expected API contract.
378-387: Well-documented returning clause logic for updates.The comments clearly explain the two scenarios where ID fields are needed. The implementation correctly handles both cases.
426-435: Good handling of SELECT * edge cases.The logic correctly handles the case where
SELECT *is used on a model that only contains ID fields, avoiding unnecessary read-back operations.
721-721: Correct use of ReferenceNode for qualified column references.Using
ReferenceNodewith both column and table ensures proper qualification in the generated SQL, preventing ambiguity in queries with joins.
785-810: Important semantic difference for post-update policies.The implementation correctly treats post-update differently from other operations - it defaults to "allow" when no explicit allow rules exist, while other operations default to "deny". This aligns with the expected behavior where post-update policies are meant to validate after the fact rather than gate access.
The combination logic with deny rules is correctly implemented using
buildIsFalseto negate conditions.
348-360: Unable to automatically verify returning behavior change for inserts
Manually review all insert query usages and associated tests to ensure that changing the returning clause to only include ID fields does not break existing client expectations.
892-896: Filter logic aligns with ZenStack docs
The ‘all’ operation covers only create/read/update/delete; post-update checks require explicit future() rules per the Post-Update Checks guide.
|
Claude finished @ymc9's task —— View job PR Review: Post-Update Policies ✅This PR implements post-update policies, which allow validation rules to be applied after database updates occur. The implementation adds support for Review SummaryOverall Assessment: GOOD - Well-implemented feature with comprehensive testing, but has some areas requiring attention. ✅ Strengths
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/runtime/src/plugins/policy/policy-handler.ts(14 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
{packages,samples,tests}/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place packages only under
packages/,samples/, ortests/
Files:
packages/runtime/src/plugins/policy/policy-handler.ts
🧬 Code graph analysis (1)
packages/runtime/src/plugins/policy/policy-handler.ts (7)
packages/runtime/src/client/plugin.ts (1)
ProceedKyselyQueryFunction(195-195)packages/runtime/src/client/query-utils.ts (3)
requireField(38-56)requireIdFields(63-70)requireModel(25-31)packages/runtime/src/plugins/policy/utils.ts (6)
conjunction(49-67)isBeforeInvocation(158-160)trueNode(21-23)falseNode(28-30)disjunction(69-87)buildIsFalse(127-139)packages/runtime/src/utils/expression-utils.ts (1)
ExpressionVisitor(15-58)packages/sdk/src/schema/expression.ts (1)
MemberExpression(27-31)packages/common-helpers/src/tiny-invariant.ts (1)
invariant(4-14)packages/runtime/src/client/contract.ts (2)
CRUD_EXT(219-219)CRUD_EXT(229-229)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: build-test (20.x, postgresql)
- GitHub Check: build-test (20.x, sqlite)
- GitHub Check: claude-review
|
Claude finished @ymc9's task —— View job PR Review: Post-Update Policies ✅This PR implements post-update policies, which allow validation rules to be applied after database updates occur. The implementation adds support for Review SummaryOverall Assessment: GOOD - Well-implemented feature with comprehensive testing, but has some areas requiring attention. ✅ Strengths
|
|
Claude finished @ymc9's task —— View job PR Review: Post-Update Policies ✅This PR implements post-update policies, which allow validation rules to be applied after database updates occur. The implementation adds support for Review Progress
Overall Assessment: GOOD ⭐Well-architected feature with comprehensive testing, though there are some critical areas requiring attention. ✅ Strengths1. Comprehensive Test Coverage (
|
|
Claude finished @ymc9's task —— View job PR Review: Post-Update Policies ✅This PR implements post-update policies, which allow validation rules to be applied after database updates occur. The implementation adds support for Review Progress
Overall Assessment: GOOD ⭐Well-architected feature with comprehensive testing, though there are some critical areas requiring attention. ✅ Strengths1. Comprehensive Test Coverage (
|
Summary by CodeRabbit
New Features
Bug Fixes / Validation
Refactor
Tests