Conflict in internal/cbm/result_compact.c: main (#2543) added the variants copy and this branch the decl_namespace copy at the same place in cr_walk_def; both kept.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Main's graph_buffer.c ("Definition variants") records a definition's
variant spans as [{"file_path","start_line","end_line"}], and the
test-impact engine reads that schema to find every TEST(...) branch of one
test. This branch's extractor wrote [{"start","end"}]. On the merge with
main, graph_buffer's same-QN merge found a non-empty variants list it could
not read and dropped every span, the definition's own included. The engine
then no longer found the second #if branch of TEST(alpha_uses_lib), so
test_impact_engine_variant_tests_are_one_test reported suite alpha
UNMAPPED, in CI on macOS and Windows and locally.
The extractor now writes the shared schema, with the file path
JSON-escaped. The C-preprocessor-only gate and the one-carrier rule are
unchanged, and the variants assertions use the shared format.
test_impact_engine, extraction, pipeline, graph_buffer and
conditional_variants: 857 passed.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
On an idle WAL database (no connection open, -shm reset) the first read of a
new connection runs WAL recovery: walIndexRecover rebuilds the shared
wal-index header under SQLite's write lock. A second connection of the same
process opening at that moment reads that header lock-free at the start of
walTryBeginRead, before it takes its read lock. Across processes SQLite's
file locks order the two; between the daemon's request threads nothing did.
TSan reported exactly that pair three times in CI (2026-10-06 on #2458's
tsan-arm leg, 2026-10-07 twice on #2348's macOS leg), from concurrent
index_repository requests reading the project record through
cbm_store_open_path_query.
cbm_store_open_path_query now opens and probes the database (the plain
read-only open, its first read, and the immutable fallback) inside
SQLITE_MUTEX_STATIC_APP1, the process-wide mutex SQLite reserves for the
application. The probe is one sqlite_master read, so the section is short;
the queries that follow run outside it, as before.
Regression test store_query_first_access_is_one_process_section: a test
seam holds one opener inside the section, and sqlite3_mutex_try on the
section's mutex must then report SQLITE_BUSY. It fails without the lock
(try returns SQLITE_OK) and passes with it. SQLite's Windows build reports
BUSY from sqlite3_mutex_try unconditionally, so the failing case is shown on
POSIX; the locking code is the same on every platform.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Regression test for the merge with #2458: with its extract_class_def case restored, typedef struct { int count; } Tally; yields two Class defs named Tally (count_defs_named == 2, RED at test_extraction.c:1129); with the case removed it is one Class, one count field, one Shade enum, and no variants list (extraction 432 passed).
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Conflict in tests/test_parse_coverage.c: this branch's #2078 tests and main's #1967 line-count test (#2336) were both appended before the suite; both kept, every TEST still registered.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Conflict in internal/cbm/extract_calls.c with main's #1146 slashless Laravel routes (#2471): both helper sets kept (this branch's route_prefix_compose/route_path_with_prefix, main's php_plain_string_value/php_first_arg_value/php_group_array_prefix). At the call site main's slashless-URI step runs first, then this branch's shared route_path_with_group_prefix replaces main's inline #952 composition (identical composition and guard), then main's string-action handler rule.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Conflict in tests/test_edge_types_probe.c: both sides added a self-contained helper + tests before the Rails test (this branch: et_handles_exact_routes and the class-handler tests; main/#2471: et_route_set_exact and the slashless-route tests) and their RUN_TEST lines; both blocks kept whole, this branch's first.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Conflicts: internal/cbm/extract_defs.c includes (union of both sides); src/pipeline/registry.c keeps main's lang-aware index_under_name call, and the fence comment combines both facts (Rust cfg twins are variants of one QN; a C macro's #macro QN never reaches the registry).
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Conflict in internal/cbm/cbm.h resolved by keeping both added CBMDefinition fields: decl_namespace (this branch) and the test-definition role/spans (main).
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
The Git facts fixture ran every Git command with a 10 s quiet timeout. The
diff-driver controls run `git diff --ext-diff` / `--textconv` with a fresh
copy of the test runner as the driver; on a loaded host that copy takes over
10 s to start and finish, Git prints nothing meanwhile, and the timeout killed
it (outcome HANG). test-windows (x86_64) failed
test_git_ancestor_changes_history_and_external_driver_guards_apply that way
(controls[0]), and locally 12 concurrent runs of that test failed 8 times,
every failure HANG at ~10,020 ms. Without the quiet timeout the same run
failed 0 of 12.
The fixture now waits for Git to finish; the suite's own ceiling stays the
backstop. No fixture caller expects a hang.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
macOS answers ESRCH to setpgid and getpgid for our own unreaped child from
the moment it starts to exit, before waitid can report it. a5c7ae97 accepted
a child that had already exited, probed with waitid(WNOHANG|WNOWAIT); in the
window before the child is reapable that probe said "not exited", and the
spawn was reported as SPAWN_FAILED errno 3. macos-15-intel CI kept hitting it
in a different Git-backed fixture on each run; with the new diagnostics it
named itself: `git config --local core.protectNTFS false`, outcome=5 errno=3.
A child of ours that setpgid/getpgid cannot find is not running: it has
exited or is exiting. The parent now waits until it is reapable (WNOWAIT
leaves it for the supervision, which reaps it with its real exit status);
the wait ends with the child's exit. EACCES/EPERM keep the group check.
A test seam makes the parent observe the exiting state (ESRCH, not yet
reapable): subprocess_run_child_exiting_at_group_check is SPAWN_FAILED
without this change and exit status 3 with it.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
macos-15-intel CI fails a different Git-backed fixture on each run of this
branch (spawn ESRCH on 6a29a19c, the native inventory fixture on bb1f6238,
two test_impact_git blob-batch checks on dd598ef4: shallow_before and the
budget variants' controls), and these left nothing to attribute: the facts
open, the inventory control and the blob read returned false silently. They
pass on Apple Silicon, Linux and Windows.
The open, inventory and blob-batch failures of these fixtures now print their
stage and the Git facts error (status, exit code, diagnostic). No verdict
changes.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Seeding drops a hunk whose lines are all comments. The check took any line
starting with `*` for a block-comment line and any line ending in a block
comment's close for a comment, so a dereference (`*out = f(a, b, true);`)
and code with a trailing comment counted as comments and their edits seeded
nothing.
On the oracle, PR #2158 changed two `*out_* = extract_route_path_from_args(...)`
lines in scan_route_annotations. Both hunks were dropped, the function was
never a seed, and its coverage id never reached the changed set. The six
artifact_reconcile_* tests that execute it, recorded as complete coverage rows
of the merge-base map, were missed (6 per job, two jobs: the only misses
among 191 jobs). With the check fixed, all six are selected for COVERAGE
again; until now the new graph walk had reached them as STATIC only by
chance.
A line now counts as a comment only when it is nothing but comment: blank,
`//`, a block opened with nothing after its close, `*` followed by
whitespace or the end, a lone close, or the closing line of a block opened
earlier. `*name`, `**`, `*(` and code before a trailing comment are code.
When unsure the check says code, which only seeds more.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
inventory_a_native_head_verified_controls failed once on macos-15-intel CI
(`if_dependency_control() && if_native_start(&n) && if_native_dependency(&n)`)
and left nothing to attribute: every failure path of the native fixture
returned false silently. It does not reproduce on Apple Silicon (40/40 green).
The three steps are now separate checks, and each silent path prints one
line: the Git spawn failure with errno, the facts and inventory status with
their diagnostic, a differing inventory or view row, and a short prefix read.
No verdict changes.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
The pinned tree requires its private parent to be owner-only: a protected
DACL, the current user as owner, one full-access grant to that user. It
accepted only the single-entry encoding (OI|CI). cbm_mkdir_p stamps a fresh
directory with exactly that grant, but written with generic rights, and
Windows stores it as an effective entry plus an inherit-only one
(icacls: user:(F) and user:(OI)(CI)(IO)(F)). The work directory production
creates was therefore refused ("pinning HEAD failed: protected owner-only
DACL policy mismatch"), and every Windows selection ran everything.
Both encodings are now accepted: one or two entries, each an allow entry for
the current user with full access and only inheritance flags, at least one
applying to the object itself. Any other principal, deny entry, partial
mask or flag is still refused.
tree_e_windows_split_owner_dacl_is_owner_only creates the parent with
cbm_mkdir_p and pins on it (red before this change), pins on the split form
written explicitly, and is refused once the inherit-only entry names Everyone.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
The subprocess capture probes, the runner-filter tests and the git-facts diff
probe start (or copy) the test runner itself, by argv[0]. On Windows that is
the caller's spelling: the native python scheduler (run-test-wave.py) finds
the runner by search and passes it without ".exe", and an exact spawn or copy
of that path fails. Started that way, 12 subprocess tests failed and the
runner-filter tests with them; started with ".exe", the same build passed.
tf_runner_image() returns the module path on Windows (cbm_module_path_utf8)
and argv[0] elsewhere; the three sites use it.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>