Skip to content

Preserve merged Warp bonus lane - #3166

Merged
steipete merged 1 commit into
steipete:mainfrom
akshayprabhu200:codex/fix-merged-warp-bonus-icon
Aug 24, 2026
Merged

Preserve merged Warp bonus lane#3166
steipete merged 1 commit into
steipete:mainfrom
akshayprabhu200:codex/fix-merged-warp-bonus-icon

Conversation

@akshayprabhu200

@akshayprabhu200 akshayprabhu200 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve Warp's present-but-unused bonus lane when the menu-bar icon uses merged .combined rendering
  • keep exhausted/missing bonus windows on Warp's established missing-secondary presentation
  • remove the obsolete visual renderingStyle argument from quota resolution now that provider layout policy is passed separately
  • add resolver coverage for both states and a merged controller-level cache/pixel regression

Fixes #3165
Follow-up to #3155.

Root cause

The merged status-item path resolved Warp's provider windows but passed .combined as a second semantic switch. In show-used mode that bypassed Warp's sentinel conversion: a real unused bonus window stayed at zero and was later treated as absent, while an exhausted window stayed at 100 and was treated as present.

Provider presentation now travels independently from visual icon style, so presence/exhaustion semantics must follow the selected provider in both merged and unmerged rendering.

Compatibility

  • Present-but-unused Warp bonus windows map to a 0.1% subpixel sentinel: it keeps an empty lane, rounds to
    zero filled pixels, and remains distinct from exhausted zero in both controller and renderer cache keys.
  • Exhausted Warp bonus windows map to zero and keep the existing missing-secondary layout.
  • Other providers are unchanged because the conversion remains gated by treatsExhaustedSecondaryIconWindowAsMissing.
  • No settings, stored identifiers, API contracts, provider data, or screenshot assets change.

Privacy and proof

The regression uses fixed synthetic percentages only. It constructs the production merged controller path,
transitions exhausted to unused, and verifies both the cache signature and the resulting bitmap/lane. It does
not launch the app or access live accounts, Keychain, browser state, workspaces, usernames, emails, paths, or
the desktop. Its controller receives AccountInfo(email: nil, plan: nil) directly; no ambient account loader is
called.

The checked-in proof is generated by the production resolver and renderer from fixed synthetic values. It was
visually inspected before upload and contains no PII:

Synthetic merged Warp exhausted-to-unused runtime proof

Reproduce it with:

CODEXBAR_WARP_ICON_PROOF_DIR=.github/pr-proof swift test \
  --filter IconRendererScreenshotRenderTests/test_renderSyntheticMergedWarpTransition

The anonymized before/after proof for the original single-quota change remains in #3155; this PR is limited to its Warp compatibility follow-up.

Validation

  • focused resolver/icon run — 36 tests passed
  • merged production controller regression — passed
  • synthetic production proof generator — passed and wrote the inspected 720×300 PNG
  • make check — passed; SwiftFormat clean and 0 SwiftLint violations
  • make test — 928 selections in 78/78 groups passed; 0 failures, retries, or timeouts
  • git diff --check — passed

Signed commit: ba59dab171918738e54163fa5ec697eead5ec0f8

— Akshay / Codex

@clawsweeper

clawsweeper Bot commented Aug 24, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@akshayprabhu200

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

This is the current-main follow-up to the sole compatibility finding from merged #3155. It includes resolver-state coverage, a merged controller-level pixel regression, a clean repository gate, and a full 928-selection test run. — Akshay / Codex

@clawsweeper

clawsweeper Bot commented Aug 24, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a96c9d7664

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/CodexBar/IconRemainingResolver.swift
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 24, 2026
@clawsweeper

clawsweeper Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed August 23, 2026, 11:40 PM ET / August 24, 2026, 03:40 UTC.

ClawSweeper review

What this changes

This PR removes the merged-style exception from Warp quota resolution so an unused bonus window keeps an empty secondary icon lane while an exhausted window retains Warp’s missing-secondary presentation.

Regression provenance

Possible regression — probable (reviewed change; known regression link). No predecessor PR is attributed.

Merge readiness

Blocked until real behavior proof from a real setup is added - 3 items remain

The patch correctly addresses the merged-Warp semantic mismatch and resolves both prior findings, but the supplied image is generated by synthetic XCTest fixtures rather than a freshly built app run; external-PR proof policy still requires real after-fix behavior evidence before merge.

Priority: P2
Reviewed head: ba59dab171918738e54163fa5ec697eead5ec0f8

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The scoped implementation and regressions are strong, but synthetic test-derived visual proof does not satisfy the external real-behavior merge gate.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The attached 720×300 image directly shows the intended lane difference, but it is generated by a synthetic XCTest fixture rather than a freshly built CodexBar app; add redacted after-fix app evidence before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The attached 720×300 image directly shows the intended lane difference, but it is generated by a synthetic XCTest fixture rather than a freshly built CodexBar app; add redacted after-fix app evidence before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Current-main defect: Current main passes the visual combined style into quota resolution and uses that style to suppress Warp’s sentinel conversion, so the merged path still conflates unused and exhausted secondary windows.
Targeted implementation: The PR bases Warp’s sentinel decision solely on the selected provider presentation, making merged rendering follow the same unused-versus-exhausted semantics as direct Warp rendering.
Cache and controller coverage: The new controller regression transitions exhausted to unused, verifies distinct merged signatures (0.000 versus 0.100), a new bitmap, and the visible empty lower lane.
Findings None None.
Security None None.

Live Verification

Command: swift test --filter MergedWarpIconRenderingTests

Result: FAIL (failed) — execution before step 1 run: sh -lc pnpm install --ignore-scripts --frozen-lockfile failed: ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-11.23.0.tgz

sh -lc pnpm install --ignore-scripts --frozen-lockfile failed: ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-11.23.0.tgz

Assertions:

  • FAIL expect_output: MergedWarpIconRenderingTests

How this fits together

CodexBar converts provider usage snapshots into menu-bar icon meter values. Warp’s provider presentation policy feeds the merged status-item controller and renderer, whose signatures and cache keys decide whether the secondary lane is refreshed and drawn.

flowchart LR
A[Warp usage snapshot] --> B[Provider percentage resolver]
B --> C[Warp presentation policy]
C --> D[Merged status-item controller]
D --> E[Renderer cache and lane layout]
E --> F[Menu-bar icon]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The attached 720×300 image directly shows the intended lane difference, but it is generated by a synthetic XCTest fixture rather than a freshly built CodexBar app; add redacted after-fix app evidence before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - Before merge, the external-contributor proof gate remains open: the supplied image is produced by a synthetic XCTest fixture, not a freshly built CodexBar app demonstrating the after-fix menu-bar behavior.
  • Complete next step (P2) - The remaining blocker is contributor-supplied real app behavior proof, which an automated repair lane cannot create honestly.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Review surface 2 production files changed, 4 test files changed, 1 proof image added The implementation is narrowly scoped around resolver semantics, the merged controller path, and reproducible visual evidence.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #3165
Summary: This PR is the explicitly linked candidate fix for the deterministic merged-Warp issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the provider-owned sentinel and cache regression coverage, then add a redacted after-fix app-bundle screenshot or recording of merged Warp with Show used enabled before merging.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the provider-owned sentinel and cache regression coverage, then add a redacted after-fix app-bundle screenshot or recording of merged Warp with Show used enabled before merging.

Do we have a high-confidence way to reproduce the issue?

Yes—source provides a deterministic path: select Warp in merged mode with Show used enabled, then transition its secondary window from 100% used to 0% used; current main’s combined-style guard suppresses the required sentinel.

Is this the best way to solve the issue?

Yes—the provider-owned sentinel is the narrowest solution because layout policy is already passed independently to the renderer, and the 0.1 value survives both relevant cache normalizations while still rendering zero filled pixels.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 1835ccd218b6.

Labels

Label changes:

  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove merge-risk: 🚨 security-boundary: Current PR review selected no merge-risk labels.

Label justifications:

  • P2: This corrects a bounded menu-bar compatibility defect for merged Warp usage icons.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The attached 720×300 image directly shows the intended lane difference, but it is generated by a synthetic XCTest fixture rather than a freshly built CodexBar app; add redacted after-fix app evidence before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

Likely related people:

  • steipete: Introduced the provider-descriptor presentation refactor that owns the Warp policy consumed by the resolver and renderer. (role: provider-presentation architecture contributor; confidence: high; commits: fb66e63e8719; files: Sources/CodexBar/IconRenderer.swift, Sources/CodexBar/IconRemainingResolver.swift)
  • akshayprabhu200: Authored the merged icon-layout change whose follow-up compatibility path this PR repairs. (role: recent merged icon-layout contributor; confidence: high; commits: daa16fb844d1; files: Sources/CodexBar/IconRenderer.swift, Sources/CodexBar/StatusItemController+Animation.swift)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add a redacted screenshot or short recording from a freshly built CodexBar app showing the merged Warp icon transition with Show used enabled.
  • Update the PR body with that evidence; if a fresh review does not start, ask a maintainer to comment @clawsweeper re-review.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-08-24T02:54:06.690Z sha a96c9d7 :: needs real behavior proof before merge. :: [P2] Preserve empty-lane state in cache keys
  • reviewed 2026-08-24T03:08:51.324Z sha 991f76c :: needs real behavior proof before merge. :: [P2] Keep the regression fixture free of ambient account data

@akshayprabhu200
akshayprabhu200 force-pushed the codex/fix-merged-warp-bonus-icon branch from a96c9d7 to 991f76c Compare August 24, 2026 03:03
@akshayprabhu200

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review the corrected signed head 991f76c10, please. The present-empty sentinel now survives both the controller signature and renderer tenth-percent cache while still producing zero filled pixels. The production regression transitions exhausted → unused and verifies the signature, distinct bitmap, and bottom lane. Corrected-head validation: 37 focused tests, make check, and 928 selections across 78/78 groups all pass. — Akshay / Codex

@clawsweeper

clawsweeper Bot commented Aug 24, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. label Aug 24, 2026
@akshayprabhu200
akshayprabhu200 force-pushed the codex/fix-merged-warp-bonus-icon branch from 991f76c to ba59dab Compare August 24, 2026 03:37
@akshayprabhu200

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review final signed head ba59dab17, please. The security-boundary finding is removed: the merged controller fixture now uses AccountInfo(email: nil, plan: nil) and never calls the ambient account loader. The PR also embeds an inspected 720×300 exhausted→unused Warp proof generated from the production resolver/renderer with fixed synthetic values and no PII, plus its reproduction command. Final-head validation: focused controller/proof tests, make check, and all 928 selections across 78/78 groups pass with 0 failures/retries/timeouts. — Akshay / Codex

@clawsweeper

clawsweeper Bot commented Aug 24, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot removed merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. labels Aug 24, 2026
@steipete
steipete merged commit d216392 into steipete:main Aug 24, 2026
9 checks passed
steipete added a commit that referenced this pull request Aug 24, 2026
@akshayprabhu200
akshayprabhu200 deleted the codex/fix-merged-warp-bonus-icon branch August 24, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Merged Warp icon conflates unused and exhausted bonus windows

2 participants