(number)
| 150 | } |
| 151 | |
| 152 | function findingBlock(number) { |
| 153 | const item = findings.get(number), finding = item.finding; |
| 154 | const host = el('article', 'finding'); |
| 155 | host.dataset.finding=String(number); |
| 156 | const heading = el('h3'); |
| 157 | heading.append(el('span', 'finding-number', 'F' + number), el('span', '', finding.summary), badge(title(finding.severity), finding.severity)); |
| 158 | if (item.comparison) heading.append(badge(title(item.comparison.status),item.comparison.status)); |
| 159 | if(acceptedFor(item.id).length)heading.append(badge('Accepted degradation','changed')); |
| 160 | host.append(heading); |
| 161 | const links = el('div', 'callouts'); |
| 162 | links.append(cardCallout(finding.requirement_or_rule.id, 'Audit: ' + (auditCards.get(finding.requirement_or_rule.id)?.title || finding.requirement_or_rule.id))); |
| 163 | host.append(links, el('p', 'region-meta', viewComparison ? `Confidence: ${title(finding.confidence)} · ${title(item.comparison?.status || 'unknown')} local observation between the selected views` : `Confidence: ${title(finding.confidence)} · Introduced by this change: ${finding.introduced_by_change.status}`)); |
| 164 | const acceptance=acceptanceBlock(item.id);if(acceptance)host.append(acceptance); |
| 165 | const evidence = el('div', 'evidence'); |
| 166 | if (item.comparison) evidence.append(el('p','',item.comparison.rationale)); |
| 167 | evidence.append(el('p', '', finding.introduced_by_change.rationale)); |
| 168 | for (const entry of finding.evidence) { |
| 169 | evidence.append(el('p', 'source-path', entry.reference), el('pre', '', entry.observation)); |
| 170 | } |
| 171 | evidence.append(el('h3', '', 'Proposed correction'), el('p', '', finding.proposed_correction)); |
| 172 | for (const criterion of finding.acceptance_criteria || []) evidence.append(el('p', '', `${criterion.criterion}: ${criterion.assessment} — ${criterion.rationale}`)); |
| 173 | if (!(finding.acceptance_criteria || []).length) evidence.append(el('p', 'muted', 'Engineering-rule concern; no unmet acceptance criterion was inferred.')); |
| 174 | host.append(detail('Evidence, attribution & correction', evidence)); |
| 175 | return host; |
| 176 | } |
| 177 | |
| 178 | function acceptanceBlock(reference) { |
| 179 | const entries=acceptedFor(reference);if(!entries.length)return null; |
no test coverage detected