A direct discovery witness for both conditions of the existing full-driver gate. * This is not a runtime worker/route observer; the pipeline handle is opaque. */
| 227 | /* A direct discovery witness for both conditions of the existing full-driver gate. |
| 228 | * This is not a runtime worker/route observer; the pipeline handle is opaque. */ |
| 229 | static bool pc_parallel_inputs(pc_fixture_t *f, cbm_index_mode_t mode) { |
| 230 | cbm_file_info_t *files = NULL; int count = 0; |
| 231 | cbm_discover_opts_t opts = {.mode = mode}; |
| 232 | bool ok = cbm_default_worker_count(true) == 2 && getenv("CBM_INDEX_SINGLE_THREAD") == NULL && |
| 233 | cbm_discover(f->repo, &opts, &files, &count) == 0 && count > 50; |
| 234 | for (int n = 0; ok && n < 51; n++) { |
| 235 | char leaf[40]; (void)snprintf(leaf, sizeof(leaf), "filler_%02d.c", n); |
| 236 | int matches = 0; |
| 237 | for (int i = 0; i < count; i++) |
| 238 | if (pc_text(files[i].rel_path, leaf) && files[i].language == CBM_LANG_C) matches++; |
| 239 | ok = matches == 1; |
| 240 | } |
| 241 | cbm_discover_free(files, count); return ok; |
| 242 | } |
| 243 | static bool pc_snapshot_equal(pc_fixture_t *f, const pc_snapshot_t *before) { |
| 244 | char now[128]; |
| 245 | return pc_files_equal(f->db, f->saved) && pc_generation(f->db, now) && |
no test coverage detected