fix: clarify bug responsibility in sentinel guard message

Address review feedback from @HenryLoenwind:
- Change "This is a bug" to "This is a bug in the calling code
  shown in the attached stacktrace" to prevent users from reporting
  against the guard itself instead of providing the calling trace.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Protocol-zero-0 2026-02-20 17:39:38 +00:00
parent 98ebdceb64
commit df4b903b1f

View File

@ -1194,7 +1194,7 @@ export function createConfigIO(overrides: ConfigIoDeps = {}) {
if (json.includes(REDACTED_SENTINEL)) {
const sentinel_err = new Error(
`Refusing to write config for "${configPath}": found redaction sentinel ` +
`"${REDACTED_SENTINEL}". This is a bug — credentials would be permanently lost. ` +
`"${REDACTED_SENTINEL}". This is a bug in the calling code shown in the attached stacktrace — credentials would be permanently lost. ` +
`The config file on disk was not changed.`,
);
deps.logger.error(