chore(ingest): document unbounded ranges in scope for the `..` scan
public
chore(ingest): document unbounded ranges in scope for the `..` scan The structural `..`-scan already admits `[1..]` / `[..10]` / `[..]` (the `..` still sits inside its bracket group), so no functional change was needed; the 0072 / 1156 re-ingest produced no fixture diff. Update the docstrings/comments to record that unbounded omitted-endpoint ranges are shipped (ADR-31). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| Changeset | 8fd7cd6eb256a4918982e0f1b4ad1be5c74e9f88 |
|---|---|
| Author (claimed) | Timo Stolz <timo.stolz@gmail.com>, |
| Parents | a0ec71c81375 |
| Children | |
| Pushlog | by timo via ssh |
modified tools/ingest_tck.py +11 −7
| @@ -142,12 +142,15 @@ | ||
| 142 | 142 | def _value_range_brackets_ok(s: str) -> bool: |
| 143 | 143 | """True if every `..` in value-position `s` sits inside a bracketed range literal / |
| 144 | 144 | interval feel-core parses — INCLUDING the reverse-bracket spellings `]a..b]` |
| 145 | - (exclusive lower, ≡ `(a..b]`) and `[a..b[` (exclusive upper, ≡ `[a..b)`), both | |
| 146 | - shipped now. A structural scan that does NOT require bracket *types* to match: FEEL | |
| 147 | - intervals legitimately mix `[`/`(`/`]` (`(1..2]`), so an opener and a closer pair by | |
| 148 | - nesting alone. Reverse roles resolve positionally — a `]` with nothing open is a | |
| 149 | - reverse-open opener; a `[` whose innermost group already holds a `..` is a | |
| 150 | - reverse-close closer. Rejects a bare top-level `..` and stray / unbalanced brackets; | |
| 145 | + (exclusive lower, ≡ `(a..b]`) and `[a..b[` (exclusive upper, ≡ `[a..b)`) and the | |
| 146 | + UNBOUNDED spellings `[1..]` / `[..10]` / `[..]` (an omitted endpoint is `±∞`; | |
| 147 | + ADR-31), all shipped now. An omitted endpoint needs no special casing: the `..` | |
| 148 | + still sits inside its bracket group, so the structural balance check accepts it. A | |
| 149 | + scan that does NOT require bracket *types* to match: FEEL intervals legitimately mix | |
| 150 | + `[`/`(`/`]` (`(1..2]`), so an opener and a closer pair by nesting alone. Reverse | |
| 151 | + roles resolve positionally — a `]` with nothing open is a reverse-open opener; a `[` | |
| 152 | + whose innermost group already holds a `..` is a reverse-close closer. Rejects a bare | |
| 153 | + top-level `..` and stray / unbalanced brackets; | |
| 151 | 154 | a few exotic shapes not in the TCK (a reverse-open as a list's first element, |
| 152 | 155 | `[a..[list]]`) are conservatively skipped rather than risk a false positive (which |
| 153 | 156 | would crash the closed-loop fixture test).""" |
| @@ -346,7 +349,8 @@ | ||
| 346 | 349 | # `[1..10] instance of range<number>`, `]1..10].start`) or a |
| 347 | 350 | # membership-interval RHS (`x in [a..b]`, validated further by the |
| 348 | 351 | # membership scan below). The reverse-bracket spellings `]a..b]` / `[a..b[` |
| 349 | - # are in scope now (shipped), so the structural scan accepts them and | |
| 352 | + # and the unbounded spellings `[1..]` / `[..10]` (ADR-31) are in scope now | |
| 353 | + # (shipped), so the structural scan accepts them and | |
| 350 | 354 | # rejects only a bare top-level `..` or genuinely unbalanced brackets. |
| 351 | 355 | if not _value_range_brackets_ok(s): |
| 352 | 356 | return False |