Conversation
|
@ivanauth is attempting to deploy a commit to the authzed Team on Vercel. A member of the Team first needs to authorize it. |
ivanauth
force-pushed
the
ivancherapau/oss-959-add-generate-all-to-populate-the-entire-expected-relations
branch
from
August 5, 2026 21:27
7185a1d to
9aa2fbb
Compare
Re-Generate and Compute and Diff now enumerate every applicable relation and permission key for the objects appearing on either side of the test relationships, seed them with empty values, and let the existing SpiceDB WASM populate path fill in the expected subjects. An empty Expected Relations document now produces the complete section. Enumeration parses the schema fresh rather than reading the debounced local parse service, so it stays consistent with the text at click time. Merging only ever adds absent keys, leaving hand-written entries intact. A document that is not a plain YAML map aborts with a toast before any write, and the original contents are snapshotted before validation so Compute and Diff reverts to the right thing. Verified by hand against a running playground: caveats need no special handling, wildcards are excluded as keys but preserved as subjects, subject-only objects are enumerated, and self-referential relations dedupe correctly. The unit project needed spicedb-parser-js inlined: it pulls in parsimmon, a CJS module whose named exports Node's ESM loader cannot see.
ivanauth
force-pushed
the
ivancherapau/oss-959-add-generate-all-to-populate-the-entire-expected-relations
branch
from
August 5, 2026 22:20
9aa2fbb to
45ee8ee
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Expected Relations only populates subjects for keys you have already written by
hand.
Re-Generateagainst an empty document does nothing, so building the filemeans hand-writing every
object:id#relationkey first — and keys for newlyadded relations or permissions go missing silently.
Change
Re-GenerateandCompute and Diffnow enumerate every applicable relation andpermission key for the objects in the test relationships, seed them with empty
values, and hand that to the existing populate path. An empty document now
produces the complete section.