Repository navigation
test(coding-agent): lock in extension startup errors naming the extension and cause (#3807) - #3841
Merged
Merged
Conversation
…sion and cause (#3807) origin/main already builds ExtensionStartupError with the failing extension path and cause in its message (1edfc92). Add regression tests for the reported scenario: a session_start handler that throws names the extension and cause on the SDK error, the stage and run errors, and the workflow journal. Attribute the existing changelog entry to #3807. Assistant-model: Claude Sonnet 5.5 Assistant-workflow: issues-to-merged-prs (run 7286d4f0-78e1-431b-a798-87da91fc30fc) Assistant-verification: vitest unit passed: npx vitest --run --project unit test/unit/workflow-stage-extension-startup-fallback.test.ts test/unit/stage-runner-thrown-retry.test.ts test/unit/model-fallback-classifier-conformance.test.ts (45 tests) Assistant-verification: vitest coding-agent passed: extension-startup-failure-message, sdk-builtin-parity, extension-reload-session-writes (184 tests) Assistant-verification: regression fails before passed: restoring the bare "Extension startup failed" message fails the new #3807 tests (4 unit, 2 coding-agent) Assistant-verification: npm run check passed: biome, bun typecheck, shrinkwrap Co-authored-by: Norin Lavaee <nlavaee@umich.edu>
…ror tests (#3807) Use .js specifiers for local imports and assert the concrete <inline:1> and <inline:2> paths so wrong extension attribution fails the tests. Assistant-model: Claude Opus 5.5 Assistant-workflow: issues-to-merged-prs (run 7286d4f0-78e1-431b-a798-87da91fc30fc) Assistant-verification: vitest unit passed: npx vitest --run test/extension-startup-failure-message.test.ts (2 tests) Assistant-verification: typecheck and lint passed: npm run check Co-authored-by: Norin Lavaee <nlavaee@umich.edu>
…ror (#3807) Assistant-model: Claude Opus 5.5 Assistant-workflow: issues-to-merged-prs (run 7286d4f0-78e1-431b-a798-87da91fc30fc) Assistant-verification: vitest unit passed: npx vitest --run test/extension-startup-failure-message.test.ts Assistant-verification: typecheck and lint passed: npm run check Co-authored-by: Norin Lavaee <nlavaee@umich.edu>
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.
Closes #3807
Summary
origin/mainalready fixes the reported behavior: commit1edfc9255replaced the bareAggregateErrorwithExtensionStartupError, whose message isExtension startup failed: <extension path>: <cause>and which has an enumerablefailureslist. This PR adds the missing regression coverage for the issue's scenario and attributes the existing changelog entry to #3807. No source behavior changes.Changes
packages/coding-agent/test/extension-startup-failure-message.test.ts(new): a throwingsession_starthandler (causeCannot read properties of undefined (reading 'fg')) is named inerror.message,String(error), the JSON offailures, anderrors; a second test checks two failing extensions in load order.test/unit/workflow-stage-extension-startup-fallback.test.ts:(#3807)test checking the run error, stageerror/failureMessage, and serialized journal entries.packages/coding-agent/CHANGELOG.md: added the "Extension startup failed" hides the failing extension and cause — AggregateError members dropped from every surface #3807 link to the existing Unreleased entry.Not covered
AggregateErrors ("Extension shutdown failed", "Session event callbacks failed") are out of scope. Thetheme.fgcrash is Interactive workflow stages bind ctx.ui.theme as undefined, crashing UI-reading extensions at session_start #3801.Verification
Assistant-workflow: issues-to-merged-prs (run 7286d4f0-78e1-431b-a798-87da91fc30fc)
Assistant-verification: regression fails before passed: reverting to the bare message fails the new tests (4 unit, 2 coding-agent)
Assistant-verification: vitest unit passed: 45 tests
Assistant-verification: vitest coding-agent passed: 184 tests
Assistant-verification: npm run check passed: biome, bun typecheck, shrinkwrap
Assistant-duration: 58m converged, estimated 2h
Assistant-verification: GitHub Actions CI passed: test (all platforms) on b023b67 (unit, integration, agent-suite, release-archive on linux-x64 and windows-x64; static-checks; CodeQL)
Assistant-verification: Greptile review passed: approved b023b67 with confidence 5/5 and no new comments
Co-authored-by: Norin Lavaee nlavaee@umich.edu
User-preference: loop each PR until CI is green and Greptile has no feedback, then merge


Confidence Score: 5/5
No blocking issues identified in these test and changelog changes; the reviewed changes are safe to merge.Summary
Adds regression tests for extension startup errors and links the existing changelog entry to #3807. No production behavior changes.
Reviews (3) · Last reviewed commit: "test(coding-agent): type startup failure..." · Reviewed by Greptile