Render Headroom savings as a table instead of a dense sentence - #53
Conversation
…sentence The Step Summary and PR comment both packed request count, tokens saved, and two distinct compression percentages into one run-on sentence, making the two figures easy to conflate at a glance. Render both as a small "Metric | Value" table instead, so each number has its own labelled row.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Clean, minimal, well-tested change. action.yml is the only file touched, and both edits are purely presentational: the "Verify Headroom actually proxied this run" Step Summary block and the "Post Headroom savings comment" PR-comment body now render the proxied-count/tokens-saved/aggregate-savings/average-compression figures as a 4-row GFM table instead of a dense sentence. No logic, variable computation, or interpolated-value sourcing changed — PROXIED_COUNT, TOKENS_SAVED, TOTAL_PERCENT_SAVED, and COMPRESSION_PCT/COMPRESSION_PERCENT are still derived identically from Headroom's own local, loopback-bound /stats response, so nothing untrusted is newly rendered.
Checked:
- Both new tables have a blank line before the header row and a correctly formed
| --- | --- |delimiter row, so they'll render as tables rather than plain text in both the Step Summary and the PR comment. - The
$MARKERHTML comment used for the sticky-comment dedup logic is still appended after the table, unchanged. - No prior reviews or inline comments exist on this PR (first review) — nothing stale to reconcile.
- No related tracking issue found that this PR should close.
- Title and description are already specific and complete (exact change named, before/after example, concrete test plan) — no update needed.
No Should-fix or Blocker findings. Approving.
There was a problem hiding this comment.
Sound, minimal, purely presentational change. Only action.yml is touched, in the two spots (action.yml:1734-1743, action.yml:1798) that render Headroom's proxied-count/tokens-saved/aggregate/average-compression figures — the dense-sentence format becomes a "Metric | Value" GFM table in both the Step Summary and the sticky PR comment. No variable computation or value sourcing changed; PROXIED_COUNT, TOKENS_SAVED, TOTAL_PERCENT_SAVED, and COMPRESSION_PCT/COMPRESSION_PERCENT are still read from the same local, loopback-bound Headroom /stats response as before.
Checked:
- Both tables have a blank line before the header row and a valid
| --- | --- |delimiter, so they render as GFM tables rather than plain text. - This is independently confirmed correct, not just by reading the YAML: this PR's own "🗜️ Headroom context compression" comment on this thread was produced by this exact code path on this exact commit, and it renders the intended table cleanly.
- The
$MARKERHTML comment used for sticky-comment dedup is still appended unchanged after the table. - Title and description are specific and complete (names the exact before/after, includes a concrete test plan) — no update needed.
- No tracking issue found for this change; branch name and commit message don't reference one.
This PR's head commit (67c39ef) is identical to the commit already reviewed and approved by claude[bot] — this is a duplicate trigger on the same revision, not a new commit, so there's nothing stale to reconcile and no re-verification of a prior finding applies here.
One process note: gh pr list / gh issue list were both blocked by permission in this run, so I could not independently check for related open PRs or a tracking issue beyond what's visible in this PR's own metadata; nothing in the diff itself suggested either was needed.
No Should-fix or Blocker findings.
|
🗜️ Headroom context compression
|
|
🎉 This PR is included in version 1.9.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
The Step Summary and PR comment both crammed request count, tokens saved, and two distinct compression percentages into one run-on sentence, e.g. "proxied 20 request(s), saving 24542 tokens, 1.1% of all tokens sent this run (1.7% average per-request compression)". Easy to conflate the two percentages at a glance. Renders both as a small "Metric | Value" markdown table instead, one row per figure.
Test plan
run:script viayaml.safe_load(), ran it against a fake local/statsserver seeded with the exact figures from the last live dogfood run, confirmed the Step Summary table and outputs render correctlyprintfwith the same values to confirm the markdown table body is well-formedworkflow_callwrapper: no new findings at the two modified stepsnpm run lint/typecheck/format:checkall pass