Problem
The formatted thought log written to stderr has three defects:
- A revision with no
revisesThought prints "revising thought undefined".
- A
branchFromThought with no branchId draws a Branch header reading "ID: undefined".
- The border width counts the header's colour escape codes, so the box is drawn wider than its text.
Where it is pinned
src/sequentialthinking/__tests__/thought-logging.test.ts: "prints 'undefined' for a revision with no revisesThought", "draws a branch header even when no branch is recorded (no branchId)", "sizes the border from the coloured header, escape codes included", added in #4970 (Wave 1 of #4857). Each of these tests carries a KNOWN BUG marker: it asserts the current, wrong behavior, so the fix has to change it.
Expected
No "undefined" in headers, and the border is sized from the visible text.
Done when
- The behavior above is fixed, in the legacy-era (2025-11-25) server on SDK 1.x.
- The pinning tests assert the correct behavior, and their
KNOWN BUG markers are gone.
- The per-file 90% coverage gate still passes.
Problem
The formatted thought log written to stderr has three defects:
revisesThoughtprints "revising thought undefined".branchFromThoughtwith nobranchIddraws a Branch header reading "ID: undefined".Where it is pinned
src/sequentialthinking/__tests__/thought-logging.test.ts: "prints 'undefined' for a revision with no revisesThought", "draws a branch header even when no branch is recorded (no branchId)", "sizes the border from the coloured header, escape codes included", added in #4970 (Wave 1 of #4857). Each of these tests carries aKNOWN BUGmarker: it asserts the current, wrong behavior, so the fix has to change it.Expected
No "undefined" in headers, and the border is sized from the visible text.
Done when
KNOWN BUGmarkers are gone.