docs(adapter-utils): state what the header scanner's fixpoint rests on

The growth loop settles because the placeholder carries no byte that stops a
scan: no quote, no backslash, no whitespace, no backtick, no metacharacter.
Every caller passes `***REDACTED***`, so the assumption holds today, but it
is an assumption about a parameter and it belongs next to the loop that
depends on it.

Claude-Session: https://claude.ai/code/session_01RYigf3eMFJjey9iKRApPGE
This commit is contained in:
Michel Tomas 2026-09-06 02:08:25 +02:00
parent 5ad32ccc87
commit 5a4844dd34
No known key found for this signature in database
GPG Key ID: 0878846631FFD1E0
1 changed files with 6 additions and 0 deletions

View File

@ -700,6 +700,12 @@ function redactCommandSecretHeaders(
// a scan would consume makes one pass settle, which the caller's chain
// requires. Each round starts where the last stopped and the rounds cover
// disjoint text, so the loop stays linear.
//
// This rests on `redactedValue` carrying no quote, backslash, whitespace,
// backtick or shell metacharacter, which is what makes a scan cross it
// rather than stop inside it. Every caller passes `***REDACTED***`. A
// placeholder holding any of those bytes would stop one reading and not
// another, and the rule's output could move on a second pass.
for (;;) {
let grown: number = best.end;
const consider = (candidate: number) => {