Skip to content

fix(usage): isolate auxiliary report failures - #3043

Closed
tang-vu wants to merge 2 commits into
Osmantic:public-betafrom
tang-vu:fix/usage-auxiliary-request-isolation
Closed

tang-vu wants to merge 2 commits into
Osmantic:public-betafrom
tang-vu:fix/usage-auxiliary-request-isolation

Conversation

@tang-vu

@tang-vu tang-vu commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Isolate usage-readiness failures from a successfully received monthly report, including stalled auxiliary response bodies.

Why this matters

A broken tracking-control endpoint should not erase verified usage totals, charts and model rows that the report endpoint has already returned.

Root cause: Both reads share a single rejecting aggregate and deadline, so an auxiliary failure resets the whole report.

Behavioral invariant: Each receipt settles within the existing 15-second deadline; a valid report survives readiness failure and late auxiliary results cannot overwrite the next poll.

Implementation and compatibility

Race each full response independently against the existing deadline, settle both outcomes, and expose unavailable tracking controls while retaining the primary report. Preserve #4983's single displayed-month request and #4419's cancellation and stale-result behavior. Update its polling regression to assert retained report data on auxiliary timeout.

This updates the original canonical PR onto public-beta at 3c186f3f12ba21dad7b7266ec5449393529abb00; it does not create a competing replacement. The shared browser code applies to Linux, macOS and Windows installations. There is no persisted schema migration. Rollback is a revert/rebuild of the dashboard; server lifecycle and authorization remain backend-owned.

Overlap check

Searched open and closed upstream PRs by semantic keywords and inspected the complete 1,010-entry public-beta changed-file index on 2026-09-16. Searched production paths: ods/extensions/services/dashboard/src/pages/Usage.jsx.

Relevant same-file results: #4983 (merged: perf(usage): fetch only the displayed reporting month), #4419 (merged: fix(usage): recover polling after stalled requests and bodies), #4349 (merged: fix(usage): select reporting months in UTC)

#4983 intentionally removed previous-month fetching; this adaptation keeps that contract instead of reintroducing the old PR's comparison request. #4419 bounded aggregate polling but did not isolate failures. #3051 mutation deduplication remains an independent change.

Regression and validation

Candidate commit: f60381cd92733eb2a11b73c8ab68e225d2c3e75e.

  • From ods/extensions/services/dashboard: npx vitest run src/pages/Usage — 30 passed.
  • Four retained-report scenarios fail with the original beta source; all 30 candidate page, UTC, single-month and polling tests pass.
  • Changed-file ESLint, git diff --check, and pre-commit secret/private-key/large-file checks pass. Existing lint warnings are not errors.
  • Clean beta baseline: full dashboard 1,232 tests passed, lint and production build passed on Windows Node 24.14.1. CI uses Node 20 and validates Linux/macOS/Windows. No browser-on-hardware or live GPU/model-service claim is made by these mocked HTTP/UI tests.
  • Broad make gate on a Linux-native clean beta checkout stops at the existing no-sudo Docker fallback contract (2 failures under the root test environment). The Windows-mounted copy additionally exposed CRLF-sensitive Hermes fixture assertions. Full-tree pre-commit finds existing dummy private-key test fixtures and Windows lacks awk for the heredoc hook; the candidate's scoped secret/key/size hooks pass. These limitations are not represented as successful runtime validation.

Review readiness and batch integration

Implementation and focused checks are complete; this PR is Ready for independent review. CI limits below remain visible and no upstream merge or deployment has been performed.

Exact-head CI at 2026-09-16T13:33:01.8060875Z for f60381cd92733eb2a11b73c8ab68e225d2c3e75e: 36 successful checks; 1 failed; 0 pending; 4 skipped review/security jobs (not counted as passes). distro: cachyos.

The failed CachyOS job stopped while installing checkout prerequisites: the distro repository signature was invalid, before this candidate was checked out. Later candidates passed the same distro job, but this exact head remains red. GitHub refused the failed-run rerun with “Must have admin rights to Repository.” A maintainer rerun is still required; no signature checks were disabled.

All 20 exact candidate commits were merged into synthetic integration d3c05b74ddfa from beta 3c186f3f12ba21dad7b7266ec5449393529abb00. That exact head passed 1,279 tests across 167 files, full ESLint (0 errors; 618 existing warnings), production build, scoped secret/private-key/large-file hooks and git diff --check on Windows Node 24.14.1. These are mocked browser/HTTP checks, not live GPU or deployment evidence.

Verified merge order: #3044 → #3046 → #3025 → #3038 → #3043 → #3050 → #3312 → #3313 → #3315 → #3316 → #3376 → #3041 → #3042 → #3051 → #3065 → #3062 → #3039 → #3040 → #3049 → #2780.

Merge guidance for this scope: With #3051, retain independent read settlement plus the synchronous mutation guard; production and tests merge cleanly.

The only textual conflicts inside the selected batch were #3316/#3040 (download hook plus tests) and #3046/#2780 (tests only). Use the linked integration commit as the reviewed resolution reference. Each PR remains independently based on beta; if merging them separately or squashing, reapply the relevant resolution and rerun affected suites. Outside-batch checks used git merge-tree only: #3846/#3848/#3841/#3843 merged textually, while #3803/#4356/#5276/#5125 conflicted. Textual compatibility alone does not establish runtime compatibility.

Additional clean-beta Linux checks: make lint, make smoke, and make simulate pass. make bats has five baseline environment failures (WSL classification, root permissions/preflight, and a 15 GB free-space boundary), in addition to the full-gate limitations described above. Installer/backend sources are unchanged by this batch. Rollback remains a revert and dashboard rebuild; no stored schema or backend lifecycle migration was introduced.

@tang-vu
tang-vu changed the base branch from main to public-beta September 16, 2026 13:01
@tang-vu
tang-vu force-pushed the fix/usage-auxiliary-request-isolation branch from f60381c to 45e1fe1 Compare September 17, 2026 14:03
@Lightheartdevs

Copy link
Copy Markdown
Collaborator

Thanks for this contribution. public-beta was promoted into main on 2026-09-24 and no longer receives changes, so we're closing pull requests that target it. This isn't a judgment on the change itself. If it's still needed, please rebase onto main and open a focused PR. See #7253 for details and the contribution policy.

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.

2 participants