You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pm-stack/provider-usage/reconcile.py (#1270's reconciliation diff) compares the fee_period field across legs as a raw string, but the legs use different vocabularies for the same fact:
Plan-store leg: the store's Effect schema (packages/core/src/model-plan.ts in the opencode fork, Period) only admits monthly / yearly / once, and ModelPlan.writeStore validates against it — a store row written through the sanctioned edit path can never carry month / year.
Result: since #1270 slice 2 seeded the store (2026-11-23), every daily diff reports 9 fee_period findings (winner: plan-store) that are pure vocabulary noise, burying any real drift. The fixture in test_reconcile.py masks this because its hand-written store fixture uses month — a value the real store schema rejects.
Fix shape
Normalise the period vocabulary on one side of the comparison in reconcile.py (e.g. map the store leg's monthly→month, yearly→year in load_store, or canonicalise both legs in diff), and extend the fixture tests: a store fixture carrying monthly against a tracker row carrying month must produce no fee_period finding, while a genuine period mismatch (monthly vs year) must still be caught with the winner named.
Evidence: the 2026-11-23 post-seed run recorded on #1270 (legs plan-store 9 / tracker 9 / measured 0; the only findings were the 9 fee_period vocabulary rows) and in the registry's RECONCILIATION FINDINGS — 2026-11-23 (post-seed run) section.
Lane ZS claiming #13375 (reconcile.py fee_period vocabulary mismatch), dispatched by the coordinator 2026-11-23 ~09:15 CST.
Plan: re-verify the mismatch first-hand in the current code path, decide the normalisation direction from the consumers of both vocabularies (store schema monthly/yearly/once vs tracker month/year), implement in reconcile.py + fixture tests, verify the post-seed reconciliation reports no fee_period drift, land via PR. #1270 stays open regardless — no closing keywords for it anywhere.
Lane ZS — premise verified first-hand, normalisation direction decided.
Premise: TRUE. Reproduced the exact reported state with current main's reconcile.py (0d29cda) against the live inputs (laptop ~/.local/share/opencode/plans.json, the registry's plan-facts block, the current snapshot): legs plan-store 9 / tracker 9 / measured 0, and exactly 9 findings, all fee_period — every one a pure vocabulary pair (monthly vs month, yearly vs year), winner plan-store. No other field drifts.
Root cause confirmed in code:
reconcile.pydiff() compares fee_period as a raw string; neither leg is normalised.
Store leg can only ever carry monthly/yearly/once — the opencode fork's packages/core/src/model-plan.tsPeriod schema (Schema.Literals(["monthly", "yearly", "once"])), enforced by ModelPlan.writeStore.
Tracker leg carries month/year per the plan-facts schema approved 2026-11-16.
The fixture masks it: test_reconcile.py's hand-written store fixture uses "period": "month", a value the real store schema rejects.
Direction: canonicalise inside reconcile.py at comparison time — neither source's vocabulary changes.
Consumers: within this repo, fee_period is consumed only by reconcile.py itself. The tracker vocabulary belongs to an approved schema (2026-11-16) maintained by the registry keeper; the store vocabulary is schema-enforced in another repo. The comparison is the only place the two vocabularies meet, so it is the only place that can reconcile them.
Canonical form: the tracker vocabulary (month/year), mapping the store leg's monthly→month, yearly→year for the comparison only. once has no tracker equivalent and passes through unchanged, so a store once against any tracker period still reports as a genuine mismatch.
Canonicalising in diff rather than load_store: findings keep each leg's raw values, so a real period finding still shows what each source actually says and names the winner truthfully — normalising at load would rewrite the reported plan-store value to a string the store never carried.
Fixture tests will be extended per the issue: the base store fixture switches to the schema-valid monthly (tracker month → no finding), and a planted genuine period mismatch (store monthly vs tracker year) must still be caught with the winner named.
Landed: PR #13395, merged — merge commit 22ec90b9c29db984a11e5a78abfe52a42b7323b6 (head SHA-guarded at 0784f1806254). Verified present on main by read-back (PERIOD_ALIASES / _canon in pm-stack/provider-usage/reconcile.py).
Fix:diff() canonicalises fee_period to the tracker vocabulary for comparison only (monthly→month, yearly→year); findings keep each leg's raw values and the winner. once passes through, so a one-off fee still mismatches any recurring tracker period. Neither source's vocabulary changed.
Verification:
Remote dispatch: fleet queue session fp_cd30072ca532094c8a3f60d74e59b6b7 (run 45203801763, conclusion success) ran python3 pm-stack/provider-usage/test_reconcile.py at ref lane-zs-13375.
Laptop run of the same fixture suite in the worktree: all tests pass — base case now exercises the vocabulary pair (store monthly vs tracker month), the planted genuine mismatch (store monthly vs tracker year) is caught with winner plan-store and raw values reported, and store yearly vs tracker year agrees.
Live-input reconciliation with the fixed tool (laptop plan store, registry plan-facts block, current snapshot): no-drift — legs plan-store 9 / tracker 9 / measured 0, zero findings. The 9 fee_period vocabulary findings are gone, and no other store↔tracker drift remains. (Measured leg empty: the snapshot freshness gap already recorded on feat(quota-plane): plan-store / tracker / measured reconciliation diff (daily) #1270; it carries no values to disagree with.)
Criteria in the issue are fully met: normalisation on the comparison side, fixture extended both ways (vocabulary agreement produces no finding; genuine mismatch still caught with the winner named).
Progress from xaltha: PR #13397 is open — the store leg is normalised to the tracker vocabulary in load_store (monthly→month, yearly→year), so the 9 daily fee_period noise findings stop; values outside the map (e.g. once) still pass through, so genuine drift still reports. The fixture now carries the real store value monthly (the old month masked the bug) and a new case proves a genuine mismatch (monthly vs year) is still caught with the plan-store named winner. Verified remotely via the fleet-command workflow (run 45203450530, success): all reconcile fixture tests pass. The PR says Closes #13375.
Activity
developing-today commentedon Nov 23, 2026
CODE-4873
dezren39 commentedon Nov 23, 2026
Lane ZS claiming #13375 (reconcile.py fee_period vocabulary mismatch), dispatched by the coordinator 2026-11-23 ~09:15 CST.
Plan: re-verify the mismatch first-hand in the current code path, decide the normalisation direction from the consumers of both vocabularies (store schema
monthly/yearly/oncevs trackermonth/year), implement in reconcile.py + fixture tests, verify the post-seed reconciliation reports no fee_period drift, land via PR. #1270 stays open regardless — no closing keywords for it anywhere.fix(quota-plane): normalise fee_period vocabulary in reconcile.py (#1…
dezren39 commentedon Nov 23, 2026
Lane ZS — premise verified first-hand, normalisation direction decided.
Premise: TRUE. Reproduced the exact reported state with current main's
reconcile.py(0d29cda) against the live inputs (laptop~/.local/share/opencode/plans.json, the registry's plan-facts block, the current snapshot): legs plan-store 9 / tracker 9 / measured 0, and exactly 9 findings, allfee_period— every one a pure vocabulary pair (monthlyvsmonth,yearlyvsyear), winner plan-store. No other field drifts.Root cause confirmed in code:
reconcile.pydiff()comparesfee_periodas a raw string; neither leg is normalised.monthly/yearly/once— the opencode fork'spackages/core/src/model-plan.tsPeriodschema (Schema.Literals(["monthly", "yearly", "once"])), enforced byModelPlan.writeStore.month/yearper the plan-facts schema approved 2026-11-16.test_reconcile.py's hand-written store fixture uses"period": "month", a value the real store schema rejects.Direction: canonicalise inside
reconcile.pyat comparison time — neither source's vocabulary changes.fee_periodis consumed only byreconcile.pyitself. The tracker vocabulary belongs to an approved schema (2026-11-16) maintained by the registry keeper; the store vocabulary is schema-enforced in another repo. The comparison is the only place the two vocabularies meet, so it is the only place that can reconcile them.month/year), mapping the store leg'smonthly→month,yearly→yearfor the comparison only.oncehas no tracker equivalent and passes through unchanged, so a storeonceagainst any tracker period still reports as a genuine mismatch.diffrather thanload_store: findings keep each leg's raw values, so a real period finding still shows what each source actually says and names the winner truthfully — normalising at load would rewrite the reported plan-store value to a string the store never carried.Fixture tests will be extended per the issue: the base store fixture switches to the schema-valid
monthly(trackermonth→ no finding), and a planted genuine period mismatch (storemonthlyvs trackeryear) must still be caught with the winner named.Merge pull request #13395 from developing-today/lane-zs-13375
dezren39 commentedon Nov 23, 2026
Lane ZS — done. Closing #13375 as completed.
Landed: PR #13395, merged — merge commit
22ec90b9c29db984a11e5a78abfe52a42b7323b6(head SHA-guarded at0784f1806254). Verified present on main by read-back (PERIOD_ALIASES/_canoninpm-stack/provider-usage/reconcile.py).Fix:
diff()canonicalisesfee_periodto the tracker vocabulary for comparison only (monthly→month,yearly→year); findings keep each leg's raw values and the winner.oncepasses through, so a one-off fee still mismatches any recurring tracker period. Neither source's vocabulary changed.Verification:
fp_cd30072ca532094c8a3f60d74e59b6b7(run 45203801763, conclusion success) ranpython3 pm-stack/provider-usage/test_reconcile.pyat reflane-zs-13375.monthlyvs trackermonth), the planted genuine mismatch (storemonthlyvs trackeryear) is caught with winnerplan-storeand raw values reported, and storeyearlyvs trackeryearagrees.fee_periodvocabulary findings are gone, and no other store↔tracker drift remains. (Measured leg empty: the snapshot freshness gap already recorded on feat(quota-plane): plan-store / tracker / measured reconciliation diff (daily) #1270; it carries no values to disagree with.)Criteria in the issue are fully met: normalisation on the comparison side, fixture extended both ways (vocabulary agreement produces no finding; genuine mismatch still caught with the winner named).
dezren39 commentedon Nov 23, 2026
Progress from xaltha: PR #13397 is open — the store leg is normalised to the tracker vocabulary in
load_store(monthly→month,yearly→year), so the 9 dailyfee_periodnoise findings stop; values outside the map (e.g.once) still pass through, so genuine drift still reports. The fixture now carries the real store valuemonthly(the oldmonthmasked the bug) and a new case proves a genuine mismatch (monthlyvsyear) is still caught with the plan-store named winner. Verified remotely via the fleet-command workflow (run 45203450530, success): all reconcile fixture tests pass. The PR says Closes #13375.