Skip to content

feat: Add quota memory extraction for agy harness - #2431

Open
prajwal-395 wants to merge 1 commit into
kunchenguid:mainfrom
prajwal-395:fm-agy-quota
Open

feat: Add quota memory extraction for agy harness#2431
prajwal-395 wants to merge 1 commit into
kunchenguid:mainfrom
prajwal-395:fm-agy-quota

Conversation

@prajwal-395

Copy link
Copy Markdown

Give firstmate a memory of agy model quota, so a dispatch rule about quota can be obeyed BEFORE the dispatch rather than discovered by making it.

The sequence is inescapable: to learn that Opus 4.6 is below its floor, you must first dispatch a worker onto Opus 4.6 and read its pane. A reading older than the time-to-reset it recorded means that window has since reset.

This task builds the memory and exposes it:

  • Extract model, quota, and reset time from agy pane footer using bin/fm-agy-quota-lib.sh
  • Store it durably in state/.agy-quota-<hash>
  • Fail open on unparseable/ambiguous formats
  • Return unknown if the reading is older than the time-to-reset window

Testing:
Run tests: bin/fm-test-run.sh tests/fm-agy-quota-lib.test.sh
Shellcheck: shellcheck bin/fm-agy-quota-lib.sh bin/fm-watch.sh

Live End-to-End parse test:
Input: Gemini 3.1 Pro (High) | ctx: 10.5% | quota: 94.7% (4h 24m)
Output: Gemini 3.1 Pro (High)|94.7%|4h 24m|1786813299

Extracts model, quota, and reset time from agy pane footer and stores
it persistently in state/ so dispatch rules can read it.
Fails open on ambiguous reads and resets on staleness.
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.

1 participant