fix(daemon): preserve ACP startup diagnostics - #6267
Conversation
|
Queued for QA validation — this PR changes runtime diagnostics that users and support flows rely on, so we want a manual QA pass before merge. Nothing needed from you right now; we will follow up here once it is validated. |
nettee
left a comment
There was a problem hiding this comment.
@Siri-Ray I reviewed the ACP startup diagnostics change in apps/daemon/src/agent-protocol/acp/session.ts and the new coverage in apps/daemon/tests/acp.test.ts. The phase tracking, bounded stderr capture, ANSI/control-character cleanup, and shared secret redaction all line up with the intended failure-path behavior, and I re-ran corepack pnpm --filter @open-design/daemon exec vitest run tests/acp.test.ts locally with 73 passing tests. Nice tightening of a high-risk runtime path while keeping the user-facing error concise.
Preserve both the startup-diagnostics regression coverage from the PR and the opted-in ACP turn-end completion coverage from main. Generated-By: looper 0.11.1 (runner=fixer, agent=codex)
AmyShang-alt
left a comment
There was a problem hiding this comment.
Thanks for the contribution. QA found a blocking secret-redaction edge case in the ACP child-exit diagnostic. Please address the inline finding before validation.
Generated-By: looper 0.11.8 (runner=fixer, agent=codex)
|
Looper fixer round complete — f43a8e4
🔁 Powered by Looper · runner=fixer · agent=codex · An autonomous AI dev team for your GitHub repos. |
|
Thanks for the contribution. I revalidated the current head after the ANSI-split credential fix. The focused ACP suite passed 75/75, AMR ACP integration passed 40/40, daemon type checks passed, and current-head CI is green. Child-exit diagnostics now normalize terminal control sequences before redaction, keep stderr bounded, and preserve phase and exit metadata without exposing the tested credential. Conclusion: Accepted. |
Fixes #6266
Why
The 0.16.1 reliability investigation found Hermes and Kimi startup failures collapsing into the same generic
ACP session exited before completionerror. The ACP bridge retained stderr only for an AMR-specific retry classifier, so when a child exited before producing a JSON-RPC error, the provider/configuration reason was discarded.This change preserves actionable startup evidence while bounding it, stripping terminal control codes, and applying the repository's secret/PII redactor before the diagnostic leaves the process boundary.
What users will see
The primary error message stays concise. Support traces and structured error details now identify the failed ACP phase (
initialize,session/new, model selection, or prompt), exit code/signal, and a redacted stderr tail when available.Surface area
apps/weborapps/desktop(including Electron menu bar)odsubcommand or flag, newtools-dev/tools-packflag, or newOD_*env var/api/*endpoint, new SSE event, or changed shape inpackages/contractsskills/,design-systems/,design-templates/, orcraft/, or change to the skills protocolTRANSLATIONS.mdfor the locale workflow)package.json(dependenciesordevDependencies); workspace-packagepackage.jsonfiles are out of scope. Include a paragraph on what we get vs. what bytes we ship (seeCONTRIBUTING.md→ Code style)Screenshots
Not applicable; this is an agent-runtime diagnostics change with no UI changes.
Bug fix verification
apps/daemon/tests/acp.test.ts(preserves redacted stderr diagnostics for startup exits;classifies exits after initialize as session setup failures)mainbecause the error contained neither structured details nor stderr, then passed on this branch.Validation
corepack pnpm --filter @open-design/daemon exec vitest run tests/acp.test.ts(73 passed)corepack pnpm --filter @open-design/daemon exec vitest run tests/amr-acp-integration.test.ts(40 passed)corepack pnpm guardcorepack pnpm typecheck