Add Zig credential effects - #273
Open
marcusschiesser wants to merge 11 commits into
Open
Conversation
|
@marcusschiesser is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
marcusschiesser
marked this pull request as ready for review
August 3, 2026 15:01
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.
Summary
UiAppeffects for setting, getting, and deleting credentials by stable(service, account)keyrecording_unsupportedbefore OS access while session recording is activeCloses #272.
API
The same option shape drives
fx.setCredential(plussecret) andfx.deleteCredential.EffectCredentialResultreportsop,outcome, and an update-scopedsecretonly for a successful get. Outcomes areok,not_found,failed,rejected,recording_unsupported, andcancelled.Recording and replay
Recording keeps the live request's occupied-key window but resolves get as
recording_unsupportedwithout calling the credential store. Its metadata record retires the replay-side parked fake request at the same delivery point. Set/delete remain available and journal only their operation/outcome.Replay rejects hand-edited credential records that carry payload bytes or an operation/outcome shape the recorder cannot produce. The guarantee is scoped to credential effect records; ordinary UI input events are not general-purpose secret-redacted.
Tests
zig build testzig build test-desktop-runtime-corezig build validatepnpm --dir docs checkscripts/gate.sh fast(all change-relevant suites pass; local aggregate remains red for two environment/baseline checks: the package proxy cannot install the pinnedscriptc@0.0.22required by two TypeScript examples, andtoggle-big-viewmeasures ~10.7 ms against the 9 ms Apple Silicon budget; the same benchmark failure reproduces on untouchedmain)The new tests cover fake request copies and feeds, validation, duplicate keys, cancellation, real null-platform set/get/delete/not-found behavior, recording-time get refusal, metadata-only codec output, strict replay record validation, and replay-fed rejection ordering.