Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
912020c
Test that brace groups follow bash expansion in path-tables
thekevinbot Oct 5, 2026
cd8c60d
Expand path-table braces as bash does
thekevinbot Oct 5, 2026
c43d370
e2e attestation for claude/1262-brace-literal
thekevinbot Oct 5, 2026
671b75c
e2e attestation for claude/1262-brace-literal
thekevinbot Oct 5, 2026
cf516e9
Scan braces with iterators so every scan terminates
thekevinbot Oct 5, 2026
6ae735e
e2e attestation for claude/1262-brace-literal
thekevinbot Oct 5, 2026
6809016
e2e attestation for claude/1262-brace-literal
thekevinbot Oct 5, 2026
38fe559
Pin the sequence guards and bash's element-count limit
thekevinbot Oct 5, 2026
84bebad
Merge origin/main into claude/1262-brace-literal
thekevinbot Oct 5, 2026
c48199e
e2e attestation for claude/1262-brace-literal
thekevinbot Oct 5, 2026
14cd991
e2e attestation for claude/1262-brace-literal
thekevinbot Oct 5, 2026
5e74090
Merge remote-tracking branch 'origin/main' into claude/1262-brace-lit…
thekevinbot Oct 5, 2026
08dc87d
e2e attestation for claude/1262-brace-literal
thekevinbot Oct 5, 2026
b327ac7
e2e attestation for claude/1262-brace-literal
thekevinbot Oct 5, 2026
84f5326
Merge remote-tracking branch 'origin/main' into claude/1262-brace-lit…
thekevinbot Oct 5, 2026
494fcdd
e2e attestation for claude/1262-brace-literal
thekevinbot Oct 5, 2026
5ea17af
e2e attestation for claude/1262-brace-literal
thekevinbot Oct 5, 2026
b364316
Merge remote-tracking branch 'origin/main' into claude/1262-brace-lit…
thekevinbot Oct 5, 2026
ee1eb2a
e2e attestation for claude/1262-brace-literal
thekevinbot Oct 5, 2026
42a8a90
e2e attestation for claude/1262-brace-literal
thekevinbot Oct 5, 2026
47fcbcd
Drop history from the unclosed-class comment
thekevinbot Oct 5, 2026
14262a3
e2e attestation for claude/1262-brace-literal
thekevinbot Oct 5, 2026
1efa332
e2e attestation for claude/1262-brace-literal
thekevinbot Oct 5, 2026
42886c6
Merge remote-tracking branch 'origin/main' into claude/1262-brace-lit…
thekevinbot Oct 5, 2026
f6ce938
e2e attestation for claude/1262-brace-literal
thekevinbot Oct 5, 2026
c5c0caf
e2e attestation for claude/1262-brace-literal
thekevinbot Oct 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions PARITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,13 @@ the skip rules (configured `ignore` plus the built-in `node_modules/**` and
by `db::query` and the `dirsql_path` module). All three SDKs and the CLI get the
same answers with no per-binding surface and no SDK signature changes.

**Path-table braces follow bash brace expansion (#1262) — parity by
construction, no drift.** A comma group alternates, a `..` range expands, and
any other brace is literal text. The expansion runs in the shared Rust core
(`brace::expand`, called by `scanner::compile_glob`), so all three SDKs and the
CLI match the same files with no per-binding surface and no SDK signature
changes. Config `[[table]] glob` does not use it yet.

**Gitignore-by-default in path-tables (#742) — at parity, opt-out
restored (#745/#746).** Path-table scans respect `.gitignore` files by default
(hierarchical, traversal-pruned, hidden files still scanned). The *behavior*
Expand Down
7 changes: 7 additions & 0 deletions docs/reference/path-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ depth, as in the shell. A trailing `/` is `*` appended, so `'./*/'` is
A path containing `*`, `?`, `[` or `{` is a glob and is used exactly as
written: `*` matches within a single directory, `**` crosses directories.

Braces expand as bash expands them. A group holding a comma is an
alternation: `'./docs/{a,b}.md'` is `docs/a.md` and `docs/b.md`, and groups
nest. A group holding a `..` range counts: `'./log/{1..3}.txt'`,
`'./{a..c}.md'`, `'./{01..10}.md'` (zero-padded) and `'./{1..10..2}.md'`
(every second value). Any other brace is literal text, so `'./br/{q}.md'`
names the file `br/{q}.md`, and `\{` is always a literal brace.

The scan starts at the last directory named outright before the first glob
component, and descends only as deep as the pattern can match --
`'./small/*.md'` lists `small/` and nothing else -- so a query over one
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
**Changed** Braces in a path-table follow bash brace expansion. A group with
a top-level comma (`{a,b}`, nested allowed) is an alternation, and a `..`
range (`{1..3}`, `{a..c}`, `{01..10}`, `{1..10..2}`) expands to each value.
Any other brace is literal text: `'./br/{q}.md'` names the file `br/{q}.md`
where it used to match `br/q.md`, and `{` or `}` without a partner no longer
fails to compile. Config `[[table]] glob` is unchanged.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"command": "just test-e2e",
"ran_at": 1791240509,
"exit_code": 0,
"commit": "42886c665ab14434f259593bf7868455cf206eda",
"branch": "claude/1262-brace-literal"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
### Core: path-table braces follow bash brace expansion

#### Summary

A path-table's braces now expand as bash expands them before globbing: a
group with a top-level comma is an alternation, a `..` range expands to each
value, and every other brace is literal text. `'./br/{q}.md'` used to match
`br/q.md` and now matches only a file named `br/{q}.md`; `'./a{1..3}.md'`
used to match nothing and now matches `a1.md`, `a2.md`, `a3.md`. Comma groups
behave as before. Every surface that resolves a path-table is affected (CLI,
REPL, HTTP server, SDKs, `--on-file`); config `[[table]] glob` is not.

#### Required changes

| Surface | Before | After |
| ------- | ------ | ----- |
| One-option group | `SELECT * FROM './br/{q}.md'` (matched `br/q.md`) | `SELECT * FROM './br/q.md'` |

#### Deprecations removed

_None._

#### Behavior changes without code changes

- A brace group with neither a top-level comma nor a valid `..` range is
literal text.
- `{1..3}`, `{a..c}`, `{01..10}` and `{1..10..2}` expand to their values
instead of matching the literal text between the braces.
- An unpaired `{` or `}` is literal text instead of a glob compile error.

#### Verification

```python
# root holds q.md, {q}.md, a1.md and a2.md
rows = await DirSQL(root).query("SELECT path FROM './{q}.md'")
# expected: [{"path": "{q}.md"}]
rows = await DirSQL(root).query("SELECT path FROM './a{1..2}.md' ORDER BY path")
# expected: [{"path": "a1.md"}, {"path": "a2.md"}]
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
**Changed** Braces in a path-table follow bash brace expansion. A group with
a top-level comma (`{a,b}`, nested allowed) is an alternation, and a `..`
range (`{1..3}`, `{a..c}`, `{01..10}`, `{1..10..2}`) expands to each value.
Any other brace is literal text: `'./br/{q}.md'` names the file `br/{q}.md`
where it used to match `br/q.md`, and `{` or `}` without a partner no longer
fails to compile. Config `[[table]] glob` is unchanged.
40 changes: 40 additions & 0 deletions packages/rust/migrations.d/2026-10-05-brace-groups-follow-bash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
### Core: path-table braces follow bash brace expansion

#### Summary

A path-table's braces now expand as bash expands them before globbing: a
group with a top-level comma is an alternation, a `..` range expands to each
value, and every other brace is literal text. `'./br/{q}.md'` used to match
`br/q.md` and now matches only a file named `br/{q}.md`; `'./a{1..3}.md'`
used to match nothing and now matches `a1.md`, `a2.md`, `a3.md`. Comma groups
behave as before. Every surface that resolves a path-table is affected (CLI,
REPL, HTTP server, SDKs, `--on-file`); config `[[table]] glob` is not.

#### Required changes

| Surface | Before | After |
| ------- | ------ | ----- |
| One-option group | `SELECT * FROM './br/{q}.md'` (matched `br/q.md`) | `SELECT * FROM './br/q.md'` |

#### Deprecations removed

_None._

#### Behavior changes without code changes

- A brace group with neither a top-level comma nor a valid `..` range is
literal text.
- `{1..3}`, `{a..c}`, `{01..10}` and `{1..10..2}` expand to their values
instead of matching the literal text between the braces.
- An unpaired `{` or `}` is literal text instead of a glob compile error.

#### Verification

```bash
cd "$(mktemp -d)"
touch q.md '{q}.md' a1.md a2.md
dirsql query "SELECT path FROM './{q}.md'"
# expected: [{"path":"{q}.md"}]
dirsql query "SELECT path FROM './a{1..2}.md' ORDER BY path"
# expected: [{"path":"a1.md"},{"path":"a2.md"}]
```
Loading
Loading