fix(signal): finish the two hand-offs — badge overflow and a comment that lied - #500
Merged
Merged
Conversation
…that lied Both files were claimed in flight by peer lanes when the surrounding work landed (#499), so they were documented and left alone rather than handed a mid-flight merge conflict. Both lanes have since released them. BADGE. `Subscription renewed` is 20 characters against a ~16 budget, and the email header has no media query to save it -- Gmail strips <style> in several contexts, so the three header cells must fit unaided on a 320px phone. It overflowed, wrapped the row and squeezed the wordmark. Now `Renewal`. The test that pinned the old string failed, which is exactly what it was for. Rather than just swap the literal, the assertion now checks the BUDGET: it extracts whatever badge was rendered and fails if it exceeds BADGE_MAX_CHARS. The next person who writes a more descriptive badge fails here instead of in a customer's inbox. Revert-checked -- restoring `Subscription renewed` makes it fail naming the string and its length. STALE COMMENT. license/activate.js said "there is no event-id dedup store" while dedup has existed since #494, twenty lines from the LICENSE_KV call that implements it. #497 moved the file, carrying the wrong comment with it. The fix is not deletion: the guard the comment sits above is still load-bearing, and saying so is the point. Dedup only suppresses a REDELIVERY of the same event id; this guard catches a genuinely NEW invoice.paid arriving after a refund or dispute. Two different defences against two different failures, and the comment now says which is which. 212 script tests pass.
runyourempire
enabled auto-merge (squash)
August 21, 2026 02:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finishing the two hand-offs from #499
Both files were claimed in flight by peer lanes when the surrounding work landed, so they were documented and deliberately left alone rather than handing an active peer a mid-flight merge conflict. Both lanes have since released them.
Badge overflow
Subscription renewedis 20 characters against a ~16 budget, and the email header has no media query to save it — Gmail strips<style>in several contexts, so the three header cells must fit unaided on a 320px phone. It overflowed, wrapped the row and squeezed the wordmark. NowRenewal.The test pinning the old string failed, which is exactly what it was for. Rather than just swap the literal, the assertion now checks the budget: it extracts whatever badge was rendered and fails if it exceeds
BADGE_MAX_CHARS. The next person who writes a more descriptive badge fails here instead of in a customer's inbox.Revert-checked — restoring
Subscription renewedmakes it fail, naming both the offending string and its length.A comment that lied
license/activate.jssaid "there is no event-id dedup store" while dedup has existed since #494 — twenty lines from theLICENSE_KVcall that implements it. #497 moved the file and carried the wrong comment along with it.The fix is deliberately not deletion. The guard that comment sits above is still load-bearing, and saying so is the whole point:
invoice.paidarriving after a refund or disputeTwo different defences against two different failures. The comment now says which is which, instead of denying that the other one exists.
Verification
212 script tests pass. The badge guard is revert-checked in both directions.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Fq96xWyPQjx2bCCzWtsnC9