Repository navigation
fix: keep visual whitespace out of authoritative structure #319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
cea0e7b
9f7574f
e84994e
1e762d5
9a45941
9e59b70
e3f00ea
33f53ac
5cb315d
365f253
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| ## Fix source-only indentation depth | ||
|
|
||
| - Keep leading spaces and ` ` available as diagnostics without persisting | ||
| them as authoritative structure; only declared HTML/CSS/OOXML or list | ||
| nesting is explicit. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # ADR 0103: Source-only whitespace is not authoritative structure | ||
|
|
||
| - Status: Accepted | ||
| - Date: 2026-08-20 | ||
| - Depends on: [0073](0073-llm-structure-adjudication.md), [0102](0102-semantic-source-unit-boundaries.md) | ||
|
|
||
| ## Context | ||
|
|
||
| Rich-text exports often contain leading spaces or ` ` characters that | ||
| only preserve an editor's visual alignment. Treating every distinct width as | ||
| a nesting level makes unrelated list items appear deeply nested, especially | ||
| when an export mixes tabs, non-breaking spaces, and manual alignment. The | ||
| result is an authoritative structure decision without structural evidence. | ||
|
|
||
| ## Decision | ||
|
|
||
| `Chunk` retains the total source indentation for diagnostics and fallback | ||
| rendering, but exposes declared indentation separately. Only HTML/CSS/OOXML | ||
| declarations and nested list-container depth populate declared indentation. | ||
| Persistence may mark a unit `explicit` only when declared indentation exists. | ||
| Source-only whitespace follows the existing contextual-orchestrator | ||
| adjudication path; if that channel is unavailable, it remains `unresolved` | ||
| with level zero. | ||
|
|
||
| ## Consequences | ||
|
|
||
| - Visual alignment cannot manufacture hierarchy or distort the buyer view. | ||
| - Real CSS, OOXML, and list-container structure remains authoritative. | ||
| - Reprocessing with contextual-orchestrator can resolve source-only cases while | ||
| preserving the original body and diagnostic width. | ||
|
|
||
| ## References | ||
|
|
||
| World Wide Web Consortium. (n.d.). *HTML Living Standard: The `ol`, `ul`, and | ||
| `li` elements*. WHATWG. https://html.spec.whatwg.org/multipage/grouping-content.html | ||
|
|
||
| World Wide Web Consortium. (n.d.). *CSS box model module level 3*. W3C. | ||
| https://www.w3.org/TR/css-box-3/ |
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 Info: Narrowed exception set may let rare transport errors escape isolation The batch failure handling changed from a broad (Refers to this code) Was this helpful? React with 👍 or 👎 to provide feedback. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 Info: Adjudicated and explicit indent levels use independent numbering With source-only whitespace now routed to adjudication instead of being treated as explicit, a document can end up with both declared-indent chunks (whose (Refers to this code) Was this helpful? React with 👍 or 👎 to provide feedback. |
Uh oh!
There was an error while loading. Please reload this page.