Repository navigation
debug(windows): trace the Kimi configuration readback failure [do not merge] - #11723
IvenKooLab wants to merge 1 commit into
Conversation
[High impact] The trace reaches stderr during Windows client setup and can include configuration values. Do not merge while the mismatch trace can print transport credentials. Findings
Fix with agent prompt### Issue 1
src/application/SetupClientConfiguration.ts:521-523
On a readback mismatch, this trace prints whole server entries and the first 400 characters of the configuration file. If those values contain transport credentials, such as an `Authorization` header on another server, `winDebug` copies them unchanged to stderr on Windows. Sharing the diagnostic log can then expose those credentials.
`AGENTS.md` requires transport authentication credentials to be redacted. Log the differing field names and comparison results instead of whole values or raw configuration text.
**How this was verified:** The mismatch branch passes configuration text and server entries directly to `winDebug`, which writes them to stderr without redaction.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds temporary configuration-stage and readback traces to stderr on Windows, or when
Reviews (1) · Last reviewed commit: "debug(windows): trace the Kimi configura..." · Reviewed by Greptile |
| winDebug( | ||
| `readback-mismatch registered=${String(registrationCurrent(readback, desired))} readback=${JSON.stringify(readback.servers[PRODUCT_IDENTITY.mcpServerKey])} desired=${JSON.stringify(desired)} fallback=${JSON.stringify(fallbackServers)} text=${JSON.stringify(text.slice(0, 400))}`, | ||
| ); |
There was a problem hiding this comment.
Credentials appear in debug logs
On a readback mismatch, this trace prints whole server entries and the first 400 characters of the configuration file. If those values contain transport credentials, such as an Authorization header on another server, winDebug copies them unchanged to stderr on Windows. Sharing the diagnostic log can then expose those credentials.
AGENTS.md requires transport authentication credentials to be redacted. Log the differing field names and comparison results instead of whole values or raw configuration text.
How this was verified: The mismatch branch passes configuration text and server entries directly to winDebug, which writes them to stderr without redaction.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/application/SetupClientConfiguration.ts
Line: 521-523
Comment:
**Credentials appear in debug logs**
On a readback mismatch, this trace prints whole server entries and the first 400 characters of the configuration file. If those values contain transport credentials, such as an `Authorization` header on another server, `winDebug` copies them unchanged to stderr on Windows. Sharing the diagnostic log can then expose those credentials.
`AGENTS.md` requires transport authentication credentials to be redacted. Log the differing field names and comparison results instead of whole values or raw configuration text.
**How this was verified:** The mismatch branch passes configuration text and server entries directly to `winDebug`, which writes them to stderr without redaction.
**Context Used:** AGENTS.md ([source](https://github.com/morluto/rea/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Temporary instrumentation, Windows-only (or REA_WIN_DEBUG=1). It prints the configuration stages and the readback mismatch so the failure recorded on main's Windows lane can be located before any behaviour changes.
5532020 to
f8f508c
Compare
|
Trace captured, so this debug PR is closed and its branch deleted. The failure was not Windows-specific: the fixture wrote Windows-lane trace (Kimi case): The fix is #11725 (test fixture on |
Temporary debug PR, not for review or merge. It adds Windows-only diagnostics to
src/application/SetupClientConfiguration.tsso the Kimi configuration readback failure recorded on main's Windows lane can be located.Failure under investigation (
maind6bcfc10,Windows capability and package lane):Reported with reproduction steps on #10532. This branch prints
REA-WIN-DEBUGlines from the configuration stages and readback comparison; it will be closed as soon as the trace is captured and the real fix is proposed.