Skip to content

fix(quota-plane): normalise fee_period vocabulary in reconcile.py (#13375) - #13397

Open
dezren39 wants to merge 1 commit into
mainfrom
xaltha/13375-reconcile-fee-period
Open

dezren39 wants to merge 1 commit into
mainfrom
xaltha/13375-reconcile-fee-period

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Closes #13375.

Summary

The daily reconciliation diff compared fee_period as a raw string, but the legs use different vocabularies for the same fact: the plan-store Effect schema only admits monthly/yearly/once, while the tracker says month/year. Since #1270 slice 2 seeded the store, every daily diff reported 9 fee_period findings that were pure vocabulary noise, burying any real drift. The store leg is now normalised to the tracker vocabulary in load_store (monthly→month, yearly→year); values outside the map (e.g. once) pass through untouched, so a genuinely new period still reports drift.

Evidence

  • Failing-first (python3, this seat, single-binary check while iterating): the agreeing-legs fixture case failed pre-fix with exactly the reported finding — {'plan': 'go-personal', 'field': 'fee_period', 'values': {'plan-store': 'monthly', 'tracker': 'month'}, 'winner': 'plan-store'} — and passes after the fix.
  • The fixture itself masked the bug: its hand-written store row used month, a value the real store schema rejects. It now carries monthly (the real store value), so the agreeing-legs case proves no drift, and a new case proves a genuine mismatch (monthly vs year) is still caught with the plan-store named as winner.
  • Remote verification (fleet-command.yml fallback — fleet queue dispatch is still blocked by TLS fleet: repo-queue dispatch fails with TLS UnknownIssuer behind the egress proxy (Rust TLS ignores SSL_CERT_FILE) #13185, invalid peer certificate): run https://github.com/developing-today/fleet/actions/runs/45203450530, conclusion success, cd pm-stack/provider-usage && python3 test_reconcile.py — all reconcile fixture tests pass.

Merge Danger

Low. One mapping table plus one fixture-value change, confined to the quota-plane reconciliation script. The only diffs that disappear are the vocabulary-noise fee_period rows; genuine period mismatches are covered by the new fixture case.


Show it working
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…3375)

The diff compared fee_period as a raw string, but the legs use
different vocabularies for the same fact: the plan-store Effect
schema only admits monthly/yearly/once, while the tracker says
month/year. Since #1270 slice 2 seeded the store, every daily diff
reported 9 fee_period findings that were pure vocabulary noise.

Normalise the store leg to the tracker vocabulary in load_store
(monthly->month, yearly->year); values outside the map (e.g. once)
pass through untouched, so a genuinely new period still reports
drift.

The fixture masked this: its hand-written store row used month, a
value the real store schema rejects. The fixture now carries monthly
(the real store value), so the agreeing-legs case proves no drift,
and a new case proves a genuine mismatch (monthly vs year) is still
caught with the plan-store named as winner.
Failing-first: the agreeing-legs case failed pre-fix with a
fee_period finding {plan-store: monthly, tracker: month}.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 989dbcac-8b57-4884-8914-f1212033b74e
Commits

Reviewing files that changed from the base of the PR and between 22ec90b and bbde91c.

Files selected for processing: 2

  • pm-stack/provider-usage/reconcile.py
  • pm-stack/provider-usage/test_reconcile.py
  • 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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T15:28:08.110217Z bbde91c PR opened
ℹ️ 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.

This branch has not been deployed

No deployments
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.

fix(quota-plane): reconcile.py fee_period vocabulary mismatch reports permanent drift

1 participant