Skip to content

doctor reads consolidate_max_bytes: 0 as a 0-byte cap, where the pipeline reads it as the cap being disabled #360

Closed

Description

@fdaviddpt

Found by round two of the release audit of v0.20.0..HEAD, before tagging 0.21.0. Ranked misreports, non-blocking, carried forward against the next milestone.

The divergence

pipeline/shell.py documents and implements consolidate_max_bytes: 0 as cap disabled — max_prompt_bytes: Skip-guard cap ... "0" disables it (:452), enforced by if max_prompt_bytes > 0: (:542).

The store-size check added to the doctor in this delta reads the same key at scripts/doctor.sh:379:

case "$_cmb" in (''|*[!0-9]*) : ;; (*) _CONSOLIDATE_MAX_BYTES=$((10#$_cmb)) ;; esac

0 is all digits, so it passes the guard and becomes a literal 0-byte cap.

What the user sees

Every later comparison (scripts/doctor.sh:443, :444) is then true for any non-empty store:

FAIL Store is too large to consolidate and cannot heal itself: N bytes against a thresholds.consolidate_max_bytes cap of 0
VERDICT: problem — memory is being captured but never consolidated

All of it false. With the cap disabled, consolidation runs every round. _STORE_NEEDS_A_HUMAN=1 also takes the new top verdict arm at scripts/doctor.sh:567, so this is the loudest thing the diagnostic can say, on a store that is fine.

Reaching it is plausible rather than exotic: the README row directly below this key, memory_inject_max_bytes, is documented "Set 0 to disable".

Shape of a fix

One rendering seam in the doctor: treat 0 as cap disabled and say so, rather than comparing against it. No pipeline change — pipeline/shell.py:452 is the authority on what the value means and it is already right.

Activity

  1. added
    priority:medium
    on Aug 18, 2026
  2. added
    cohort-1
    on Aug 27, 2026
  3. self-assigned this
    on Aug 27, 2026
  4. added a commit that references this issue on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

cohort-1priority:medium

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions