Skip to content

FLT-146 Build Report

Result

  • Codex provider freshness now reflects the age of lastUpdated, independently of whether the honest tier is UNKNOWN.
  • A fresh scan always stamps Codex lastUpdated; absent or unusable quota telemetry remains UNKNOWN and is not fabricated.
  • Agy now exposes a top-level tier derived from the most restrictive real pool tier and a fresh top-level lastUpdated.

Codex usage-source investigation

Accepted:

  • ~/.codex/sessions/**/*.jsonl contains vendor-written payload.rate_limits events with primary and secondary used_percent, window lengths, and timestamps. The existing CodexLimitReader already parses the newest usable events and rejects observations older than its six-hour signal window. This remains the best-effort real source.

Rejected:

  • codex doctor --json completed successfully but only reported install, configuration, authentication, runtime, network, and state health. It exposed no quota, usage, or rate-limit values.
  • Non-session ~/.codex state included UI/global state, model cache, logs/history, and SQLite state, but no reliably identifiable persisted quota/rate-limit cache. Authentication file contents were not inspected.

When no reliable session telemetry exists, the scanner reports Codex tier UNKNOWN, freshly stamps lastUpdated, and reports stale: false for that fresh scan.

Tests added or updated

  • Fresh scan plus Codex UNKNOWN asserts stale: false and a fresh lastUpdated.
  • Provider freshness asserts a current timestamp is not stale and a timestamp older than the six-hour window is stale.
  • Agy aggregation asserts the most restrictive real pool tier is promoted, including EXHAUSTED.
  • Scanner integration asserts Agy top-level tier and timestamp are emitted.
  • Existing CodexLimitReaderTests continue to cover genuine fresh telemetry, old telemetry, missing telemetry, malformed events, and freshness boundaries.

Exact gate output

dotnet build -warnaserror

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:19.80

The SDK also emitted informational NETSDK1057 messages because the installed .NET 10 SDK is a preview; these were not warnings and the gate reported zero warnings.

dotnet test

Passed!  - Failed:     0, Passed:   524, Skipped:     0, Total:   524, Duration: 22 s - UsageGovernor.Tests.dll (net10.0)

Command exit code: 0. Total wall time reported by the runner: 45.1 seconds.