Skip to content

walkWithScope (scoped numbering) lacks cell descent — cell floats/notes unregistered in scoped books #475

Description

@abalter

What. walkWithScope — numbering's scoped walker, active when counter-reset-scope resolves to chapter/section (any book with <config number-sections>, or an explicit config) — has no descendCellArrays call (numbering.js; compare core/walkers/discover.js:50). So a float or note authored inside a parsed table cell (_parsedCells / _htmlTable) registers in an unscoped article but silently does NOT register under a scoped book: no number, no cross-reference anchor, and for a <note> the note-placement "unregistered note" fallback path.

Provenance. Found by the pass-map audit (§3.2, a Wave-0 item never converted to an issue); re-confirmed and made load-bearing by the wave-1 walk-merges slice — it is the reason the M6+M7 merge (note registration riding numbering's walk) is DISCOVER-BRANCH ONLY, a constraint now stated in pipeline-contract.md's roster row, pipeline.md §4.5, and the merge site in numbering.js.

Fix shape. Add descendCellArrays to walkWithScope — a BYTE-CHANGING fix on scoped books with cell floats/notes (they gain numbers), so it needs its own output-adding slice with fixtures, not a ride-along. When it lands, the M6+M7 scoped branch can be revisited (the _scope-stamp wrap remains the second blocker).

Second walker divergence, same family: walkWithScope's header also describes an abandoned "walkWithScope.current" design that does not exist (audit §3.2) — fix the comment in the same slice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions