[proof-card-redesign] Proof card visual redesign on a shared render vocabulary#319
Merged
Conversation
…+ primitive tests Six pure terminal-render primitives (headerBox, sectionRule, keyValueRows, statGrid, proportionBar, statusGlyph) plus lifted formatTokenCount, columnWidth, BOX, and a visibleWidth/truncateCell pair for ANSI-safe alignment. 23 unit tests. Co-authored-by: Ana <build@anatomia.dev>
… header adopts headerBox formatHumanReadable is reconstructed entirely on utils/render: rounded headerBox headline (verdict · feature) with surface · duration[ · cost] subtitle; inset sectionRules with roll-ups; a contract proportionBar + collapsed counted line with UNSATISFIED/DEVIATED (and the folded-in Deviations detail) rendered individually; Findings/Build Concerns via one shared severity-list helper with an actionable --json overflow; and a Provenance statGrid surfacing in/out/cache tokens with a TOTAL footer under a rule. formatHealthDisplay adopts headerBox with default (square) corners -> byte-identical. Duplicated BOX/getStatusIcon/ formatTokenCount/columnWidth/SEVERITY_ORDER-sort removed. Adds golden snapshots across five fixtures; updates the format assertions broken by the redesign. Co-authored-by: Ana <build@anatomia.dev>
…ns unchanged Co-authored-by: Ana <build@anatomia.dev>
Co-authored-by: Ana <build@anatomia.dev>
Co-authored-by: Ana <build@anatomia.dev>
…ass in CI The card renders its header timestamp in local time (correct UX for a CLI receipt). The golden snapshots were captured in the author's zone (MDT), so under CI's UTC the timestamp shifted (16:40 -> 22:40) and all 5 snapshots failed deterministically. Pin process.env.TZ=UTC for the golden suite (restored in afterAll) and regenerate the snapshots so they match on every runner while the product keeps rendering local time for real users. Fixes A029/A030/A031, AC10. Co-authored-by: Ana <build@anatomia.dev>
…d/Codex edges
(a) The Provenance TOTAL footer rendered `$${provTotalCost.toFixed(2)}`
unconditionally, so an all-unpriced run (every session on a model missing from
pricing.ts — a real future trigger when a new model id ships) advertised a paid
run as `$0.00`, the exact "free run" lie A026 guards against. The per-session
cost already rendered `n/a`; the footer now does too when no session is priced.
(b) Add two golden fixtures for AC7 alignment cases no fixture exercised:
- all-unpriced run: proves the n/a TOTAL above and `not.toContain('$0.00')`
on the genuine all-unpriced edge (the existing unpriced fixture mixes
priced + unpriced, so it passed that check on a gap).
- counts-unavailable + Codex (cache_create=0): the no-derived session renders
as a loud free line out of the grid; the Codex cache column sums create+read
and stays aligned.
Closes the A026 risk and the AC7 coverage gap from the verify report.
Co-authored-by: Ana <build@anatomia.dev>
Co-authored-by: Ana <build@anatomia.dev>
Co-authored-by: Ana <build@anatomia.dev>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Anatomia Proof — Proof card visual redesign on a shared render vocabulary
✅ PASS · 31/31 assertions satisfied · 13/16 ACs met · 0 deviations
Contract Compliance
Generated by Anatomia · Ship with proof.
Summary
utils/render.ts, a shared, pure terminal-render vocabulary (six primitives + lifted helpers) that the proof, scan, and health cards can converge on instead of each re-deriving box/section/grid/glyph logic.ana proof <slug>human card on those primitives: rounded header with verdict and cost, inset section rules with roll-ups, a contract proportion bar, collapsed passing assertions with failures/deviations shown in full, and a Provenance grid with input/output/cache tokens per session and a separated TOTAL.n/a, and an entirely-unpriced run now shows ann/aTOTAL rather than a misleading$0.00— a real future trigger is a new model id missing frompricing.ts.ana proof healthadopts the shared header primitive with square corners, leaving its output byte-identical; the--jsonrender path is untouched.Pipeline Artifacts
.ana/plans/active/proof-card-redesign/scope.md.ana/plans/active/proof-card-redesign/spec.md.ana/plans/active/proof-card-redesign/build_report.md.ana/plans/active/proof-card-redesign/verify_report.mdVerification
Co-authored-by: Ana build@anatomia.dev