Skip to content

feat(quota-plane): plan-store / tracker / measured reconciliation diff (daily) #1270

Todo

Description

@dezren39

Part of epic #1149; extends the daily model + route audit (#1173). Priority P2. Three records describe the same plans and can drift independently: (1) the fork plan store (model-plan.ts JSON — entitlements, fees, windows), (2) the master tracker / quota-view (human-maintained plan facts), (3) the hub snapshot history (measured reality). The 2026-10-26 passes already found drift of exactly this kind (Go windows, ClinePass's stale tracker row, Meta's blocked-vs-funded status).
Feature: a daily reconciliation diff — plan-store entitlements vs tracker rows vs latest measured windows — reporting only mismatches (plan name, fee, window limit/reset, status active/cancelled) as findings in the stewardship cycle log + registry, each with the winning source named per the evidence rules (console read > plan store > tracker prose). No silent auto-fixes: corrections flow through the normal edit/PR paths with the diff attached.
Acceptance: first diff run produces a dated findings list (or an explicit no-drift result); a planted mismatch in a test fixture is caught.

Acceptance criteria

  • A daily reconciliation diff runs across plan-store entitlements vs tracker rows vs latest measured windows, reporting only mismatches (plan name, fee, window limit/reset, status active/cancelled).
  • Each finding names the winning source per the evidence rules (console read > plan store > tracker prose) and lands as a dated findings list in the stewardship cycle log + registry — or an explicit no-drift result.
  • A planted mismatch in a test fixture is caught by the diff.
  • No silent auto-fixes: corrections flow through the normal edit/PR paths with the diff attached.

Activity

  1. added
    meta/follow-up
    on Oct 27, 2026
  2. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  3. added
    kind/feature
    source/human
    status/needs-triage
    priority/normal
    effort/m
    meta/enriched
    on Oct 28, 2026
  4. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    Intake review

    Fleet-monitor intake pass (protocol §5), 2026-10-28. Filed with only meta/follow-up; labels normalised in this pass (kind/feature, source/human — author dezren39 — status/needs-triage, priority/normal per the body's P2, effort/m).

    Still live: no merged or open PR references this issue (checked 2026-10-28T01:47Z); nothing has implemented it yet.

    Related: part of epic #1149; extends the daily model + route audit #1173. Siblings #1268 (parallel provider fetching) and #1269 (credential lifecycle) feed the same measured-reality record this diff compares against.

    Notes / risks: the body's one-line Acceptance was expanded into criteria without changing its meaning. The evidence-rule ordering (console > plan store > tracker prose) is the load-bearing decision — a diff that reports mismatches without naming the winner recreates the manual drift hunt it replaces. No silent auto-fixes is an explicit design constraint, kept as a criterion.

    Suggested approach: fixture-first — build the three-source comparison against a planted-mismatch fixture, then wire the daily run into the stewardship cycle log.

  5. added
    work/assigned
    queue/claimed
    status/in-progress
    and removed
    status/needs-triage
    on Nov 1, 2026
  6. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane C
    • Session / ID: queue task 2529
    • Found via: queue claim
    • Task: Triage feat(quota-plane): plan-store / tracker / measured reconciliation diff (daily) #1270 against current main: verify whether a plan-store / tracker / measured reconciliation diff exists, then route as a scoped follow-up packet or close with evidence.
    • Expectation: effort s; done = agent-note triage verdict posted, follow-up packet enqueued if confirmed, labels synced.
    • Links: queue task 2529
  7. 179 remaining items

  8. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Claim — Lane KD (archer, sandbox fix lane), 2026-11-23 ~01:20 CST. Taking #1270 slice 2 in Lane EB's named order (Lane HC landed slice 1, comment 7093237096, and left slice 2 explicitly outstanding): seed the plan store's plan rows from the 9 tracker rows through the normal edit path — first verifying what that path is and the store's consumer semantics, per HC's recorded reason for not hand-editing plans.json. Then re-run reconcile.py against the same three legs and record the fresh findings here. Slice 3 (daily stewardship-cycle wiring) is a primary-seat scheduling change — not taken by this lane. If no sanctioned edit path exists, I will record that finding and stop rather than hand-edit a live fleet store.

  9. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Flag hold — Lane KD (archer), 2026-11-23 ~01:24 CST. #1270 slice 2 is premise-verified, fully prepared, and NOT executed past this point.

    Premise verdict: TRUE and unclaimed. Lane HC landed slice 1 (comment 7093237096) and left slice 2 explicitly outstanding. Verified first-hand this pass (read-only):

    • The plan store ~/.local/share/opencode/plans.json is present, valid, and holds plans: [] with 15 model tier entries and 0 pools — exactly the state HC recorded.
    • The tracker leg is live: the fenced plan-facts block in the canonical registry (laptop hatch-personal provider-quota-registry.md) carries the 9 rows HC seeded.
    • The normal edit path is identified and its semantics verified in source (opencode fork, origin/main 7403b84a0d): the plan_info tool's upsert action calls ModelPlan.upsertPlan(store, patch, now) then ModelPlan.writeStore(...) (packages/core/src/tool/plugin/plan-info.ts:136). writeStore validates the whole store against the Plan schema and replaces the file atomically (temp + rename, mode preserved); readStore throws on a malformed file, so a post-write re-read is a real verification. This is the path HC could not verify in its pass; no hand-edit of the JSON is needed or proposed.

    Flag hold: the fork worktree I created for the run (~/wt-lane-kd-1270, branch lane-kd-1270, off origin/main) and its dependency install returned under a platform execution-risk notice. Per the standing rule from the prior holds, I stopped: nothing will be run, imported, built, or tested inside that checkout, and the store has NOT been written. Drew's standing clone approval does not clear a per-item flag — this needs Drew's plain-words go-ahead for this specific slice.

    Prepared seed, ready to execute verbatim on approval — one upsert per tracker row through the path above, fields transcribed from the tracker row only (fee currency USD per Drew's 2026-11-07 dictation; verifiedAt = the run date, verifiedFrom = the tracker block and its dictation source):

    • claude-max (provider claude, label "Claude Max", coverage subscription): fee 100/month; quota window 168h, no limit/reset.
    • meta-high-usage (provider meta, "Meta High Usage", subscription): fee 15/month; window 168h.
    • openai-drewrypope (provider openai, "OpenAI drewrypope", subscription): fee 100/month; window 168h.
    • openai-popesdrew (provider openai, "OpenAI popesdrew", coverage free — free Student per the dictation): fee 0/month; window 168h.
    • opencode-go (provider opencode-go, "OpenCode Go", subscription): fee 10/month; window 720h, limit 60 (unit usd — the $60 list cap), reset calendar.
    • command-code-go (provider command-code, "Command Code GO", subscription): fee 1/month; window 720h.
    • clinepass (provider clinepass, "ClinePass", subscription): fee 79.92/year; no quota window.
    • open-design-go (provider open-design, "Open Design Go", subscription): fee 84/year; window 168h.
    • mistral-education (provider mistral, "Mistral Education", subscription): fee 57.50/year; window 720h, limit 15 (unit usd — the $15 API budget), reset calendar.
    • All status active (the tracker value). Window names from the window length (168h = weekly, 720h = monthly); limit-less windows carry unit other — the tracker names no unit and none is invented.
    • Safety shape: back up plans.json beside itself first; the seed script re-reads the store immediately before writing (single read-modify-write via upsertPlan ×9 + one writeStore), then re-reads and asserts plans = 9, models still 15, pools still 0; then reconcile.py is re-run on the same three legs HC used and the fresh findings are recorded here. Expected result if the transcription is right: legs plan-store 9 / tracker 9 / measured 0, and the 9 presence findings clear (the measured leg stays empty — the 2026-11-03 snapshot freshness gap HC recorded is a separate remainder, not part of this slice).

    Blocker: Drew's item-specific approval only. Slice 3 (daily stewardship-cycle wiring) remains a primary-seat scheduling change, untouched by this lane either way.

  10. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Takeover claim — Lane YP (archer), 2026-11-23. Taking #1270 slice 2 under Drew's batch approval of the former flag holds (2026-11-23 07:35 CST, which covers this item).

    Lane KD's claim (comment 7094202190) and flag-hold record (comment 7094341501) are orphaned — KD stopped on the platform flag and the lane has been silent since; no other active lane claim covers this slice (full thread re-read this pass, 50/50 comments, count-confirmed). I adopt KD's prepared scope exactly as recorded in 7094341501: seed the plan store's 9 plan rows from the tracker rows through the verified normal edit path (plan_info upsert → ModelPlan.upsertPlan + ModelPlan.writeStore), with the recorded safety shape (backup beside the store, re-read before write, post-write assertions plans=9 / models=15 / pools=0), then re-run reconcile.py on the same three legs Lane HC used and record the fresh findings here.

    Slice 3 (daily stewardship-cycle wiring) is a primary-seat scheduling change — not taken by this lane. #1270 stays open after slice 2.

  11. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Lane YP — #1270 slice 2 LANDED: plan store seeded through the normal edit path; fresh findings recorded (2026-11-23)

    Executed Lane KD's prepared scope (comment 7094341501) verbatim under Drew's 2026-11-23 batch approval, adopted via my takeover claim (comment 7103937514). KD's flagged worktree no longer exists on the laptop and its branch was never created — nothing had been run in it and the store was untouched, exactly as KD recorded. I worked from a fresh worktree off current fork main (e8a2cd966b); the dependency install and every step ran without the platform flag this time.

    What was done

    • Pre-write state verified first-hand: ~/.local/share/opencode/plans.json held plans 0 / models 17 / pools 0. (KD recorded 15 model entries at ~01:24 CST; the live store gained 2 tier entries through normal use in between — the seed's invariant is that the models/pools counts are unchanged by the write, and that is what was asserted.)
    • Backup taken beside the store first: plans.json.bak-2026-11-23-1270-slice2 (mode 600, byte count identical to the pre-seed file).
    • Seed ran through the verified sanctioned path — one script performing a single read-modify-write: ModelPlan.readStore → ModelPlan.upsertPlan ×9 (one per tracker row, fields transcribed from the tracker rows only) → one ModelPlan.writeStore, importing the module from the fresh main worktree so the write went through full schema validation and the atomic temp+rename replace. Post-write re-read through readStore (which throws on a malformed store) asserts: plans = 9, models = 17 (unchanged), pools = 0 (unchanged). Store file mode still 600.
    • The 9 rows: claude-max, meta-high-usage, openai-drewrypope, openai-popesdrew (coverage free, fee 0 — free Student per the dictation), opencode-go (720h window, limit 60 USD, calendar reset), command-code-go, clinepass (no quota window), open-design-go, mistral-education (720h, limit 15 USD, calendar reset). All status active; verifiedAt = the run timestamp; verifiedFrom names the tracker block and its dictation source. One mapping the schema forces: the tracker writes fee periods as month/year, the store schema (Period) admits only monthly/yearly/once, so the rows carry the schema's words for the same facts.

    Fresh findings (same three legs Lane HC used; test_reconcile.py passes, incl. the planted-mismatch case)

    • Legs: plan-store 9 / tracker 9 / measured 0.
    • The 9 presence findings from HC's run are gone: every tracker plan now has a store row, and fee amount, window, limit, reset and status agree on all 9.
    • 9 findings remain, all fee_period, winner plan-store: the vocabulary gap named above — reconcile.py compares the raw strings, so the store's monthly/yearly reads as drift against the tracker's month/year on every run. This is a tool vocabulary defect, not data drift; the correction path (normalise the period vocabulary in reconcile.py, with fixture coverage for the schema's words) is filed as fix(quota-plane): reconcile.py fee_period vocabulary mismatch reports permanent drift #13375. Nothing was auto-edited.
    • The dated findings are also recorded in the registry (RECONCILIATION FINDINGS — 2026-11-23 (post-seed run) section; hatch-personal commit 43dd53a17, pushed to main).
    • Measured leg still empty — the 2026-11-03 snapshot freshness gap HC recorded is unchanged and remains a separate remainder.

    What remains on #1270

    • Slice 3: wire the daily call into the stewardship cycle — a primary-seat scheduling change, not taken by this lane (named here so the issue's remaining scope is explicit).
    • The fix(quota-plane): reconcile.py fee_period vocabulary mismatch reports permanent drift #13375 vocabulary normalisation, once landed, should take the daily diff to a no-drift result on the store↔tracker legs.
    • The measured-leg freshness gap (snapshot dated 2026-11-03) still needs the gatherer/keeper flow restored before the diff can see measured reality.

    #1270 stays open on slice 3. There is no PR for this slice by design: the correction's normal path for a live data store is the plan_info upsert itself, and the only repo-side change (the registry findings section) landed as the hatch-personal commit above, mirroring Lane HC's slice 1.

  12. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Lane ZS — store↔tracker drift note from the #13375 landing.

    #13375 (fee_period vocabulary mismatch in reconcile.py) is fixed and closed: PR #13395 merged (22ec90b9c29d). The diff now canonicalises fee_period to the tracker vocabulary for comparison only; findings keep raw per-leg values.

    Post-fix live-input reconciliation (laptop plan store ~/.local/share/opencode/plans.json, this registry's plan-facts block, current snapshot): no-drift overall — legs plan-store 9 / tracker 9 / measured 0, zero findings. The 9 vocabulary findings from the post-seed run are gone, and no other store↔tracker field drift remains.

    Remaining known gap is unchanged and already recorded here: the measured leg is empty because the surviving snapshot carries no per-provider plan records (gatherer/keeper freshness), so the diff still cannot see measured reality. This issue stays open on its remaining slices.

  13. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Second-pass verify (lane code-h, task 21742), fresh state 2026-11-24:

    Verdict: substantially delivered; remainder is an owner scheduling decision — no packet routed.

  14. dezren39 commented on Nov 26, 2026

    @dezren39
    MemberAuthor

    Triage (queue task 24955, lane 11, 2026-11-26): the 2026-11-24 verdict stands, and nothing has changed since.

    • Slices 1 and 2: landed. Tracker rows and plan-store rows were seeded.
    • The no-drift result: holds. After fix(quota-plane): canonicalise fee_period vocabulary in reconcile.py diff (#13375) #13395, a live-input run found zero findings.
    • The daily schedule: still open. Wiring the daily call into the live stewardship-cycle cron is a scheduling change on the primary seat, which is an owner call.
    • The measured leg: still empty. The snapshot carries no per-provider plan records, so the diff can't see measured reality until gatherer/keeper freshness is fixed.

    No worker packet is routed, because neither remainder has an executor a lane can act on.


    Generated by Claude Code

  15. dezren39 commented on Nov 27, 2026

    @dezren39
    MemberAuthor

    Triage — xaltha lane, queue task 25452 (coverage-reconciliation re-import), 2026-11-26

    Revalidated #1270 first-hand this pass; the 2026-11-24 pass-2 verdict (task 21742) and the 2026-11-26 triage (task 24955) stand unchanged:

    Remaining — neither has a lane executor:

    1. Slice 3: wire the daily reconcile.py call into the live stewardship-cycle cron — a primary-seat scheduling change / owner decision, repeatedly named-not-taken by prior lanes.
    2. Measured-leg freshness gap: the surviving snapshot carries no per-provider plan records (dated 2026-11-03), so the diff cannot see measured reality until the gatherer/keeper flow is restored.

    Disposition: triaged per task 25452 acceptance — issue stays OPEN on slice 3 + the measured-leg gap above. No code change, worktree, or PR this run; routing a worker packet for slice 3 would manufacture queue work with no executor.

  16. dezren39 commented on Nov 29, 2026

    @dezren39
    MemberAuthor

    Census 2026-11-29 (lane CEN-C02) — rechecked firsthand.

    State: OPEN; the diff tool itself is built and verified, and acceptance criteria 3 (planted mismatch caught) and 4 (no silent auto-fixes) hold. Current position per the thread's own verification chain:

    Remaining — exactly two items, neither has a lane executor:

    1. Slice 3 (the "daily" in criterion 1): wire the reconcile.py call into the live stewardship-cycle cron. This is a primary-seat scheduling change — an owner-seat action, repeatedly named-not-taken by lanes. Until it lands, the diff runs only when a lane runs it by hand.
    2. Measured-leg freshness: the surviving provider-usage-snapshot.json is dated 2026-11-03 and carries no per-provider plan records, so the measured leg reads 0 and the diff cannot see measured reality until the gatherer/keeper flow is restored.

    Blockers: slice 3 = primary-seat scheduling action; measured leg = gatherer/keeper freshness gap (separate remainder, already recorded in-thread). The two 2026-11-12 input-contract rulings were answered 2026-11-16 and are implemented — nothing waits on a new decision. Labels/priority: kind/feature + priority/normal confirmed correct by this census.

  17. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Census 2026-11-29 (Felix): full re-read (body, labels, all comments, edges) in the CODE-6 recovery pass, concurring with the parallel census note (lane CEN) already on this thread, whose claims I verified against live state in this pass. STRENGTHS: the reconciliation tool is built and verified (~/tools/provider-usage/reconcile.py; fixture tests pass incl. the planted-mismatch case); acceptance criteria 3-4 hold. PRIORITY VALIDATION: priority/normal, single, correct. FIXES I APPLIED: none needed. REMAINS: the daily-run/adoption remainder recorded in-thread; no Drewry decision needed.

  18. added
    status/triaged
    app/pm-stack
    on Nov 29, 2026
  19. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Issue census — 2026-11-29

    Gaps found: No status/* or lifecycle label and no app/*/area/* label. Added status/triaged and app/pm-stack. An ## Acceptance criteria section is present.

    Strengths: The daily reconciliation diff is specified by its three inputs (plan-store / tracker / measured) — the three sources whose disagreement this exists to surface.

    Actions taken by this census: Labels added: status/triaged, app/pm-stack.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/pm-stackeffort/mepic/pm-stackkind/featuremeta/enrichedmeta/follow-upmode/onlinepriority/normalsource/humanstatus/triagedtask/fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions