Title: refactor(credentials): resolve Vanta tokens through the coordinated client-token resolver by waleedlatif1 · Pull Request #9919 · simstudioai/sim · GitHub
Open Graph Title: refactor(credentials): resolve Vanta tokens through the coordinated client-token resolver by waleedlatif1 · Pull Request #9919 · simstudioai/sim
X Title: refactor(credentials): resolve Vanta tokens through the coordinated client-token resolver by waleedlatif1 · Pull Request #9919 · simstudioai/sim
Description: Summary vanta-token.ts is now a thin wrapper over resolveCoordinatedClientToken. The duplicated lock-and-memo machinery is gone: digests, lock_timeout, advisory lock, failure memo, decode helpers, upsert and invalidation by digest. About 180 lines are removed, so later fixes to the coordinated token chain reach Vanta too. CoordinatedClientTokenInput gains four optional fields: minRemainingMs, failureKeyQualifier, accessTokenDigestTag (also accepted by invalidateCoordinatedClientToken) and pinnedState. When a field is omitted the behavior is unchanged, so Shopify, Atlassian and Linear are unaffected. What Vanta reads and writes is byte-compatible with the previous code, so old and new workers share rows and contend on the same lock during a rolling deploy. That covers the row id, the advisory lock name and key, the failure-memo id and body, the access-token digest, the encrypted payload shape and order, the 30s reuse margin, and the first-mint scope pin. Vanta's exported API is unchanged. Type of Change Refactor (no functional change) Testing Compatibility proofs run against real Postgres in vanta-token.integration.ts (19 pass) and coordinated-client-token.integration.ts (11 pass). Fixture rows are seeded exactly as the previous build wrote them, using inline sha256 ids and digests and real encryption. The tests show that: the new resolver serves a fresh stored token without calling the provider; it honors an old failure memo and the expired-row scope pin; a minted token and a refusal are written where the old build reads them, with byte-equal payloads; invalidation matches the old digest; the resolver blocks on a raw advisory lock taken with the old key, then serves the token the "old build" commits; Shopify-style defaults keep their row id, digest and memo id. Five scratch format changes, made one at a time, each turned the suite red: the Vanta digest tag, the lock key, the failure-key scope, the default digest tag and the invalidation tag. bunx biome check, check:test-patterns, check:comment-hygiene and check:unused-exports pass. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing (new tests pass the test-audit authoring gate) No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary vanta-token.ts is now a thin wrapper over resolveCoordinatedClientToken. The duplicated lock-and-memo machinery is gone: digests, lock_timeout, advisory lock, failure memo, decode helpers,...
X Description: Summary vanta-token.ts is now a thin wrapper over resolveCoordinatedClientToken. The duplicated lock-and-memo machinery is gone: digests, lock_timeout, advisory lock, failure memo, decode helpers,...
Opengraph URL: https://github.com/simstudioai/sim/pull/9919
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:5bb4ecd9-fe25-7b71-ed7a-45199c924480 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8998:AE1F3:AF4CED:F64CE4:6AFB79A8 |
| html-safe-nonce | e10dd88d93358780eed5aac8a03f9240c29dcbdde4ebd2a25109b101ae151caf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTk4OkFFMUYzOkFGNENFRDpGNjRDRTQ6NkFGQjc5QTgiLCJ2aXNpdG9yX2lkIjoiNjQ3ODA3MzExNjc4NTA4MDc0NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9f0c232ca29f43f75db162035ce6f5d1445106c156fa9d47ad3be2f26e7562f2 |
| hovercard-subject-tag | pull_request:5269914069 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/9919/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary vanta-token.ts is now a thin wrapper over resolveCoordinatedClientToken. The duplicated lock-and-memo machinery is gone: digests, lock_timeout, advisory lock, failure memo, decode helpers,... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0e29e7974fdda2feeaf5c891efd4b23b0734b23480232b62c7bdef13f40b5b48 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2e8872b770cc4d5d0cc1f2026afab747a268e2ce |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width