Harden reliability, remove global mutable state, fix test flakiness#16
Merged
Conversation
…ness - Remove configureDevtools global singleton; pass DevtoolsOptions through call sites to eliminate shared mutable state - Cap __PING_DEVTOOLS_STATE__ at 500 entries to prevent memory leaks - Guard localStorage/cookie access with try-catch for privacy modes - Pin GitHub Actions to commit SHAs for supply-chain security - Replace waitForTimeout with Playwright toPass/expect retries in e2e tests - Fix CORS credentials-mismatch false positive when no credentials sent - Remove hard-coded PKCE challengeMethod from token annotator - Add origin check to content relay for defense-in-depth - Fix service worker rehydration (module-eval vs activate lifecycle) - Add defensive guards for snapshot loading and event-store hydration - Clean up CDP client disconnect (reject pending calls, clear state) - Properly dispose ManagedRuntime on VS Code extension deactivate - Add devtools-core and vscode-extension to root tsconfig references - Fix devtools-ui ports export to use .ts source Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… consolidate BridgeHandle BREAKING CHANGE: `attachDevToolsBridge` is now `attachDaVinciBridge`. `BridgeHandle` is the single shared type for all bridges (replaces `JourneyBridgeHandle` and `OidcBridgeHandle`). File renamed from `bridge.ts` to `davinci-bridge.ts`. Also adds missing test coverage: - Ring buffer cap (emit.ts splices at 500 entries) - Cache/responseBody passthrough via client.cache.getCache - Cookie diff tracking (session:cookie events) - Multi-key storage diffs in a single transition - Multi-bridge coexistence (independent event streams) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
33b85fa to
546f82e
Compare
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
configureDevtoolsglobal singleton — options are now passed through call sites, eliminating shared mutable state that could leak between SDK instances__PING_DEVTOOLS_STATE__at 500 entries, guardlocalStorage/cookieaccess for privacy modes, add origin check to content relay, defensive guards for snapshot loading and event-store hydrationwaitForTimeoutwith PlaywrighttoPass()retry assertions, properlyawaitmock server closecredentials-mismatchnow only flags when the request actually sends credentials (Cookie/Authorization)challengeMethod: 'S256'from token annotator (only the authorize request knows the method)activate(fires once)ManagedRuntimeon deactivate, reject pending CDP calls on disconnect, exclude webview from tsconfigdevtools-coreandvscode-extensionto root tsconfig references, fixdevtools-uiports exportTest plan
pnpm testacross all packages to verify unit tests pass🤖 Generated with Claude Code