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

Function readProblems

scripts/dashboard.js:828–844  ·  view source on GitHub ↗
(projectRoot, now = new Date())

Source from the content-addressed store, hash-verified

826 };
827
828 for (const problem of problems) {
829 if (problem.actionable) summary.actionable++;
830 if (problem.category === 'safety-block') summary.safetyBlocks++;
831 if (problem.category === 'stale' || problem.category === 'stale-approval') summary.stale++;
832 if (problem.category === 'hook-failure') summary.hookFailures++;
833 if (problem.category === 'approval-needed') summary.approvalNeeded++;
834 if (problem.category === 'resolved-approval') summary.resolvedApprovals++;
835 }
836
837 return summary;
838}
839
840function readProblems(projectRoot, now = new Date()) {
841 const telemetryDir = path.join(projectRoot, '.planning', 'telemetry');
842 const errors = tailJsonl(path.join(telemetryDir, 'hook-errors.jsonl'), 100);
843 const auditEntries = tailJsonl(path.join(telemetryDir, 'audit.jsonl'), 300);
844 const problems = errors
845 .map((entry) => classifyHookProblem(entry, now, { auditEntries }))
846 .sort((left, right) => {
847 const severityOrder = { high: 0, medium: 1, info: 2, low: 3 };

Callers 1

collectDashboardFunction · 0.85

Calls 3

tailJsonlFunction · 0.85
classifyHookProblemFunction · 0.85
summarizeProblemTaxonomyFunction · 0.85

Tested by

no test coverage detected