(projectRoot, options = {})
| 229 | .slice(0, 5) |
| 230 | .map((entry) => normalizePath(path.join('.planning', 'pr-readiness', entry))); |
| 231 | } catch { |
| 232 | prReadiness = []; |
| 233 | } |
| 234 | |
| 235 | const allEvidence = [...evidence, ...prReadiness]; |
| 236 | return { |
| 237 | id: 'report', |
| 238 | status: allEvidence.length > 0 ? 'pass' : 'partial', |
| 239 | detail: allEvidence.length > 0 |
| 240 | ? `${allEvidence.length} durable artifact(s) found` |
| 241 | : 'no durable proof artifacts found yet', |
| 242 | evidence: allEvidence, |
| 243 | }; |
| 244 | } |
| 245 | |
| 246 | function buildProof(projectRoot, options = {}) { |
| 247 | const root = path.resolve(projectRoot || process.cwd()); |
| 248 | const dashboard = collectDashboard({ projectRoot: root }); |
| 249 | const checks = [ |
| 250 | checkSetup(root, dashboard), |
| 251 | checkOrient(dashboard), |
| 252 | checkRoute(root, options.routeRequest || DEFAULT_ROUTE_REQUEST), |
| 253 | checkVerify(root, { runVerification: Boolean(options.runVerification) }), |
| 254 | checkReport(root), |
| 255 | ]; |
| 256 | |
| 257 | return { |
| 258 | generatedAt: options.now || new Date().toISOString(), |
no test coverage detected