-
Notifications
You must be signed in to change notification settings - Fork 1
check --fix: subsection boundary and multi-table edge cases in the code-aware table scanner #768
Copy link
Copy link
Open
Labels
area:test-coverageTests, verification, coverage, or lint coverage gapTests, verification, coverage, or lint coverage gaparea:uxMessages, output, or next actions mislead or frustrateMessages, output, or next actions mislead or frustrateimpact:developer-experienceAffects authors, maintainers, or local workflowsAffects authors, maintainers, or local workflowspriority:p2Important but not immediately release-blockingImportant but not immediately release-blockingresolution:partialRelated work landed but meaningful residual work remainsRelated work landed but meaningful residual work remainsscope:specsync-6Applies to current SpecSync 6 behavior or release contractApplies to current SpecSync 6 behavior or release contract
Description
Activity
Metadata
Metadata
Assignees
Labels
area:test-coverageTests, verification, coverage, or lint coverage gapTests, verification, coverage, or lint coverage gaparea:uxMessages, output, or next actions mislead or frustrateMessages, output, or next actions mislead or frustrateimpact:developer-experienceAffects authors, maintainers, or local workflowsAffects authors, maintainers, or local workflowspriority:p2Important but not immediately release-blockingImportant but not immediately release-blockingresolution:partialRelated work landed but meaningful residual work remainsRelated work landed but meaningful residual work remainsscope:specsync-6Applies to current SpecSync 6 behavior or release contractApplies to current SpecSync 6 behavior or release contract
Follow-ups from Codex review of #766 (
table_rows_outside_codeinsrc/commands/check.rs), deferred because that package was already finalized. None affects the common case fixed by #766; all are worth a drill and a fix in 6.0.x.table_column_counttakes the first table's width whiletable_rows_endpicks the last table for insertion. If a### Exported Functionssubsection holds the export table followed by, say, a parameters table, the generated row lands in the second table with the first table's column count. Fix: identify one contiguous target table and derive both width and insertion offset from it (prefer the first table whose header names aNamecolumn).```` is content under CommonMark, but the scanner records it as a fence opener before the indentation check, so a later real table is treated as still fenced and--fix` falls back to the section end. Fix: check indentation before updating fence state.sub_positions(subsection boundary discovery) is fence-blind: a### Exampleline inside a fenced sample before the real export table ends the subsection early,table_rows_endreturnsNonefor that block, and the fallback inserts the row before the fenced heading, inside the fence. Fix: make the###scan skip fenced code the same way the row scanner does.Each should get a regression test in
tests/integration/fix.rsalongside the #766 tests.