Repository navigation
π docs: README copy in plain speech, cards as crisp PNGs with embedded font - #14788
Conversation
|
[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 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
00f2b9e
βΉοΈ Sentinel notice β informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @clubanderson, head
Hive did not add the |
800775e
βΉοΈ Sentinel notice β informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @clubanderson, head
Hive did not add the |
800775e to
a9f0cfb
Compare
a9f0cfb
βΉοΈ Sentinel notice β informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @clubanderson, head
Hive did not add the |
Draw every README card twice from one op list: the SVG (vector source) and a 2x PNG rasterised in Go with embedded IBM Plex Mono (OFL), so the cards no longer depend on the reader's monospace fallback or on browser filter support. Flat amber, no gradient or glow; more whitespace; the three stat cards share one height and show one figure each, with the rest of the picture in a side column. The README <picture> now embeds the PNGs. Each PNG carries the SHA-256 of its SVG in a tEXt chunk and the drift test checks that hash plus dimensions instead of pixels. Add hivectl evidence benchmark --from-json and outcome-benchmark.sh --rerender to redraw the committed assets and README block from the committed outcomes JSON without the evidence tree. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Rewrite the README prose and every card headline, side note and footnote as short full sentences a person would say: one idea each, numbers inside the sentence, no semicolons, no label lines. The section sentences are generated from the report so they stay in step with the cards. Headings are Accuracy, Security, Cost, And the rest. TestReadmeVocabulary now rejects semicolons and "Numbers below:" style labels in the README prose and in the card text. Prose is 299 words of the 300 budget. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Keep the CNCF sandbox project wording and Code of Conduct link from #15100, drop the semicolons, and stay inside the 300 word prose budget. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
a9f0cfb to
f7fc76c
Compare
|
@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply. |
f7fc76c
βΉοΈ Sentinel notice β informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @clubanderson, head
Hive did not add the |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
There was a problem hiding this comment.
Style review (head 0971a6f) β three findings, worst first.
1. README prose and card wording are copy-pasted, not shared (medium). The body says the section sentences "stay in step with the cards", but nothing enforces it: the same strings are built twice by hand.
- false-alarm sentence:
cards.go:589-591andreadme.go:119-121 - per-merge figure (
$%.0f/%dΒ’):cards.go:607-609,cards.go:685-687,readme.go:131-133 - accuracy sentence:
cards.go:548-555vsreadme.go:100-112
TestReadmeBlockRoundTrip checks literals, not equality with the card, so editing one copy silently splits the README prose from the card headline. Suggested shape:
--- a/src/pkg/outcomebench/readme.go
+++ b/src/pkg/outcomebench/readme.go
+// perMergeFigure is the one cost figure every surface shows: "$2" or "40Β’".
+func perMergeFigure(per float64) string {
+ if per < 1 {
+ return fmt.Sprintf("%dΒ’", int(math.Round(per*100)))
+ }
+ return fmt.Sprintf("$%.0f", per)
+}
+
+// falseAlarmSentence is the benign-text sentence shared by the card and the prose.
+func falseAlarmSentence(rt *RedTeam) string {
+ if rt.FalseAlarms == 1 {
+ return fmt.Sprintf("One harmless text in %d got flagged by mistake.", rt.Benign)
+ }
+ return fmt.Sprintf("%d harmless texts in %d got flagged by mistake.", rt.FalseAlarms, rt.Benign)
+}then accuracyCard takes head, _ := r.accuracySentences(), and costCard/alsoTiles/costSentences/promptInjectionCard call the helpers.
2. Stranded comment in readme_budget_test.go:106-111 (low). The new readmeLabelLine was inserted between the "Dates in the README and cards are β¦" comment and readmeForbiddenDates, so that comment now sits on the wrong var.
// A prose line that is one or two words followed by a colon is a label, not
// a sentence ("Numbers below:"). Headings and link rows are exempt because
// they have no colon.
var readmeLabelLine = regexp.MustCompile(`^\s*[a-z][a-z' -]{0,24}:\s`)
// Dates in the README and cards are "(oct '26)" or "(augβoct '26)"; never
// ISO dates or bare four-digit years.
var readmeForbiddenDates = []*regexp.Regexp{
3. Two small drifts from the PNG-of-record change (low).
cards.go:403documents an'r' rectop kind, but no op emits it and neitherSVG()(cards.go:487-507) norPNG()(raster.go:97-110) handles it. Drop it from the comment.cards.go:665one-story footnote says "The right column links to the pull request", but the README now embeds the PNG (readme.go:157-158) andPNG()skips'a'ops, so for README readers no link exists. Latent today (the committed report has two stories, which take the other branch), but the sentence should go:foot := "Times from Hive's review records."
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. |
Fixes #14786.
Rebased onto v5 after #15100. The footer keeps the CNCF sandbox project wording and Code of Conduct link, in plain speech, inside the 300 word budget.
What changed
Copy. The README prose and every card headline, side note and footnote are rewritten as short full sentences in plain speech: one idea each, second person, numbers inside the sentence, no semicolons, no "Numbers below:" labels. The section sentences are generated from the report so they stay in step with the cards. Sections are Accuracy, Security, Cost, And the rest.
TestReadmeVocabularynow rejects semicolons and label lines in the README prose and in the card text. Prose is 299 words of the 300 budget, 7 H2.Cards. The outcome cards are crisp 2Γ PNGs rendered in Go with an embedded OFL mono face (IBM Plex Mono,
pkg/outcomebench/fonts/), instead of SVGs that GitHub rendered in whatever monospace the reader's machine had. Each card is drawn once from an op list into both an SVG (vector source) and a PNG (what the README embeds). The PNG carries the SHA-256 of its SVG twin in atEXtchunk and the drift test checks that hash plus dimensions, so the test is tool-independent and stable across amd64/arm64.Pipeline.
hivectl evidence benchmark --from-json <report>re-renders cards from the committed report without the evidence tree;scripts/outcome-benchmark.sh --rerender --readmewraps it. The<!-- outcomes:start/end -->block is regenerated and byte-idempotent.README prose (verbatim)
Before / after / reference (same width)
Dark:
Light (the reference has no light variant and is shown dark):
Full page, dark, 1280 wide:
Verification
go test ./pkg/outcomebench/ ./pkg/hivectl/commands/β pass (incl.TestReadmeProseBudget,TestReadmeVocabulary,TestCommittedReportMatchesReadme,TestCardPNGs,TestPNGTextRoundTrip)bash scripts/outcome-benchmark.sh --rerender --readmetwice β identical output