Skip to content

Switch advisory quota reads from quota-axi to Remainder TOON after remainder#46 #98

Description

@douglasjarquin

Outcome / gate

Switch Sum's advisory quota reads from quota-axi to the standalone Remainder binary, using Remainder's --format toon once douglasjarquin/remainder#46 has landed in a tested Remainder release.

Blocked only by: a released Remainder that implements --format toon from remainder#46 (same observation as compact/JSON, go-toon pinned, compact/JSON/value unchanged).
A merged remainder#46 PR without that release is not enough.

This is the TOON-gated cutover of live quota-axi call sites.
It does not wait for sum#93 (sumctl's own LLM-facing output).
It does not wait for Pinchos.
Pinchos already consumes Remainder independently (pinchos#181 / pinchos#185).

sum#42 remains the broader Remainder integration (install/staging, rollback, unmigrated scopes).
This issue replaces #42's "JSON for code and compact for model context" for the quota-evidence path with Remainder TOON.
Do not duplicate #42's packaging/rollback work here; reuse it.

Path: Sum → remainder --format toon → authorized provider evidence.
Sum is not an intermediary for Pinchos.
Remainder is not a Sum builtin.

Scope

  • Replace advisory quota-axi --provider <provider> in skills/sum-dispatch/SKILL.md (and any other live quota reads) with an explicit Remainder invocation that selects provider/profile/window and --format toon.
    Keep the same policy: advisory only, not a budget or scheduler.
    Known exhaustion still blocks that route.
    Unknown/stale still must be disclosed.
    Do not silently switch accounts, paid routes, or providers.
  • Consume the released Remainder TOON document.
    Do not parse quota-axi TOON.
    Do not copy Remainder or go-toon into Sum.
    Do not add jq for this path.
  • Pin a checksum-verified Remainder version at setup/release staging only, through the documented standalone path.
    Doctor/TOOLS/mise/docs/DEPENDENCIES.md/docs/dependency-inventory.json should name Remainder for migrated scopes.
    Keep quota-axi explicitly for any scope Remainder's released route still does not cover.
    Record the exact migrated vs retained routes.
  • Preserve dispatch/host/model/default/preset/account policy.
    This is not permission to rank providers, change billing, stop workers, or count shared-account capacity twice.
  • Retain positive quota-axi attribution in ATTRIBUTIONS.md.
    Remainder owns collection, cache, and the TOON contract.
    Sum owns when to read it and what to do with exhaustion/unknown.

Non-goals

  • sumctl JSON→TOON (Adopt TOON in place of JSON for LLM-facing sumctl output #93).
  • Embedding a collector, FFI, or requiring Pinchos/Herdr to read quota.
  • Migrating every Remainder provider before the first TOON-backed Codex (or other already-released) route.
  • Changing live user Pinchos TOML.
  • Deleting quota-axi from the machine if another consumer still needs it.

Acceptance

  • Remainder#46 is in the pinned release (remainder --format toon through the real Cobra CLI).
  • Dispatch quota reads use that TOON output for each migrated provider, with Sum and extra runtimes absent from the Remainder process.
  • Compact/JSON/value goldens in Remainder stay out of this PR.
  • Exhausted, unknown, stale, missing auth, wrong account, nonzero exit, and timeout stay failures or disclosed unknowns, never numeric zero success.
  • Unmigrated scopes still call quota-axi and say so.
  • Existing dispatch tests, doctor, and packaging inventory pass with the new pin.
  • Rollback restores the quota-axi command without uninstalling Remainder.

References: remainder#1/#46, sum#42/#56/#65/#93, pinchos#181.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions