There are no tests
The repository is wired for testing — Vitest, Testing Library, jsdom, a setup.ts with a
matchMedia polyfill, test / test:watch scripts — but contains exactly one test:
// src/test/example.test.ts
describe("example", () => {
it("should pass", () => { expect(true).toBe(true); });
});
Nothing else. Zero coverage of:
- the transition guards, caducidade check, and 5-working-day CT/Sindicato calc in
useWorkflow getFilteredTransitions(the conditional legal branching)- the deadline math in
date-utils(calendar vs working days) - the witness limits (art. 357.º/4 CT)
- any RLS policy behaviour
Why this is the crux of the whole autopsy: the dangerous parts of this system are its tacit rules — legal deadlines, mandatory-consultation logic, witness caps, transition gates — and not one of them is pinned by a test. They can be changed, or broken by a refactor, with no signal. Every note in Tacit Assumptions describes behaviour that a test should have encoded and didn't.
Rebuild implication
The legal rules are the highest-value test surface. In the rebuild, each rule in Domain & Legal Rules should ship with a test that encodes it and cites its statute, so the assumption stops being tacit. Treat "add a test that pins this rule" as the definition of done for porting each rule.