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
No reviewers
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index!333
Loading…
Reference in a new issue
No description provided.
Delete branch "zammad-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
Const.methodcalls bind to the class'sdef self.method(rule 111). The bind is refused when the class also declaresmethod=.de.h-dv.rubyproduce identical binds, before and after the change..rb,.rake, …). The trait gates this by the file's stored language.baseline.jsonandstage-baseline.jsonwere re-recorded with operator approval; every other repo is byte-identical.ruby/activemoved, to 3085, which equals builtin parity.#327: edits no longer wait for a running resolve stage
lagging_pathsrow: freshness now counts onlyfilesrows 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.Watcher::stopno longer errors when its own interrupt lands mid-commit.#328: per-repo
[index] extra_text_extensions.code-index.toml. Double extensions work, for examplejst.eco.index_coveragereports the rule that admitted a file inadmitted_by.#329
review_diff: untracked files are reviewed as added. Withstaged:truethe payload says how many untracked files were left out.path_glob: a{a,b}group is refused by name asunsupported_glob_syntaxin all four tools that take it, and the error lists the expansions.Also
Verification, once on this tree
-D warnings --document-private-items: clean.precision_gate: 7/7, phantoms 0, POPULATION unchanged.Known residue (#314)
agent_task_bench, run with the corpus job'sCOSI_CORPUS_DIR, writes.code-index/into three corpus checkouts. It is noted on #314.🤖 Generated with Claude Code
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_0126PDDLB4wNHxKXvWM1VNmuEvery 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_0126PDDLB4wNHxKXvWM1VNmuOperator-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_0126PDDLB4wNHxKXvWM1VNmuNative 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_0126PDDLB4wNHxKXvWM1VNmuFast-forwarded into master at
014ed555and released as v0.34.0 (release run 1028): https://git.h-dv.de/h-dv/code-index/releases/tag/v0.34.0Forgejo does not mark a fast-forward as merged, so I'm closing this by hand.
Pull request closed