MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / pf_sidecar_refusal

Function pf_sidecar_refusal

tests/test_pipeline_frozen.c:747–761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

745}
746
747static bool pf_sidecar_refusal(pf_fixture_t *f, const char *suffix) {
748 char path[1100];
749 int n = snprintf(path, sizeof(path), "%s%s", f->db, suffix);
750 if (n <= 0 || (size_t)n >= sizeof(path) || !pf_write(path, "caller-owned-sidecar\n"))
751 return false;
752 cbm_pipeline_frozen_t *owner = NULL;
753 bool ready = pf_create(f, "{}", NULL, &owner) == CBM_PIPELINE_FROZEN_OK && owner;
754 cbm_pipeline_frozen_status_t status =
755 ready ? cbm_pipeline_frozen_build(owner) : CBM_PIPELINE_FROZEN_INVALID;
756 bool ok = ready && status == CBM_PIPELINE_FROZEN_DEST_EXISTS &&
757 !cbm_pipeline_frozen_candidate_path(owner) &&
758 pf_file_is(path, "caller-owned-sidecar\n") && pf_files_equal(f->control, f->saved);
759 cbm_pipeline_frozen_free(owner);
760 return cbm_unlink(path) == 0 && ok && pf_directory_only(f->destination, NULL);
761}
762static bool pf_path_refusal(pf_fixture_t *f, int variant) {
763 char bad[1024];
764 cbm_git_context_t git = pf_git(f);

Callers 1

Calls 9

pf_writeFunction · 0.85
pf_createFunction · 0.85
pf_file_isFunction · 0.85
pf_files_equalFunction · 0.85
cbm_pipeline_frozen_freeFunction · 0.85
cbm_unlinkFunction · 0.85
pf_directory_onlyFunction · 0.85

Tested by

no test coverage detected