SessionFs structured error contract + workspace E2E tests#1102
Draft
SteveSandersonMS wants to merge 1 commit intomainfrom
Draft
SessionFs structured error contract + workspace E2E tests#1102SteveSandersonMS wants to merge 1 commit intomainfrom
SteveSandersonMS wants to merge 1 commit intomainfrom
Conversation
…e tests
- Regenerate rpc.ts from updated api.schema.json with structured error type
(error?: { code: 'ENOENT' | 'UNKNOWN', message?: string }) on all sessionFs results
- Update createTestSessionFsHandler to catch fs errors and return error objects
instead of throwing (matches the new RPC contract)
- Add E2E tests for workspace metadata and plan.md written via sessionFs
- Add test snapshots for new workspace tests
Depends on: github/copilot-agent-runtime#6479
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Updates the Node.js SDK to support the new sessionFs structured error contract from github/copilot-agent-runtime#6479.
Changes
pc.ts* from updated \�pi.schema.json\ — all sessionFs result types now include an optional \�rror\ object:
\\ ypescript
error?: { code: 'ENOENT' | 'UNKNOWN'; message?: string }
\\
Why
\�scode-jsonrpc\ \ResponseError\ loses the Node.js .code\ string property during serialization. The runtime's \WorkspaceManager.loadWorkspace()\ checks \�rror.code === 'ENOENT'\ to handle missing workspaces — without this contract, workspace initialization silently fails over SDK sessions.
Depends on