Repository navigation
🐛 fix: rasterize README outcome cards with embedded fonts - #14794
thatguywob wants to merge 1 commit into
Conversation
Share drawing operations between SVG sources and 2x PNG assets. Use flat amber, bold headlines, one hero figure and fixed stat-card heights. Redraw saved report JSON without requiring its evidence tree, and check PNG source hashes and dimensions for drift. Hive-Run: hivecommons#14786 Hive-Plan: outcome-card-rasterization Hive-Spec: issue-14786#proposed-fix Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
6a54aa9
|
|
@thatguywob this PR is back in your court ( Failing checks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity. |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether vendoring IBM Plex Mono (SIL OFL 1.1, ~2 binary TTFs under src/pkg/outcomebench/fonts/) into the hive module and embedding it in the hivectl binary is acceptable for this repository's licensing/NOTICE policy.
Conclusion: one concrete CI defect that the author can fix, and one licensing question that needs an owner.
1. NOTICE matches the module graph is failing, and the cause is in this diff. src/go.mod adds golang.org/x/image v0.43.0 (used by src/pkg/outcomebench/drawing.go:23-26), but NOTICE is not touched by this PR, so the generated file no longer matches the module graph. The job log says exactly what to do:
NOTICE is out of date with src/go.mod / src/go.sum. Run 'src/scripts/generate-notice.sh' locally (requires a Go toolchain). The comparison is byte-for-byte and whitespace-significant; commit the regenerated NOTICE verbatim.
(x/image is BSD-3-Clause like the other golang.org/x/* entries already in NOTICE, so this is a regeneration, not a policy change.)
2. Routed, not judged — licensing. The PR vendors two font binaries (fonts/IBMPlexMono-Regular.ttf, fonts/IBMPlexMono-Bold.ttf) with OFL.txt and a README.md naming the source mirror, and embeds them via //go:embed (drawing.go:31-35). What I verified: they are loaded only from the embedded bytes (cardFonts, drawing.go:37-47), never from the network or host, and the SVG output records each font's SHA-256 (drawing.go:68) so a swapped font invalidates the rendered-asset hashes. OFL 1.1 permits bundling, but whether this repository wants third-party font binaries in-tree — and whether generate-notice.sh / NOTICE should list them, since the module-graph check cannot see embedded assets — is a licensing call for an owner, which is why I am not judging it. The PR also carries sentinel-alert.
Minor, not blocking: cardFonts panics on parse failure (drawing.go:40-43). Fine for embedded, hash-pinned assets; just noting it is a process-level panic rather than an error return.
I have not changed anything.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Closed as superseded by #14788 by @clubanderson from the Hive dashboard. Duplicate of #14786 work: the owner’s #14788 (same issue) already embeds IBM Plex Mono, rasterizes the README cards to PNG in Go, adds |
Summary
README outcome cards now embed 2× PNGs rasterized in Go with bundled regular and bold IBM Plex Mono (SIL OFL), avoiding machine-dependent font fallbacks. SVG sources and PNGs consume the same drawing operations. Cards use flat amber, bold headlines, more padding, one hero figure per stat card, and a fixed stat-card height. The secondary properties retain their order in a roomier two-column grid.
Add
hivectl evidence benchmark --from-jsonandoutcome-benchmark.sh --rerenderto redraw the saved report without its evidence tree or changing its counts/timestamps. README rewriting also updates the process card outside the outcomes block. PNG drift checks verify the embedded source SHA-256 (including font hashes) and dimensions instead of pixels.Related issues
Fixes #14786
Testing
src/scripts/outcome-benchmark.sh --rerender --month 2026-10 --readmesuccessfully and inspected generated card previews. Saved report JSON, report markdown, and detailed charts remain unchanged.gofmt -lon changed Go files andgit diff upstream/v5 --checkare clean.Contributor checklist
changelog.d/fixed-outcome-card-fonts.md.v5; title follows the repository emoji convention.— hive: backend=codex
🐝 Hive Agent:
contributor| SHA:6a54aa9fa