From e0e54f3461a3161889b043099366d087f1aaab6c Mon Sep 17 00:00:00 2001 From: Kaloyan Naumov Date: Tue, 1 Dec 2026 23:00:41 +0000 Subject: [PATCH 1/3] A TypeScript path no member owns no longer reindexes every member With a member list, a changed TypeScript file outside every member (a root `*.config.ts`, `scripts/*.ts`, `tools/**`) made the filter return the whole list. The merge keeps a document only from a member that owns it, so none of those indexes could hold the file: the pass reindexed every member and converted nothing for it. Such a path now selects no member. A window holding only paths no member owns runs no indexer and converts an empty index, so its delta still carries the window's deletions. An empty selection no longer falls through to the indexer run on the checkout root, which is the run a member list exists to avoid; a checkout without a member list still takes it. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Kaloyan Naumov --- docs/architecture/code-index-architecture.md | 12 +++++----- scripts/scip_harness/run_typescript_delta.sh | 9 +++---- scripts/scip_harness/scip_ts_projects.py | 17 +++++-------- .../test_run_typescript_delta_umbrella.py | 24 +++++++++++++++++-- tests/unit/test_scip_ts_projects.py | 9 +++++-- 5 files changed, 46 insertions(+), 25 deletions(-) diff --git a/docs/architecture/code-index-architecture.md b/docs/architecture/code-index-architecture.md index 1573ed82c17..463c776d2d9 100644 --- a/docs/architecture/code-index-architecture.md +++ b/docs/architecture/code-index-architecture.md @@ -348,12 +348,12 @@ applies it. Per touched file the apply upserts what the delta emits and tombston file's `scip` rows it no longer emits; a deleted file is tombstoned whole. Re-applying a delta gives the same live set. -| Producer | Language | Watermark | Workers | How it runs | -| ----------------- | ----------------------- | ---------------- | ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `scip-clang` | C++ | `scip_commit` | `code_scip_full`, `code_scip_delta`, `code_scip_apply` | Changed TUs (and TUs including changed headers, capped) via `run_delta.sh`; `code_scip_full` seeds the tier and re-indexes it weekly. | -| `scip-typescript` | TypeScript / JavaScript | `scip_commit_ts` | `code_scip_ts_delta` | Indexes named projects, or the members of an umbrella root tsconfig (including explicit tsconfig file references); a delta indexes only the projects that contain the window's files unless a shared config or lockfile changed, or a changed TypeScript path sits outside every member. The converter still bounds the output to the TypeScript window. | -| `scip-go` | Go | `scip_commit_go` | `code_scip_go_delta` | One build per module (`run_go_monorepo_delta.sh`). | -| `scip-python` | Python | `scip_commit_py` | `code_scip_py_delta`, `code_scip_apply` | Per-merge delta (`run_python_delta.sh`); a first run indexes the tree. | +| Producer | Language | Watermark | Workers | How it runs | +| ----------------- | ----------------------- | ---------------- | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `scip-clang` | C++ | `scip_commit` | `code_scip_full`, `code_scip_delta`, `code_scip_apply` | Changed TUs (and TUs including changed headers, capped) via `run_delta.sh`; `code_scip_full` seeds the tier and re-indexes it weekly. | +| `scip-typescript` | TypeScript / JavaScript | `scip_commit_ts` | `code_scip_ts_delta` | Indexes named projects, or the members of an umbrella root tsconfig (including explicit tsconfig file references); a delta indexes only the projects that contain the window's files unless a shared config or lockfile changed; a TypeScript file no project contains selects none. The converter still bounds the output to the TypeScript window. | +| `scip-go` | Go | `scip_commit_go` | `code_scip_go_delta` | One build per module (`run_go_monorepo_delta.sh`). | +| `scip-python` | Python | `scip_commit_py` | `code_scip_py_delta`, `code_scip_apply` | Per-merge delta (`run_python_delta.sh`); a first run indexes the tree. | `code/domain/index/compiler_tiers.py` (`TIERS`) is the one table of watermark, label and workers per producer; status handlers and the dashboard read it. A delta worker diff --git a/scripts/scip_harness/run_typescript_delta.sh b/scripts/scip_harness/run_typescript_delta.sh index 2353888518d..77365b9dd0f 100755 --- a/scripts/scip_harness/run_typescript_delta.sh +++ b/scripts/scip_harness/run_typescript_delta.sh @@ -151,9 +151,10 @@ JSONEOF if [[ ${#targets[@]} -eq 0 ]]; then # No member list: a regular root tsconfig (or a pnpm/yarn workspace) # is indexed by invoking scip-typescript on the checkout with only the - # workspace flags. An umbrella whose members were all skipped still - # writes an empty index. - if [[ ${#PROJECTS[@]} -eq 0 ]]; then + # workspace flags. A member list whose members were all skipped, or a + # delta that selected none (only paths no member owns changed), still + # writes an empty index: the root pass is what the list exists to avoid. + if [[ ${#ALL_PROJECTS[@]} -eq 0 ]]; then NODE_OPTIONS="--max-old-space-size=$NODE_HEAP_MB" \ "$SCIP_TYPESCRIPT" index "${ws[@]}" --output "$WORK/index.scip" >&2 else @@ -200,7 +201,7 @@ if [[ "$BASE" != "--full" ]]; then mapfile -t PROJECTS <<<"$filtered" else # An empty filter is a real empty selection (e.g. an unowned - # package.json). Do not keep the full member set. + # package.json or TypeScript file). Do not keep the full member set. PROJECTS=() fi # A package manifest, lockfile, or tsconfig in a selected member (or a diff --git a/scripts/scip_harness/scip_ts_projects.py b/scripts/scip_harness/scip_ts_projects.py index 48a1d08e210..ec43e3eaefd 100755 --- a/scripts/scip_harness/scip_ts_projects.py +++ b/scripts/scip_harness/scip_ts_projects.py @@ -6,8 +6,9 @@ workspace: scip-typescript loads every referenced project at once and can exhaust the heap. This helper expands that root to its member project directories or explicit tsconfig files, and on a delta pass keeps only the -members that contain a changed path. A change to a shared config or lockfile, -or a TypeScript path that no member owns, falls back to the full member set. +members that contain a changed path. A change to a shared config or lockfile +falls back to the full member set. A TypeScript path that no member owns +selects none: the merge keeps a document only from a member that owns it. """ from __future__ import annotations @@ -249,8 +250,9 @@ def is_index_trigger(relpath: str) -> bool: def select_projects_for_delta(projects: list[str], changed_paths: list[str]) -> list[str]: - """Projects to index for this window. Shared config/lockfile changes, or - any TypeScript path that no named project owns, keep the full set. + """Projects to index for this window. Shared config/lockfile changes keep + the full set. A TypeScript path that no named project owns selects none: + the merge would drop it from every member's index. A non-TypeScript, non-config change inside a member (a README, for example) does not select that member. @@ -264,13 +266,6 @@ def select_projects_for_delta(projects: list[str], changed_paths: list[str]) -> for project in projects if any(project_owns(project, path) and is_index_trigger(path) for path in changed_paths) ] - unowned_ts = [ - path - for path in changed_paths - if is_typescript_path(path) and not any(project_owns(project, path) for project in projects) - ] - if unowned_ts: - return list(projects) return selected diff --git a/tests/unit/test_run_typescript_delta_umbrella.py b/tests/unit/test_run_typescript_delta_umbrella.py index 1890760170b..6030d09c33d 100644 --- a/tests/unit/test_run_typescript_delta_umbrella.py +++ b/tests/unit/test_run_typescript_delta_umbrella.py @@ -193,7 +193,7 @@ def test_explicit_tsconfig_file_is_passed_to_the_indexer(tmp_path: Path) -> None assert not (repo / "packages/app/tsconfig.scip.json").exists() -def test_delta_with_owned_and_unowned_typescript_indexes_every_member(tmp_path: Path) -> None: +def test_delta_with_owned_and_unowned_typescript_indexes_the_owner(tmp_path: Path) -> None: repo = _repo(tmp_path) (repo / "outside.ts").write_text("export const o = 1;\n") _git(repo, "add", "-A") @@ -205,7 +205,27 @@ def test_delta_with_owned_and_unowned_typescript_indexes_every_member(tmp_path: _git(repo, "-c", "user.name=t", "-c", "user.email=t@t", "commit", "-qm", "mixed") head = _git(repo, "rev-parse", "HEAD") log = _run(tmp_path, repo, base, head) - assert _targets(_runs(log)) == ["packages/app", "packages/lib"] + assert _targets(_runs(log)) == ["packages/app"] + + +def test_delta_with_only_an_unowned_typescript_path_runs_no_indexer(tmp_path: Path) -> None: + """No member owns tools/build.ts, so no member index can hold it. The harness + runs no indexer, neither the members nor the checkout root, and still writes + the window's delta.""" + repo = _repo(tmp_path) + (repo / "tools").mkdir() + (repo / "tools/build.ts").write_text("export const t = 1;\n") + _git(repo, "add", "-A") + _git(repo, "-c", "user.name=t", "-c", "user.email=t@t", "commit", "-qm", "tools") + base = _git(repo, "rev-parse", "HEAD") + (repo / "tools/build.ts").write_text("export const t = 2;\n") + _git(repo, "add", "-A") + _git(repo, "-c", "user.name=t", "-c", "user.email=t@t", "commit", "-qm", "edit tools") + head = _git(repo, "rev-parse", "HEAD") + log = _run(tmp_path, repo, base, head) + assert _runs(log) == [] + assert "--changed-files" in _convert_args(log) + assert (tmp_path / "delta.json").is_file() def test_member_path_with_a_space_survives_full_and_delta_passes(tmp_path: Path) -> None: diff --git a/tests/unit/test_scip_ts_projects.py b/tests/unit/test_scip_ts_projects.py index 98cf5f5bab7..6d2329c50bd 100644 --- a/tests/unit/test_scip_ts_projects.py +++ b/tests/unit/test_scip_ts_projects.py @@ -139,9 +139,14 @@ def test_discover_preserves_explicit_tsconfig_file_references(tmp_path: Path) -> assert discover_umbrella_projects(tmp_path) == ["packages/app/tsconfig.build.json"] -def test_delta_falls_back_when_any_typescript_path_is_unowned() -> None: +def test_a_typescript_path_no_member_owns_selects_no_member() -> None: + """The merge keeps a document only from a member that owns it, so no member's + index can hold an unowned path: indexing every member for it converts nothing.""" projects = ["packages/app", "packages/lib"] - assert select_projects_for_delta(projects, ["packages/app/src/a.ts", "outside.ts"]) == projects + assert select_projects_for_delta(projects, ["packages/app/src/a.ts", "outside.ts"]) == [ + "packages/app" + ] + assert select_projects_for_delta(projects, ["tools/build.ts"]) == [] assert select_projects_for_delta( ["packages/app/tsconfig.build.json", "packages/lib"], ["packages/app/src/a.ts"], From 3378af232e9731870adeda750aa3b699acc90ff4 Mon Sep 17 00:00:00 2001 From: Kaloyan Naumov Date: Tue, 1 Dec 2026 23:17:14 +0000 Subject: [PATCH 2/3] An unowned TypeScript path beside an owned one keeps the full member set The converter reads definition kinds from the members it is given: a reference to an arrow-function constant becomes a `calls` edge only when the index holds that constant's definition. With the full set, the window's owned files got those edges into every member; with only their owners, a reference into another member lost them. Measured with scip-typescript on members `src`, `src/infra` and `pkg/b`: an edit to `src/infra/net.ts` beside an unowned `tools/build.ts` writes `net -> helper` and `net -> twice` with the full set and neither with `src/infra` alone. So an unowned TypeScript path selects no member only when nothing else in the window selects one, the case in which no file is converted either way. Beside a selected member, or beside an unowned manifest, the full set stays as before. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Kaloyan Naumov --- docs/architecture/code-index-architecture.md | 12 ++++++------ scripts/scip_harness/scip_ts_projects.py | 18 +++++++++++++++--- .../unit/test_run_typescript_delta_umbrella.py | 4 ++-- tests/unit/test_scip_ts_projects.py | 13 ++++++++++--- 4 files changed, 33 insertions(+), 14 deletions(-) diff --git a/docs/architecture/code-index-architecture.md b/docs/architecture/code-index-architecture.md index 463c776d2d9..4927a869bb1 100644 --- a/docs/architecture/code-index-architecture.md +++ b/docs/architecture/code-index-architecture.md @@ -348,12 +348,12 @@ applies it. Per touched file the apply upserts what the delta emits and tombston file's `scip` rows it no longer emits; a deleted file is tombstoned whole. Re-applying a delta gives the same live set. -| Producer | Language | Watermark | Workers | How it runs | -| ----------------- | ----------------------- | ---------------- | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `scip-clang` | C++ | `scip_commit` | `code_scip_full`, `code_scip_delta`, `code_scip_apply` | Changed TUs (and TUs including changed headers, capped) via `run_delta.sh`; `code_scip_full` seeds the tier and re-indexes it weekly. | -| `scip-typescript` | TypeScript / JavaScript | `scip_commit_ts` | `code_scip_ts_delta` | Indexes named projects, or the members of an umbrella root tsconfig (including explicit tsconfig file references); a delta indexes only the projects that contain the window's files unless a shared config or lockfile changed; a TypeScript file no project contains selects none. The converter still bounds the output to the TypeScript window. | -| `scip-go` | Go | `scip_commit_go` | `code_scip_go_delta` | One build per module (`run_go_monorepo_delta.sh`). | -| `scip-python` | Python | `scip_commit_py` | `code_scip_py_delta`, `code_scip_apply` | Per-merge delta (`run_python_delta.sh`); a first run indexes the tree. | +| Producer | Language | Watermark | Workers | How it runs | +| ----------------- | ----------------------- | ---------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `scip-clang` | C++ | `scip_commit` | `code_scip_full`, `code_scip_delta`, `code_scip_apply` | Changed TUs (and TUs including changed headers, capped) via `run_delta.sh`; `code_scip_full` seeds the tier and re-indexes it weekly. | +| `scip-typescript` | TypeScript / JavaScript | `scip_commit_ts` | `code_scip_ts_delta` | Indexes named projects, or the members of an umbrella root tsconfig (including explicit tsconfig file references); a delta indexes only the projects that contain the window's files unless a shared config or lockfile changed, or a TypeScript file no project contains changed beside one that selects a project; a window whose only TypeScript changes lie outside every project indexes none. The converter still bounds the output to the TypeScript window. | +| `scip-go` | Go | `scip_commit_go` | `code_scip_go_delta` | One build per module (`run_go_monorepo_delta.sh`). | +| `scip-python` | Python | `scip_commit_py` | `code_scip_py_delta`, `code_scip_apply` | Per-merge delta (`run_python_delta.sh`); a first run indexes the tree. | `code/domain/index/compiler_tiers.py` (`TIERS`) is the one table of watermark, label and workers per producer; status handlers and the dashboard read it. A delta worker diff --git a/scripts/scip_harness/scip_ts_projects.py b/scripts/scip_harness/scip_ts_projects.py index ec43e3eaefd..59482d14cef 100755 --- a/scripts/scip_harness/scip_ts_projects.py +++ b/scripts/scip_harness/scip_ts_projects.py @@ -7,7 +7,8 @@ exhaust the heap. This helper expands that root to its member project directories or explicit tsconfig files, and on a delta pass keeps only the members that contain a changed path. A change to a shared config or lockfile -falls back to the full member set. A TypeScript path that no member owns +falls back to the full member set, and so does a TypeScript path that no +member owns when the window also selects a member. Alone, such a path selects none: the merge keeps a document only from a member that owns it. """ @@ -251,8 +252,9 @@ def is_index_trigger(relpath: str) -> bool: def select_projects_for_delta(projects: list[str], changed_paths: list[str]) -> list[str]: """Projects to index for this window. Shared config/lockfile changes keep - the full set. A TypeScript path that no named project owns selects none: - the merge would drop it from every member's index. + the full set. A TypeScript path that no named project owns keeps the full + set when another path selects a project, and selects none on its own: the + merge would drop it from every member's index. A non-TypeScript, non-config change inside a member (a README, for example) does not select that member. @@ -266,6 +268,16 @@ def select_projects_for_delta(projects: list[str], changed_paths: list[str]) -> for project in projects if any(project_owns(project, path) and is_index_trigger(path) for path in changed_paths) ] + unowned_ts = [ + path + for path in changed_paths + if is_typescript_path(path) and not any(project_owns(project, path) for project in projects) + ] + if unowned_ts and (selected or any(is_project_config_change(path) for path in changed_paths)): + # The converter reads definition kinds from the members it is given, so a + # narrower set would write fewer `calls` edges for the owned files than the + # full set does; an unowned manifest rebuilds every member, as before. + return list(projects) return selected diff --git a/tests/unit/test_run_typescript_delta_umbrella.py b/tests/unit/test_run_typescript_delta_umbrella.py index 6030d09c33d..e125bcdffa1 100644 --- a/tests/unit/test_run_typescript_delta_umbrella.py +++ b/tests/unit/test_run_typescript_delta_umbrella.py @@ -193,7 +193,7 @@ def test_explicit_tsconfig_file_is_passed_to_the_indexer(tmp_path: Path) -> None assert not (repo / "packages/app/tsconfig.scip.json").exists() -def test_delta_with_owned_and_unowned_typescript_indexes_the_owner(tmp_path: Path) -> None: +def test_delta_with_owned_and_unowned_typescript_indexes_every_member(tmp_path: Path) -> None: repo = _repo(tmp_path) (repo / "outside.ts").write_text("export const o = 1;\n") _git(repo, "add", "-A") @@ -205,7 +205,7 @@ def test_delta_with_owned_and_unowned_typescript_indexes_the_owner(tmp_path: Pat _git(repo, "-c", "user.name=t", "-c", "user.email=t@t", "commit", "-qm", "mixed") head = _git(repo, "rev-parse", "HEAD") log = _run(tmp_path, repo, base, head) - assert _targets(_runs(log)) == ["packages/app"] + assert _targets(_runs(log)) == ["packages/app", "packages/lib"] def test_delta_with_only_an_unowned_typescript_path_runs_no_indexer(tmp_path: Path) -> None: diff --git a/tests/unit/test_scip_ts_projects.py b/tests/unit/test_scip_ts_projects.py index 6d2329c50bd..abd802f1596 100644 --- a/tests/unit/test_scip_ts_projects.py +++ b/tests/unit/test_scip_ts_projects.py @@ -143,10 +143,17 @@ def test_a_typescript_path_no_member_owns_selects_no_member() -> None: """The merge keeps a document only from a member that owns it, so no member's index can hold an unowned path: indexing every member for it converts nothing.""" projects = ["packages/app", "packages/lib"] - assert select_projects_for_delta(projects, ["packages/app/src/a.ts", "outside.ts"]) == [ - "packages/app" - ] assert select_projects_for_delta(projects, ["tools/build.ts"]) == [] + assert select_projects_for_delta(projects, ["tools/build.ts", "README.md"]) == [] + + +def test_an_unowned_path_beside_a_selecting_one_keeps_the_full_set() -> None: + """The converter reads definition kinds from every member it is given: a narrower + set would write fewer `calls` edges for the window's owned files than the full set.""" + projects = ["packages/app", "packages/lib"] + assert select_projects_for_delta(projects, ["packages/app/src/a.ts", "outside.ts"]) == projects + # an unowned manifest beside it rebuilds every member, as before + assert select_projects_for_delta(projects, ["tools/build.ts", "tools/package.json"]) == projects assert select_projects_for_delta( ["packages/app/tsconfig.build.json", "packages/lib"], ["packages/app/src/a.ts"], From 95f1a892817791f7bc7e3032c8bd5a95f19b84d6 Mon Sep 17 00:00:00 2001 From: Kaloyan Naumov Date: Wed, 2 Dec 2026 03:38:11 +0000 Subject: [PATCH 3/3] State the unowned-TypeScript rule as it holds The architecture row said a window whose only TypeScript changes lie outside every project indexes none. A window with such a file beside a changed manifest or lockfile still runs every member, so the row now says a window whose only changes are TypeScript files outside every project. The module and function docstrings in scip_ts_projects.py and a comment in run_typescript_delta.sh named the same case without the manifest and lockfile condition; they now carry it. Co-Authored-By: Claude Sonnet 5.5 Signed-off-by: Kaloyan Naumov --- docs/architecture/code-index-architecture.md | 12 ++++++------ scripts/scip_harness/run_typescript_delta.sh | 2 +- scripts/scip_harness/scip_ts_projects.py | 10 ++++++---- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/architecture/code-index-architecture.md b/docs/architecture/code-index-architecture.md index 4927a869bb1..b35e9f7f91c 100644 --- a/docs/architecture/code-index-architecture.md +++ b/docs/architecture/code-index-architecture.md @@ -348,12 +348,12 @@ applies it. Per touched file the apply upserts what the delta emits and tombston file's `scip` rows it no longer emits; a deleted file is tombstoned whole. Re-applying a delta gives the same live set. -| Producer | Language | Watermark | Workers | How it runs | -| ----------------- | ----------------------- | ---------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `scip-clang` | C++ | `scip_commit` | `code_scip_full`, `code_scip_delta`, `code_scip_apply` | Changed TUs (and TUs including changed headers, capped) via `run_delta.sh`; `code_scip_full` seeds the tier and re-indexes it weekly. | -| `scip-typescript` | TypeScript / JavaScript | `scip_commit_ts` | `code_scip_ts_delta` | Indexes named projects, or the members of an umbrella root tsconfig (including explicit tsconfig file references); a delta indexes only the projects that contain the window's files unless a shared config or lockfile changed, or a TypeScript file no project contains changed beside one that selects a project; a window whose only TypeScript changes lie outside every project indexes none. The converter still bounds the output to the TypeScript window. | -| `scip-go` | Go | `scip_commit_go` | `code_scip_go_delta` | One build per module (`run_go_monorepo_delta.sh`). | -| `scip-python` | Python | `scip_commit_py` | `code_scip_py_delta`, `code_scip_apply` | Per-merge delta (`run_python_delta.sh`); a first run indexes the tree. | +| Producer | Language | Watermark | Workers | How it runs | +| ----------------- | ----------------------- | ---------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `scip-clang` | C++ | `scip_commit` | `code_scip_full`, `code_scip_delta`, `code_scip_apply` | Changed TUs (and TUs including changed headers, capped) via `run_delta.sh`; `code_scip_full` seeds the tier and re-indexes it weekly. | +| `scip-typescript` | TypeScript / JavaScript | `scip_commit_ts` | `code_scip_ts_delta` | Indexes named projects, or the members of an umbrella root tsconfig (including explicit tsconfig file references); a delta indexes only the projects that contain the window's files unless a shared config or lockfile changed, or a TypeScript file no project contains changed beside one that selects a project; a window whose only changes are TypeScript files outside every project indexes none. The converter still bounds the output to the TypeScript window. | +| `scip-go` | Go | `scip_commit_go` | `code_scip_go_delta` | One build per module (`run_go_monorepo_delta.sh`). | +| `scip-python` | Python | `scip_commit_py` | `code_scip_py_delta`, `code_scip_apply` | Per-merge delta (`run_python_delta.sh`); a first run indexes the tree. | `code/domain/index/compiler_tiers.py` (`TIERS`) is the one table of watermark, label and workers per producer; status handlers and the dashboard read it. A delta worker diff --git a/scripts/scip_harness/run_typescript_delta.sh b/scripts/scip_harness/run_typescript_delta.sh index 77365b9dd0f..0b0fa745574 100755 --- a/scripts/scip_harness/run_typescript_delta.sh +++ b/scripts/scip_harness/run_typescript_delta.sh @@ -152,7 +152,7 @@ JSONEOF # No member list: a regular root tsconfig (or a pnpm/yarn workspace) # is indexed by invoking scip-typescript on the checkout with only the # workspace flags. A member list whose members were all skipped, or a - # delta that selected none (only paths no member owns changed), still + # delta that selected none (only TypeScript files no member owns changed), still # writes an empty index: the root pass is what the list exists to avoid. if [[ ${#ALL_PROJECTS[@]} -eq 0 ]]; then NODE_OPTIONS="--max-old-space-size=$NODE_HEAP_MB" \ diff --git a/scripts/scip_harness/scip_ts_projects.py b/scripts/scip_harness/scip_ts_projects.py index 59482d14cef..d60f08a8665 100755 --- a/scripts/scip_harness/scip_ts_projects.py +++ b/scripts/scip_harness/scip_ts_projects.py @@ -8,8 +8,9 @@ directories or explicit tsconfig files, and on a delta pass keeps only the members that contain a changed path. A change to a shared config or lockfile falls back to the full member set, and so does a TypeScript path that no -member owns when the window also selects a member. Alone, such a path -selects none: the merge keeps a document only from a member that owns it. +member owns when the window also selects a member or changes a manifest or +lockfile. A window whose only changes are such paths selects none: the merge +keeps a document only from a member that owns it. """ from __future__ import annotations @@ -253,8 +254,9 @@ def is_index_trigger(relpath: str) -> bool: def select_projects_for_delta(projects: list[str], changed_paths: list[str]) -> list[str]: """Projects to index for this window. Shared config/lockfile changes keep the full set. A TypeScript path that no named project owns keeps the full - set when another path selects a project, and selects none on its own: the - merge would drop it from every member's index. + set when the window also selects a project or changes a manifest or + lockfile, and selects none when the window holds nothing else: the merge + would drop it from every member's index. A non-TypeScript, non-config change inside a member (a README, for example) does not select that member.