Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
851f4b4
Skip a SCIP document that fails to decode or convert; its file keeps …
KaloyanNaumov Nov 28, 2026
2d75e22
Keep each tier's stale paths in one state row; the Go harness fails w…
KaloyanNaumov Nov 28, 2026
12decef
Mark a skipped file stale in its own row under the tier that applied …
KaloyanNaumov Nov 28, 2026
47bc8e4
Read the asked paths' stale marks by key; a delta lists only the skip…
KaloyanNaumov Nov 28, 2026
2e3beaf
Say that a delta marks only the skipped files in its window
KaloyanNaumov Nov 28, 2026
2da9227
Fail a full run on a failed document whose path cannot be read
KaloyanNaumov Nov 28, 2026
3ac33f5
Write a delta that lists skipped files as version 2
KaloyanNaumov Nov 28, 2026
8bc15ff
Pass the apply's tier to one more stand-in; align the failure table
KaloyanNaumov Nov 28, 2026
03041ef
Keep the rows of a file that a delta both converts and skips
KaloyanNaumov Nov 28, 2026
a46fdc9
Keep the rows of a skipped path that a delta also deletes
KaloyanNaumov Nov 28, 2026
d9b4f0d
Make no constructor-call claim when a full run skipped a document
KaloyanNaumov Nov 29, 2026
bff33c4
Refuse a kept delta file of a version the build does not apply
KaloyanNaumov Nov 29, 2026
41f3fd9
Read a namespace's constructor-call claim as withdrawn while a file i…
KaloyanNaumov Nov 29, 2026
bc2177a
Read the compiler tier's stale marks outside the coverage cache
KaloyanNaumov Nov 30, 2026
903f398
Merge branch 'main' into pr/scip-skip-bad-document
KaloyanNaumov Dec 1, 2026
76a2b61
Retire a stale mark once any build applies the file
KaloyanNaumov Dec 1, 2026
c6d0e2e
Correct the stale-mark comments: a refresh that writes no row keeps t…
KaloyanNaumov Dec 1, 2026
6fa2586
Merge remote-tracking branch 'upstream/main' into wip/scip-skip-bad-d…
KaloyanNaumov Dec 1, 2026
9dfae11
Keep a stale mark until the apply that refreshes its file completes
KaloyanNaumov Dec 1, 2026
831373c
The TypeScript merge copies records instead of parsing whole indexes
KaloyanNaumov Dec 1, 2026
4d081c0
TypeScript project filter reads window paths that are not UTF-8
KaloyanNaumov Dec 1, 2026
a99d74e
Write the stale marks in force again before a tier moves its watermark
KaloyanNaumov Dec 1, 2026
b0cef9c
Keep the stale marks when a Go window applies no module delta
KaloyanNaumov Dec 1, 2026
71c57aa
Merge remote-tracking branch 'upstream/main' into wip/ts-merge-record…
KaloyanNaumov Dec 1, 2026
0056c39
Merge remote-tracking branch 'upstream/main' into wip/ts-nonutf8-path…
KaloyanNaumov Dec 1, 2026
319175a
Merge upstream main into wip/scip-skip-bad-document-r21
KaloyanNaumov Dec 1, 2026
28684e7
The non-UTF-8 harness test builds its window with Git plumbing
KaloyanNaumov Dec 2, 2026
a4c39d1
The record reader refuses a record that runs past the end of its data
KaloyanNaumov Dec 2, 2026
f33c2dc
Keep a stale mark until this build applies the file
KaloyanNaumov Dec 2, 2026
619be75
The record reader refuses every truncated wire type
KaloyanNaumov Dec 2, 2026
0414806
Empty the mark of a file the previous build deleted
KaloyanNaumov Dec 2, 2026
c5f7902
A failing TypeScript member keeps the other members' rows
KaloyanNaumov Dec 1, 2026
d03cbec
A file that calls into a failed TypeScript member keeps its rows too
KaloyanNaumov Dec 1, 2026
c8f53c8
Fail the TypeScript pass on a member killed by a signal
KaloyanNaumov Dec 2, 2026
0ac767e
A failing sibling tsconfig fails only the files no sibling indexed
KaloyanNaumov Dec 2, 2026
f910225
Read the failed-files list the way the merge writes it
KaloyanNaumov Dec 2, 2026
f120571
The record reader applies the protobuf parser's tag and length bounds
KaloyanNaumov Dec 2, 2026
e6286e3
Read every harness path list the way git writes it
KaloyanNaumov Dec 2, 2026
e55d0a6
Read a skipped document's effect on callers and seeds as stale
KaloyanNaumov Dec 2, 2026
d25bdbb
Merge #1704's constructor-overload and seed-path fixes into the membe…
KaloyanNaumov Dec 2, 2026
11e18fa
Merge remote-tracking branch 'origin/pr/ts-nonutf8-path' into wip/ts-…
KaloyanNaumov Dec 2, 2026
7ef1199
Run the member-isolation regression through the real window filter
KaloyanNaumov Dec 2, 2026
15da045
Merge remote-tracking branch 'upstream/main' into wip/ts-merge-record…
KaloyanNaumov Dec 2, 2026
0267d57
The record reader keeps the last value of a singular field
KaloyanNaumov Dec 2, 2026
817ed0c
Read any stale mark as a gap in an incoming answer
KaloyanNaumov Dec 2, 2026
630dc61
Merge #1704's stale-mark incoming answers into the member-isolation b…
KaloyanNaumov Dec 2, 2026
7bb6aa7
Merge main into the member-isolation branch
KaloyanNaumov Dec 2, 2026
1c0d2ba
Pin the ten-byte value varint the record reader accepts
KaloyanNaumov Dec 2, 2026
2488a8b
Let the Go worker's apply stand-ins take the tier
KaloyanNaumov Dec 2, 2026
27650f3
Merge main into the skipped-document branch
KaloyanNaumov Dec 2, 2026
226a92c
Test the PR pack's callers line and name unread stale marks in the note
KaloyanNaumov Dec 2, 2026
65c7ec4
Format the failure-model table in code-index-operations.md with Prettier
KaloyanNaumov Dec 2, 2026
c3ed4e4
Key merged documents by their raw path bytes
KaloyanNaumov Dec 2, 2026
d958be3
Type the raw path reader as bytes
KaloyanNaumov Dec 2, 2026
a0f8660
Read the stale marks of an incoming answer with a bound
KaloyanNaumov Dec 2, 2026
e329807
Merge the bounded stale-mark read of #1704 into the member-failure is…
KaloyanNaumov Dec 2, 2026
4f34de0
Return the merge's kept paths as text
KaloyanNaumov Dec 2, 2026
82521da
Read one more stale mark than the callers note names
KaloyanNaumov Dec 2, 2026
e35389c
Read a skipped TypeScript document's callers as stale
KaloyanNaumov Dec 2, 2026
60417d5
Claim constructor calls only when the constructor scan read every doc…
KaloyanNaumov Dec 2, 2026
cdc76fe
Write the merged index through a unique temporary file
KaloyanNaumov Dec 2, 2026
c3ae722
Retire a stale mark once a later apply of the file is published
KaloyanNaumov Dec 2, 2026
2b52cea
Merge the record-level member merge into the member failure isolation
KaloyanNaumov Dec 2, 2026
2b26a82
Merge the scan-completeness check into the member failure isolation
KaloyanNaumov Dec 2, 2026
b792baa
Scope the stale-mark recovery to the entries a tier worker runs
KaloyanNaumov Dec 2, 2026
e75b94c
Merge the skipped-document round 33 into the member failure isolation
KaloyanNaumov Dec 2, 2026
0a9e148
Merge upstream main into wip/ts-member-failure-isolation-r33
KaloyanNaumov Dec 2, 2026
fbf3c75
Merge upstream main into the scip-skip-bad-document branch
KaloyanNaumov Dec 2, 2026
b914189
Retire a published mark by its blob, and keep it past a failed upload
KaloyanNaumov Dec 2, 2026
3906e18
Merge remote-tracking branch 'origin/wip/scip-skip-bad-document-r35' …
KaloyanNaumov Dec 2, 2026
4163e79
Merge origin/main into the scip-skip-bad-document branch
KaloyanNaumov Dec 3, 2026
d4c163c
Merge origin/main (24950d984) into the TypeScript member failure isol…
KaloyanNaumov Dec 3, 2026
9b914b3
A path whose bytes are not UTF-8 keeps its key: the window lists ever…
KaloyanNaumov Dec 3, 2026
7932246
Retire a stale mark only on the file's own record of an apply at the …
KaloyanNaumov Dec 3, 2026
13cc9a7
Retire a stale mark only when both of the file's inserts carry the wa…
KaloyanNaumov Dec 3, 2026
d81b67e
A mark retires on the apply's own record, and the Go freeze names mod…
KaloyanNaumov Dec 3, 2026
b5ff7ba
The coverage the retirement review asked for, and one record write
KaloyanNaumov Dec 3, 2026
aff3758
Merge upstream/main into the SCIP skipped-document branch
KaloyanNaumov Dec 3, 2026
5ca63b4
A gone mark is asked of the tree, not only of git's byte lookup
KaloyanNaumov Dec 3, 2026
dd0c138
scip_merge_indexes: the merge duplicated _keeps, _encode_varint and _…
KaloyanNaumov Dec 3, 2026
f612187
Merge upstream main (cd5041645) into the TypeScript member failure is…
KaloyanNaumov Dec 3, 2026
b4b868e
A failed member is matched by its whole name, not as a word in another
KaloyanNaumov Dec 3, 2026
84889e8
Merge #1704's head (5ca63b494) into the TypeScript member failure iso…
KaloyanNaumov Dec 3, 2026
1d0d363
A gitlink is not a file, and a document's own damage stays its own
KaloyanNaumov Dec 3, 2026
249760a
The path-scoped read guard knows the two state-only writers
KaloyanNaumov Dec 3, 2026
dfd1545
Merge upstream main (bd58b7b65)
KaloyanNaumov Dec 3, 2026
e3575d6
Merge #1704 at dfd154565: the retirement predicate and its test
KaloyanNaumov Dec 3, 2026
1b07f07
Decode a project's own name and its documents' paths as one key
KaloyanNaumov Dec 3, 2026
0225eda
A failed member's file with a tab in its name keeps its skip record
KaloyanNaumov Dec 3, 2026
cbf2a39
Merge upstream main (dea732eb8) into the TypeScript member failure is…
KaloyanNaumov Dec 4, 2026
29d0998
Each bound list in a staleness read stays inside one ClickHouse form …
KaloyanNaumov Dec 4, 2026
8be80e1
Merge upstream main (dea732eb8)
KaloyanNaumov Dec 4, 2026
a363427
A member's run that drops a sibling reference keeps its own failure
KaloyanNaumov Dec 4, 2026
4879af4
handle_code_impact stays under the line ratchet after the merge
KaloyanNaumov Dec 4, 2026
6da687d
docs/reference/status.md: the merge's settings count
KaloyanNaumov Dec 4, 2026
112c3e4
Merge upstream main (a229f49c8) into the gitlink-as-gone line
KaloyanNaumov Dec 4, 2026
ddbdfa5
Merge upstream main (a229f49c8) into the TypeScript member failure is…
KaloyanNaumov Dec 4, 2026
e383334
The header loop body indents under the pipeline shfmt holds it in
KaloyanNaumov Dec 4, 2026
56fc521
The header loop body indents under the pipeline shfmt holds it in
KaloyanNaumov Dec 4, 2026
efa1108
handle_code_impact stays under the line ratchet: the co-change gaps m…
KaloyanNaumov Dec 4, 2026
18c9a54
Merge remote-tracking branch 'github/main' into wip/scip-skip-r39
KaloyanNaumov Dec 4, 2026
4344eae
Merge remote-tracking branch 'github/main' into wip/ts-member-r39
KaloyanNaumov Dec 4, 2026
18a8cdb
The stale-mark clear is cut under the bound field, merge ownership co…
KaloyanNaumov Dec 4, 2026
4c3103c
The plan and the member lists are NUL-delimited fields
KaloyanNaumov Dec 4, 2026
550c65e
A Go module directory keeps every byte and reaches the harness whole
KaloyanNaumov Dec 4, 2026
a135044
The operations doc points at rule 76 for the skipped-document delta
KaloyanNaumov Dec 4, 2026
c00d8e0
A stale-marks read that lowers an answer says so, and the SCIP pass's…
KaloyanNaumov Dec 4, 2026
03570a9
The selected Go modules reach the harness NUL-separated, so a module …
KaloyanNaumov Dec 4, 2026
f48290b
Merge upstream main into the TypeScript member failure isolation
KaloyanNaumov Dec 5, 2026
19e2b98
A failed TypeScript member is told apart by its whole path
KaloyanNaumov Dec 5, 2026
41352d5
A Go module that fails to build is named whole in the harness output,…
KaloyanNaumov Dec 5, 2026
635abb6
Merge the Go harness's skipped-document line (#1704) into the TypeScr…
KaloyanNaumov Dec 5, 2026
f5b3de2
The boolean-settings count in status.md follows the merged settings
KaloyanNaumov Dec 5, 2026
4cfab66
The stale-mark integration test stubs the submodule sync main added
KaloyanNaumov Dec 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
12 changes: 6 additions & 6 deletions docs/architecture/code-index-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,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), one process per project of their reference closures, each project once; 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. |
| 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), one process per project of their reference closures, each project once; 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. A member whose indexer exits with an error leaves the others; its files keep their rows, marked stale. 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
Expand Down
76 changes: 76 additions & 0 deletions docs/architecture/rolling-upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,82 @@ See the [participant lifecycle baseline](cells.md#participant-lifecycle-baseline
worker build. No gate holds the rollout. `tests/unit/test_worker_source_copies.py`
checks N's side, and the mixed-version gate does not check this rule.

78. **A SCIP delta that lists skipped files** (`skipped_files`, written by
`scripts/scip_harness/scip_to_delta.py`) is `delta_version` 2; one that lists none
stays 1. N's `code_scip_apply` applies both and marks each skipped file stale. N-1's
applies version 1 only and ignores `skipped_files`, so it fails a version-2 batch
(`unsupported delta_version 2`) and leaves the tier's watermark, and a rollback past
N does the same; `loom code scip-retry <batch_id>` applies it once N runs the
workers, as long as no later batch for that tier has applied (a retry after one
would move the watermark back). A compiler-tier worker applies the delta its own
build's harness wrote. In `tests/unit/test_code_scip_skipped_documents.py`, a
converted upload with a skipped document fails under a worker that applies version 1
only and applies with its mark under N's. N-1 neither reads nor empties a mark. A
round writes its symbols and its edges in separate inserts, and an apply that rewrites a
symbol row while leaving the edge set unchanged writes no edge row at all (`_apply_round`
skips an empty edge insert, `_diff_edges` restamps no row it keeps), so N-1's rows of the
file alone cannot show that its apply of the file completed: what a finished apply of an
unchanged file leaves and what an edge insert that raised leaves are the same rows. A read
keeps counting the mark: after an N-1 retry whose edge insert failed, followed by an N-1
watermark write over a window that does not carry the file, it reads stale and
constructor coverage incomplete.

So the apply leaves its own record and N retires on that alone. At the end of every round
— after the round's symbol insert and its edge insert, in the same coroutine — N writes
one state row per marked file the round carried, `scip_applied:<tier>:<path>` holding the
commit (`SCIP_APPLIED_PREFIX`, `_record_applied` in
`server/code/app/index/scip_delta.py`). The row exists only for a round whose inserts both
returned; an insert that raised leaves none. It is written for a file the round rewrote no
row of too — a function body alone — because the record states that the apply reached the
file, and a count of the file's rows cannot. N empties the mark when it applies the file,
once every round of that apply has landed, and empties the record in the same insert
(`_mark_stale`): a mark and the record that answers it are written and emptied together,
so no retirement joins a record to a mark it was not written for. It is one narrow row per
marked file a round carried, not a row a file of the index, and nothing else writes it.

N's next pass of the tier also empties a mark whose file a completed apply published
(`retire_published_marks`), on that record and nothing else: `scip_applied` for the file's
tier and path, read `FINAL`, non-empty, holding the tier's watermark commit, and written
after the mark (`version` past the mark's). A superseded version of either row answers
nothing. A file the previous build applied holds no record — N-1 writes none — so its mark
ends when N applies the file, not on N-1's rows: the predicate this replaced retired it on
stamps that could not tell a finished apply from a failed insert, and a mark kept a pass
too long reads stale, where one retired on a partial apply hides the failure the mark
exists for. `tests/unit/test_code_scip_mark_retirement.py` applies every case.

The pass reads `code_scip_batches` for nothing: that table expires a record 30 days
after it is created, so a row's absence there is evidence of nothing, and what an apply
did is in the rows it wrote, which do not expire. A namespace whose compiler tier arrives
by upload alone has no mirror to prove the refresh with:
`code_scip_apply` (`server/code/workers/scip_apply.py`) writes its marks and moves its
watermark but never runs the pass, so that namespace keeps the mark until N applies the
file. A watermark written over a window with no change of the file still holds the
mark's blob, so the failed retry above keeps its mark until N applies the file. The Go
worker passes a module it could not fetch without a retry and without a delta, so it
writes the modules it left unbuilt to `scip_unavailable:go` — a JSON list of their dirs,
unmasked, from the split the harness output already gives it (`_build`'s `unfetched`) —
before it moves the watermark, and the pass keeps the marks of those modules' files and no
others: a module that owes a retry (`scip_commit_go_retry`) is gated the same way, by its
own dir, and both rows name modules rather than the entry. The health record's note is not
read for this: it keeps the module lines as printed and masked, clipped to their tail, and
names no faithful set of modules to scope a freeze by. A Go file outside those modules
ends on its record like any other tier's, so one broken module no longer holds an entry's
every Go mark. A mirror that lacks the
watermark's commit, or a read that fails, keeps every mark; one that lacks a mark's
commit keeps that mark. A rollback and a roll
forward do the same. A marked file that N-1 deletes is never applied by N again, so N's
next apply of the tier empties its mark when the entry's mirror holds the delta's commit
and the commit holds no file at that path, its names read as the keys the store writes
them by — so a name that is not UTF-8 matches its `replace` spelling and an existing
file is never read as gone; a mirror that cannot be read, or lacks the commit, keeps
the mark.
`tests/integration/test_code_scip_stale_mark.py` applies these orders. A kept delta
file (`scip-full --apply-delta`) is read by the CLI that applies it: N-1's CLI
applies a retained version-2 file as version 1, so a skipped file's partial entry
replaces its rows and no stale mark is written. Apply a kept file with the CLI of
the build that wrote it, during a rollout or a rollback. N's reader refuses a version
it does not apply. No gate holds the rollout.

## What checks them

`scripts/gates/mixed_version.py` (`make test-mixed-version`, the `mixed-version` CI job,
Expand Down
6 changes: 4 additions & 2 deletions docs/features/code-index/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,10 @@ generated from the same schemas.
The first three are answers; no fallback grep is needed.

- **`epistemic`.** `code.callers` and `code.impact` answer `exact` when the compiler
tier covers every seed file, no call site named like a seed was declined, and no
override seed lacks its base. Otherwise `lower_bound`, with `causes`:
tier covers every seed file, no call site named like a seed was declined, no
override seed lacks its base, and no file in the namespace is marked stale because the
compiler tier skipped its document (it may hold a caller no edge shows). Otherwise
`lower_bound`, with `causes`:
`unresolved_calls`, `ambiguous_calls`, `dispatch_seeds_missing`,
`treesitter_only_files`, `external_calls`, `ctor_edges_absent`, `scip_stale_files`,
`truncated`. History answers are always `lower_bound`. No static index sees dispatch
Expand Down
Loading
Loading