Conversation
🦋 Changeset detectedLatest commit: 4fcafff The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Code Review
This pull request introduces significant updates to the platform API, primarily focusing on resource security and locking mechanisms. Key changes include the addition of resource_signature and color_proof fields across various resource and KV operations to enhance verification. A new LockFieldValues RPC has been implemented for optimistic locking of field references, and the Lease API endpoints have been updated. Additionally, ResourceSchema now supports granular AccessFlags for non-controller roles and automatic locking controls. The TypeScript client has been updated to reflect these proto changes, including field renames and regenerated gRPC code. Feedback was provided to correct a grammatical error in the documentation for the locking logic.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1531 +/- ##
==========================================
- Coverage 54.55% 54.20% -0.36%
==========================================
Files 250 254 +4
Lines 14467 14537 +70
Branches 2999 3013 +14
==========================================
- Hits 7893 7880 -13
- Misses 5572 5654 +82
- Partials 1002 1003 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Greptile Summary
This PR updates the Platform API proto definitions and the generated TypeScript client code, adding resource signatures (a "color" ownership/authenticity system), a new
LockFieldValuesRPC for optimistic field-reference locking, aSetDefaultColortransaction operation,AccessFlagsonResourceSchema, JWT role selection, and various field renames. The generated files (api.ts,api_types.ts,api.client.ts) are correctly regenerated to match the proto changes.\n\nKey concerns:\n- TypeScript compile errors intransaction.ts: The proto update promotesresourceSignature(anderrorResourceSignature) to required, non-optionalUint8Arrayfields in ~11 request interfaces. The existing object literals intransaction.tsthat construct these requests do not include those fields, producing TypeScript compilation errors acrossremoveResource,resourceExists,getResourceData,lockInputs,lockOutputs,setResourceError,setFieldError, and all KV operations. Only the two explicit renames (id → resourceId,errResourceId → errorResourceId) were applied — the signature fields need to be addressed either by addingresourceSignature: new Uint8Array(0)everywhere or by making the generated fields optional (?).\n- Minor typo: "successfull" in theLockFieldValues.Create.Responsecomment should be "successful".Confidence Score: 4/5
Not safe to merge until missing resourceSignature fields in transaction.ts are resolved — they will cause TypeScript build failures.
The proto design and generated TypeScript are internally consistent and well-structured. However, the required resourceSignature: Uint8Array field introduced by this PR is not supplied by ~11 existing object literal constructions in transaction.ts, which will break the TypeScript build. This is a blocking P1 issue.
lib/node/pl-client/src/core/transaction.ts requires updating all request object literals to supply the new required resourceSignature (and errorResourceSignature) fields.
Important Files Changed
Comments Outside Diff (1)
lib/node/pl-client/proto/plapi/plapiproto/api.proto, line 32 (link)The comment on the
acquiredfield inLockFieldValues.Create.Responsecontains a double-l typo.Prompt To Fix With AI
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "MILAB-5815: feat: proto update" | Re-trigger Greptile