# ControlTestResult

> Design and operating effectiveness, the sample, and every exception.

Source: https://lopifi.com/components/control-test-result
Part of: Lopifi — US GAAP books on autopilot, checked by a CPA (https://lopifi.com)

---

- **Family:** Tax & compliance — The obligations around the books: what is due to whom, who has been verified, and which controls held.
- **Status:** Implemented
- **Spec:** https://lopifi.com/docs/catalog/14-tax-compliance

## Install

```bash
npx shadcn@latest add @lopifi/theme
npx shadcn@latest add @lopifi/control-test-result
```

## Specification

One control, one test, one conclusion: control id and description, owner, frequency, test type (`design` or `operating-effectiveness`), sample size against population, every exception (the sample item, what was found, the amount, the remediation), and the conclusion.

**The grade uses the auditor's vocabulary** from [controls & audit](https://lopifi.com/md/docs/domain/08-controls-and-audit): effective, control deficiency, significant deficiency, material weakness. Never a generic "issue". The wording is data. `CONCLUSION_COPY` is the default, and a firm with its own methodology passes `conclusionCopy` rather than forking the component.

**A material weakness owns its surface**, with a 2px negative border and an alert, as a failing `IntegrityCheckPanel` does.

**The component asserts:**
- A sample larger than the population is an error. One of the two figures is wrong.
- "Effective" with exceptions and no rationale is flagged. That conclusion can be right, but only with a reason.
- A `null` population prints "population not stated", never "of 0". An exception with a `null` amount prints "Not quantified", never $0.00.

**Accessibility:** the conclusion is an icon plus a label, and its consequence is spelled out in a sentence.

## Rules this component obeys

Money is minor units, never floats. `null` is not `0` and neither is redacted. Negatives render in accounting parentheses with the parenthesis column reserved on both sides. Debit and credit are two columns. Per-currency decimal places. Polarity is explicit — up is not always good. Every figure states its period, entity, currency, basis and as-of.
