Skip to content

Fail the build when the index root does not exist - #1772

Merged
thekevinscott merged 6 commits into
mainfrom
bot/1771-missing-index-root-1118
Nov 19, 2026
Merged

thekevinscott merged 6 commits into
mainfrom
bot/1771-missing-index-root-1118

Conversation

@thekevinbot

@thekevinbot thekevinbot commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #1771

A DirSQL whose index root does not exist now fails the build with root directory <dir> does not exist, in the Rust SDK, Python, and TypeScript. The check runs in prepare_resolved, the entry every build path shares. The CLI always roots at the current directory, so it cannot name a missing root and has no new test.

code_review_findings.rs's i3_watch_error_exposes_underlying_source built over a missing root to provoke a watch error; that build now fails, and the source() assertion it made is already covered by the error_helpers_build_expected_variants unit test, so the integration test is removed. The with_ignore_and_fs test seam skips the root check so its FileSystem double can stand in for a root such as /ws.

Red: CI job 135005854123 (Integration tests): a_missing_root_fails_the_build ... panicked at packages/rust/tests/missing_root.rs:12:18: the build succeeded; Python binding job 135005857802: it_raises_when_the_root_does_not_exist - Failed: DID NOT RAISE Exception.

Manual exercise: in Python, await DirSQL("/no/such/dir").ready() raised RuntimeError: root directory /no/such/dir does not exist; over an existing empty directory, SELECT 1 returned [{'x': 1}].

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)

E2E Verification

  • Ran e2e suites locally for every affected SDK
  • Python SDK e2e: pass
  • TypeScript SDK e2e: pass
  • Rust core e2e (if applicable): pass (cargo test -p dirsql --features cli; the non_utf8_names suites fail locally on main too, a filesystem limit of this host)
  • 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: just e2e-attest-ts; in packages/python, testing-conventions e2e attest 'uv run python -m pytest <20 non-speed e2e files> -x -q' after maturin develop --release and a release CLI build
  • Result summary: TS 29 passed; Python 53 passed (speed suites not run: the change adds one existence check before the walk)

@thekevinbot
thekevinbot marked this pull request as ready for review November 18, 2026 18:22
…x-root-1118

# Conflicts:
#	packages/rust/src/lib.rs
@thekevinscott
thekevinscott merged commit 5a658c3 into main Nov 19, 2026
89 checks passed
@thekevinscott
thekevinscott deleted the bot/1771-missing-index-root-1118 branch November 19, 2026 01:55
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.

A missing index root does not fail the build

2 participants