Release train 0.36.0: Ruby package owns its source, Rails DSL, Rust/Ruby recall, faster package start #352

Closed
buildagent wants to merge 0 commits from train-0.36 into master
Member

This is the v0.36 release train: one full local run, one PR, one CI round, one tag set. It closes #337, #338, #341, #345, #347, #348, #349 and #350.

What is in it

  • #345: the Ruby package owns its source. The builtin Ruby extractor is frozen. Parity with the builtin is one-way, with every difference declared. de.h-dv.ruby 0.10.0 gets its own catalog URL (pkg/de.h-dv.ruby/v0.10.0).
  • #338: Rails DSL declarations become methods. RSpec let/subject names shadow model methods of the same name. A DSL method is not emitted when its class already defines a method of that name.
  • #337: Ruby resolution. A namespace reopened across its own directory now resolves to one declaration. A bare call to a class's own attr_reader resolves as a read.
  • #348: Rust receiver typing. Chains, struct literals and typed parameters type a receiver, and crate:: counts as origin. This wins back correct binds that #336 dropped. Schema v81.
  • #347: package cold cost.
    • Discovery verifies each package once, in parallel.
    • The first index extracts each file once.
    • The budget is now 1.20× builtin + 0.5 s.
    • The kind no-op fix and the rollup lever (rollups rebuilt once per full resolve) cut SQLite work by 0.4–3.9%.
  • #350: a daemon spawned during another daemon's idle exit waits for the lock. The client gets a retryable daemon_restarting.
  • #341: the window after a promotion is disclosed as promotion_resolving.
  • #349: the bridge destination grant gate keys on the generation.
  • Packages:
    • rust, php, python, csharp, javascript and typescript are rebuilt as 0.1.2 against the current shared source, with facts unchanged except the #348 Rust rows.
    • The guest encoder can now represent Rust chain rows.
    • A stale shared input now FAILS the package's own-bytes leg.
    • CI schedules package legs from the recorded inputs.
    • package_records keeps a host-release row on the host release.
  • Tools:
    • ruby_package_cost_attribution attributes the Ruby cost record's own leg per statement.
    • manifest_layering attributes #[path] files to the crate that compiles them.
    • The index_state block is trimmed back under its ceiling.

Records (all operator-approved, each with attribution in its reason)

  • baseline.json, stage-baseline.json and tier3-baseline.json: #337/#348 binds, source-sampled before the re-record.
  • cost-baseline.json: the rollup lever's full scan (+6–11% fullscan) and the kind no-op fix (vm_step −0.4…−3.9%).
  • ruby-package-cost.json: schema 81 / ruby 0.10.0, attributed per statement.

Verification

Every lane was verified independently: its claimed tests were re-run, and a mutation of its fix turned them RED.

The ONE full local run on 805a38c0 was all green:

  • fmt, clippy (×3), rustdoc with -D warnings --document-private-items;
  • nextest: workspace 5027/5027, daemon leg 919/919, ci-timing 32/32;
  • guest_gates;
  • the 11 ci.yml corpus suites, psr4_vs_builtin and tier-3 (no suite executed zero repos);
  • precision_gate 7/7 with phantom 0;
  • the package-ci legs for all 11 packages: own bytes under COSI_GUEST_REBUILD=1 (none unmeasured), the release gates, the ruby corpus leg, and builtin overhead parity for all seven languages.

Not run locally: agent_task_bench, because the local rule forbids COSI_CORPUS_DIR on MCP tests. CI runs it.

Release order after merge

  1. Push the v0.36.0 tag after master CI is terminal.
  2. After the v0.36.0 release is published, push pkg/de.h-dv.ruby/v0.10.0. This is the first package-release.yml run; it packs with the newest core release's binary.

🤖 Generated with Claude Code

https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu

This is the v0.36 release train: one full local run, one PR, one CI round, one tag set. It closes #337, #338, #341, #345, #347, #348, #349 and #350. ## What is in it - **#345: the Ruby package owns its source.** The builtin Ruby extractor is frozen. Parity with the builtin is one-way, with every difference declared. de.h-dv.ruby 0.10.0 gets its own catalog URL (`pkg/de.h-dv.ruby/v0.10.0`). - **#338: Rails DSL declarations become methods.** RSpec `let`/`subject` names shadow model methods of the same name. A DSL method is not emitted when its class already defines a method of that name. - **#337: Ruby resolution.** A namespace reopened across its own directory now resolves to one declaration. A bare call to a class's own `attr_reader` resolves as a read. - **#348: Rust receiver typing.** Chains, struct literals and typed parameters type a receiver, and `crate::` counts as origin. This wins back correct binds that #336 dropped. Schema v81. - **#347: package cold cost.** - Discovery verifies each package once, in parallel. - The first index extracts each file once. - The budget is now 1.20× builtin + 0.5 s. - The kind no-op fix and the rollup lever (rollups rebuilt once per full resolve) cut SQLite work by 0.4–3.9%. - **#350:** a daemon spawned during another daemon's idle exit waits for the lock. The client gets a retryable `daemon_restarting`. - **#341:** the window after a promotion is disclosed as `promotion_resolving`. - **#349:** the bridge destination grant gate keys on the generation. - **Packages:** - rust, php, python, csharp, javascript and typescript are rebuilt as 0.1.2 against the current shared source, with facts unchanged except the #348 Rust rows. - The guest encoder can now represent Rust chain rows. - A stale shared input now FAILS the package's own-bytes leg. - CI schedules package legs from the recorded inputs. - `package_records` keeps a host-release row on the host release. - **Tools:** - `ruby_package_cost_attribution` attributes the Ruby cost record's own leg per statement. - `manifest_layering` attributes `#[path]` files to the crate that compiles them. - The `index_state` block is trimmed back under its ceiling. ## Records (all operator-approved, each with attribution in its reason) - `baseline.json`, `stage-baseline.json` and `tier3-baseline.json`: #337/#348 binds, source-sampled before the re-record. - `cost-baseline.json`: the rollup lever's full scan (+6–11% fullscan) and the kind no-op fix (vm_step −0.4…−3.9%). - `ruby-package-cost.json`: schema 81 / ruby 0.10.0, attributed per statement. ## Verification Every lane was verified independently: its claimed tests were re-run, and a mutation of its fix turned them RED. The ONE full local run on 805a38c0 was all green: - fmt, clippy (×3), rustdoc with `-D warnings --document-private-items`; - nextest: workspace 5027/5027, daemon leg 919/919, ci-timing 32/32; - guest_gates; - the 11 ci.yml corpus suites, psr4_vs_builtin and tier-3 (no suite executed zero repos); - precision_gate 7/7 with phantom 0; - the package-ci legs for all 11 packages: own bytes under `COSI_GUEST_REBUILD=1` (none unmeasured), the release gates, the ruby corpus leg, and builtin overhead parity for all seven languages. Not run locally: `agent_task_bench`, because the local rule forbids `COSI_CORPUS_DIR` on MCP tests. CI runs it. ## Release order after merge 1. Push the v0.36.0 tag after master CI is terminal. 2. After the v0.36.0 release is published, push `pkg/de.h-dv.ruby/v0.10.0`. This is the first package-release.yml run; it packs with the newest core release's binary. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
`active_grant_gate("cd", "b", ..)` rendered `cd.generation_id = b.id`,
comparing a generation id to a language_bridges ROW id. It now passes
the already-joined active generation `g` (== b.generation_id).

Test: influence_classification::the_bridge_destination_gate_keys_on_the_
generation_not_the_bridge_row, both directions, mutation RUN (RED).
The I340 differential oracle now spells b.generation_id, and its bridge
row id no longer coincides with the generation id, so it grades the
missed direction too (mutation RUN: 36 refs differ).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Root cause: every graceful exit records its cause, closes its listener,
then holds the daemon lock through its drain (accept drain, watcher stop,
final WAL checkpoint) and removes its registration last. A daemon spawned
in that window ran `takeover::acquire_with_takeover`, which read the
leaving holder as healthy (probe answered before the listener closed),
as STARTING (young, unreachable) or as payload-less, and DEFERRED: the
spawn exited, the old daemon finished, and nothing served. The MCP
attach then waited out its 60 s poll and fell back to single-process
mode ("did not answer within 60s. OBSERVED: NEVER-SPAWNED"), reproduced
by the new e2e under the mutation. A holder past the 60 s startup grace
was instead EVICTED: SIGKILL mid-checkpoint.

Fix (daemon side, so every spawner benefits): a holder whose exit record
names its pid, written since it registered, is LEAVING; so is a held lock
with no registration. The successor waits up to 30 s for the lock instead
of deferring or evicting, then falls back to the old health decision.

Client side: when a heal fails after the previous daemon announced its
exit, the error is a typed `DaemonRestarting` naming the old pid and its
cause, kept for every later RPC of the call, and the MCP server renders
it as the retryable `daemon_restarting` instead of `internal_error`.

Debug-only daemon seams (env, like CODE_INDEX_DAEMON_TEST_PANIC_WHEN):
CODE_INDEX_DAEMON_TEST_IDLE_EXIT_WHEN (idle exit on a marker) and
CODE_INDEX_DAEMON_TEST_SHUTDOWN_HOLD_MS (hold the lock after the listener
closes). No #[cfg(test)] static was added.

Tests (mutation RUN for each, all RED):
- reconnect_e2e::a_daemon_started_during_an_idle_exit_waits_for_the_lock_and_serves (3 tries)
- daemon_death_mcp_e2e::a_session_started_during_an_idle_exit_is_answered_by_a_new_daemon (2 tries)
- daemon_death_mcp_e2e::a_heal_that_cannot_finish_after_an_idle_exit_answers_daemon_restarting
- takeover unit tests: announced exit waited for, payload-less lock waited
  for, a pre-registration exit record ignored
- server::call_timeout_render_tests::a_daemon_restart_in_progress_is_retryable_and_names_the_old_exit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Root cause: `promotion::promote_observed` commits the pointer switch
(`generations::promote`) and only then runs the resolve it owes, so for
that whole resolve every reader sees the switched generation with its
rebuilt files' refs unresolved: refs_resolved 0, empty callers.

Design choice: disclose, do not reorder. Resolving before the switch is
not sound here: refs.target_id is single-valued, and the switch also
withdraws the rebuilt files' live symbols and unbinds the carried (live)
refs that pointed into them, which cannot be re-decided without
overwriting what readers are served. The resolve also commits in
batches outside the writer lock (m0077, #78 "promotion is short"), so it
cannot join the switch's transaction. Serving the previous generation's
resolution fails on the same unbinding. No migration.

`promotion::promotion_resolving` derives the window from durable state
alone: every existing build file of the active (or, after a rollback,
the superseded) generation is still in m0007's resolve_scope_files. It
holds from the switch's commit to the resolve's final commit, survives a
crash or a cancelled resolve, and needs no marker to clear. The daemon's
`stats()` and `path_claims` lifecycle lay it over the runtime phase
(`promotion_overlay`: outranks ready/resyncing/reconciling, keeps the
replaced detail, never hides degraded), so `index_state` and
`project_overview` say `promotion_resolving` with "an empty or zero
result is NOT evidence of absence".

Tests (mutation RUN for each, all RED):
- generation_promotion::the_window_between_the_switch_and_its_resolve_is_disclosed
- reader_epoch_e2e::the_post_promotion_window_is_disclosed_to_every_reader
- local_index::stats_tests::the_promotion_overlay_outranks_all_but_degraded

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
A package leg's cold-index overhead on a tier-one repo is a FIXED cost,
not a per-file one. Measured on python-flask with the seven first-party
packages installed (release, 12-core x86_64 without SHA extensions,
1-min load 3.3-3.9 at start): the index pass's SQLite work is +0.75%
vm_step over the builtin's (+0.35% on py-django, where the package
leg's wall clock is LOWER), parse-and-write is equal, and
PackageSet::discover_with_store took 0.98-1.24 s per start against a
1.05-1.09 s builtin index. Most of that was SHA-256 over the same
stored bytes, three times per package, one package after another:

* ApprovedPackageIds::resolve read and verified every approval through
  Store::get, for the package id alone;
* prepare_activation read and verified each again, to stage it
  (0.31-0.43 s);
* collect_stale_caches parsed every installed package through
  Store::installed only to learn digest names the store already spells
  as file names (0.29-0.47 s).

Every approval is now read and verified ONCE, all at once, and that
read feeds both ApprovedPackageIds::from_grants (the one implementation
of the #91 rule) and the sequential, digest-ordered admission, so every
refusal, warning and admission is the old loop's. The cache GC reads
`<digest>.cip` names; the one input where that differs is a .cip that
no longer verifies, whose cache is now kept (disk only: such a package
cannot run, and a reinstall of the same bytes reuses it).

Discovery 0.98-1.24 s -> 0.15-0.32 s. Cold ratio, median of 5 paired
rounds, before -> after: python-flask 2.23 -> 1.40, ruby-sinatra
2.19 -> 1.56, php-guzzle 1.74 -> 1.36, rust-ripgrep 1.61 -> 1.31,
cs-dapper 2.09 -> 1.48, js-express 2.28 -> 1.45, ts-zod 1.53 -> 0.89
(that last one under load that rose to 8.4). Parity exact on every leg.

Tests, each mutation RUN:
* cache_gc::a_package_that_no_longer_verifies_keeps_its_caches_until_its_file_goes
  - installed_cache_keys back to the parse-based set: RED.
* discovery_store_reads::each_approval_is_admitted_or_refused_on_its_own_stored_bytes
  - reads zipped reversed: RED; every approval handed the first read: RED.
* duplicate_package_id (existing) grades the ids fed to from_grants
  - from_grants fed no ids: RED (6 tests).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
A path with no `files` row is DEFERRED by an activation build: it
carries no rows, and the first ordinary walk after promotion
full-upserts it. The build nonetheless read, extracted and validated
it first, and dropped every byte of the answer. On a FRESH database
every path is such a path, so a package's first index extracted the
whole tree twice — `index::reconcile_activation_before_index` builds and
promotes an isolated generation, then the ordinary pass extracts again.

`dispatch_round_observed` now settles an owed path that has no `files`
row without reading it: `defer_one` stats it against the recorded
identity (Vanished / Moved -> redispatch, exactly as before) and routes
it with `classify_walked`, which reads no bytes (Routing -> unclaimed,
as before); anything claimed settles `done` with no file_id and a NULL
hash ("recorded from a stat alone", m0053). A `files` row that appears
between dispatch and settlement leaves the path owed, so the next round
extracts it like any indexed file.

WHY THE #78 GATE IS UNCHANGED. Every predicate `build::gate` applies
reads the queue's identity columns, this generation's
file_contributions/symbols/refs/imports, or `files` joined to them. A
path with no `files` row reaches none of them whatever its extraction
answered: `dispatch_round` writes a refusal contribution only for a path
WITH a `files` row, so before this change a trapping or lying extractor
on a fresh database was not refused by the gate either — the build
promoted, and the ORDINARY pass recorded one refusal per file. Both
halves still hold and are graded: the routing and churn halves of the
gate see the same rows, and `first_index_single_extraction.rs`'s
broken-package arms pass on the OLD code at every gate-state and
refusal assertion (promoted, no failure, one refusal contribution per
file on the package's component, zero symbols, parse_errors == files).
One text moved and it is named: the per-file refusal used to read
`host.restart_backoff (...; last=host.worker_trapped)` because the
package had already spent its failures on the discarded extraction; it
now reads the extractor's own `host.worker_trapped`
(`fact.span_out_of_range` for the lying guest).

`PackageHost::extractions_answered` exposes the count the lane pool
already kept (LaneGate::served), so a test can say how many times one
pass asked a package for a file.

Cold ratio, median of 5 paired rounds, all seven first-party packages
installed, load < 4 at start, before (2aa240b7) -> after:
python-flask 1.361 -> 1.342, ruby-sinatra 1.500 -> 1.357, php-guzzle
1.365 -> 1.200, rust-ripgrep 1.321 -> 1.191, cs-dapper 1.489 -> 1.344,
js-express 1.427 -> 1.317, ts-zod 1.166 -> 1.131. Parity exact on all.

Tests, each mutation RUN (cp snapshot, md5, touch):
* first_index_single_extraction::a_first_index_extracts_each_claimed_file_exactly_once
  - build.rs as before this change: RED (6 requests for 3 files); the
    two broken arms RED only at their final request count;
    pass_policy::a_builtin_transition_preserves_the_retained_package_record
    RED (parse_count 3, not 2).
* ..._a_trapping_package_on_a_fresh_database_is_refused_per_file_as_before
  and ..._an_extractor_emitting_invalid_facts_...
  - Deferred settled `unclaimed`: RED, ActivationFailed/gate_failed.
  - extract_for answers a refusal with empty facts: RED.
* pass_policy's parse_count assertion moves 3 -> 2: it counted the
  double read this removes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
#336 stopped proximity from choosing a captured receiver's target. On
rust-ripgrep about half of the dropped binds were correct, and proximity
had been standing in for TYPE evidence the binding rows did not carry:
`ov.matched` on `let ov = OverrideBuilder::new(ROOT).add(..)?.build()?`,
`printer.sink(..)` on `StandardBuilder::new().build(..)`, `builder.add`
on `let mut builder = GlobSetBuilder::new()` under `use crate::..`.

Found first: `let x: T`, `let x = T::new()/T::default()` and typed
parameters (`x: T`, `&T`, `&mut T`) were ALREADY binding rows (I030).
They did not bind because (a) a builder chain ended the walk untyped,
(b) `T { .. }` was not read, (c) `crate::` gave tier 1R no origin.

Extractor (crates/plugins/src/rust.rs):
- a chain keeps every non-preserving link, in order, as a provisional
  row `T::m1::m2..` (`?`/unwrap/expect/context.. still elided); a
  `new`/`default`/tuple-variant head yields `T`; struct literal `T {..}`
  names `T` (an enum variant's literal, `E::V {..}`, is refused);
  `f @ pat: T` binds `f`; MAX_BINDING_CHAIN = 16 nodes (registered).
- a `let` whose initializer reads the name it binds puts its row on the
  LAST such read (a row's span must spell its name; a `let`'s scope
  starts after it), never on a path segment (`line_index::LineIndex`).

Resolver (index.rs, tier 1R):
- `returned_type`: each chain link is typed by the callee's indexed
  signature (Self/own type, another nameable type; unwraps Result/
  Option/Box/Arc/Rc and `&`/`&mut`; refuses generics, impl/dyn,
  primitives). Every same-named (container, method) must agree.
- an UNPROVEN provisional row now inserts a NULL rebind instead of being
  dropped: dropping left an earlier typed binding governing (stale type).
- a binding row on the call's OWN receiver token does not type it (the
  read of the shadowed value); the nearest earlier row decides.
- route D: `use crate::[m::]T` / inline `crate::[m::]T` is origin
  evidence for the containers named T in the source's OWN package
  (nearest manifest dir), in module file `m` when a module is spelled.
  Not mirrored in the #65 equivalence oracle (stated at the oracle).

Bind diff vs the train-0.36 binary (bd683200), joined on
(path,line,col,kind,occurrence), split by resolved_by:
  rust-ripgrep  +147 gained (all tier1r_receiver 60), 0 lost, 0 moved
  rust-analyzer +1956 gained (60), 2 lost (60), 0 moved
  cs-dapper, js-express, php-guzzle, python-flask, ts-zod, py-django:
  byte-identical binds.
Against #336's own lost list (train-0.35 -> r336): ripgrep 51 of 410
come back (49 to the SAME target, 2 to a different, correct one: the
pre-#336 target was a same-file phantom); rust-analyzer 82 of 1940 (61
same, 21 different, the ones read all moved off same-file phantoms).
The rest are not type-evidenced in the source the index reads (tuple
destructuring, `for`, closures, untyped fn results) or were phantoms.
Every distinct ripgrep gain and a 1-in-33 sample of rust-analyzer's
read at source: all correct. The 2 RA losses are `range.start()` inside
`let range = TextRange::at(range.start()..)`: the shadowed `range` is
untyped, and the pre-change bind read the NEW binding's type.

Cost (cost_attribution, nine pinned repos, started at load < 4,
vm_step vs bd683200): cs-dapper +0.12%, js-express +0.06%, php-guzzle
+0.08%, py-django +0.02%, python-flask +0.06%, ruby-sinatra +1.23% (its
#337 half), rust-analyzer +0.26%, rust-ripgrep +0.36%, ts-zod +0.04%.
Attributed: tier 1R's decision INSERT (RA +1.87M, ripgrep +132k) and its
UPDATE track the new binds; `recv_bound` (+0.2-1.9% of that statement)
is the own-receiver-token clause, reduced from three measured forms (a
bare LENGTH compare, a materialised end-position column on either temp
table, a second seek) to the line-first form; the signature scan is now
by method name (-592k on RA, -77k on ripgrep).

Tests, mutations RUN, each RED on its named test:
- plugins rust.rs `typed_initializer_shapes_bind_their_evidence`: old
  early return on a non-preserving link (ov); no struct_expression arm
  (hay); no captured_pattern arm (f); row on the pattern (data); no
  tuple-variant head (v).
- index.rs `a_signature_types_the_value_its_call_yields`: no `&`/`&mut`
  strip; no generic-parameter refusal.
- receiver_phantom: every chain link unprovable / an unproven chain
  skipped instead of rebinding NULL
  (`rust_receiver_typed_by_its_initializer_binds_without_proximity`);
  own-receiver-token clause always true, row on the pattern
  (`rust_shadowing_let_types_its_name_only_after_its_initializer`);
  route D returns nothing / no same-package filter
  (`rust_crate_relative_path_is_type_origin_within_its_own_package`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
THE SHARED WALKER HALF of #337, committed alone so the de.h-dv.ruby
package walker (#345) can take it as one cherry-pick. Touches only
crates/plugins/src/ruby.rs:
- `Extractor` gains `reader_fields: HashSet<usize>` (and `new()` inits it);
- the receiver-less DSL dispatch in `emit_call` splits attr_reader /
  attr_accessor (`emit_attr_fields(.., true)`) from attr_writer (`false`);
- `emit_attr_fields` takes `reader: bool` and records reader fields;
- `prove_bare_receivers` adds the own-reader arm;
- test `a_bare_call_to_the_own_reader_accessor_reads_it_through_self`.

Field report (zammad-dev): 16 bare `space` calls beside the class's own
`attr_reader :space` stayed unresolved (`missing_receiver_single_candidate`).
`attr_reader`/`attr_accessor` produce FIELD symbols, and #294's
`prove_bare_receivers` proved a bare call only against a `def`; a
`method_call` draws from the METHOD pool, which never holds a field.

Now such a call, proven exactly as a `def` call is (this class, this
file, not in a block; a `def` of the name wins; `attr_writer` defines no
reader), is emitted as what it reaches: a `read` of the data member
through `self`, DATA_MEMBER_ONLY, the row `@space` already produces. It
binds through TIER1Q_REL_SAMEFILE. Ruby-only by structure: only Ruby's
extractor turns a bare identifier into a call. #336 untouched: no
captured receiver is involved.

Measured (with the resolver commit after it): ruby-sinatra +48 reads,
Zammad 7.0.2 +859 reads and 15 `mail` calls moved off a SIBLING class's
`def mail` onto the own accessor. Package-owned projects get it with the
next de.h-dv.ruby release.

MUTATIONS (RUN), each RED on the unit test: drop the readers arm;
register attr_writer fields as readers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Field report (zammad-dev, de.h-dv.ruby 0.8.1), two Ruby recall gaps.

1. NAMESPACE. `HDv` is one module, reopened compactly (`class
HDv::Assistant`, which declares only `Assistant`) and, for the report's
`ambiguous` reason to hold, nested in >= 2 files (`module HDv; ...`). No
`lib/h_dv.rb` spells it, so #326's `Tree::canonical` had no canonical
declaration and every `HDv` head stayed unresolved. Reproduced on a
fixture (a pure-compact namespace has NO symbol and reads `no_candidate`;
the report's `ambiguous` needs nested reopenings) and on Zammad 7.0.2
(`Gql::Types`, `Service`, `Import`, `Zammad`, ...).

Rule (constant_lookup.rs): when EVERY declaration of a constant is a
`module` and none is spelled by its file, the ones lying under a
DIRECTORY that spells it (Zeitwerk's implicit namespace, `lib/h_dv/`)
decide ONE target: the first by (path depth, path, line), the same from
every file, including a file holding a reopening of its own. A namespace
under no directory of its name (`module RSpec` in two support files)
still decides nothing, as #326 stated. NOTE for review: an external
gem's namespace that the project reopens under its own directory
(`lib/core_ext/active_record/..`, rack-protection's `lib/rack/`) is the
same constant by this rule and now binds that reopening.

2. IMPLICIT SELF. `attr_reader`/`attr_accessor` produce FIELD symbols,
not methods, and #294's `prove_bare_receivers` proved a bare call only
against a `def`. So a bare `space` beside the class's own `attr_reader
:space` stayed UNCAPTURED and (a field never being in the METHOD pool)
unresolved. Ruby-only by structure: only Ruby's extractor turns a bare
identifier into a call. The walker fix is the commit before this one; such a call, proven
the same way (this class, this file, not in a block; a `def` of the name
wins; `attr_writer` defines no reader), is emitted as what it reaches,
a `read` of the data member through `self`, the row `@space` already
produces; it binds through TIER1Q_REL_SAMEFILE. #336's rule is
untouched: no captured receiver is involved. Package-owned projects get
the extractor half with the next de.h-dv.ruby release.

Migration 81 (receiver_type_evidence, CURRENT_VERSION 81): builtin
Rust/Ruby files re-extract (m0078's pattern), then one Full pass, run
when any file adopts the rust or ruby profile.

Bind diff vs the train-0.36 binary (bd683200), joined on
(path,line,col,kind,occurrence), split by resolved_by; sites whose kind
changed (type -> member_access re-kind, method_call -> read) paired by
(path,line,col):
  ruby-sinatra  +423 (375 lexical_constant 110 heads, 48 own-reader
                reads 41), 47 moved to the canonical reopening, 0 lost
  Zammad 7.0.2  +4172 (3313 heads 110, 859 reads 41), 465 moved (450
                between reopenings of one constant; 15 `mail` calls off
                a SIBLING class's `def mail` onto the own accessor), 0 lost
  the seven other pinned repos: no Ruby, byte-identical binds.
Cost: ruby-sinatra +1.23% vm_step, attributed to the re-kind UPDATE of
the newly bound heads (+174k) and the lookup's own apply (+76k), both
proportional to the 423 new binds.

Tests, mutations RUN, each RED:
- (walker test: see the walker commit) ruby_constant_lookup `a_bare_call_
  to_the_own_attr_
  reader_binds_the_accessor`: drop the readers arm; attr_writer as reader.
- `a_namespace_reopened_across_its_directory_binds_one_declaration`:
  delete the namespace arm; `under_spelling_dir` always true (RSpec).
- `upgrading_redecides_a_reopened_namespace`: m0081 returns before its
  Full pass; 'ruby' dropped from its re-extraction list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Re-recorded with the repo's own writers (COSI_CORPUS_BLESS,
COSI_STAGE_BLESS, COSI_TIER3_BLESS, COSI_PACKAGE_BLESS; release, pinned
corpus). Every numeric move matches lane B's bind diff vs bd683200:

baseline.json (only these two repos moved):
  rust-ripgrep  resolved 15846 -> 15993 (+147), edges +114,
                resolved_method_call +138, resolved_read +5, resolved_write +4
  ruby-sinatra  resolved 3374 -> 3797 (+423), edges +339,
                resolved_member_access +375, resolved_read +48
stage-baseline.json:
  rust-ripgrep  rule.tier1r_receiver 816 -> 963 (+147)
  ruby-sinatra  rule.lexical_constant 182 -> 604 (+422),
                rule.tier1q_rel_samefile 185 -> 233 (+48),
                rule.tier2_same_file 500 -> 474 (-26),
                rule.tier3_import_boost 565 -> 544 (-21)   (net +423)
  sum(rule.*) == baseline resolved for all seven repos.
tier3-baseline.json (rust-analyzer only; py-django unchanged):
  resolved 149043 -> 150997 (+1954), rule.tier1r_receiver 5453 -> 7407
  (+1954), refs 414898 -> 414918 (+20: `f @ pat: T` parameter binding
  rows), influence.builtin_only +20, edges +1166, resolved_method_call
  +898, resolved_read +996, resolved_write +60. sum(rule.*) == resolved.
host-package-lifecycle.json: schema 80 -> 81; ruby/active resolved
  2900 -> 3086 (+186 = rule.lexical_constant +224, tier2_same_file -21,
  tier3_import_boost -17; resolved_member_access +186): the package leg
  runs the de.h-dv.ruby 0.9.0 extractor, which does not carry the
  own-reader walker change, so only the host's namespace rule moves it.
  sum(rule.*) == resolved in every state.

cost-baseline.json, ruby-package-cost.json: not touched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
The operator's budget decision on #347. A package leg pays start-up
costs a builtin cannot have and that do not grow with the tree, so the
pure 1.20 ratio graded a fixed cost against whatever the builtin
happened to cost. Measured on #347 (seven first-party packages, release,
load < 4, median of 5 paired rounds), after its two fixes removed what
was waste: discovery of the seven packages 0.16-0.39 s per start, the
index pass's fixed excess over the builtin 0.13-0.45 s.

ONE definition, in `support/language_overhead.rs`, the body every
`<lang>_language_overhead` leg includes: COLD_RATIO_BUDGET (1.20) and
COLD_STARTUP_ALLOWANCE_SECONDS (0.5, doc cites #347 and the
measurement), `cold_limit_seconds` and `cold_budget`. A red verdict
prints builtin, package, ratio, limit and allowance; the JSON row gains
cold_limit_seconds, cold_allowance_seconds and cold_margin_seconds. The
warm bound (1.10) is unchanged. The other site that stated the cold
budget in prose, `ruby_package_overhead.rs`'s header, now says the
same; `_prdoc/records` are dated measurements and keep the number they
were taken against.

Tests (non-ignored, so every leg's "grades its own bytes" step runs
them without a corpus), each mutation RUN with cp snapshot, md5, touch:
* cold_budget_tests::a_leg_within_the_allowance_passes
  - allowance 0.0: RED. And the python-flask leg with allowance 0.0,
    release, load 3.87: RED — "python-flask cold: package 1.294 s
    exceeds the limit 1.247 s (= 1.20 x builtin 1.039 s + allowance
    0.00 s); ratio 1.245".
* cold_budget_tests::a_two_x_leg_fails_and_says_why — a 2x leg is red
  and its message carries every number
  - COLD_RATIO_BUDGET 2.0: RED.

All seven legs, nightly mode, median of 5, load < 4 at start: cold
margins python-flask 0.461 s, ruby-sinatra 0.257 s, php-guzzle 0.488 s,
rust-ripgrep 0.496 s, cs-dapper 0.263 s, js-express 0.376 s, ts-zod
0.755 s — every leg inside the cold budget, semantic parity exact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
de.h-dv.ruby compiled the HOST's builtin walker (crates/plugins/src/ruby.rs)
by #[path], and that file was compiled into every build.py lane, so a Ruby
extraction fix was a host change that moved every language package's bytes
(measured: the php extractor rebuilt from a tree whose only moved input was
ruby.rs is a different module) and could not ship as a package-only release.

Ownership:
- crates/guest/ruby/src/ruby.rs is the package's walker (a copy of the
  builtin minus its unit tests), compiled by crates/guest/languages into the
  Ruby lane ONLY (#[cfg(any(not(wasm32), code_index_guest_ruby))]).
- support/inputs.rs classes a walker under crates/guest/<pkg>/ as a PACKAGE
  input of <pkg> and of no other package, and refuses one that lacks the
  lane cfg. A shared input that leaves the set is REPORTED, not failed.
- The builtin is frozen: ruby_builtin_frozen pins its bytes.
- The 0.7 guest (extract.rs, kinds.rs, its crate and lockfile),
  ruby_native_differential and ruby_guest_wire are retired; the host's
  shared_guest_parity no longer grades the Ruby lane.

One-way parity:
- package_parity/deltas.rs reads a package's declared deltas
  (crates/guest/ruby/parity-deltas.toml: closed rules, measured counts per
  population, the frozen builtin's sha) and package_parity::run_declared
  classifies every difference against them; an undeclared difference or a
  count that is not the declared one is red. The pin moved into
  ruby_package_parity.rs. ruby_walker_parity grades the walker natively
  against the builtin the same way; fixture expectations are the builtin's
  facts plus the declared [[fixture_symbol]] rows. No delta is declared:
  the legs are equal (fixtures, ruby-sinatra 156 files, resolved 3391).

Release tooling:
- package_records --write re-records only a package whose pack or own
  inputs moved (--package <name> forces one); a version with no catalog
  row MOVES the package's row onto its own pkg/<id>/v<version> release.
- registry_schema_gate accepts that segment; release_registry.sh (and its
  Rust mirror) and version_bump.sh leave it alone.

de.h-dv.ruby 0.10.0: the extractor rebuilt from the moved source (its
panic locations carry the path: 1873599 -> 1873591 bytes, facts equal).
Only ruby's records moved. ruby_package_cost refuses the band on
package_version 0.9.0 -> 0.10.0 (SQLite work unchanged: vm_step 27803696
vs 27798372 blessed) and needs the operator's re-bless.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
de.h-dv.ruby's own walker now emits a `method` symbol for each name a Rails
DSL declaration defines, on the class or module that declares it:
`scope :name`, `has_many`/`has_one`/`belongs_to`/`has_and_belongs_to_many
:name`, `attribute :name`, and `delegate :x, :y, to: :t` (with `prefix:`
honoured and `private: true` making it `file`). Only in a declaration
position: a class/module body statement, or one inside an `included do`
(ActiveSupport::Concern) that is one. Span = the `:name` literal (as an
`attr_*` field's), signature = `<macro> :<name>…`. No new ABI: `method`,
`exported`/`file` and a signature. The frozen builtin does not move.

Declared in crates/guest/ruby/parity-deltas.toml as `rails-dsl-method`
(symbol_added; fixtures 14, the association readers of rails.rb.rbx,
spelled out row by row; ruby-sinatra 0, measured). The one-way gate gains
two closed rules a declared symbol needs: `ref_self_proven_by_added` (a
bare call the walker now proves `self`) and `ref_rule_moved_by_added`
(same target, another resolver rule) — the second found by a positive
control: under a no-`to:` mutation Sinatra's Delegator declares 29
methods, which the gate refuses undeclared and admits exactly when
declared (bound 7, unbound 70, rule-moved 2).

Measured with this branch's host binary, old package vs new package:
ruby-sinatra: no difference at all. Zammad: +313 symbols, +246 resolved
refs (271 gained, all onto an added symbol; 25 lost; 0 moved; 15 same
target by another rule; 164 bare calls proven `self`). TSVs in
/tmp/claude-1000/v036a/.

NOT YET RE-RECORDED, pending the operator's sampling: extractor.wasm,
rails.expected (+ the new rails_dsl fixture, staged at
crates/guest/ruby/tests/rails_dsl.rb), ruby.digest/.provenance, the
catalog row and the ruby-package-cost band. Until then the ruby leg is red
on exactly those (ruby_builtin_expectations, the rebuild gates).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Operator sampling of the Zammad bind diff found two defect classes.

1. A bare call an RSpec memoized helper names (`let(:articles)`,
   `let!`, `subject(:x)`, `subject!`) bound a same-named Rails reader of
   the model under test (16 binds, rule 13). The walker now proves `self`
   on every bare call a helper of an ENCLOSING example group names, and
   declares no helper symbol: measured as a `method` symbol it bought
   18,183 proven binds and 61 wrong ones (29 `context '…' do` calls onto
   `let(:context)`, 27 receiver calls, 4 `filter(…)` by tier 2), which no
   visibility keeps out of tier 1a. Proven with no candidate, such a call
   stays unresolved. Declared as `rspec-helper-proof`, a new closed rule
   `ref_self_proven_by_spec_helper` whose predicate is SOURCE-anchored:
   the ref's own file must declare a helper of its name. Counts: fixtures
   5 (spelled out as [[fixture_ref]] rows), ruby-sinatra 65.

2. A DSL method beside a `def` of its name in the same class tied with it
   (the index carries no instance/class placement; measured on the
   builtin itself: `def self.x` + `def x` leave a proven bare `x`
   unresolved), unbinding the def's correct callers. DSL methods are now
   collected during the walk and appended after it, except one whose
   class already declares a method of its name.

Zammad, 0.9.0 vs this package, same binary: +310 symbols, +226 resolved
(255 gained, all onto an added symbol; 29 lost; 0 moved). Against round 1:
the 16 spec binds are gone, the 5 taskbar/handles_response losses are
back, and 9 sla_spec `sla` calls 0.9.0 bound to lib/escalation.rb#sla
(the file has `let(:sla)`) are now unresolved. Let sites (bare refs a
let/subject of their own spec file names): 30,330; bound to a non-helper
9 under 0.9.0, 25 under round 1, 0 now. ruby-sinatra: no target moved;
ruby_package_parity green with the round-2 extractor swapped in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
4b9cbe9e changed the builtin walker: a bare call proven against the
class's own `attr_reader`/`attr_accessor` is emitted as a `read` of that
data member through `self`. Ported into crates/guest/ruby/src/ruby.rs (the
same six hunks; the unit test stays with the builtin), so the package does
not silently lose it.

The builtin moved deliberately, so its pin moves with it:
ruby_builtin_frozen and parity-deltas.toml's `builtin_sha256` now name
the post-B bytes (050f2be8…). ruby_walker_parity: the package walker is
still exactly the builtin plus the declared deltas, at the same counts
(fixtures: rails-dsl-method 14, rspec-helper-proof 5; ruby-sinatra 0 and
65).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
The package records, re-recorded after the rebase onto train-0.36 (lane B):
- extractor.wasm rebuilt from the package walker (sha256 6a273f18…,
  1890337 bytes): the Rails DSL methods, the RSpec helper proof and #337's
  own-reader read.
- fixtures: rails.expected and rspec.expected regenerated (builtin facts
  plus the declared rows), and rails_dsl.rb.rbx added with its expectation
  and four decoys; parity-deltas.toml spells out its 13 methods and the 2
  bare calls they prove (`rails-dsl-proof`).
- ruby.digest / ruby.provenance and the catalog row on
  pkg/de.h-dv.ruby/v0.10.0 (package_records --write moved ruby only).

ruby_package_parity's pin: 3391 -> 3804 on both legs, lane B's builtin
change (own-reader reads, reopened-namespace constants), which the package
walker carries too.

The overhead leg's semantic parity was exact, and the RSpec helper proof
is a real delta on ruby-sinatra (65 bare calls proven `self`):
package_overhead::parity_declared admits exactly the declared `self`
proofs on refs at their declared count and compares everything else as
before (MUTATION RUN: a declared 64 -> RED "declared 64, measured 65").

No host corpus record moved: package_baseline (frozen 0.8.1 snapshot) and
precision_gate are green; host-package-lifecycle.json is untouched.
ruby_package_cost still refuses on the version, by design: the operator
runs the isolated pair.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
#113's package_cost_attribution is a HOST suite: it installs the FROZEN
Ruby snapshot (ruby 0.8.1 under tests/host-fixtures), so on one tree it
measured 25.41M package vm_step where ruby_package_cost's leg (the
checkout's tests/packages/ruby, all six pool grants) measured 28.00M. It
could not see a package change at all, and nothing compared the two.

- crates/indexer/tests/stmt_attribution: #113's per-statement profile
  hook, moved out of package_cost_attribution.rs so two binaries share
  one hook (plus a serialising lock and a label width).
- crates/first-party-tests/tests/support/ruby_cost_leg.rs: Legs,
  measure_both_legs, PASSES and the Checkout spec, MOVED unchanged out of
  ruby_package_cost.rs (the gate measured 28,005,148 after the move, in
  the 28.002-28.008M band measured before it).
- ruby_package_cost_attribution (#[ignore]d, panics without a corpus):
  runs the gate's own measure_both_legs, then stages and indexes again
  under the hook and refuses to print unless both attributed totals sit
  within 0.1% of the gate's medians. Writes per-statement TSVs and
  VACUUM INTO copies of both databases under COSI_PKG_ATTRIBUTION_OUT.
- ignored_test_reachability: waiver for it, beside cost_attribution's.

Leg match, three trees, three rounds each: within +-0.03% on every run
(e.g. head: gate 28,000,003 / attributed 28,000,760, +0.0027%).

MUTATIONS (RUN, cp snapshot, md5 verified, touched):
- install package_parity::RUBY (frozen) in the attributed staging: RED,
  25,406,618 vs 28,004,173 (-9.276%). First run went red on the version
  check instead; the match now runs first.
- grant POOL_SIX[..5]: RED, 24,347,619 vs 28,005,216 (-13.060%).

No baseline is read or written; nothing was blessed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
`UPDATE refs SET kind = CASE … 'write' ELSE 'read' END` restored every
plugin-emitted access ref on every pass, including the ones that already
had that kind — on a cold index, all of them. Each such write changed
nothing and still paid the row rewrite plus the WHEN of the three rollup
doors that watch `kind`. One conjunct, `kind <> CASE …`, skips them.

Independent of rollup_suspension and measured ALONE on train-0.36
(cost_attribution, nine pinned repos, cold index): vm_step -0.79 % to
-3.38 %, fullscan_step unchanged (the statement already scanned refs).

Test: crates/indexer/tests/access_clear_noop.rs counts no-op kind writes
on the resolver's own connection with a TEMP trigger, across a cold index
and an incremental full pass, with a positive control. MUTATION (RUN):
drop the conjunct — RED (7 no-op writes on the cold index).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
m0060/m0061's seven triggers on `refs` keep `refs_rollup` and
`file_refs_rollup` exact one row at a time. A full resolve pass rewrites
`kind` on every access ref and binds a large share of the index, and
every one of those row writes paid a door: 3.3-6.5 % of a cold index
across the nine pinned repos.

Inside the pass's own write transaction the doors' CREATE TRIGGER text is
read from sqlite_master and the doors are dropped; after the resolver
(and after the PARTIAL_RESOLUTION crash seam) the exact text is
re-executed and both rollups are reconciled from ONE scan of `refs`:
zero every bucket, upsert the live counts, delete nothing — so the rows
the doors leave drained at zero survive, as `ref_aggregate::fold`
reports them.

Sound because DDL is transactional: WAL readers see the last commit
(doors and rollups both before or both after), and a crash or cancel
rolls the suspension back with everything else — there is no "rollups
owed" state. Scoped passes, the durable batched path, the writer and
migrations keep the doors. SQLITE_DBCONFIG_ENABLE_TRIGGER was refused:
it disables every trigger on the connection, m0052's guards included.

Two GROUP BY rebuild statements were written first and measured at
~54 vm_step per ref, net -1.5 % to +2.6 %; the single scan is ~30.

Tests (src/rollup_suspension.rs), every mutation run:
equivalence vs a door-kept oracle on cold + incremental full passes
(binds, unbinds, re-binds, member_access, read/write, reclassified,
drained buckets), moved-grant re-resolve, scoped pass keeps its doors,
a reader mid-pass and a cancel see the last commit, a crash at
partial_resolution leaves the doors and exact rollups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
doc_citation_gate grades backticked names; the guard's name is built by
m0052's trigger_names(), so it is described instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
#345 retired the Ruby guest's Cargo.toml; the package's walker,
crates/guest/ruby/src/ruby.rs, is now compiled only by
crates/guest/languages through a #[path] attribute. The test attributed
every file to its nearest manifest, crates/guest (the SDK, which never
compiles the walker), and reported its 142 edges into crates/core as
undeclared.

A Rust file now belongs to the longest crate directory whose Cargo
target tree (src/, tests/, benches/, examples/, build.rs) holds it; a
file no target tree holds belongs to the crates whose #[path]
attributes compile it, read from the indexed sources. An edge endpoint
under a crate directory that neither rule attributes now fails the test
instead of being skipped ungraded.

Mutations, each RED: nearest-manifest attribution restored (the three
original violations); #[path] reading emptied (ruby.rs unattributed);
languages' core dependency withheld (ruby.rs and wire.rs edges).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
#341 (ca090f22) widened INDEX_STATE_SEMANTICS with the
`promotion_resolving` state and a sentence on what it means. The
constant rides on EVERY answer while an index is not steady, so an
ordinary reconcile paid for the promotion window too: the reconciling
project_overview's `index_state` block went from 103 to 136 estimated
tokens, over its 111-token ceiling.

The constant now names no state (`projects` already does) and the #341
clause is appended only when a project is `promotion_resolving`; the
window keeps its full account in the daemon's `state_detail`, and its
reader still learns that an empty result is not evidence. Reconciling
block: 136 -> 94 tokens (373 wire chars). Ceiling unchanged.

New unit test the_promotion_clause_rides_only_in_the_promotion_window.

Mutations, each RED: the #341 text re-added (136 > 111); clause always
appended (120 > 111, and the unit test); clause never appended (unit
test).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
The operator approved shipping the rollup lever (rollup_suspension) on
2026-10-10, knowing corpus_cost refuses its single scan of refs: 7 repos
fullscan_step +7..+11%, attributed 93-111% to that scan. vm_step falls on
all nine repos with the kind no-op fix. Also recorded, inside their bands
and named per commit in the reason: schema 79 -> 81 and the #336/#340 and
#337/#348 drift since the previous record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Attributed per statement by ruby_package_cost_attribution: +0.7% from
#337's namespace binds, -0.25% from the kind no-op fix and the rollup
lever (whose reconcile scan is most of the +6.7% fullscan), +0.04% from
the 0.10.0 package itself. Isolated window, load < 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
16aaeec0 (#348) made the builtin emit provisional chain rows,
`T::m1::m2…` (`let out = Command::new(..).args(..).output()` is
`Command::args::output`). The guest's shared wire encoder located a
binding receiver only as the two-segment `T::m(..)` call
(`rust_receiver_spans`), so ANY chain row made `wire::encode` fail with
"unrepresentable receiver" and the guest disclosed the whole file as
UNSUPPORTED_SYNTAX with no facts. A de.h-dv.rust rebuilt from the
current source lost 1990 of rust-ripgrep's 4874 symbols in the
builtin-parity leg (symbols: 4874 vs 2884).

`rust_receiver_chains` collects every call chain's ordered AST name
tokens (head type, head method, each `.m(..)` link, through `?`),
starting at `T::m(..)` or a struct literal `T { .. }`, and
`rust_receiver_segments` takes the first chain headed by `q`'s type
whose tokens hold `q`'s remaining segments in order: the tokens it
skips are the ones the builtin elides (`new`/`default`/a tuple variant,
`unwrap`/`expect`/`context`…). Source order makes the segments
ascending, as TAG_REF_QUALIFIER_SEGMENTS requires; only AST name nodes
are tokens, so prose still cannot supply evidence.

The two-segment map is consulted FIRST and is unchanged (its head
descent moved into `rust_head_name`, same loop), so every row that
encoded before encodes byte-identically: package_expectations
(native -> wire, all six build.py languages) is unchanged.

MEASURED, with the extractor rebuilt on this commit:
guest_runtime_parity full facts on rust-ripgrep (110 files) and
rust-analyzer (1480 files), every file equal to the builtin.

Test: chain_binding_segments_spell_every_kept_link_in_source_order.
MUTATION RUN: `rust_receiver_segments` returning None -> RED
("unrepresentable receiver Command::args::output for out").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The builtin-parity leg (package-ci.yml "Builtin parity on its own pinned
repo") was red: the package's extractor was built before 16aaeec0 and
still emitted the old binding rows (`Command::args::output` vs empty
on build.rs:40). Its .provenance recorded crates/plugins/src/rust.rs at
the pre-16aaeec0 blob (04a1696a…).

- extractor.wasm rebuilt by crates/guest/languages/build.py rust on the
  previous commit (sha256 e53ae42e…, 1885298 bytes); the artifact row in
  rust.provenance follows it.
- plugin.toml 0.1.1 -> 0.1.2.
- rust.digest, the generated input rows of rust.provenance and the
  catalog digests: `package_records -- --write --package rust` (it moved
  rust only; every other package reported "unchanged").
- Fixture expectations: unchanged (`package_expectations` check is
  green; the native-oracle fixtures hold no #348 shape).

THE CATALOG ROW. `package_records --write` moves a bumped package's row
to `releases/download/pkg/de.h-dv.rust/v0.1.2/` (#345,
`inputs::move_catalog_row`). This package ships in the host release, so
the row's two URLs were re-pointed at the segment the sibling host rows
carry, copied from the php row by script (no version typed). Both
spellings pass registry_schema_gate, package_release_scripts,
release_gate, release_fixture_gate and `package_records` check mode.

Builtin parity on rust-ripgrep: green. MUTATION RUN: the 0.1.1
extractor.wasm put back -> RED with the original
"references and targets: 42043 vs 42043 rows … Command::args::output".
package_baseline green; host-package-lifecycle.json did not move.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`inputs::move_catalog_row` moved EVERY version-bumped row to the
package's own release, `pkg/<id>/v<new>`. For a package that ships in
the host release that is a URL to a release that does not exist: lane H
had to move de.h-dv.rust 0.1.2 back to the host segment by script.

The rule is now structural and read off the row, never typed: a row on
its own `pkg/<id>/v<old>` release moves to `pkg/<id>/v<new>`; a row on a
host release keeps the host segment it carries (version_bump.sh moves
that segment with the host version). `--own-release <name>` is the one
deliberate host -> pkg/ move. A row on some other `pkg/` release, or
whose url and signature_url disagree, is refused.

Tests (ruby_source_ownership):
- a_version_bump_moves_its_own_catalog_row_on_its_own_release_class:
  host row stays host, pkg row follows the version, --own-release moves
  a host row; nothing but the one row moves.
  MUTATION RUN: every row to pkg/ (the old rule) -> RED at the host row.
  MUTATION RUN: every row keeps its segment -> RED at the pkg/ row.
- every_catalog_row_names_a_release_its_bump_can_classify: the real
  catalog. MUTATION RUN: ruby's url on pkg/de.h-dv.ruby/v0.0.1 -> RED.

RE-DERIVED: the pre-lane-H catalog (efdfdf95^) put back and
`package_records -- --write` run on the efdfdf95 records: the catalog it
writes is byte-identical to lane H's hand-made one (cmp).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gap 1 of #348. `support::rebuild_gate`'s SharedMoved arm printed
"REPORT … The byte comparison is NOT run" and returned false, so every
package leg stayed green while its extractor was no longer what the tree
builds: de.h-dv.rust shipped pre-#348 bytes until a full local run's
parity leg found them.

Now `support::gate` decides, purely, from the inputs' verdict and
COSI_GUEST_REBUILD:
- shared inputs moved, COSI_GUEST_REBUILD=1 (every package CI leg):
  rebuild and byte-compare. Equal bytes are green; a difference is RED
  and `Rebuild::why` names the package, its version, the recorded vs
  current `source_inputs` and every moved input with both hashes;
- shared inputs moved, no COSI_GUEST_REBUILD: not compared, and the run
  prints UNMEASURED (never a pass of the comparison);
- nothing moved / a package-owned input moved: unchanged.
All four rebuild legs (package_self, ruby/vue/timeline_guest_rebuild)
carry the `why` on both their length and their byte assertions.

Tests:
- ruby_source_ownership::gate_compares_a_shared_move_under_cosi_guest_rebuild.
  MUTATION RUN: the report-only arm restored (`SharedMoved` ->
  `NotCompared` regardless) -> RED.
- The leg itself, on this tree, where php's recorded shared inputs moved
  (#348's builtin and encoder): COSI_GUEST_REBUILD=1 php_package
  the_extractor_is_what_its_source_builds -> RED, "php/extractor.wasm:
  shipped 1866376 bytes, source builds 1875293 bytes" plus the moved
  inputs. MUTATION RUN: the report-only arm restored -> the same leg
  GREEN, printing UNMEASURED.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gap 2 of #348. ci_changes.sh routed crates/plugins/src/<lang>.rs as
host-only ("the leg's source_inputs record reports that drift"), so a
PR changing the builtin Rust walker ran no package leg; only the nightly
packages=all run or a full local run could see the stale extractor.

The shared-input lookup that only the guest-crate arm did now runs for
EVERY path: a file any tests/packages/<n>.provenance records as
`input shared <path>` turns on those packages' legs, and is still
classified for the host groups as before. The records are the one
derivation (support/inputs.rs writes them), so no list in the script
names a file: a builtin walker, the guest SDK, a grammar,
rust-toolchain.toml all route by what the packages record. The
guest-crate prefix fallback for a file no record names yet is kept.
A `Cargo.lock#<crate>` closure row names no path and routes no leg
(unchanged).

Test (ci_path_gating):
a_recorded_shared_input_runs_every_leg_that_records_it derives the
expected legs from the real records for crates/plugins/src/rust.rs,
python.rs, common.rs, rust-toolchain.toml and a grammar, pins that
rust.rs names the rust, php and python legs, and that each is host code
too. a_host_change_runs_no_leg keeps the host-only paths (the builtin
walker leaves it; crates/plugins/src/lib.rs, which nothing records,
takes its place).
MUTATION RUN: drop the new `LEGS=` line -> RED (rust.rs routes to
`none`; a_shared_guest_change_runs_every_leg_that_builds_from_it red
too). MUTATION RUN: the train's ci_changes.sh -> RED on the new test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gap 3 of #348. No fixture held a builder chain bound by `let`
(`Command::new(..).args(..).output()`), so the shared encoder's failure
on chain rows ("unrepresentable receiver") was invisible to every fast
test that sweeps the fixtures; lane H's inline test
(chain_binding_segments_spell_every_kept_link_in_source_order) covers
the encoder, but the fixture population did not.

tests/fixtures/rust/builder_chains.rs: four chain rows
(`Command::args::current_dir::output` through `?`,
`PathBuf::from::join::with_extension`, `Config::finish` off a struct
literal, `Vec::with_capacity::into_boxed_slice` through a turbofish) and
a prose/string decoy, `Ghost::new().haunt().vanish()`.

- shared_guest_parity::all_fixture_languages_preserve_every_raw_fact
  sweeps it (native vs guest vs validated wire).
  MUTATION RUN: `wire::rust_receiver_chains` returning an empty map ->
  RED, "builder_chains.rs: unrepresentable receiver
  Command::args::current_dir::output for out". CONTROL RUN: the same
  mutation with the fixture moved aside -> GREEN (the gap).
- abi_projection pins rust 192 -> 227: +35, every one from the new
  fixture and read at source (2 imports, 7 bindings, 11 method calls,
  4 calls, 9 type rows, 1 read, 1 write); the decoy produces none.

Not mirrored into tests/packages/rust/fixtures: that moves the rust
pack, i.e. another de.h-dv.rust release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The packages whose recorded SHARED inputs had moved under them (#348's
builtin and wire encoder, guest-kit, the languages crate, #345's Ruby
walker leaving every other lane), by the repo's own tooling:

- php, python, csharp, javascript (+jsx), typescript (+tsx):
  `crates/guest/languages/build.py <lanes>`; every component's bytes
  moved (php 1866376 -> 1875293, python 1949753 -> 1958546, csharp
  1887706 -> 1896625, javascript 1882432 -> 1891349, jsx 1885713 ->
  1894638, typescript 1885232 -> 1894165, tsx 1885713 -> 1894638).
  Artifact rows follow the bytes (sha256 derived), plugin.toml patch
  version +1 (0.1.1 -> 0.1.2, derived), records and catalog by
  `package_records -- --write --package <name>`. The catalog rows stay
  on the host release (inputs::move_catalog_row, previous commit): only
  the asset names moved.
- svelte, timeline, vue: `crates/guest/<n>/build.sh` rebuilds a
  BYTE-IDENTICAL extractor.wasm (cmp), so the pack, the digests and the
  version do not move; only `source_inputs` is re-recorded
  (`--package`). A version bump would publish the same bytes as a new
  release.

FACTS DID NOT CHANGE. guest_runtime_parity, old and new extractor each
against the native oracle, full facts, every file equal: php fixtures 8
+ php-guzzle 132; python 9 + python-flask 83 + py-django 2927; csharp 6
+ cs-dapper 157; javascript 7 + js-express 141; typescript 9 + ts-zod
372; jsx and tsx on ts-zod 29 each. `package_expectations` (native
oracle -> wire) is unchanged for all five.

LEGS (package-ci.yml, each step as spelled, corpus at
~/.cache/cosi-corpus): own bytes under COSI_GUEST_REBUILD=1, the four
release gates under COSI_PACKAGE, corpus suites (none of the eight has
one) and the builtin-parity overhead leg (php, python, csharp,
javascript, typescript; semantic_failure null on php-guzzle,
python-flask, cs-dapper, js-express, ts-zod): green for all eight.

Not done here: de.h-dv.ruby is stale too (lane H's wire.rs is one of its
recorded shared inputs, and its rebuilt extractor differs: 1890337 ->
1899124). Its version bump would make ruby_package_cost refuse until the
operator re-records ruby-package-cost.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous fixture commit put tests/fixtures/rust/builder_chains.rs in
the host fixture sweep; `package_expectations` holds every
tests/fixtures/<lang> file mirrored into its package, and its check mode
panicked on the missing tests/packages/rust/fixtures/builder_chains.rs.

`package_expectations -- --write` wrote the input, its native-oracle
`.expected` and the `[[fixtures]]` entry; it moved nothing in any other
package. `package_records -- --write` re-recorded the rust pack:
package_digest moved, extraction_identity did not (fixtures are outside
the extraction surface), and the catalog row's digest followed in place.

The version stays 0.1.2: lane H's 0.1.2 (efdfdf95) is unreleased on this
train, so no operator pin names its digest (the svelte 0.1.0 precedent
in svelte.digest).

rust leg steps 1-2 (own bytes under COSI_GUEST_REBUILD=1, the four
release gates under COSI_PACKAGE=rust): green. package_expectations
check: green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
de.h-dv.ruby 0.10.0: rebuilt against lane H's wire.rs, no version bump
Some checks failed
CI (Windows) / changes (what this run must test) (pull_request) Successful in 38s
CI / changes (what this run must test) (pull_request) Successful in 51s
CI / cargo fmt (pull_request) Successful in 1m18s
CI / OSS corpus tier-3 scale (nightly) (pull_request) Has been skipped
CI / Grammar rebuild from source (nightly) (pull_request) Has been skipped
CI / CI lane wall-clock headroom (pull_request) Successful in 1m32s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 2m27s
Package CI / package suites (clippy) (pull_request) Successful in 15m58s
CI / cargo doc (intra-doc links) (pull_request) Successful in 14m54s
CI / cargo deny (pull_request) Successful in 16m51s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 17m41s
CI / cargo check (MSRV 1.98) (pull_request) Successful in 21m4s
CI / cargo clippy (pull_request) Successful in 21m26s
CI / cargo check (windows-gnu) (pull_request) Successful in 22m49s
Package CI / package (timeline) (pull_request) Successful in 35m38s
Package CI / package (xaml) (pull_request) Successful in 35m44s
Package CI / package (vue) (pull_request) Successful in 36m2s
Package CI / package (svelte) (pull_request) Successful in 36m30s
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Successful in 38m2s
Package CI / package (rust) (pull_request) Successful in 1h3m12s
Package CI / package (javascript) (pull_request) Successful in 1h4m13s
Package CI / package (php) (pull_request) Successful in 1h4m14s
Package CI / package (csharp) (pull_request) Successful in 1h4m15s
Package CI / package (typescript) (pull_request) Successful in 1h4m38s
Package CI / package (python) (pull_request) Successful in 1h5m51s
Package CI / package (ruby) (pull_request) Successful in 1h10m53s
CI / OSS corpus (tier 1) (pull_request) Successful in 1h13m35s
CI / cargo test (pull_request) Failing after 57m47s
CI / cargo test (daemon transport) (pull_request) Has been skipped
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been skipped
805a38c069
Lane H's chain support in crates/guest/languages/src/wire.rs (11c2d1b2)
is a recorded shared input of ruby too, and with the gap-1 rule the
ruby own-bytes leg was RED ("shipped 1890337 bytes, source builds
1899124"). Coordinator decision: rebuild at 0.10.0, which is unreleased
(introduced on this train in 0c32678a, its pkg tag never pushed) — the
same reasoning as rust 0.1.2.

- extractor.wasm: crates/guest/languages/build.py ruby (sha256
  75bfe007…, 1899124 bytes; the same bytes as an independent earlier
  build in this lane). The artifact row follows it.
- ruby.digest / ruby.provenance / catalog digests:
  `package_records -- --write --package ruby`. The catalog row stays on
  pkg/de.h-dv.ruby/v0.10.0 (inputs::move_catalog_row: only the digests
  moved).

FACTS DID NOT CHANGE: the old and the rebuilt guest, run side by side,
full validated facts compared file by file: tests/fixtures/ruby 13
files, ruby-sinatra 156 files / 24431 fact rows, 0 files differ.

THE LEG, as package-ci.yml spells it: own bytes under
COSI_GUEST_REBUILD=1 GREEN (compared, not reported); the four release
gates under COSI_PACKAGE=ruby GREEN; the corpus step (ruby_package_cost,
ruby_package_cost_attribution, ruby_package_overhead,
ruby_package_parity, ruby_walker_parity; release, corpus require, tier
1) GREEN — ruby_package_cost inside its band with NO bless (ratio 134%,
2800 symbols / 3804 resolved on both legs), ruby-package-cost.json
untouched; overhead parity GREEN, semantic_failure null.

`package_records` check: no package stale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Root cause (PRE-EXISTING; bisected to the release this train started
from). The daemon's signal handler raises the control's sticky shutdown
flag and pokes `sqlite3_interrupt` ONCE. The poke aborts only the
statement running at that instant; one that lands between two statements
is a no-op. The flag is read only by the resolver's progress handler,
which fires every RESOLVE_PROGRESS_OPS (50 million) VM steps of ONE
statement -- never on resolve_progress_e2e's corpus (`heartbeat_ticks: 0`
six seconds into a 6.6 s pass) -- and is not installed at all after the
tiers (rollup restore + reconcile, recompute_ref_counts,
rebuild_symbol_edges, the pending-table DELETEs). So a lost poke let the
whole pass run on and COMMIT, consuming the owed work, and the daemon
exited a full resolve window after the signal: the reported 6.81 s exit
against a 6.67 s window. Reproduced deterministically:
* SIGINT after the last tier (`resolution_influence`): the pass commits
  and `resolve_scope_files` is empty, 3/3 on bd683200, ca090f22 (before
  lane D) and 70a644ec (before the rollup lever), 1/1 on 805a38c0.
* a flag-only shutdown (the new debug seam below) at pass start: exit
  6.71 s against a 6.97 s window, owed work gone.

Fix:
* `cold_start_step` (daemon main.rs): the startup activation and
  `Watcher::start` are awaited while re-delivering the interrupt every
  20 ms once a shutdown is requested -- what `Watcher::stop` already does
  for its own threads, for the same reason. The flag decides, not `stop`:
  an interrupt nobody asked for is an error, not a cancel.
* `refuse_commit_if_cancelled` (index.rs): `apply_resolution_observed`
  and `reresolve_under_moved_grant` check the flag at the commit and
  return the interrupt error a cancelled statement raises, so the
  transaction rolls back with the m0007 pending tables intact and every
  caller that tells a cancel from a failure reads it as one.

resolve_progress_e2e::shutdown_cancels_a_running_resolve_and_leaves_the_work_owed:
* the baseline is the daemon's own `last_pass_ms` of the first COMMITTED
  pass, not "first poll that saw active" to "first that saw it done". CI
  run 1066 failed 2.4 s into the test with "the pass finished without
  ever being seen active" where every earlier CI run of it took
  9.6-26.6 s: some pass ended between two polls, and the old loop
  discarded the outcome that would say how. Every state seen is now
  printed if any pass ends other than by committing.
* graded twice: `delivered` (the real handler) and `lost`
  (CODE_INDEX_DAEMON_TEST_LOSE_SHUTDOWN_INTERRUPT, debug builds only:
  the flag, no poke). MIN_OBSERVABLE_WINDOW and the latency bound are
  unchanged.

`ResolveControl::set_cancel_flag_only` is exported in debug builds for
that seam; a release build has no such method.

Tests (mutation RUN for each, cp snapshot + md5 + touch):
* resolve_progress::tests::a_cancel_raised_after_the_tiers_still_refuses_the_commit
  (new; seam `cancel_after_resolve`, production op count). Mutation:
  delete `refuse_commit_if_cancelled(ctl)?` in apply_resolution_observed
  -> RED (pass returned Ok, outcome committed).
* resolve_progress_e2e: `cold_start_step` returns `step.await` without
  poking -> RED on the `lost` leg (6.71 s exit vs 6.97 s window). The
  handler's `request_cancel` removed -> RED on `delivered` (6.86 s).
* 10/10 green after the fix: delivered 11-13 ms, lost 22-35 ms; SIGINT
  after the last tier: 3/3 runs cancelled with the work owed (both legs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
CI run 1066 (nextest profile `ci`, beside the suite) failed
svelte_package_cost at its FLOOR: "the package leg was CHEAPER than the
TypeScript alone (61%): it skipped work". Its own numbers say otherwise:
builtin_ms=1041 package_ms=637, but package vm_step 4,209,040 against
3,157,220 and stmts 10,845 against 8,794 -- the package leg did 33% MORE
SQLite work, and a neighbour had slowed the builtin leg. A wall ratio
answers "did it skip work" only on an idle box.

* The floor is now `p.vm_step >= b.vm_step && p.stmts >= b.stmts`: the
  package leg writes the same TypeScript rows plus a template's. The
  counters are the leg's own and identical locally and on CI
  (4,209,040 / 10,845).
* The wall-clock CEILING (ratio <= 1500, the amplification bound) stays.
  It is an upper bound on measured wall time, so the test runs alone in
  `ci-timing`. It was never listed because the duration comes back from
  a helper (`work::measure` -> `WorkUnits::wall_ms`), which
  wall_clock_registry's body scan could not see. The registry now counts
  a `.wall_ms` field as it counts `.elapsed()`, which finds exactly the
  two tests that bound a ratio of them, and `.config/nextest.toml` lists
  both in `ci-timing` and in `ci`'s exclusion.
* vue_package_cost had the same floor and the same ceiling (it says it
  is "the svelte suite's"); fixed the same way.

Mutations (RUN; cp snapshot + md5 + touch):
* svelte: `let p = WorkUnits { vm_step: b.vm_step - 1, ..p }` -> RED at
  the work floor. vue: the same with `stmts` -> RED at the work floor.
* `embedded::delegate` returns no regions -> RED at the parity
  assertion in both (documented, re-run).
* registry: `MEASURED` without `.wall_ms` -> RED (both terms stale, and
  the new anti-vacuity `take` case); svelte's term deleted from both
  profiles -> RED naming it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
resolve: grade the cancel refusal on the moved-grant re-resolve too
Some checks failed
CI (Windows) / changes (what this run must test) (pull_request) Successful in 28s
CI / changes (what this run must test) (pull_request) Successful in 33s
CI / cargo fmt (pull_request) Successful in 1m13s
CI / OSS corpus tier-3 scale (nightly) (pull_request) Has been skipped
CI / Grammar rebuild from source (nightly) (pull_request) Has been skipped
CI / CI lane wall-clock headroom (pull_request) Successful in 1m37s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 1m47s
CI / cargo doc (intra-doc links) (pull_request) Successful in 14m47s
CI / cargo deny (pull_request) Successful in 16m35s
Package CI / package suites (clippy) (pull_request) Successful in 17m56s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 18m4s
CI / cargo check (MSRV 1.98) (pull_request) Successful in 20m23s
CI / cargo clippy (pull_request) Successful in 21m7s
CI / cargo check (windows-gnu) (pull_request) Successful in 22m41s
Package CI / package (timeline) (pull_request) Successful in 34m51s
Package CI / package (xaml) (pull_request) Successful in 35m1s
Package CI / package (vue) (pull_request) Successful in 35m35s
Package CI / package (svelte) (pull_request) Successful in 35m43s
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Successful in 37m20s
Package CI / package (rust) (pull_request) Successful in 1h3m16s
Package CI / package (csharp) (pull_request) Successful in 1h3m29s
Package CI / package (javascript) (pull_request) Successful in 1h3m35s
Package CI / package (php) (pull_request) Successful in 1h3m38s
Package CI / package (typescript) (pull_request) Successful in 1h4m1s
Package CI / package (python) (pull_request) Successful in 1h5m12s
Package CI / package (ruby) (pull_request) Successful in 1h10m0s
CI / OSS corpus (tier 1) (pull_request) Successful in 1h12m54s
CI / cargo test (pull_request) Failing after 58m1s
CI / cargo test (daemon transport) (pull_request) Has been skipped
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been skipped
b676f3d5ea
`refuse_commit_if_cancelled` guards two commits, and only the one in
`apply_resolution_observed` was under a test: deleting the check in
`reresolve_under_moved_grant` (#80 S16, the pass that unbinds every ref
and decides them again under a moved capability/bridge grant) left
everything green (coordinator's review of 82c5e35c).

* The `cancel_after_resolve` seam now also fires in
  `reresolve_under_moved_grant` once `rollup_suspension::around` (unbind
  + Full tiers + door restore) has returned: a flag-only shutdown, the
  production op count, nothing poked.
* resolve_progress::tests::a_cancel_raised_after_the_tiers_refuses_the_moved_grant_reresolve:
  a committed cold index, then the re-resolve under the seam must return
  Err and leave every committed binding `(path, line, col, name,
  target@path)` exactly as before. Anti-vacuity: without the seam the
  same call commits, with forgotten > 0 and resolved > 0.

MUTATION (RUN; cp snapshot + md5 + touch): delete
`refuse_commit_if_cancelled(ctl)?` in `reresolve_under_moved_grant` ->
RED ("must not succeed: Ok((40, 40))"). The binding equality alone would
not have caught it -- the re-decision reproduces the same answers on
this fixture -- which is why the test asserts the refusal itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
writer: a deleted file's ranks leave with it, so a recycled id inherits none
Some checks failed
CI / changes (what this run must test) (pull_request) Successful in 42s
CI (Windows) / changes (what this run must test) (pull_request) Successful in 43s
CI / cargo fmt (pull_request) Successful in 52s
CI / OSS corpus tier-3 scale (nightly) (pull_request) Has been skipped
CI / Grammar rebuild from source (nightly) (pull_request) Has been skipped
CI / cargo check (MSRV 1.98) (pull_request) Has started running
CI / cargo doc (intra-doc links) (pull_request) Has started running
CI / CI lane wall-clock headroom (pull_request) Successful in 1m55s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 2m19s
CI / OSS corpus (tier 1) (pull_request) Failing after 8h21m26s
CI / cargo deny (pull_request) Failing after 8h23m22s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Failing after 8h23m22s
CI / cargo check (windows-gnu) (pull_request) Failing after 8h23m22s
CI / cargo clippy (pull_request) Failing after 8h23m22s
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Failing after 8h23m33s
Package CI / package (xaml) (pull_request) Failing after 8h23m51s
Package CI / package (vue) (pull_request) Failing after 8h23m51s
Package CI / package (typescript) (pull_request) Failing after 8h23m51s
Package CI / package (timeline) (pull_request) Failing after 8h23m51s
Package CI / package (svelte) (pull_request) Failing after 8h23m51s
Package CI / package (rust) (pull_request) Failing after 8h23m51s
Package CI / package (ruby) (pull_request) Failing after 8h23m51s
Package CI / package (python) (pull_request) Failing after 8h23m51s
Package CI / package (php) (pull_request) Failing after 8h23m52s
Package CI / package (javascript) (pull_request) Failing after 8h23m52s
Package CI / package (csharp) (pull_request) Failing after 8h23m52s
Package CI / package suites (clippy) (pull_request) Failing after 8h23m52s
CI / cargo test (pull_request) Has been cancelled
CI / cargo test (daemon transport) (pull_request) Has been cancelled
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been cancelled
ef3e10fc43
`rollup_suspension::tests::a_suspended_full_pass_equals_the_door_maintained_one`
failed intermittently (CI run 1069): the door-maintained database held
`(0, "api.py", 0)` in `file_refs_rollup` and the suspended one did not.

The ordering: `files.id` is a plain rowid. When the parallel extractor
finished `lib.php` LAST in one database's cold index, it held the
highest id; the incremental pass deleted it (its rank drained to zero
and, by design, stayed) and re-inserted `api.py`, which recycled that id
and joined the drained row. Both mechanisms keep the dead row; which
database showed it depended only on each one's finish order. Reproduced
11/400 under 16-way contention (0/100 sequential), every failure with
`lib.php` at id 9 and `api.py` re-inserted at 9.

The fix: `writer::delete_file_row` is now the one spelling of a
`files`-row delete (both `write_upsert` and `write_delete`), and it
deletes that file's `file_refs_rollup` ranks too, by a loose index scan
over the generations (a handful of primary-key seeks, never a scan of
every file's rank). No schema change: the doors and `reconcile` are
untouched, so a LIVE file's drained rank stays a row at zero in both
legs, as before. The equivalence now holds by the structure of the
pass: it re-kinds only within m0061's population and un-reclassifies
only refs inserted in it, so it can never create a rank, and a rank
leaves the table only with its file.

Readers: `graph::index_health_from_rollup` is the only production
reader and keeps a file only `HAVING SUM(refs) > 0`, so no reply moves.

Tests: `a_recycled_file_id_inherits_no_rank` forces the ordering
(gone.py alone, deleted, fresh.py recycles its id) plus a rank the pass
drains (only.cs). MUTATIONS RUN: delete_file_row keeps the ranks -> RED
(fresh.py holds a rank in both legs; the equivalence and scoped tests
RED on the dead row too); reconcile deletes and re-inserts the file
ranks -> RED at `only.cs added`. The equivalence test now asserts the
deleted file was ranked and left no row at all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
ci: re-run PR #352 after the runner/network outage (round 3 runs 1071-1073 were cut off mid-build)
Some checks failed
CI / changes (what this run must test) (pull_request) Successful in 44s
Package CI / changes (which packages this run must test) (pull_request) Successful in 45s
CI / cargo fmt (pull_request) Successful in 1m4s
CI / OSS corpus tier-3 scale (nightly) (pull_request) Has been skipped
CI / Grammar rebuild from source (nightly) (pull_request) Has been skipped
Package CI / package suites (clippy) (pull_request) Successful in 19m4s
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Successful in 37m50s
Package CI / package (svelte) (pull_request) Successful in 44m18s
Package CI / package (timeline) (pull_request) Successful in 43m33s
Package CI / package (xaml) (pull_request) Successful in 42m40s
Package CI / package (vue) (pull_request) Successful in 43m39s
CI / cargo clippy (pull_request) Successful in 21m2s
CI / cargo check (MSRV 1.98) (pull_request) Successful in 20m1s
Package CI / package (javascript) (pull_request) Successful in 1h51m58s
Package CI / package (csharp) (pull_request) Successful in 1h52m4s
Package CI / package (php) (pull_request) Successful in 1h52m3s
CI / CI lane wall-clock headroom (pull_request) Successful in 1m1s
Package CI / package (rust) (pull_request) Successful in 1h51m3s
CI / cargo check (windows-gnu) (pull_request) Successful in 22m54s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 1m32s
Package CI / package (python) (pull_request) Successful in 1h56m54s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 13m13s
CI / cargo doc (intra-doc links) (pull_request) Successful in 9m1s
CI / cargo deny (pull_request) Successful in 11m29s
Package CI / package (typescript) (pull_request) Successful in 1h32m7s
Package CI / package (ruby) (pull_request) Successful in 2h13m39s
CI / OSS corpus (tier 1) (pull_request) Successful in 57m38s
CI / cargo test (pull_request) Failing after 54m12s
CI / cargo test (daemon transport) (pull_request) Has been skipped
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been skipped
77a5c47733
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
daemon tests: the S2 child oracle is a record, not a 2 ms /proc sample
Some checks failed
CI (Windows) / changes (what this run must test) (pull_request) Successful in 35s
Package CI / changes (which packages this run must test) (pull_request) Successful in 27s
CI / cargo fmt (pull_request) Successful in 1m11s
CI / OSS corpus tier-3 scale (nightly) (pull_request) Has been skipped
CI / Grammar rebuild from source (nightly) (pull_request) Has been skipped
CI / CI lane wall-clock headroom (pull_request) Successful in 1m32s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 1m55s
Package CI / package suites (clippy) (pull_request) Successful in 18m2s
CI / cargo deny (pull_request) Successful in 17m39s
CI / cargo doc (intra-doc links) (pull_request) Successful in 14m48s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 19m5s
CI / cargo check (MSRV 1.98) (pull_request) Successful in 22m35s
CI / cargo clippy (pull_request) Successful in 22m44s
CI / cargo check (windows-gnu) (pull_request) Successful in 24m31s
Package CI / package (xaml) (pull_request) Successful in 38m9s
Package CI / package (timeline) (pull_request) Successful in 38m36s
Package CI / package (vue) (pull_request) Successful in 39m8s
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Successful in 39m10s
Package CI / package (svelte) (pull_request) Successful in 39m39s
Package CI / package (csharp) (pull_request) Successful in 1h13m2s
Package CI / package (php) (pull_request) Successful in 1h13m25s
Package CI / package (rust) (pull_request) Successful in 1h13m38s
Package CI / package (javascript) (pull_request) Successful in 1h13m53s
Package CI / package (typescript) (pull_request) Successful in 1h13m56s
Package CI / package (python) (pull_request) Successful in 1h15m39s
Package CI / package (ruby) (pull_request) Successful in 1h22m48s
CI / OSS corpus (tier 1) (pull_request) Successful in 1h14m31s
CI / cargo test (pull_request) Failing after 1h18m22s
CI / cargo test (daemon transport) (pull_request) Has been skipped
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been skipped
5399d699e4
`an_unapproved_in_tree_package_is_never_executed` failed CI round 3b
(run 1077) on its positive control: phase 2 saw the `--kind-table`
child and not `--precompile`. Not a cache hit and not #347: the
extractor and grammar caches live under the test's own tempdir
operator home and are keyed on the private host path, and an
instrumented run measured the extractor cache EMPTY before phase 2 and
holding a freshly written entry after it in every failing iteration —
the compile ran; the sampler missed it. strace puts the fixture's
`--precompile` at ~7 ms from exec to exit (`--kind-table` ~40 ms), and
a child is visible to the poll only between its exec and its exit.

Twelve copies beside twelve busy loops, 300 iterations each:
  train-0.36 (77a5c477):        6/300 red  (8/300 in a second run)
  bd683200 (previous release): 12/300 red  — pre-existing
  this change:                  0/600 and 0/300; clone test 0/420

The oracle is now `common::RecordedHost`, shared by both S2 tests: the
host binary handed to discovery is a /bin/sh shim that appends its
argv to a log and execs a private copy of the real worker, and exits
97 without running it if it cannot record. Both phases now read a
record, so the negative half can no longer pass on a missed sample
either. Phase 1 of the e2e test also asserts the whole log is empty
before the approval (the mixed discovery ran outside any watch), and
the clone test's positive control now requires `--precompile`, not
"any child". `own_children`/`cmdline_of` leave daemon `common` with
their last callers; plugin-host's own copy is untouched.

Mutations, each RUN:
* revert all three files to 77a5c477: RED 4/300 under load (the race).
* stage+compile the unapproved in-tree request and discard it, in
  `discover_with_store`'s not-approved arm: RED 20/20 in each test, on
  the phase-1 assertion, naming the `--precompile` argv.
* shim records nothing (`: '<log>'` for the printf): RED 10/10 in
  each test, on the positive control.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
reconcile_pending: an unread reparse count is named, never omitted like a zero
Some checks failed
Package CI / package (rust) (push) Successful in 47m15s
Package CI / package (javascript) (push) Successful in 47m31s
Package CI / package (typescript) (push) Successful in 47m41s
Package CI / package (python) (push) Successful in 48m13s
Package CI / package (ruby) (push) Successful in 53m59s
Release Build / Generate Version (push) Successful in 30s
Release Build / Required CI green (push) Successful in 46s
Release Build / Build linux-aarch64 (push) Successful in 12m26s
Release Build / Build linux-x86_64 (push) Successful in 15m0s
Release Build / Build linux-x86_64-musl (push) Successful in 15m22s
Release Build / Pack the first-party packages-1 (push) Successful in 52s
Release Build / Pack the first-party packages-5 (push) Successful in 52s
Release Build / Pack the first-party packages-10 (push) Successful in 56s
Release Build / Pack the first-party packages-9 (push) Successful in 58s
Release Build / Pack the first-party packages-4 (push) Successful in 1m1s
Release Build / Pack the first-party packages-6 (push) Successful in 1m7s
Release Build / Pack the first-party packages-7 (push) Successful in 1m12s
Release Build / Pack the first-party packages (push) Successful in 1m13s
Release Build / Pack the first-party packages-2 (push) Successful in 1m17s
Release Build / Pack the first-party packages-3 (push) Successful in 1m27s
Release Build / Pack the first-party packages-8 (push) Successful in 1m29s
Release Build / Build windows-x86_64 (push) Successful in 18m37s
Release Build / Assemble the release archives (push) Successful in 3m26s
Release Build / Windows archive smoke (msvc) (push) Successful in 24s
Release Build / Create Forgejo Release (push) Successful in 10m8s
Release Build / Seed the package channel (push) Successful in 2m33s
Package Release / Required CI green (push) Failing after 50m48s
Package Release / Pack, sign and verify one package (push) Has been skipped
Package Release / Publish the package release (push) Has been skipped
Package Release / Update the package channel (push) Has been skipped
6ec0a6124c
CI round 4 on PR #352 failed `a_one_shot_query_mid_upgrade_converges_on_retry`:
the `warming_up` reply carried no `code_files_total`. Debug logs under load
show why: the reply was built while the one-shot's own open of the index was
still in flight, so `probe_db_path` stood the probe down (by design, since
1c5436a8) and the count was dropped exactly as a count of zero is. The reader
could not tell "nothing awaits reparse" from "not measured".

Pre-existing: v0.35.0 fails the same assertion 2 of 16 runs with 16 copies on
two CPUs; this tree failed 5 of 16 the same way.

`ReconcilePending.code_files_unmeasured` now names the reason
(`local_open_in_flight`, or `unreadable` when the read-only probe fails). The
e2e test grades the disclosure when it is present and the count's value
otherwise.

MUTATIONS (RUN): `code_files_unmeasured` never set -> unit test RED on the
open-in-flight arm; e2e RED 2 of 16 under the same load (count assertion).
Fixed: 16 of 16 green under that load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Member

Shipped. Head 6ec0a612 is on master's first-parent line, because master was fast-forwarded to it rather than merged through this PR, and it is tagged v0.36.0. Closing as delivered.

Shipped. Head 6ec0a612 is on master's first-parent line, because master was fast-forwarded to it rather than merged through this PR, and it is tagged **v0.36.0**. Closing as delivered.
buildagent closed this pull request 2026-10-13 10:15:22 +02:00
Some checks failed
Package CI / changes (which packages this run must test) (pull_request) Successful in 25s
CI / changes (what this run must test) (pull_request) Successful in 33s
CI (Windows) / changes (what this run must test) (pull_request) Successful in 43s
CI / cargo fmt (pull_request) Successful in 53s
CI / Grammar rebuild from source (nightly) (pull_request) Has been skipped
CI / OSS corpus tier-3 scale (nightly) (pull_request) Has been skipped
CI / CI lane wall-clock headroom (pull_request) Successful in 1m58s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 1m55s
CI / cargo doc (intra-doc links) (pull_request) Successful in 15m2s
CI / cargo deny (pull_request) Successful in 17m25s
Package CI / package suites (clippy) (pull_request) Successful in 17m57s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 18m18s
CI / cargo check (MSRV 1.98) (pull_request) Successful in 22m12s
CI / cargo clippy (pull_request) Successful in 22m40s
CI / cargo check (windows-gnu) (pull_request) Successful in 23m56s
Package CI / package (xaml) (pull_request) Successful in 37m9s
Package CI / package (vue) (pull_request) Successful in 37m24s
Package CI / package (timeline) (pull_request) Successful in 37m42s
Package CI / package (svelte) (pull_request) Successful in 38m16s
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Successful in 38m48s
Package CI / package (csharp) (pull_request) Successful in 1h7m50s
Package CI / package (rust) (pull_request) Successful in 1h8m12s
Package CI / package (php) (pull_request) Successful in 1h8m24s
Package CI / package (javascript) (pull_request) Successful in 1h8m26s
Package CI / package (typescript) (pull_request) Successful in 1h8m46s
Package CI / package (python) (pull_request) Successful in 1h10m24s
Package CI / package (ruby) (pull_request) Successful in 1h16m10s
CI / OSS corpus (tier 1) (pull_request) Successful in 1h19m11s
CI / cargo test (pull_request) Successful in 1h3m48s
CI / cargo test (daemon transport) (pull_request) Successful in 12m8s
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been skipped
Package CI / changes (which packages this run must test) (push) Successful in 22s
CI (Windows) / changes (what this run must test) (push) Successful in 37s
CI (Windows) / fmt + clippy + build + test (windows) (push) Has been skipped
CI / changes (what this run must test) (push) Successful in 46s
CI / cargo fmt (push) Successful in 54s
CI / cargo test (abi, 32-bit + wasm32) (push) Has been skipped
CI / cargo deny (push) Has been skipped
CI / CI lane wall-clock headroom (push) Has been skipped
CI / guest crates (fmt, clippy, doc) (push) Has been skipped
CI / cargo doc (intra-doc links) (push) Has been skipped
CI / OSS corpus (tier 1) (push) Has been skipped
CI / OSS corpus tier-3 scale (nightly) (push) Has been skipped
CI / Grammar rebuild from source (nightly) (push) Has been skipped
CI / cargo clippy (push) Has been skipped
CI / cargo check (MSRV 1.98) (push) Has been skipped
CI / cargo check (windows-gnu) (push) Has been skipped
CI / cargo test (push) Has been skipped
CI / cargo test (daemon transport) (push) Has been skipped
CI / Plugin path cost + pool throughput (nightly) (push) Has been skipped
Package CI / package suites (clippy) (push) Successful in 11m47s
Package CI / package (timeline) (push) Successful in 25m22s
Package CI / package (xaml) (push) Successful in 25m39s
Package CI / package (vue) (push) Successful in 26m19s
Package CI / package (svelte) (push) Successful in 26m33s
Package CI / package (php) (push) Successful in 46m52s
Package CI / package (csharp) (push) Successful in 47m3s
Package CI / package (rust) (push) Successful in 47m15s
Package CI / package (javascript) (push) Successful in 47m31s
Package CI / package (typescript) (push) Successful in 47m41s
Package CI / package (python) (push) Successful in 48m13s
Package CI / package (ruby) (push) Successful in 53m59s
Release Build / Generate Version (push) Successful in 30s
Release Build / Required CI green (push) Successful in 46s
Release Build / Build linux-aarch64 (push) Successful in 12m26s
Release Build / Build linux-x86_64 (push) Successful in 15m0s
Release Build / Build linux-x86_64-musl (push) Successful in 15m22s
Release Build / Pack the first-party packages-1 (push) Successful in 52s
Release Build / Pack the first-party packages-5 (push) Successful in 52s
Release Build / Pack the first-party packages-10 (push) Successful in 56s
Release Build / Pack the first-party packages-9 (push) Successful in 58s
Release Build / Pack the first-party packages-4 (push) Successful in 1m1s
Release Build / Pack the first-party packages-6 (push) Successful in 1m7s
Release Build / Pack the first-party packages-7 (push) Successful in 1m12s
Release Build / Pack the first-party packages (push) Successful in 1m13s
Release Build / Pack the first-party packages-2 (push) Successful in 1m17s
Release Build / Pack the first-party packages-3 (push) Successful in 1m27s
Release Build / Pack the first-party packages-8 (push) Successful in 1m29s
Release Build / Build windows-x86_64 (push) Successful in 18m37s
Release Build / Assemble the release archives (push) Successful in 3m26s
Release Build / Windows archive smoke (msvc) (push) Successful in 24s
Release Build / Create Forgejo Release (push) Successful in 10m8s
Release Build / Seed the package channel (push) Successful in 2m33s
Package Release / Required CI green (push) Failing after 50m48s
Package Release / Pack, sign and verify one package (push) Has been skipped
Package Release / Publish the package release (push) Has been skipped
Package Release / Update the package channel (push) Has been skipped

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
h-dv/code-index!352
No description provided.