MCPcopy Create free account
hub / github.com/SethGammon/Citadel / checkVerify

Function checkVerify

scripts/operating-proof.js:173–199  ·  view source on GitHub ↗
(projectRoot, options = {})

Source from the content-addressed store, hash-verified

171}
172
173function checkVerify(projectRoot, options = {}) {
174 const scripts = readPackageScripts(projectRoot);
175 const profile = selectVerificationProfile(projectRoot);
176 const command = scripts.test ? 'npm run test' : profile.primaryCommand;
177 const hasCommand = Boolean(command);
178 const result = options.runVerification && hasCommand ? runCommand(projectRoot, command) : null;
179
180 let status = hasCommand ? 'pass' : 'partial';
181 let detail = hasCommand ? `selected ${command}` : 'no verification command was discovered';
182 if (result) {
183 status = result.status === 'pass' ? 'pass' : 'fail';
184 detail = `${command} exited ${result.exitCode}`;
185 }
186
187 return {
188 id: 'verify',
189 status,
190 detail,
191 evidence: [
192 `profile=${profile.id}`,
193 `primary=${profile.primaryCommand}`,
194 ...profile.commands.slice(0, 4),
195 ],
196 profile,
197 result,
198 };
199}
200
201function checkReport(projectRoot) {
202 const evidence = listExisting(projectRoot, [

Callers 1

buildProofFunction · 0.85

Calls 3

readPackageScriptsFunction · 0.85
runCommandFunction · 0.70

Tested by

no test coverage detected