Skip to content

fix: resolve './/x' path-tables under the index root - #1603

Merged
thekevinbot merged 7 commits into
mainfrom
bot/1579-dot-double-slash-1104
Nov 4, 2026
Merged

thekevinbot merged 7 commits into
mainfrom
bot/1579-dot-double-slash-1104

Conversation

@thekevinbot

@thekevinbot thekevinbot commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #1579

A path-table written .//x resolved against the filesystem root instead of the index root: './/a/top.md' returned nothing and './/etc/hostname' read /etc/hostname. After ./ was stripped, the rest kept its leading /, so index_root.join(...) replaced the base. The fix trims separators after the leading ./, so .//x resolves like ./x.

Sibling: #1580 (.. folded lexically in absolute/~ tables) is in the same module, but it has a separate cause and is not touched here.

Red

Red tests pushed alone (974bd9d). CI failed on exactly those assertions (left: [], right: ["folder/a.md"] / ["docs/a.md"]) on Linux and Windows:

By hand

Ran the issue's repro with the release binary: './/a/top.md' gives [{"path":"a/top.md"}], and './/etc/hostname' gives []. './/a', './//a/*.md' and './/**' give a/top.md. './/' gives [] (no top-level files).

E2E Verification

  • Ran e2e suites locally for every affected SDK
  • Python SDK e2e: pass
  • TypeScript SDK e2e: pass
  • Rust core e2e (if applicable): pass
  • packages/python/e2e-attestations/<branch>.json receipt written if packages/python changed (just e2e-attest-python)
  • packages/ts/e2e-attestations/<branch>.json receipt written if packages/ts changed (just e2e-attest-ts)
  • Command(s) run: cargo test --features cli --test path_table_cli_e2e --test path_table_query --test path_table_globs --test glob_conformance; testing-conventions e2e attest 'pnpm test:e2e' (packages/ts); testing-conventions e2e attest 'uv run python -m pytest tests/e2e/query_contract_test.py tests/e2e/use_case_join_test.py tests/e2e/use_case_dossier_test.py tests/e2e/glob_speed_one_level_test.py tests/e2e/stat_speed_test.py -x -q' (packages/python)
  • Result summary: Rust path-table suites all passed. TS: 19/19 passed. Python (path-table-impacted subset): 15/15 passed. Re-run on the merge with main (b2f173f, which brings in fix: resolve '..' physically in absolute and ~ path-tables #1606) with fresh receipts.

Changelog / Migrations

  • Changelog fragment added under <root>/<pkg>/changelog.d/ for each changed package (or: skip-changelog trailer on a commit with reason)
  • Migration fragment with the same slug added under <root>/<pkg>/migrations.d/ for each changed package (every subsection but Summary _None._ when nothing breaks)

@thekevinbot
thekevinbot merged commit df27179 into main Nov 4, 2026
89 checks passed
@thekevinbot
thekevinbot deleted the bot/1579-dot-double-slash-1104 branch November 4, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resolve './/x' path-tables against the index root, not the filesystem root

1 participant