release v0.33.0: pluggable languages ship opt-in, durable resolution, Windows CANTOPEN fix, XAML 0.3.0 #316
No reviewers
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index!316
Loading…
Reference in a new issue
No description provided.
Delete branch "release-v0.33.0"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Epic #309. Schema 75 → 78. The first-start reparse happens once.
What ships
init(and the first automatic start) records the detected languages in.code-index/languages.toml, never in the project root.requires_host, and come with catalog v2 andplugin update.index_statewhile the project is not ready. Measured on Django: convergence in 43 bounded calls, with the result matching the oracle exactly.["python"]on a Python-only project no longer rebuilds everything.warming_up;unsupported_syntaxon longData/Pointsvalues.x:Keyand{StaticResource}/{DynamicResource}are now indexed and bound.Measured package overhead (quiet machine, release worker, median of 5)
Local gate (one full run on
8879fd84; fixes since re-verified by their own suites)-D warnings --document-private-items; abi i686; guest gates.5e4c602b(example versions had collided with 0.33.0); headroom; daemon leg 83/83.The Python package parity is tracked in #315. #314 (a test leaks
COSI_CORPUS_DIRto a spawned server) does not affect CI.🤖 Generated with Claude Code
https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Phase 1 created `declared_profiles` lazily on the first declaration, so as not to move CURRENT_VERSION under a baseline that lane could not re-measure. m0074 now creates it on every index (`IF NOT EXISTS`, so an index a Phase-1 build already gave the table keeps its rows), and the lazy path is gone: `profiles::ensure_table` and `table_exists`, the probes in `fingerprint`/`write_declared`, and `LAZY_OBJECTS` with its agreement checks in `generation_policy_registry` (the source scan now sees the DDL). ONE PROBE STAYS, in `load_book`, and it is not the lazy path: the resolver also runs inside older migrations (m0016's full re-resolve), on a schema below v74. Measured: without it 59 migration tests fail with "no such table: declared_profiles" at version 16. Test: `profiles::tests::m0074_creates_the_table_and_adopts_a_lazily_created_one` MUTATION (RUN) drop m0074 from MIGRATIONS -> RED (all 4 profiles tests). MUTATION (RUN) m0074 without IF NOT EXISTS -> RED ("table declared_profiles already exists" on the lazily created one). BASELINES, re-measured through their bless paths, not edited: - package-baseline.json: outcome `conditions_only`, diff [], projection identity unchanged (eaad2470...); only the schema moved, 73 -> 74. - ruby-package-cost.json: projection identity unchanged (58b2da9c...). The bless path rewrites the run's numbers: vm_step 30086175 -> 30075681 (-0.035%), fullscan 625828 -> 625304, sort/autoindex unchanged, wall ratio 134 -> 140. Pre-bless survey at schema 74, 4 runs, load 7-9: vm_step 30077045..30086094 — inside the same jitter the schema-73 lane recorded (30083210..30092091). An A/B at schema 73 in this tree is not possible without restoring the lazy path (write_declared needs the table), so the comparison is against that recorded survey. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmuautoa displacing package stays SHADOW until its language flips 3c1b351852The release side of the channel, as a CLI command the workflow runs and a test can run locally: code-index plugin catalog-merge --out <dir> [--base <channel>] [--include <release catalog>]... [--package <x.cip> --url <u> --signature-url <u>] writes <dir>/registry.v2.json (the channel) and <dir>/registry.v1.json (its v1 projection). Every input is verified against the trust set first — base and includes through the one catalog loader (.sig required), the package through its .cips — and every output value is derived from them (registry::channel_entry); the only outside inputs are the two URLs the host that stored the assets reports. Merge rules (registry::merge_plugin / build_channel): a version already listed with the same digest is kept (re-running a release reproduces the channel byte for byte); the same version with different bytes, or a package offered under another publisher key, is refused; code_index is taken whole from the input naming the newest core release; the result and its projection must pass validate() or nothing is written. The command is user-family read-only (registered in plugin_command_registry; the registry's variant->invocation mapping now kebab-cases, which every one-word variant had satisfied by accident) and documented in README. The e2e builds a channel from a signed release catalog plus two packages, loads both outputs through `plugin catalog`, and has `plugin update` read it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmuMeasured against the installed v0.32.2 binary: the v2 channel is refused at DESERIALISATION ("unknown field requires_host"), before validate() reaches schema_version — not "by number" as the docs claimed. Still a refusal, never a misread; the v1 projection loads and lists every range-free version, and a manifest carrying requires_host is refused with manifest.unknown_field. The docs now say what was observed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmulanguages enablece0477b24dThe four copy-pasted packaging jobs in release.yml (~2,100 lines that differed in a directory, a capability list, a scratch fixture and Ruby's derived-names arm) are ONE matrix job, `package-plugin`, over `package: [xaml, timeline, ruby, svelte]`. Its steps keep their names and run three shared scripts, which derive everything package-specific from the package: package_pack.sh pack with the shipped binary; refuse a moved package_digest/extraction_identity, an empty record, a tag naming another id or version package_sign.sh sign; refuse an unset key or one that is not the recorded publisher (HOLDS THE KEY, EXECUTES NOTHING) package_verify.sh install: the operator path with `--grant requested`, C1/C2, the derived-names arm where the manifest asks; negative: byte-flipped and missing .cips must refuse (EXECUTES THE PACKAGE; refuses while the key is reachable) `plugin inspect` now prints `derived_names` (text and JSON), which the verify script reads off the packed bytes. Found and fixed on the way: the inline jobs compared the flipped .cips against "${CIP}s" from inside scratch/, where it named no file, so "the byte flip changed nothing" could never fire. package-release.yml releases ONE package on a `pkg/<id>/v<version>` tag, without a core release: the required-CI gate (release.yml's windows-gate body, moved into require_ci_green.sh and called by both); the newest core release's shipped binary, held to its signed catalog's sha256; the same three scripts; an immutable `pkg/<id>/v<version>` release (package_publish.sh: Forgejo API by curl, DRY_RUN rehearsal, URLs from the host's answer); the channel (package_channel.sh: catalog-merge, sign both documents, read each back through the binary's own catalog door); publish it; and re-read the PUBLISHED channel to catch a lost update. Gates: release_gate.rs and release_fixture_gate.rs read the one matrix job and the scripts its steps run (effective code), hold the matrix EQUAL to tests/packages/*/plugin.toml in both directions, and extend the publisher-key containment to package-release.yml. Population floors re-measured and named (steps 87->66, jobs 11->8, key sites 5->4 across both workflows, key-holding steps 5, all inlined). A script that only TESTS the key's absence (`-n "${CODE_INDEX_PUBLISHER_KEY:-}"`) no longer counts as holding it. ci_cadence registers the new workflow; plugin_command_registry's variant->verb mapping is unchanged. test-support's HTTP fixture drains request bodies and records `METHOD path`; posix gains run_posix_script_in. crates/cli/tests/package_release_scripts.rs EXECUTES every script: all four packages end to end with a fixture key, every refusal beside its twin, the channel build/sign/read-back, the publish script against a fake API (DRY_RUN and real), and every arm of the CI gate. Also removes the literal release version from four files the version-site registry flagged. NOTHING HERE HAS BEEN DISPATCHED. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmuResolution is one transaction. A one-shot server killed on its 2 s `warming_up` reply therefore lost the reconcile on every call, and `converges_on_retry` could only be false. - A one-shot call now waits up to 10 s (ONE_SHOT_WAIT_DEADLINE) for its own reconcile. That answers every tier-1 repo except django on the first call, and stays inside the blast-radius hook's 20 s. - If the reconcile is still running, the reply discloses `reconcile_pending.finisher {this_process, pid, lock, log}` with `converges_on_retry: true`. When its caller hangs up, the server stays until the index is current, logs both ends to daemon.log, and exits. It yields (exits) if a daemon starts serving the index. - Every in-process writer leg takes the reconcile lock before opening the database. A one-shot server that finds the lock held waits, and its reply says another process is finishing. - `converges_on_retry` is derived from the reconcile phase. It is false only when no process is reconciling. The phase ends when the outcome is stored into the slot, not before. - A server hung up on before any disclosing reply exits at once. It does not linger silently. Tests (each mutation run, each RED): - reconcile_pending_is_for_a_one_shot_process_no_daemon_serves: `converges_on_retry` constant true; `mark_disclosed` dropped; RUNNING reported as another process; `store` not resetting the phase. - oneshot_reconcile_e2e (new; the test holds the lock): - a busy lock taken as acquired; - WAITING mapped to no finisher; - the undisclosed-exit removed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmuposix_script_gate grades spawns call by call and read the new test's Command::new("git") as handing a script to a hand-rolled interpreter, because the same body read .forgejo/scripts/*.sh. The spawn now lives in git_index_modes(dir). posix_script_gate 4/4, release_gate 37/37; the exec-bit mutation (package_pack.sh at 100644) re-run: RED. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmuplugin updaterepairs (#309 review HIGH-1) f8a2ae1543languages enablesays refused, not absent; grade the reserved-id door b40116e348Review finding (LOW): `grammar_cache_for` now keys every lane as `<host key>-<grammar key>`, so the default grammar's old directory `<digest>/<host key>` was kept by GC for as long as this build lived (its key equals the current build's). It is now collected at once: an entry with no `-` whose name IS the current host key is this build's old layout, which this build never reads again. An old-layout entry of ANOTHER build may still be that build's live cache and keeps the ordinary age rule. Test: cache_gc::stale_cache_entries_are_collected_and_live_ones_are_kept plants a fresh `<digest>/<current host key>` in both caches. MUTATION (RUN) disable the old-layout arm -> RED ("this build's old-layout entry survived"). cache_gc, grammar_cache, extractor_cache green. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmuAn independent review reproduced two high-severity defects in the first cut, where the one-shot server stayed behind to finish the reconcile itself: - Its stderr was a pipe owned by the CLI. After the CLI exited, the first log line hit EPIPE, and the finisher died with its reconcile. - The 10 s wait applied per call, so batches overran the CLI's 60 s and the hook's 20 s. Redesigned onto the existing daemon: - A one-shot process waits ONCE (a shared deadline, `tool_wait_deadline`). Every later call and batch entry waits only until the same instant. - The slot is re-checked before a `warming_up` refusal. - When the wait runs out with work pending and `--start-daemon-to-finish` was given, the server starts the code-index daemon through the shared recipe `lifecycle::daemon_command` (detached, null stdio, own log, daemon.lock, idle exit). `attach_or_spawn_daemon` now uses the same recipe. - A daemon already registered is reported, not started again. The pid reported is the one the registration names. - The reply carries `reconcile_pending.started_daemon {pid, started_by_this_call, log}`, and `converges_on_retry` is true exactly then. - Without the flag, or for a `--db` other than the project's own, no daemon is started and the reply stays `false` with the remedy. Deleted: - the reconcile lock (`try_reconcile_lock`, `reconcile_lock_path`); - the `ReconcileState` phases; - `finish_one_shot` and the daemon-yield poll; - the stay-behind and undisclosed-exit logic; - the `Finisher` wire type; - `oneshot_reconcile_e2e.rs` and the harness's `hang_up_and_wait`. `keep_std_handles_from_children` stays, called inside `daemon_command`. On Windows a daemon would otherwise inherit its spawner's client pipes. Tests (mutations run, each RED): - `oneshot_daemon_e2e` (new): - an explicit no-daemon one-shot never starts one (starter installed regardless of the flag); - with the flag it starts and names the daemon (`converges_on_retry` false constant). - `reconcile_pending_is_for_a_one_shot_process_no_daemon_serves`: - `converges_on_retry` true constant; - `started_daemon` always `None`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmuOn v0.32 a Windows index this user could not open killed every daemon start with `unable to open database file` (SQLITE_CANTOPEN), and every tool answered `warming_up` with "Retries continue in the background", so agents waited on an outage that never ended. `perms::index_access_denied` asks SQLite first (open read-write without create, `BEGIN IMMEDIATE; ROLLBACK`; BUSY counts as accessible) and only when SQLite fails opens index.db, -wal and -shm raw to learn which one refused; only PermissionDenied counts. The order matters: closing any raw descriptor drops every POSIX lock the process holds on the file, SQLite's included — a first cut that probed raw up front corrupted in-process writers ("file is not a database", a SIGBUS'd daemon) in live_activation_e2e, store_repair_e2e, language_owner_e2e and plugin_add_mcp_e2e. Its Display is the one sentence every surface prints: the code, the path, the owner (`uid N`; `DOMAIN\name` on Windows when READ_CONTROL allows), PERMANENT, and the exact repair (`icacls <dir> /reset /T` from an elevated prompt, or chown/chmod on Unix, or renaming .code-index). - db::open maps a FAILED open to IndexerError::AccessDenied, so the daemon's fatal line and daemon.exit carry the named cause. - Both MCP legs refuse `index_unavailable_permission` at routing, for a slot that is not ready, beside the schema-skew refusal, with a structured `index_unavailable` block (converges_on_retry: false). - `code-index query` prints the sentence on stderr; `doctor` names it in `database` and `index freshness`, and no longer PANICS on an index it cannot open (`check_parse_errors_ratio` unwrapped the open). Tests: unix chmod 000 on both MCP legs (refusal, timing, daemon.exit), the query CLI, doctor, db::open and a locked -shm through the probe, and a healthy index held by this process is not denied; a Windows DACL-staged e2e (CI-verified) that also runs the prescribed icacls repair. Root cannot be refused by a mode, so root runs (Linux CI) use the debug-only CODE_INDEX_TEST_DENY_INDEX_ACCESS seam instead of skipping. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmuofferflag (U+V merge fix) 274fb25a77Re-review MEDIUM 1, LOWs 5a and 6. - An older code-index-mcp on PATH rejected `--start-daemon-to-finish` ("unexpected argument", rc 2) on every query. The flag now goes only to the server beside the CLI. - A batch prints one reconcile note (`query::reconcile_pending_of`), and the note says when the daemon has not proved it serves. Tests (mutations run, each RED): - a_newer_cli_with_an_older_server_on_path_still_answers: flag passed regardless. - a_batched_call_stays_within_the_hook_budget now asserts a serving `started_daemon` and exactly one note. Mutations: note read from the top level only; later entries not answered from the known daemon. - a_warn_after_the_caller_exits_cannot_kill_the_work is behavioural on every platform: the caller's stderr must reach EOF once the CLI exits. Mutations: daemon inherits stderr; no own process group (Unix). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmuThe reviewer got three spellings of the same read past the scanner: g.state = '{}' (a format! of generations::ACTIVE), g.state = ?1 (the active state bound as a parameter), and generation_id IN (SELECT id FROM plugin_generations ...). The rule is now DEFAULT-DENY. A label table's generation_id compared with a plugin_generations id is a finding unless the literal names only non-active states, either as a value ('building') or as an inline capture of the constant ('{BUILDING}'). A state the literal does not name counts as active, because the literal cannot prove otherwise. Both subquery forms (= and IN) match, and an unspaced '=' is tokenised. A spliced state predicate is graded on what its renderer actually renders (generations::in_flight_predicate, evaluated), so a renderer that started naming 'active' would turn every statement that splices it red. Seven new anti-vacuity probes cover each bypass. A legal probe ('{SUPERSEDED}') keeps the escape hatch narrow. Each of the three bypasses was injected into src/snapshot.rs as a production literal, and each run was RED. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmuRun without COSI_CORPUS_DIR, the instrument printed "nothing measured" for all nine repos and exited 0, even with COSI_ATTRIBUTION_REPO naming a repo. That reads exactly like a clean table. Every test in the binary is #[ignore]d, so it only ever runs because someone asked for a table, and a run with no corpus is a mistake rather than a mode. corpus_or_refuse now panics, naming the missing variable and, when it is set, the filter that asked for a repo. This refuses the unfiltered run as well, which is stricter than the review asked. The test a_selected_repo_without_a_corpus_refuses is #[ignore]d and #[should_panic], as corpus_require_floor::every_test_is_ignored requires of this binary. Mutation run: returning an empty path instead of panicking turns it RED ("did not panic"). The real command (COSI_ATTRIBUTION_REPO=python-flask, no corpus) now exits 101. The cost_attribution command in CLAUDE.md now carries COSI_CORPUS_DIR=$HOME/.cache/cosi-corpus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmuRound-4 review items 1, 2, 4, 5, 6 and 7. 1. index_state, at the source. Every answer passes through `annotate_answer_provenance`, and gets an `index_state` block ({projects: {name: state}, semantics: counts are FLOORS, empty is not absence}) while a participating project's index is not `ready`. The state is `PathClaims::lifecycle_state`, an in-memory daemon answer. This covers daemon-backed sessions as well as one-shot ones. On django, find_references had answered 25/14/7/0 with nothing saying so. 2. One deadline per process for daemon registration and serving together (`DAEMON_SERVING_WAIT`, 5 s), shared by every project, so a whole call is ≤ 10 s + 5 s. 4. The started daemon stays in its spawner's process group again, consistent with `lifecycle::detach_daemon_command` and the test leash. `process_group(0)` made leashed daemons leak on a killed run. 5. One gate: `lifecycle::daemon_command` returns a Result and refuses when `lifecycle::may_spawn_daemon` does. All three spawners (attach-or-spawn, respawn, one-shot starter) go through it, and lane W wires `startup_backoff` there. 6. `reconcile_pending.semantics` says `started_daemon` converges only when `serving`. 7. The starter calls `stop_own_pass` exactly when it hands the reconcile to a daemon (found or spawned), never for a foreign `--db` or a refused or failed spawn, and then always returns `Some`. - The pass's cancel control is published before the database opens. On a first index the late publish had made the cancel a no-op (measured). Tests (mutations run, each RED): - index_state_disclosure_e2e::an_answer_from_a_reconciling_daemon_says_so (real daemon held reconciling): insertion dropped. - a_call_waits_for_the_daemon_once_registration_and_serving_together: 5 s each, RED at 11.1 s. - a_call_that_starts_no_daemon_keeps_its_own_pass: stop called first. The first draft (a first index) let the mutation survive; an upgrade staging grades it. - a_cancelled_first_index_stops_parsing: control published late. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmuThe parse loop skips every task not yet started once a shutdown is requested (a one-shot handing its reconcile to a daemon). The resolve after it can then find nothing pending and report `Skipped`, so the pass returned `Ok(stats)` over a PARTIAL index -- which `single_process` would install in the slot and report `ready`. `index_path_inner` now returns `IndexError::Cancelled` when `ctl.shutdown_requested()` after the parse join (before the resolve), and `single_process` bails "cancelled: handed to a daemon" if the flag is set once the pass returns, covering a cancel that lands later. The daemon's initial-reconcile loop already treats a shutdown-time `Err` as a clean exit, not `degraded`. Test: resolve_progress::tests::a_shutdown_mid_parse_fails_the_pass -- a wrapper plugin requests the shutdown from inside its first `extract` (deterministic mid-parse), premise asserted: fewer files indexed than on disk. Mutation, run: delete the post-join check -> RED "a pass cut short by a shutdown must not return Ok: 12 of 400 files, IndexStats { ... }". The `single_process` bail has no dedicated test: with the indexer check in place it is unreachable for the parse case, and no harness reaches a cancel landing after the parse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu`package_parity::producers_of` joined `file_contributions` onto the ACTIVE generation's id, which since m0075 labels no row, and made `ruby_package_parity` fail "left 0, right 153" — read as a product regression. The checkpoint already reads it through `live_label`; this makes the class impossible to reintroduce. `no_production_statement_reads_rows_by_the_active_generations_id` now also scans every shared test helper module — any `.rs` in a subdirectory of a crate's `tests/` (mod.rs trees and #[path] support files) and the whole test-support crate — with the same label-table scanner, plus an exact registry of helpers that call `contributions::current_generation` (one: generation_fixture's grant writer, which writes generation METADATA). Anti-vacuity: the walk must reach package_parity/mod.rs, corpus/mod.rs, test-support/src/exec.rs and mcp-server/tests/support/mcp.rs. Audit (scanner widened over every tests/*.rs, then reverted): no test-side read of a label table by the active id remains. The only hits were this file's own probe literals and generation_crash_matrix's `state NOT IN ('active','superseded')` pending-row count; every value-bound `generation_id = ?` on a label table binds LIVE or a pending/superseded id. Mutation (run): restore `JOIN plugin_generations g ON g.id = fc.generation_id AND g.state = 'active'` in producers_of -> RED, naming tests/package_parity/mod.rs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu642434c' into p-python-receivers 85a4cbbfafc3afa39's `pinned_fixture` forked bare with `.output()`. The module is compiled into targets that install executables (`extractor_cache`, `parallel_precompile`'s siblings), and the fd a `write_executable` holds is inherited by any fork in the same process, so the exec of that binary can fail ETXTBSY. Every other spawn in this module already uses `locked_output`; this one now does too. MUTATION (RUN): restore the bare `.output()` -> RED in exec_copy_registry::a_file_that_installs_an_executable_locks_its_spawns_too ("crates/indexer/tests/corpus/mod.rs:499 .output()"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmucli_beside_daemon_e2e flaked with the CLI dying "database is locked" during its 7 s hold. Only the writer loop's running flushes waited out a hold longer than busy_timeout (v0.32.2). Every other write path either failed after one busy_timeout or, worse, failed at once: * activation::record and write_capability_grants ran in autocommit, one busy_timeout per statement; * reconcile_extraction_epoch, the activation build's queue, extraction windows and layouts, and collect ran DEFERRED transactions, whose first write is a read-to-write upgrade SQLite never retries; * the resolve pass, re-resolve, retire, request, the durable resolve batch, migrations, generations::fail/transition and promotion took IMMEDIATE (or autocommit) with no retry past busy_timeout; * the FINAL flush -- a one-shot index's normal last batch, not only a shutdown -- gave up after two retries. `busy::begin_write` / `busy::begin_immediate` are now the one door: an IMMEDIATE transaction whose BEGIN is retried with the writer's backoff (25 ms doubling to 1 s, WARN per doubling, ERROR past a minute) for as long as the lock is held, until the caller's stop predicate (a cancelled pass, a shutdown) ends the wait with the SQLITE_BUSY it would have had. Retrying the BEGIN alone suffices: once it succeeds the connection holds the write lock, so no transaction body has to be re-runnable. Every production write transaction above goes through it; commit_batch takes one attempt so the writer loop keeps owning (and publishing) its wait; the final flush keeps its bound only for a cancelled pass. Tests: busy.rs holds the write lock on ANOTHER connection for longer than the connection's busy_timeout across each path (test_seams::contend, one-shot per label, which also records that the path really met the hold): batch commit (final flush), activation record, resolve pass, and an activation build's request, extraction window, state change and the promotion switch. writer_lock_registry fails on any production transaction opened around the door; four reviewed `busy: exempt` sites (a read snapshot, a read-only temp-table tx, WAL maintenance that yields by design, the access probe whose BUSY is its answer). MUTATIONS (RUN), each RED on its own test: final flush bound made unconditional -> a_hold_on_the_batch_commit... "activation record" stop `|| true` -> a_hold_on_the_activation_record... promotion begin_immediate stop true -> a_hold_on_each_activation_write... retry_busy never retries -> activation, resolve, build RED retry_busy ignores stop -> a_stopped_wait... (Timeout) activation record back to conn.transaction() -> writer_lock_registry stripper's test_only_predicate false -> the_scan_reads_production_code... Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmuWindows-only `plugin_add_package_fetch_e2e::a_package_already_in_the_store_is_not_refetched` failed "database is locked" opening a brand-new database. Read in the code, the lane-WIN hypothesis holds and is worse than stated: while a one-shot server's `single_process` is still inside `code_index_indexer::open`, a tool call takes the not-ready path, and that path opens the same file -- `perms::index_access_denied` read-write with `BEGIN IMMEDIATE; ROLLBACK`, then the schema, counts and reconcile-pending probes read-only. The opener's first locking statement is `PRAGMA journal_mode=WAL`, which ran before `busy_timeout` was even set, and which is a read-to-write upgrade SQLite never hands to the busy handler anyway -- so any concurrent lock failed the OPEN at once. Two halves: * ORDERING (structural). `ProjectHandle::begin_local_open` marks the open in flight; every not-ready probe takes its path from `probe_db_path`, which answers None meanwhile, so no probe opens a database this process is still creating. The open reports any real obstacle into the slot when it returns. * THE OPENER. `busy_timeout` is set first, and the WAL switch is retried on SQLITE_BUSY with `busy::backoff` for one busy_timeout, covering a second PROCESS's transient lock, which no in-process ordering can see. Measured: moving busy_timeout alone left the new test RED; the retry is what makes it wait. The warming hint now probes `db_path_for(key)` rather than `<root>/.code-index/index.db`, so a `--db` override is probed where it is. MUTATIONS (RUN): `probe_db_path` ignoring the in-flight flag -> RED in not_ready_probes_skip_a_database_this_process_is_still_opening ("a probe opened a database this process is still creating: Some(\"project_not_available\")"); `switch_to_wal` without its retry -> RED in opening_a_brand_new_database_waits_out_a_short_hold_on_it ("database is locked"). Both Linux-runnable; the Windows leg itself needs CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmuWith the CLI no longer dying of the lock, cli_beside_daemon_e2e failed 2 of 8 runs on the OTHER side: the daemon, started mid-index, sees an identity the CLI has not recorded yet, rebuilds the activation, and the build's gate 7 correctly refuses to promote a generation whose active projection the CLI moved underneath it -- "startup activation was not promoted; the previous generation remains active: gate_failed". That refusal is transient (once the CLI finishes the identities match and no rebuild is needed), but the startup activation ran as a fatal preamble to the initial reconcile loop, so the daemon exited. It is now `startup_activation`, run as the first step of every reconcile attempt: an `Err` marks the daemon degraded and is retried on the existing schedule, serving the last durable snapshot meanwhile -- the contract the watcher-start half of the same attempt already had. `CODE_INDEX_STARTUP_ACTIVATION_FAIL_WHILE` (debug builds only) is its deterministic test seam, the twin of CODE_INDEX_RECONCILE_FAIL_WHILE. MUTATION (RUN): return a startup-activation `Err` from `run`, the pre-fix fatality -> RED in a_failed_startup_activation_is_retried_not_fatal ("the daemon exited on a failed startup activation instead of retrying it"; log: "daemon exiting on a fatal error ... injected startup activation failure"). After the fix the original e2e passed 6/6 runs (one log shows the same race met and retried in the watcher half of the attempt). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu63fdf5e's waits were bounded only by the caller's stop predicate, and the callers without one passed `never`. A lock held by THIS process on another connection would never be released while the thread needing it waited -- a hang, not a wait. (The 34-minute suite stall the coordinator traced to this lane was a retried refusal, fixed separately; this closes the class it was suspected of.) `retry_busy` now gives up at `busy::WRITE_LOCK_DEADLINE` (600 s, far past this product's longest hold, a resolve pass of tens of seconds) with a `write_lock_deadline: ...` SQLITE_BUSY naming the wait, its duration and the bound -- still busy-class, so every caller handles it as contention. The uncancelled final flush in the writer loop takes the same bound. MUTATION (RUN): drop the deadline return -> RED in a_wait_on_a_lock_this_process_holds_ends_at_its_deadline ("the wait did not end at its deadline: Timeout"), bounded by its own 10 s watchdog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmupython-flask's cold package index took 30.5 s against 1.0 s native (30.6x); py-django's packages-only CLI index took 1,155 s against ~51 s. Per-phase debug timing put 27.3 s of flask's 30.5 s in setup_groups_buckets_stats, and an Instant around the single statement put 27.2 s of that in the INSERT INTO temp.python_layout_denied_refs. The native leg owns no layout and never runs it. The statement's binding arm (nearest binding of the receiver, a MAX probe and an enclosing-symbol probe) sat inside EXISTS(... python_import_origin p ...) as a fourth OR arm, so it re-ran for every unresolved import binding of the ref's file although only its last comparison reads p. It is hoisted: EXISTS p (A(p) OR EXISTS b (B(b) AND C(b,p))) == EXISTS p A(p) OR EXISTS b (B(b) AND EXISTS p C(b,p)), plus a necessary- condition prefilter (ungated, so a superset) of (file, name) pairs whose bindings an unresolved import of their own file types. Equivalence, measured: with both statements run side by side in the same pass on flask, each denied the same 2,793 refs (0 old-only, 0 new-only), and the package leg's REF_SQL and REF_RULE_SQL projections are byte-identical before and after. Results (contended box, single runs): flask package 30.5 s -> 4.1 s (native 1.1 s; the step 27.3 s -> 0.23 s); py-django package 44.5 s vs native 36.2 s in the same harness. Mutation run: emptying the prefilter (WHERE 0) turns both layout_withholding_blocks_foreign_imports_without_losing_local_facts and module_bindings_cannot_carry_withheld_imports_into_mapped_members red ("withheld type or import contaminated resolution": x.member() binds), so the hoisted binding arm is graded by existing tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmuThe field report: `Themes/Icons.xaml` and DevExpress's `Pie2DModels.xaml` carried `extract.unsupported_syntax` and read as "only partly indexed". The issue suspected both ceilings in _prdoc/records/80-S12 §5. WHAT FIRED, MEASURED AGAINST 0.2.0. Only the 4,096-byte NAME ceiling, and on attributes the extractor never reports. It ran on every quoted attribute value BEFORE the extractor asked whether the attribute was one it emits, so one `Data="M0,0 L…"` / `Figures` / `Points` past 4 KiB set the diagnostic. The scan then continued: nothing was lost, the diagnostic was simply false. The 196,608-byte BODY ceiling did not fire and never could have said `unsupported_syntax`: it was 0.1.0's bare `$bp > 196608`, it reported `extract.node_limit_reached` (the output code) in 0.1.0 as now, and 0.2.0 (#222/#223) had already replaced it with `$max_fact_bytes` = 2 MiB. The issue read two ceilings out of one sentence of §5. And the "keys missing after the cut" had a third cause: 0.2.0 extracted no `x:Key` and no `{StaticResource}` at all. THE DESIGN. * Name ceiling scoped to values the extractor REPORTS (`x:Class`, `x:Name`, `x:Key`, handlers, simple binding paths, resource keys). The 300 KB `x:Name` of §5 is still declined, file intact. * `x:Key` -> `field` symbol, visibility `module`; `{StaticResource K}` and `{DynamicResource K}` -> `read` ref. Chosen TOGETHER against the resolver's pool classes: `read` lands in the MEMBER pool, which admits a field; binding paths (`member_access`) and handlers (`call`) land in the VALUE pool, which excludes one — so `{Binding Title}` cannot bind to a key spelled `Title`. Implicit-style keys (`x:Key="{x:Type Button}"`) and `{StaticResource ResourceKey=…}` mint nothing. * The manifest now requests `same_file_candidate` and `exported_candidate`, without which no key can be bound to. * The body ceiling stays: `$max_fact_bytes` is sized for FILE_SIZE_LIMIT_BYTES per the #228 doctrine every guest SDK follows, and past it reports `extract.node_limit_reached`, the SDK's "reply buffer ran out" and the code Ruby/Rust/TimeLine report for the same condition. A new `extract.fact_budget_reached` would be a second spelling of it for one package. TWO LIMITS FOUND AND LEFT, BOTH ASSERTED. * Cross-DIRECTORY resource references stay unbound: tier 1b (I021) binds a unique candidate in another file only when it is reachable (same directory, or an import), and this package does not report the merged-dictionary graph. Pinned as a tripwire in the e2e test. * 2,000 x 6 KB = 12 MB of long attributes costs 20.6 s of the 30 s WALL_CLOCK_BUDGET even in a RELEASE plugin host (6 MB 10.0 s, 1.9 MB 3.1 s, linear), and in the debug host the 12 MB e2e was refused `host.deadline_exceeded (process)` in 3 of 9 runs. So the gate's fixture keeps the shape (2,000 entries, 4,001 keys, fifty ~6 KB attributes) at 1.8 MB, inside the default cap where the reporter's files were. PACKAGE VERSION BUMP 0.2.0 -> 0.3.0. extractor.wasm re-derived with the locked `wat` 1.258.0 (2191 bytes, sha256 1e2e581c…, re-pinned in grammar_provenance); a third fixture `Resources.xaml`/`.expected` so `plugin check` grades keys, references, decoys and a 4,415-byte `Data` with `diagnostics = []`. Packed twice from two directories: byte-identical. package_digest sha256:f4770234fa8d82c5369f4bc64a1fd510660c767a29d9413cfa76026d6f98a0e5 extraction_identity sha256:de062e47230b360de4c99e8d5d51613988a37e5d84bb6d92632b6c2be26cd515 xaml.digest re-recorded from `code-index plugin pack` + `digest`; the catalog row's key, archive and URLs moved to 0.3.0 by hand (a release edit, which package_records refuses to invent) and its two identities DERIVED by `package_records -- --write`. host_extraction_epoch.json re-blessed through COSI_BLESS_HOST_EPOCH (the digest moved, so the gate admits it). LEFT RED, BECAUSE THE FIX IS NOT MINE TO MAKE: * first_party_anchor (4 tests): tests/packages/xaml.cips is the offline first-party signature over the RECORDED digest; it must be re-signed with the offline key over sha256:f4770234…. * package_baseline: the three xaml CONDITIONS moved. Re-measured into the file and restored from an md5-verified snapshot: outcome `conditions_only`, `diff: []` — no count moved. Needs COSI_PACKAGE_BLESS=1 with a reason; tests/corpus baselines are not moved by this lane. GENERIC FIXES the bump exposed: one `xaml_fixture_entries()` list where three test files spelled the fixture set by hand; registry_schema_gate, package_release_scripts and agent_task_plugin_bench keyed on the literal "0.2.0", a digest prefix, or a whole `capability_withheld` line, and now read the field, the record, or the list. MUTATIONS (RUN), each RED: name ceiling back above the "reported?" test e2e: Some(["extract.unsupported_syntax"]); unreported-attr test; C2 outcome Failed $max_fact_bytes -> 194536 (0.1.0's guard) e2e: (2418, 2416, 2416) + node_limit_reached, last key unbound attribute-arm ceiling deleted oversized test: fact.string_too_long $report_ref ceiling deleted oversized test, {Binding} leg resource refs as member_access e2e: (4001, 4000, 0), nothing binds x:Key visibility file e2e: same-file binds, gallery unbound binding paths as read e2e: decoy binds to the key x:Key arm never arms C2 outcome Failed RELEASE NOTE, required: "`de.h-dv.xaml` is now 0.3.0 and its digest has MOVED to sha256:f4770234fa8d82c5369f4bc64a1fd510660c767a29d9413cfa76026d6f98a0e5. Re-pin it. It now indexes `x:Key` resource keys and `{StaticResource}`/`{DynamicResource}` references, and requests `same_file_candidate` and `exported_candidate` so they can bind. A long geometry attribute no longer reports `extract.unsupported_syntax`. The extraction_identity moved, so every project with this package enabled re-extracts its `.xaml` files once." Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmuno_checked_in_wasm_embeds_a_builder_path (grammar_provenance) reads every committed .wasm for a path that names its builder: /home/, /Users/, :\Users\, \.cargo\, /root/, /usr/local/cargo, .cargo/registry, this checkout's root, the running CARGO_HOME, and any index.crates.io- path not under the remapped /cargo/registry/src/ prefix. Anti-vacuity: at least the build.py extractor count must carry the remapped spelling. It sees the CI-only failure LOCALLY, with no rebuild. - against the candidate's bytes, unmodified: RED, all nine, 68 hits each - MUTATION (RUN): remap_rustflags returning "" and rebuilt: RED, the same nine; the mutated build reproduced the old shipped bytes exactly (csharp b9c1761a, ruby bb5f9529). Restored (md5-verified), rebuilt: green. build_py_components now recognises delegation as an `exec` of build.py: svelte and timeline build.sh NAME build.py for --print-rustflags, and the old substring test classified them as build.py packages (11, not 9). Bytes: each extractor 216-224 bytes smaller (17 registry paths, now /cargo/...). Identical from a second checkout at another path under a copied CARGO_HOME at another, longer path, with a third target dir. Versions: csharp, javascript, php, python, rust, typescript 0.1.0 -> 0.1.1; ruby 0.8.0 -> 0.8.1. WASM_ARTIFACTS rows, .digest records and the catalog re-derived (package_records --write; rows rekeyed by hand, as that example refuses to invent a version row). host_extraction_epoch.json: re-recorded with COSI_BLESS_HOST_EPOCH=1; only the seven package_digest values moved, every fingerprint, fixture and row count unchanged, so no epoch bump. package-baseline.json: COSI_PACKAGE_BLESS, outcome conditions_only, diff [] -- only ruby's version, package_digest and extraction_identity moved. Reason: "guest wasm made path-independent (remap-path-prefix); bytes moved, no behaviour delta" (operator pre-approved). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu