Skip to content

Give unnamed perk events a perk.quantity - #22

Merged
GordonBeeming merged 1 commit into
mainfrom
gb/feature/perk-quantity
Oct 12, 2026
Merged

GordonBeeming merged 1 commit into
mainfrom
gb/feature/perk-quantity

Conversation

@GordonBeeming

@GordonBeeming GordonBeeming commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

I'm adding perk.quantity to unnamed reset-credit events so Bar UI doesn't undercount when several credits come or go at once. The Bar Telemetry Spec v1 clarifications in GordonBeeming/bar-ui#17 define the attribute, and Bar UI reads a missing value as 1.

CodexBar writes one of these events, with no perk.id, when the available count changes by more credits than it can name from the credit list. That event now carries the number of credits it covers. Events for a named credit are unchanged.

Testing

All 85 tests pass. New checks cover the quantity on unnamed appear and gone events and its absence on named ones. I also installed the build locally with make install.

When the reset-credit count moves by more credits than the list names,
the leftover goes into one id-less event. Bar Telemetry Spec v1 now has
perk.quantity so that event can say how many credits it stands for;
without it Bar UI would read it as one.
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d448af68-6568-44b8-bae1-853d29706609

📥 Commits

Reviewing files that changed from the base of the PR and between 2718e60 and 5ec1d3e.


📒 Files selected for processing (3)
  • Sources/CodexBarCore/BarTelemetry.swift
  • Tests/CodexBarCoreTests/BarTelemetryTests.swift
  • docs/telemetry.md

 ___________________________________________
< Transformers: Not just a movie franchise. >
 -------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@GordonBeeming
GordonBeeming marked this pull request as ready for review October 12, 2026 07:00
Copilot AI balanced review requested due to automatic review settings October 12, 2026 07:00
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T07:02:51.543607Z 5ec1d3e Draft marked ready
🔒 Security Review ✅ Completed 2026-10-12T07:02:43.402170Z 5ec1d3e Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@GordonBeeming
GordonBeeming merged commit 7fef03b into main Oct 12, 2026
3 of 4 checks passed

Copilot AI 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.

🟢 Approval recommended

The implementation is focused, consistent with the described telemetry contract, and adequately tested.

0 open findings

What changed in this PR

Adds quantities to unnamed reset-credit events so Bar UI counts batched credit changes correctly.

Changes:

  • Emits perk.quantity for unnamed available/gone events.
  • Tests batched and named-event behavior.
  • Documents the telemetry semantics.
File Description
Sources/​CodexBarCore/​BarTelemetry.swift Adds quantities to unnamed perk events.
Tests/​CodexBarCoreTests/​BarTelemetryTests.swift Verifies quantity inclusion and omission.
docs/​telemetry.md Documents quantity behavior.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants