Skip to content

Keep a failed turn's stack in the diagnostics log - #14

Merged
neotechnet merged 1 commit into
stack/installed-0.2.7from
fix/turns-failure-stack-20261106
Nov 6, 2026
Merged

neotechnet merged 1 commit into
stack/installed-0.2.7from
fix/turns-failure-stack-20261106

Conversation

@neotechnet

Copy link
Copy Markdown
Owner

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), not dev.

What changed / 改了什么

  • ds-bot/src/host/turns.js: turnFailure keeps error.stack unless the code
    is AUTH, whose message is already dropped because a provider may echo part of
    the key, and noteTurnFailure passes it to the diagnostics entry, which already
    kept the first eight frames of a stack.
  • ds-bot/test/diagnostics.test.js: the turnFailure test now covers the stack
    kept, 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 (in ds-bot/): 1695 tests, 1693 pass, 0 fail, 2 skipped.
  • node scripts/build-client.mjs --check: exit 0 (no src/client/ change).
  • npm run lint: 0 errors, 40 warnings, all pre-existing.
  • Smoke test, for changes to index.js or src/host/: not run locally. The
    diff adds one field to an existing log entry and changes no turn code path.
  • Screenshot attached, for interface changes: no interface change.

After this change, ds-bot/src/host/turns.js is byte identical to the copy
installed in the desktop profile (67829 bytes, sha256
0D7D6828757BD1BC5E19541DBAD86AD2BA89DA270D26442A0B5DBBBE1126DF35), which is
what the port is for.

Checklist / 检查

  • One issue, one subject.
  • src/client/ not changed, so npm run build was not needed and client.js
    is untouched.
  • No keys, tokens or personal data.
  • No AI tool as author or Co-authored-by; authored by Steve Dempsey.

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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T13:50:12.274591Z f2d4443 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@neotechnet
neotechnet merged commit f61b52b into stack/installed-0.2.7 Nov 6, 2026
13 checks passed
@neotechnet
neotechnet deleted the fix/turns-failure-stack-20261106 branch November 6, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant