Skip to content

🐛 fix: rasterize README outcome cards with embedded fonts - #14794

Closed
thatguywob wants to merge 1 commit into
hivecommons:v5from
thatguywob:fix/outcome-cards-png-14786
Closed

thatguywob wants to merge 1 commit into
hivecommons:v5from
thatguywob:fix/outcome-cards-png-14786

Conversation

@thatguywob

Copy link
Copy Markdown
Contributor

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-json and outcome-benchmark.sh --rerender to 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

  • Tests not run locally, per AGENTS.md; CI runs validation.
  • Ran src/scripts/outcome-benchmark.sh --rerender --month 2026-10 --readme successfully and inspected generated card previews. Saved report JSON, report markdown, and detailed charts remain unchanged.
  • gofmt -l on changed Go files and git diff upstream/v5 --check are clean.
  • Added regression coverage for measured text bounds using the embedded faces, one hero figure/fixed stat heights, flat colors, PNG source hashes and dimensions, and saved-JSON rendering including invalid/conflicting inputs. Existing README vocabulary, prose-budget and content-order rules remain in place.

Contributor checklist

  • Added changelog.d/fixed-outcome-card-fonts.md.
  • Targets v5; title follows the repository emoji convention.
  • Signed commit with matching author/sign-off and issue-author credit.
  • Updated benchmark and CLI documentation; bundled font license and source attribution.
  • No secrets, credentials, or runtime state included.

— hive: backend=codex


🐝 Hive Agent: contributor | SHA: 6a54aa9fa

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>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 28, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kellyaa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor
6a54aa9

⚠️ Sentinel alert — maintainer review required

Hive flagged this PR (author @thatguywob, head 6a54aa9fa995) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 1 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • src/go.mod

Hive added the sentinel-alert label. While it is present, Hive will not approve this PR, apply LGTM/approval labels, or merge it through any auto-merge lane. Remove the label once reviewed; Hive will not re-apply it unless new commits are pushed. Tune paths and behaviors under sentinel in hive.yaml or the dashboard Security tab.

@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • NOTICE matches the module graph

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.

@github-actions

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#14788 📖 docs: README copy in plain speech, cards as crisp PNGs with embedded font CONFLICT README.md
src/docs/benchmarks/README.md
src/docs/benchmarks/assets/outcomes-2026-10-card-accuracy-dark.png
src/docs/benchmarks/assets/outcomes-2026-10-card-accuracy-dark.svg
src/docs/benchmarks/assets/outcomes-2026-10-card-accuracy-light.png
src/docs/benchmarks/assets/outcomes-2026-10-card-accuracy-light.svg
src/docs/benchmarks/assets/outcomes-2026-10-card-also-dark.png
src/docs/benchmarks/assets/outcomes-2026-10-card-also-dark.svg
src/docs/benchmarks/assets/outcomes-2026-10-card-also-light.png
src/docs/benchmarks/assets/outcomes-2026-10-card-also-light.svg
src/docs/benchmarks/assets/outcomes-2026-10-card-cost-dark.png
src/docs/benchmarks/assets/outcomes-2026-10-card-cost-dark.svg
src/docs/benchmarks/assets/outcomes-2026-10-card-cost-light.png
src/docs/benchmarks/assets/outcomes-2026-10-card-cost-light.svg
src/docs/benchmarks/assets/outcomes-2026-10-card-how-it-works-dark.png
src/docs/benchmarks/assets/outcomes-2026-10-card-how-it-works-dark.svg
src/docs/benchmarks/assets/outcomes-2026-10-card-how-it-works-light.png
src/docs/benchmarks/assets/outcomes-2026-10-card-how-it-works-light.svg
src/docs/benchmarks/assets/outcomes-2026-10-card-prompt-injection-dark.png
src/docs/benchmarks/assets/outcomes-2026-10-card-prompt-injection-dark.svg
src/docs/benchmarks/assets/outcomes-2026-10-card-prompt-injection-light.png
src/docs/benchmarks/assets/outcomes-2026-10-card-prompt-injection-light.svg
src/docs/benchmarks/assets/outcomes-2026-10-card-stories-dark.png
src/docs/benchmarks/assets/outcomes-2026-10-card-stories-dark.svg
src/docs/benchmarks/assets/outcomes-2026-10-card-stories-light.png
src/docs/benchmarks/assets/outcomes-2026-10-card-stories-light.svg
src/docs/hivectl.md
src/go.sum
src/pkg/hivectl/commands/evidence_benchmark.go
src/pkg/hivectl/commands/evidence_benchmark_test.go
src/pkg/outcomebench/cards.go
src/pkg/outcomebench/cards_test.go
src/pkg/outcomebench/drift_test.go
src/pkg/outcomebench/fonts/IBMPlexMono-Bold.ttf
src/pkg/outcomebench/fonts/IBMPlexMono-Regular.ttf
src/pkg/outcomebench/fonts/OFL.txt
src/pkg/outcomebench/outcomebench_test.go
src/pkg/outcomebench/readme.go
src/scripts/outcome-benchmark.sh

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 28, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

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 --from-json/--rerender, and additionally rewrites the card/README copy — the same 16 source files overlap. Keeping one branch for this; thanks @thatguywob, the flat-amber/one-hero-figure ideas are noted on #14788.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/clanker A contributor's own hive authored this PR under their login conflicts-with-open-pr Open PR has a merge conflict with another open PR dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. hive/superseded Closed by Hive: a different merged PR already landed this change sentinel-alert size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act

Projects

None yet

Development

Successfully merging this pull request may close these issues.

README: outcome cards render with fallback fonts and glow; rasterize to PNG

1 participant