Repository navigation
Keep a failed turn's stack in the diagnostics log - #14
Merged
neotechnet merged 1 commit intoNov 6, 2026
Merged
Conversation
A turn failure was logged with its code, message and request id only, so the log named the failure but never the line that raised it. The stack is what names it; the diagnostics entry keeps the first eight frames. turnFailure keeps error.stack unless the code is AUTH, whose message is dropped because a provider may echo part of the key. noteTurnFailure passes it on to the log entry, which already accepted a stack.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Issue
No issue. This restores a diagnostic that the local desktop profile carries as a
pnpm patch and that the 0.2.7 branch lost. Base branch is the local integration
stack (
stack/installed-0.2.7), notdev.What changed / 改了什么
ds-bot/src/host/turns.js:turnFailurekeepserror.stackunless the codeis
AUTH, whose message is already dropped because a provider may echo part ofthe key, and
noteTurnFailurepasses it to the diagnostics entry, which alreadykept the first eight frames of a stack.
ds-bot/test/diagnostics.test.js: theturnFailuretest now covers the stackkept, the AUTH stack dropped and a non-string stack ignored; a host test asserts
that a failed turn's diagnostics entry carries the stack and an AUTH failure's
does not.
Changelog
A failed Bot turn now records the line that failed in the diagnostics report.
How I checked it / 怎么验证的
npm test(inds-bot/): 1695 tests, 1693 pass, 0 fail, 2 skipped.node scripts/build-client.mjs --check: exit 0 (nosrc/client/change).npm run lint: 0 errors, 40 warnings, all pre-existing.index.jsorsrc/host/: not run locally. Thediff adds one field to an existing log entry and changes no turn code path.
After this change,
ds-bot/src/host/turns.jsis byte identical to the copyinstalled in the desktop profile (67829 bytes, sha256
0D7D6828757BD1BC5E19541DBAD86AD2BA89DA270D26442A0B5DBBBE1126DF35), which iswhat the port is for.
Checklist / 检查
src/client/not changed, sonpm run buildwas not needed andclient.jsis untouched.
Co-authored-by; authored by Steve Dempsey.