Field fixes from zammad-dev: Ruby constant lookup, watcher preempts resolve, ghost lagging row, text-extension opt-in, review_diff untracked, path_glob braces (#326-#329) #333

Closed
buildagent wants to merge 0 commits from zammad-fixes into master
Member

This PR fixes the field reports from zammad-dev, a Zammad 7.0.2 fork running v0.33.1.

#326: Ruby constants resolve by Ruby's own lookup

  • New behaviour:
    • Constant refs follow Ruby's own lexical lookup: enclosing scopes, then in-project ancestors and mixins, then the top level. The target is the declaration in the file the constant's name maps to by Rails convention (rule 110).
    • Const.method calls bind to the class's def self.method (rule 111). The bind is refused when the class also declares method=.
  • Why it is host, not package: the builtin and de.h-dv.ruby produce identical binds, before and after the change.
  • Which files count: a Ruby file spells its constant with its own extension (.rb, .rake, …). The trait gates this by the file's stored language.
  • Zammad results:
    • Ruby resolution 4.58% → 11.70%; constant refs 11.7% → 64.2%.
    • 1,240 wrong constant binds that v0.33.1 made are corrected, and 69 phantom binds are cleared.
    • Every new, moved and cleared bind in the samples was audited at source.
  • ruby-sinatra: +116 binds, 1 phantom cleared. Its rows in baseline.json and stage-baseline.json were re-recorded with operator approval; every other repo is byte-identical.
  • Ruby package records: re-recorded under schema 79. Only ruby/active moved, to 3085, which equals builtin parity.
  • Migration v79: one Full re-resolve on upgrade when the index holds Ruby files.

#327: edits no longer wait for a running resolve stage

  • Preemption: a waiting watcher batch makes the in-flight resolve pass give up. The pass rolls back, the edit commits, and the next pass re-decides from the persistent pending work.
    • Preemption is capped at 8 consecutive flushes, so resolution cannot be starved.
    • In the test, an edit made mid-stage was visible after 0.61 s instead of 14.9 s. The result equals a cold index.
  • Ghost lagging_paths row: freshness now counts only files rows with a live contribution. A deleted path held only by a superseded generation is no longer reported as lagging forever. The reporter confirmed this row persisted across a restart.
  • Startup reconcile: a test now pins that an edit made during the startup reconcile is not lost (this was already correct).
  • Watcher stop: Watcher::stop no longer errors when its own interrupt lands mid-commit.

#328: per-repo [index] extra_text_extensions

  • A repo can opt in to extra text-only extensions in .code-index.toml. Double extensions work, for example jst.eco.
  • An entry that cannot work is refused by name.
  • Changing the list does not trigger a full reparse.
  • index_coverage reports the rule that admitted a file in admitted_by.
  • The built-in list is unchanged; languages stay plugins.

#329

  • review_diff: untracked files are reviewed as added. With staged:true the payload says how many untracked files were left out.
  • path_glob: a {a,b} group is refused by name as unsupported_glob_syntax in all four tools that take it, and the error lists the expansions.

Also

  • Instructions and rules text: trimmed so both lanes' additions fit the existing byte ceiling and token budget. Neither limit was raised.
  • #329b test literal: kept brace-balanced, because the registry scanners strip test modules by counting braces.

Verification, once on this tree

  • fmt, clippy and rustdoc with -D warnings --document-private-items: clean.
  • Workspace (ci.yml command): 4778 passed, 0 failed.
  • Daemon leg: 925 passed, 0 failed.
  • Every corpus suite in ci.yml's corpus job: green.
  • The Ruby package leg from package-ci.yml: green.
  • precision_gate: 7/7, phantoms 0, POPULATION unchanged.

Known residue (#314)

agent_task_bench, run with the corpus job's COSI_CORPUS_DIR, writes .code-index/ into three corpus checkouts. It is noted on #314.

🤖 Generated with Claude Code

https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu

This PR fixes the field reports from zammad-dev, a Zammad 7.0.2 fork running v0.33.1. ## #326: Ruby constants resolve by Ruby's own lookup - **New behaviour:** - Constant refs follow Ruby's own lexical lookup: enclosing scopes, then in-project ancestors and mixins, then the top level. The target is the declaration in the file the constant's name maps to by Rails convention (rule 110). - `Const.method` calls bind to the class's `def self.method` (rule 111). The bind is refused when the class also declares `method=`. - **Why it is host, not package:** the builtin and `de.h-dv.ruby` produce identical binds, before and after the change. - **Which files count:** a Ruby file spells its constant with its own extension (`.rb`, `.rake`, …). The trait gates this by the file's stored language. - **Zammad results:** - Ruby resolution 4.58% → 11.70%; constant refs 11.7% → 64.2%. - 1,240 wrong constant binds that v0.33.1 made are corrected, and 69 phantom binds are cleared. - Every new, moved and cleared bind in the samples was audited at source. - **ruby-sinatra:** +116 binds, 1 phantom cleared. Its rows in `baseline.json` and `stage-baseline.json` were re-recorded with operator approval; every other repo is byte-identical. - **Ruby package records:** re-recorded under schema 79. Only `ruby/active` moved, to 3085, which equals builtin parity. - **Migration v79:** one Full re-resolve on upgrade when the index holds Ruby files. ## #327: edits no longer wait for a running resolve stage - **Preemption:** a waiting watcher batch makes the in-flight resolve pass give up. The pass rolls back, the edit commits, and the next pass re-decides from the persistent pending work. - Preemption is capped at 8 consecutive flushes, so resolution cannot be starved. - In the test, an edit made mid-stage was visible after 0.61 s instead of 14.9 s. The result equals a cold index. - **Ghost `lagging_paths` row:** freshness now counts only `files` rows with a live contribution. A deleted path held only by a superseded generation is no longer reported as lagging forever. The reporter confirmed this row persisted across a restart. - **Startup reconcile:** a test now pins that an edit made during the startup reconcile is not lost (this was already correct). - **Watcher stop:** `Watcher::stop` no longer errors when its own interrupt lands mid-commit. ## #328: per-repo `[index] extra_text_extensions` - A repo can opt in to extra text-only extensions in `.code-index.toml`. Double extensions work, for example `jst.eco`. - An entry that cannot work is refused by name. - Changing the list does not trigger a full reparse. - `index_coverage` reports the rule that admitted a file in `admitted_by`. - The built-in list is unchanged; languages stay plugins. ## #329 - **`review_diff`:** untracked files are reviewed as added. With `staged:true` the payload says how many untracked files were left out. - **`path_glob`:** a `{a,b}` group is refused by name as `unsupported_glob_syntax` in all four tools that take it, and the error lists the expansions. ## Also - **Instructions and rules text:** trimmed so both lanes' additions fit the existing byte ceiling and token budget. Neither limit was raised. - **#329b test literal:** kept brace-balanced, because the registry scanners strip test modules by counting braces. ## Verification, once on this tree - fmt, clippy and rustdoc with `-D warnings --document-private-items`: clean. - Workspace (ci.yml command): 4778 passed, 0 failed. - Daemon leg: 925 passed, 0 failed. - Every corpus suite in ci.yml's corpus job: green. - The Ruby package leg from package-ci.yml: green. - `precision_gate`: 7/7, phantoms 0, POPULATION unchanged. ## Known residue (#314) `agent_task_bench`, run with the corpus job's `COSI_CORPUS_DIR`, writes `.code-index/` into three corpus checkouts. It is noted on #314. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
A repository lists file-name suffixes (`coffee`, `eco`, `jst.eco`) in
.code-index.toml and those files are indexed as text (search_text, no
symbols). The host's built-in allowlist is unchanged: the base system is
infrastructure, and the repo that has the files says so for itself.

- text_only::RepoTextExtensions: validated suffixes matched against the
  END OF THE FILE NAME, so a double extension (`jst.eco`) is expressible;
  entries that cannot work (empty, glob/separator, binary final segment,
  a builtin language's extension) are refused by name at manifest load.
- path_eligibility_in takes the set; it is the LAST arm, after builtins
  and packages, so it can never take a file away from a parser.
- Outside the activation identity on purpose: a text row has no symbols
  or refs, so the ordinary walk admits/removes the files with no full
  reparse (measured: parse_count 2 of 4 files; hashing the key into
  project_config makes it 6).
- index_coverage names the rule in `admitted_by`
  (builtin_text_extension | extensionless | repo_text_extension), and the
  ineligible_extension hint names the key. Server instructions and the
  init template (commented, migration hazard) mention it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
`git diff` never shows an untracked file, so review_diff listed new work
under coverage.untracked_files and then reviewed none of it ("covered
only generated files"). In working-tree mode every untracked file now
joins the diff as a whole-file addition (no base side by definition; the
index reads the working tree). A `git rm --cached` path, which git
reports both as deleted and untracked, keeps its existing handling.

staged=true reviews the staging area, which untracked files are not in:
coverage.untracked_review says `excluded_by_staged` and coverage.semantics
counts the unreviewed files and names the fix (`git add`, or drop
staged). Working-tree mode says `reviewed_as_added`. changed_symbols is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Every path_glob is SQLite GLOB, which has no brace expansion, so
`src/{lib,main}.rs` matched its braces literally and answered a
confident `total: 0`. search_text/search_symbols carried a zero-hit
note (D10d); list_files and resolution_gaps carried nothing.

All four tools now refuse a brace GROUP (a `{...}` holding a comma) at
the door with `unsupported_glob_syntax`, and the hint spells out every
alternative it expands to (capped at 16) so the next calls are
mechanical. A brace with no comma (`{{cookiecutter.slug}}/`) is a real
literal path and is still answered.

Brace EXPANSION was not implemented: it would rewrite eight SQL GLOB
sites in the daemon plus list_files' literal-prefix disk scan; recorded
as a follow-up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Field (#327 comment): after catch-up, index_freshness kept one path in
lagging_paths as `deleted` -- in no commit, not on disk -- so state stayed
`lagging` for good.

Reproduced: writer::write_delete keeps a deleted file's `files` anchor
(withdrawing only its live contribution) while a `superseded` generation
still holds a contribution for it, the rollback buffer #78 step 9 retains.
Every reconcile re-sends the delete as a correct no-op, but
freshness::compare read EVERY `files` row as indexed, so the anchor was
`deleted` on every call until the generation was collected.

compare now reads only rows with a contribution under the live label
(contributions::live_label_opt; unfiltered only where no label exists).

The other timings the report asks about (deleted while the daemon was
down; mid-stage; between batches) are applied: the control half of the new
test deletes the same file without a retained generation and it clears
after the restart reconcile, and the indexer's
an_edit_lands_while_a_resolve_stage_is_still_running deletes a file
mid-stage and sees it go.

Test (mutations run):
- reader_epoch_e2e::a_deleted_path_only_a_superseded_generation_holds_is_not_lagging
  RED before the fix (the pre-#327 read); RED when any generation's
  contribution counts as live.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Field (#327): on a 9.9k-file Rails tree, files written while a resolve
stage ran stayed invisible to search_symbols/search_text for 40-71 s; a
resolve_ref_targets stage takes ~70 s there. Disclosure was right
(index_freshness: lagging); latency was the defect.

Root cause: the watcher's ONE writer thread commits batches AND runs the
per-batch resolve inline (index.rs writer_loop_observed -> try_resolve ->
apply_resolution_observed), and a long-lived caller resolves in ONE
transaction. Nothing else commits until the stage does. #301's durable
batches do not help: each batch re-initializes the whole queue once any
other write moves the content revision, and they cost far more per pass.

Fix: the live loop arms a per-resolve preemption probe ("a message is
waiting on the writer channel") on its ResolveControl. The resolve's
progress handler returns should_abandon() = cancelled OR preempted, so a
waiting batch abandons the pass by the same door a cancel uses: the
transaction rolls back, the m0007 pending tables still describe all owed
work, the batch commits, and the next pass re-decides from the union --
the crash-mid-resolve state, so it converges to an uninterrupted pass.
Durable batches yield between commits the same way. Not a CancelReason:
pass-scoped, latched only inside its armed window, outcome `preempted`.

Bounded by MAX_OWED_FLUSHES: a preempted pass restarts, so after 8
flushes with resolution owed the pass runs to completion; past that an
edit can still wait up to one stage. Agent rules, SKILL.md and the MCP
instructions now say so (the instructions within the startup reserve).

Also: a CANCELLED writer whose batch commit was aborted by the stopper's
own sqlite3_interrupt gave Watcher::stop an error (2 of 2 full-suite runs
of the new stream test); it now gives the batch up as it gives up a busy
one. An uncancelled interrupt still propagates.

Measured (watcher test, stage slowed to ~15 s): edit-to-visible 14.9 s
before (= the stage) -> 0.61 s after.

Tests (mutations run):
- watcher::an_edit_lands_while_a_resolve_stage_is_still_running: handler
  returns is_cancelled() -> RED (14.9 s); probe never armed -> RED; latch
  outlives its window -> RED (never converges). Bindings, rules and ref
  counts equal a cold index of the final tree.
- watcher::a_steady_stream_of_edits_cannot_starve_resolution: unbounded
  preemption -> RED.
- resolve_resume::a_durable_queue_yields_to_a_waiting_batch_between_batches:
  step checks is_cancelled() -> RED.
- index::a_cancelled_writer_gives_up_an_interrupted_commit_cleanly: final
  arm off -> RED; try_flush arm off -> RED; no is_cancelled guard -> RED.
- Survivor, recorded in the test doc: clearing resolve_owed on the
  preempted arm (the waiting batch's flush owes the resolve again).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Open item from #327: is the watch armed only after the startup reconcile,
leaving an edit made during it for the 30-minute periodic reconcile?

Verified it is NOT: Watcher::start_inner arms the debouncer and registers
watches before index_path, and queued events drain once the dispatcher
starts. The existing cold-start race test could not show this, because
CODE_INDEX_RECONCILE_DELAY_MS sleeps BEFORE the walk, so its edit is one
the walk reads.

New test: an existing index whose startup reconcile owes a Full resolve,
held slow with the beat delay; the edit is made while that resolve runs
(after the walk), with periodic reconcile and HEAD poll off. It lands
~0.5 s after start returns.

Mutation (run): register the watches AFTER the startup reconcile (the
pre-fix order the code's comment describes) -> RED, not landed after 30 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Each lane fit the startup budgets alone; together info.instructions was
4119 bytes (ceiling 4096) and the platform-invariant startup payload had
603 tokens left of a 622-token reserve. Tighten the wording instead of
moving either bound; both disclosures stay:

- watcher latency: "within ~1 s of an edit (longer in edit bursts; see
  `index_freshness`)"; "searchable at once"
- text coverage: "plus a repo's .code-index.toml `[index]
  extra_text_extensions`"
- `warming_up` and handle-reuse lines reworded shorter, same facts

Now 4014 wire chars; startup reserve 625 left of 622 required.

The rules template's Live-working-tree caveat is tightened the same way
(reconcile or edit burst, up to one resolve pass, `index_freshness`
reports `lagging`). The five marker-block copies were regenerated with
`code-index rules`; AGENTS.md (no marker block, left alone by the
generator) and SKILL.md carry the same paragraph by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Field report #326: on a Zammad 7.0.2 fork Ruby resolution was 4.6%,
with the builtin and the de.h-dv.ruby package bind-for-bind identical
(measured: 359,509 refs, 0 differences), so the gap is the host
resolver. A Rails app names classes by constant and loads them by
convention; the bare-name tiers read reachability from imports and
directories, and a Rails app has neither. Worse, 1,309 of the Ruby
type binds that did exist named a different constant: compact
`class A::B::C` declarations lose their scope in qualified_name, so
tier 1Q bound `Ticket::Article` to
`Sequencer::...::ModelClass::Ticket::Article` (1,098 sites) and the
same-file tier bound `File.exist?` inside `Store::File` to itself.

New profile trait `lexical_constant_lookup` (ruby only) gates a
per-site pass, `index/constant_lookup.rs`, run after every tier:

* constant refs: Ruby's lookup over the project's namespace tree —
  lexical nesting innermost first (compact paths contribute
  themselves only), in-project ancestors, then the top level — with
  full names taken from each declaration's own header. The target is
  the declaration whose file spells the constant (Zeitwerk), else the
  one in the ref's file, else a lone class that names a superclass.
  Authoritative for what it decides: re-points or clears an earlier
  tier's bind to another constant; refuses (keeps) when uncertain.
  Derived association names and `obj::X`/`::X` are left alone.
* `Const.method`: bound to the receiver class's `def self.method`;
  refused when the class also declares `method=` (setter form is
  indistinguishable in the row).

Measured, bind-level, vs the release build:
  Zammad 7.0.2:  +20,995 constants (rule 110), +4,687 Const.method
                 calls (rule 111), 1,884 moved (1,240 to a different,
                 correct constant; 644 to the canonical declaration of
                 the same one), 69 phantom binds cleared. Ruby 4.6% ->
                 11.7%; constants 11.7% -> 64.2%. Package owner leg:
                 bind-for-bind identical to the builtin.
  ruby-sinatra:  +116 (+38 constants, +78 calls), 1 phantom cleared;
                 no other corpus repo moves.
Every input is outline-tracked or in the ref's own file; incremental
vs cold verified identical on Zammad for a body edit, a mixin edit and
an outline edit.

tests/corpus/baseline.json moves for ruby-sinatra only (resolved
2955 -> 3070) and is NOT blessed here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
The lexical constant lookup runs at the end of every resolve pass over
in-scope Ruby `type` refs, bound or not, so one Full pass both binds
what the earlier tiers could not and corrects what they bound to a
different constant. Without a migration an upgraded index keeps its
old answers until something forces a Full pass — a body-only edit
re-decides only its own file — so the field fix would not reach the
index that reported it. Same shape as m0067/m0069: no re-extraction,
one Full resolve, aggregates rebuilt, content revision advanced; an
index with no file of a `lexical_constant_lookup` language runs
nothing.

COORDINATION: version 79 is claimed here; if another lane lands a v79
first, renumber this one.

Test: `upgrading_redecides_ruby_constants` puts back the pre-lookup
state (the tier-1Q decoy bind, two unresolved refs), reopens below
v79, and requires the lookup's answers. Mutation (run): make `up`
return before resolving -> RED.

Verified: migration_cost and upgrade_equivalence (corpus, release)
green; schema_skew_e2e, schema_newer_refusal_e2e, query_cli green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Operator-approved, scoped re-record. Blessed through the sanctioned
switches (COSI_CORPUS_BLESS for baseline.json, COSI_STAGE_BLESS for
stage-baseline.json); each file carries the reason and the categorised
diff in its _blessed block.

ruby-sinatra only:
  baseline.json        resolved 2955 -> 3070, edges 1136 -> 1173,
                       resolved_method_call 584 -> 662, resolved_type
                       196 -> 219, resolved_member_access 92 -> 106
  stage-baseline.json  rule.lexical_constant +38 (new), rule.
                       constant_receiver +78 (new), rule.
                       tier1b_file_key_import 21 -> 20

Every other repo's row is byte-identical to the prior record (checked
by diffing the repos section with the sinatra line/block removed).
The bind movement was audited at source by lane Z1 and spot-checked by
the lead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
`brace_alternatives_expand_groups_and_leave_literal_braces_alone`
asserted on the literal "odd{unclosed,x". bounding_site_registry and
disclosure_derivation_registry strip `#[cfg(test)]` blocks from
server.rs by counting raw braces, so that one unclosed brace made the
strip run past the module's end and swallow every production function
after it: 8 tests red in the workspace run (declared disclosure fields
"declared nowhere", `stats_resource` not found).

Spell the brace as a `\u` escape; the asserted string is unchanged.
Both suites green again (17 + 11), the unit test still passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
The constant lookup's spelled-file rank (Zeitwerk: `Ticket` lives in
`ticket.rb`) stripped a hard-coded `.rb`. ruby_package_parity caught
it: the parity harness gives the package leg `.rbx` shadow paths of the
same bytes, so the package resolved 3066 against the builtin's 3085.

`zeitwerk_stem` now strips the file's OWN extension, and only when the
file's STORED language adopts the lookup (`files.lang`, through the same
`lexical_constant_lookup` trait the pass is gated on): `.rb`, `.rake`
and `.rbx` spell alike, a file of another language never spells, and an
extensionless file spells nothing. The spelling only selects among files
that already declare the constant, so no candidate is added.

Measured: corpus_ratchet, corpus_stage and corpus_cost are unchanged
against the re-recorded ruby-sinatra rows; ruby_package_parity now
resolves 3085 on both legs, and its pin moves 2966 -> 3085 with the
derivation recorded beside it.

Tests (both mutations RUN):
- unit `a_ruby_file_spells_with_its_own_extension_and_only_a_ruby_file`:
  hard-code `.rb` -> RED on `.rake`/`.rbx`; ignore the language flag
  -> RED on `ticket.js`.
- `a_ruby_file_under_a_non_rb_extension_spells_its_constant` (indexes a
  `.rake` and a `.rb` declaration of one constant): hard-code `.rb` ->
  RED, the ref stays unresolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
corpus: re-record the Ruby package records under schema 79 (#326)
Some checks failed
Package CI / changes (which packages this run must test) (pull_request) Successful in 20s
CI / changes (what this run must test) (pull_request) Successful in 29s
CI (Windows) / changes (what this run must test) (pull_request) Successful in 38s
Package CI / package (python) (pull_request) Successful in 18s
Package CI / package (typescript) (pull_request) Successful in 20s
Package CI / package (rust) (pull_request) Successful in 29s
Package CI / package (timeline) (pull_request) Successful in 30s
Package CI / package (javascript) (pull_request) Successful in 39s
Package CI / package (svelte) (pull_request) Successful in 38s
Package CI / package (xaml) (pull_request) Successful in 38s
Package CI / package (csharp) (pull_request) Successful in 49s
CI / cargo fmt (pull_request) Successful in 1m17s
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 (php) (pull_request) Successful in 58s
CI / CI lane wall-clock headroom (pull_request) Successful in 1m11s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 1m10s
CI / cargo doc (intra-doc links) (pull_request) Successful in 6m9s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 8m2s
CI / cargo clippy (pull_request) Successful in 8m6s
CI / cargo check (MSRV 1.98) (pull_request) Successful in 8m6s
CI / cargo deny (pull_request) Successful in 8m11s
CI / cargo check (windows-gnu) (pull_request) Successful in 8m32s
Package CI / package (ruby) (pull_request) Successful in 24m4s
CI / OSS corpus (tier 1) (pull_request) Successful in 33m49s
CI / cargo test (pull_request) Successful in 51m16s
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Failing after 1h12m3s
CI / cargo test (daemon transport) (pull_request) Successful in 12m4s
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been skipped
4a92208fef
Operator-approved; Ruby rows only. Blessed through the sanctioned
switches (COSI_PACKAGE_BLESS, COSI_RUBY_PKG_COST_BLESS); each record
carries its reason and categorised diff.

host-package-lifecycle.json: only `ruby/active` moves — resolved 2966
-> 3085, edges 1147 -> 1186, method_call 589 -> 667, type 191 -> 219,
member_access 101 -> 114, rule.lexical_constant +43, rule.
constant_receiver +78, tier1b_file_key_import 29 -> 27. 3085 is exactly
the builtin's count on the same bytes (ruby_package_parity). Every other
state block (ruby absent/inert/removed/rollback, all five xaml states)
is byte-identical; the activation moves only in `schema` 78 -> 79.

ruby-package-cost.json: package vm_step 28734886 -> 29338442,
fullscan_step 629888 -> 628871, wall_ratio_pct 157 -> 141; the
reason carries the per-statement attribution of the lookup's cost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
build: a dispatch window re-checks its claim under the writer lock
Some checks failed
CI / changes (what this run must test) (pull_request) Successful in 20s
Package CI / changes (which packages this run must test) (pull_request) Successful in 21s
CI (Windows) / changes (what this run must test) (pull_request) Successful in 28s
Package CI / package (rust) (pull_request) Successful in 19s
Package CI / package (javascript) (pull_request) Successful in 23s
Package CI / package (python) (pull_request) Successful in 19s
Package CI / package (xaml) (pull_request) Successful in 26s
Package CI / package (timeline) (pull_request) Successful in 28s
Package CI / package (csharp) (pull_request) Successful in 31s
Package CI / package (typescript) (pull_request) Successful in 36s
Package CI / package (php) (pull_request) Successful in 40s
CI / cargo fmt (pull_request) Successful in 1m7s
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 (svelte) (pull_request) Successful in 55s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 1m0s
CI / CI lane wall-clock headroom (pull_request) Successful in 1m40s
CI / cargo doc (intra-doc links) (pull_request) Successful in 5m54s
CI / cargo deny (pull_request) Successful in 7m32s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 7m40s
CI / cargo clippy (pull_request) Successful in 8m13s
CI / cargo check (MSRV 1.98) (pull_request) Successful in 8m13s
CI / cargo check (windows-gnu) (pull_request) Successful in 8m25s
Package CI / package (ruby) (pull_request) Successful in 24m11s
CI / OSS corpus (tier 1) (pull_request) Successful in 33m57s
CI / cargo test (pull_request) Failing after 51m17s
CI / cargo test (daemon transport) (pull_request) Has been skipped
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been skipped
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Failing after 1h11m55s
c1d2558f2f
Native Windows CI run 1006 failed
`two_builders_requesting_at_once_coalesce_on_one_generation` with
`UNIQUE constraint failed: file_contributions.file_id, ...region_start`.

Two builders that coalesce on one generation (the joiner's `request`
answers `None` and it enters `resume_with_window_observed`) both run
`dispatch_round_observed` over the SAME queue. The owed list is read
with no transaction open and extraction runs outside the writer lock,
so both can hold an answer for one file; whichever window commits
second inserted that file's pending contribution again. The race is
pre-existing (build.rs, writer.rs and contributions.rs are identical
on master); only timing made it rare.

The window's write transaction now applies a response only if the
queue row is still `owed` at the attempt count it was dispatched
against; otherwise the other builder's settlement stands.

A cfg(test) seam, CONCURRENT_ROUND_BEFORE_WINDOW_WRITE, runs a second
builder's round between extraction and the window write, so the race
is forced rather than timed. MUTATION (RUN): disable the re-check ->
the new unit test is RED with the CI error verbatim (the integration
test stays green under it, which is why the unit test exists).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
test_seams: register the concurrent-round seam; unreachable-URL test uses a port nothing can bind
Some checks failed
CI / changes (what this run must test) (pull_request) Successful in 23s
CI (Windows) / changes (what this run must test) (pull_request) Successful in 23s
Package CI / changes (which packages this run must test) (pull_request) Successful in 22s
Package CI / package (svelte) (pull_request) Successful in 19s
Package CI / package (php) (pull_request) Successful in 20s
Package CI / package (rust) (pull_request) Successful in 27s
Package CI / package (python) (pull_request) Successful in 29s
CI / cargo fmt (pull_request) Successful in 1m2s
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 (csharp) (pull_request) Successful in 38s
Package CI / package (typescript) (pull_request) Successful in 37s
Package CI / package (javascript) (pull_request) Successful in 46s
Package CI / package (timeline) (pull_request) Successful in 46s
Package CI / package (xaml) (pull_request) Successful in 54s
CI / CI lane wall-clock headroom (pull_request) Successful in 54s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 1m41s
CI / cargo doc (intra-doc links) (pull_request) Successful in 5m42s
CI / cargo deny (pull_request) Successful in 6m34s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 7m26s
CI / cargo check (MSRV 1.98) (pull_request) Successful in 7m48s
CI / cargo clippy (pull_request) Successful in 7m59s
CI / cargo check (windows-gnu) (pull_request) Successful in 8m28s
Package CI / package (ruby) (pull_request) Successful in 24m41s
CI / OSS corpus (tier 1) (pull_request) Successful in 34m55s
CI / cargo test (pull_request) Failing after 54m20s
CI / cargo test (daemon transport) (pull_request) Has been skipped
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been skipped
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Failing after 1h22m53s
83e6db378e
`no_unkeyed_process_global_test_seam_exists` reds on c1d2558f's
`CONCURRENT_ROUND_BEFORE_WINDOW_WRITE` until it is named with its key:
it is keyed per project root and one-shot.

`an_unreachable_url_is_named_as_unreachable` bound an ephemeral port,
dropped it, and fetched from it. Native Windows CI run 1009 gave that
freed number to a parallel test's `Server`, which served `/p.cip`, so
the install failed on the signature instead of on the connect. Port 1
is privileged: no test in the binary can bind it.

MUTATION (RUN): `5..=7` -> `5..=6` in `plugin_fetch::classify`: the
test goes red with "curl exited 7"; restored by snapshot, md5 verified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Native Windows CI run 1012 failed
`watcher::a_steady_stream_of_edits_cannot_starve_resolution` at its
`watcher.stop().expect("clean stop")` with `UNIQUE constraint failed:
files.path`.

Root cause (pre-existing since the lookups were written; exposed by
#327's stream test, the first to stop a watcher mid-stream): three
lookups in `Writer::commit_batch` whose answers decide a write read
ANY error as "no row" (`.ok()`). `Watcher::stop` pokes
`sqlite3_interrupt` every 100 ms until the writer exits, and an
interrupt aborts the ONE statement it lands on while the batch's
transaction stays open and the next statement runs normally.
- `write_upsert`: an interrupted lookup answered "new file", the DELETE
  of the old row was skipped, and the INSERT died on the UNIQUE key - a
  ConstraintViolation, not an interrupt, so b13303f3's cancelled-
  interrupt arm could not absorb it and the stop returned a writer error.
- `write_delete`: answered "nothing to delete"; the batch COMMITTED
  without the delete (a silent ghost row).
- `write_stat_touch`: skipped the size guard and committed the stamp it
  exists to refuse.
`build::dispatch_round_observed` had the same shape twice: an
interrupted file-id lookup settled the queue row `done` with no
contribution, which the gate refuses the generation for.

Fix: `.optional()?` at all five sites - only QueryReturnedNoRows means
absent.

Tests (mutations run):
- writer::an_interrupt_on_any_statement_aborts_the_whole_batch sweeps
  EVERY check point of one mixed batch (2249 aborted points): an
  aborted batch must fail WITH the interrupt and leave the file as it
  was; a completed one must equal a twin. Each lookup back to `.ok()`
  -> RED: upsert reproduces run 1012's error verbatim (UNIQUE
  files.path, extended code 2067); delete and stat touch commit a batch
  missing part of itself.
- build::an_interrupt_in_a_window_write_never_settles_a_file_without_its_contribution,
  same sweep over one dispatch round: accepted arm's lookup back to
  `.ok()` -> RED, ("done", 0). The unclaimed arm's identical lookup has
  the same fix and no fixture here; said in the test doc.

Measured, not changed: after a cancelled, interrupted flush the
connection can stay wedged in its transaction (an FTS5 statement left
active keeps SQLite from clearing the flag); 159 of 159 such
connections answered every retried commit `interrupted`, the class the
cancelled writer loop already gives up, so b13303f3's retry arm is safe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
live_activation_e2e: a failure prints the daemon's own log (#333 CI)
Some checks failed
Package CI / changes (which packages this run must test) (pull_request) Successful in 23s
CI (Windows) / changes (what this run must test) (pull_request) Successful in 30s
CI / changes (what this run must test) (pull_request) Successful in 39s
Package CI / package (php) (pull_request) Successful in 19s
Package CI / package (typescript) (pull_request) Successful in 20s
CI / cargo fmt (pull_request) Successful in 54s
Package CI / package (xaml) (pull_request) Successful in 19s
Package CI / package (csharp) (pull_request) Successful in 25s
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 (timeline) (pull_request) Successful in 28s
Package CI / package (svelte) (pull_request) Successful in 37s
Package CI / package (python) (pull_request) Successful in 37s
Package CI / package (rust) (pull_request) Successful in 45s
Package CI / package (javascript) (pull_request) Successful in 55s
CI / CI lane wall-clock headroom (pull_request) Successful in 1m19s
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Failing after 1m48s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 1m31s
CI / cargo doc (intra-doc links) (pull_request) Successful in 6m10s
CI / cargo deny (pull_request) Successful in 7m0s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 7m34s
CI / cargo check (MSRV 1.98) (pull_request) Successful in 7m59s
CI / cargo clippy (pull_request) Successful in 8m0s
CI / cargo check (windows-gnu) (pull_request) Successful in 8m15s
Package CI / package (ruby) (pull_request) Successful in 23m30s
CI / OSS corpus (tier 1) (pull_request) Successful in 33m26s
CI / cargo test (pull_request) Successful in 50m58s
CI / cargo test (daemon transport) (pull_request) Successful in 11m49s
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been skipped
126e9e7b0c
Native Linux CI run 1013 timed out
`one_daemon_learns_that_an_approval_was_withdrawn_and_restored` at
`wait_until(the re-approved package's rows come back)` and left nothing
to diagnose it with: the daemon's stderr is discarded, its log lives in
the test's tempdir, which the panic deletes, and it logged at WARN.

What is known: the binary took 122.6 s against 3.9-4.0 s on the PR's
runs 1007 and 1010, while the job's other 407 binaries ran within ~5%
of run 1010, so this test stalled for about a minute BEFORE leg 3 and
then for more than leg 3's 60 s. It did not reproduce in 200 local runs
at the CI commit (83e6db3): 96 single-test runs under 8-way parallelism
with CPU burners, 80 whole-binary runs with CPU and synchronous-I/O
load, 24 pinned to two contended CPUs. A probe build measured that #327's
preemption is not reached before leg 4 in this test: the live writer
commits its first batch, and first arms preemption, only after the
second re-arm; legs 1-3 are the re-arm's build and promotion, where no
probe is armed and `should_abandon()` is exactly `is_cancelled()`.

So the next occurrence must carry its own evidence: on a panic the
test prints the last 200 lines of the daemon log, and its daemon logs
the re-arm timeline at INFO (the per-call RPC line held at WARN so the
test's 50 ms polls do not fill the tail). `Daemon::spawn_with_env` is
unchanged for every other test; it delegates to the new
`spawn_with_env_and_log` at WARN.

Verified by forcing leg 1's (2, 3) assertion to (2, 4): the failure
printed the activation, promotion and watcher lines; restored by
snapshot, md5 verified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Release 0.34.0: version_bump.sh
All checks were successful
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 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 (typescript) (push) Successful in 18s
Package CI / package (xaml) (push) Successful in 19s
Package CI / package (timeline) (push) Successful in 55s
Package CI / package (ruby) (push) Successful in 16m59s
Release Build / Generate Version (push) Successful in 21s
Release Build / Required CI green (push) Successful in 41s
Release Build / Build linux-aarch64 (push) Successful in 12m46s
Release Build / Build linux-x86_64 (push) Successful in 15m15s
Release Build / Build linux-x86_64-musl (push) Successful in 15m22s
Release Build / Pack the first-party packages-2 (push) Successful in 54s
Release Build / Pack the first-party packages-6 (push) Successful in 53s
Release Build / Pack the first-party packages-1 (push) Successful in 1m4s
Release Build / Pack the first-party packages-8 (push) Successful in 1m4s
Release Build / Pack the first-party packages (push) Successful in 1m12s
Release Build / Pack the first-party packages-9 (push) Successful in 1m8s
Release Build / Pack the first-party packages-4 (push) Successful in 1m21s
Release Build / Pack the first-party packages-3 (push) Successful in 1m25s
Release Build / Pack the first-party packages-7 (push) Successful in 1m21s
Release Build / Pack the first-party packages-5 (push) Successful in 1m29s
Release Build / Build windows-x86_64 (push) Successful in 19m4s
Release Build / Assemble the release archives (push) Successful in 3m18s
Release Build / Windows archive smoke (msvc) (push) Successful in 28s
Release Build / Create Forgejo Release (push) Successful in 9m40s
Release Build / Seed the package channel (push) Successful in 2m33s
014ed55534
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126PDDLB4wNHxKXvWM1VNmu
Author
Member

Fast-forwarded into master at 014ed555 and released as v0.34.0 (release run 1028): https://git.h-dv.de/h-dv/code-index/releases/tag/v0.34.0

Forgejo does not mark a fast-forward as merged, so I'm closing this by hand.

Fast-forwarded into master at 014ed555 and released as v0.34.0 (release run 1028): https://git.h-dv.de/h-dv/code-index/releases/tag/v0.34.0 Forgejo does not mark a fast-forward as merged, so I'm closing this by hand.
buildagent closed this pull request 2026-10-08 15:29:11 +02:00
All checks were successful
CI (Windows) / changes (what this run must test) (pull_request) Successful in 24s
Package CI / changes (which packages this run must test) (pull_request) Successful in 29s
CI / changes (what this run must test) (pull_request) Successful in 39s
CI / cargo fmt (pull_request) Successful in 51s
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 (csharp) (pull_request) Successful in 18s
Package CI / package (rust) (pull_request) Successful in 24s
Package CI / package (xaml) (pull_request) Successful in 20s
Package CI / package (timeline) (pull_request) Successful in 31s
Package CI / package (php) (pull_request) Successful in 27s
Package CI / package (typescript) (pull_request) Successful in 29s
Package CI / package (javascript) (pull_request) Successful in 36s
Package CI / package (svelte) (pull_request) Successful in 40s
Package CI / package (python) (pull_request) Successful in 50s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 1m19s
CI / CI lane wall-clock headroom (pull_request) Successful in 1m32s
CI / cargo doc (intra-doc links) (pull_request) Successful in 5m38s
CI / cargo deny (pull_request) Successful in 7m48s
CI / cargo check (MSRV 1.98) (pull_request) Successful in 8m3s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 7m59s
CI / cargo clippy (pull_request) Successful in 8m6s
CI / cargo check (windows-gnu) (pull_request) Successful in 8m24s
Package CI / package (ruby) (pull_request) Successful in 23m41s
CI / OSS corpus (tier 1) (pull_request) Successful in 33m51s
CI / cargo test (pull_request) Successful in 51m30s
CI / cargo test (daemon transport) (pull_request) Successful in 12m10s
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been skipped
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Successful in 1h25m18s
Package CI / changes (which packages this run must test) (push) Successful in 21s
CI (Windows) / changes (what this run must test) (push) Successful in 26s
CI (Windows) / fmt + clippy + build + test (windows) (push) Has been skipped
Package CI / package (csharp) (push) Successful in 16s
CI / changes (what this run must test) (push) Successful in 46s
Package CI / package (javascript) (push) Successful in 25s
Package CI / package (rust) (push) Successful in 28s
Package CI / package (svelte) (push) Successful in 19s
Package CI / package (python) (push) Successful in 28s
Package CI / package (php) (push) Successful in 33s
CI / cargo fmt (push) Successful in 1m1s
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 (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 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 (typescript) (push) Successful in 18s
Package CI / package (xaml) (push) Successful in 19s
Package CI / package (timeline) (push) Successful in 55s
Package CI / package (ruby) (push) Successful in 16m59s
Release Build / Generate Version (push) Successful in 21s
Release Build / Required CI green (push) Successful in 41s
Release Build / Build linux-aarch64 (push) Successful in 12m46s
Release Build / Build linux-x86_64 (push) Successful in 15m15s
Release Build / Build linux-x86_64-musl (push) Successful in 15m22s
Release Build / Pack the first-party packages-2 (push) Successful in 54s
Release Build / Pack the first-party packages-6 (push) Successful in 53s
Release Build / Pack the first-party packages-1 (push) Successful in 1m4s
Release Build / Pack the first-party packages-8 (push) Successful in 1m4s
Release Build / Pack the first-party packages (push) Successful in 1m12s
Release Build / Pack the first-party packages-9 (push) Successful in 1m8s
Release Build / Pack the first-party packages-4 (push) Successful in 1m21s
Release Build / Pack the first-party packages-3 (push) Successful in 1m25s
Release Build / Pack the first-party packages-7 (push) Successful in 1m21s
Release Build / Pack the first-party packages-5 (push) Successful in 1m29s
Release Build / Build windows-x86_64 (push) Successful in 19m4s
Release Build / Assemble the release archives (push) Successful in 3m18s
Release Build / Windows archive smoke (msvc) (push) Successful in 28s
Release Build / Create Forgejo Release (push) Successful in 9m40s
Release Build / Seed the package channel (push) Successful in 2m33s

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!333
No description provided.