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

Function pf_path_refusal

tests/test_pipeline_frozen.c:762–789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);
765 cbm_pipeline_frozen_inputs_t in = pf_inputs(f, "{}", &git, NULL);
766 if (variant == 0) {
767 if (!pf_path(bad, sizeof(bad), f->source, "inside.db"))
768 return false;
769 in.candidate_db_path = bad;
770 } else if (variant == 1) {
771 if (!pf_path(bad, sizeof(bad), f->home, "not-created/candidate.db"))
772 return false;
773 in.candidate_db_path = bad;
774 } else {
775 if (!pf_path(bad, sizeof(bad), f->source, "ordinary.c"))
776 return false;
777 in.source_root = bad;
778 }
779 cbm_pipeline_frozen_t *owner = NULL;
780 cbm_pipeline_frozen_status_t created = cbm_pipeline_frozen_create(&in, &owner);
781 bool ready = created == CBM_PIPELINE_FROZEN_OK && owner;
782 cbm_pipeline_frozen_status_t status = ready ? cbm_pipeline_frozen_build(owner) : created;
783 bool input_preserved = variant == 2 ? pf_file_is(bad, pf_ordinary) : pf_absent(bad);
784 bool ok = ready && status != CBM_PIPELINE_FROZEN_OK && status != CBM_PIPELINE_FROZEN_BUSY &&
785 !cbm_pipeline_frozen_candidate_path(owner) && pf_absent(f->db) &&
786 pf_directory_only(f->destination, NULL) && input_preserved;
787 cbm_pipeline_frozen_free(owner);
788 return ok && pf_files_equal(f->control, f->saved);
789}
790typedef struct {
791 char path[1100];
792 bool called, created;

Callers 1

Calls 11

pf_gitFunction · 0.85
pf_inputsFunction · 0.85
pf_pathFunction · 0.85
pf_file_isFunction · 0.85
pf_absentFunction · 0.85
pf_directory_onlyFunction · 0.85
cbm_pipeline_frozen_freeFunction · 0.85
pf_files_equalFunction · 0.85

Tested by

no test coverage detected