Repository navigation
Feature/oauth - #2008
Merged
Merged
Feature/oauth#2008
Conversation
Preserve the ordinary desktop profile and use local account credential storage for keychain-free macOS startup. Keep the application version at 0.5.8. Mirror Windows test installers and SHA256 files to the existing OSS bucket, verify public downloads, publish links in the workflow summary, and prune old test objects.
Use the loopback proxy authority when forwarding HTTPX streams, preserving valid HTTP/1.1 requests. Cover the real loopback provider stream with a regression test.
|
Merge queue CI: failure — run 41204549162, attempt 1.
The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed. |
|
Merge queue CI: success — run 41212439161, attempt 1. The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Add TokenRhythm account authorization to the desktop client, including OAuth login, local credential storage, account balance, account-backed model/media requests, explicit account/manual credential selection, and logout/recovery/lifecycle handling.
The personal menu now follows the supplied design: original default avatar, avatar/name and amount hierarchy, outlined recharge action, remote wallet balance, local Gateway today-token summary, and a link to the local Usage page filtered to today. Collapsing the sidebar hides the account entry. Loading, stale/error states, keyboard navigation, and six locales are covered.
The branch also includes an opt-in local account development host, Windows UAT/production-origin test installer tooling, and associated regression coverage. Standard production WebUI does not automatically gain the development host's login capability. The personal-menu addition does not change model/provider selection rules.
Branch
Base branch: main
Target exception: N/A
Issue
Linked issue: None
Reason: account feature implementation and the maintainer-confirmed personal-menu design follow-up.
Release Note
Add desktop TokenRhythm sign-in and a personal menu showing remote balance and local daily token usage, with recharge, usage, settings, and logout actions.
Tests
Current-head acceptance: CI run 41211143572 completed successfully on
4e6614021ce6512f392db58ec9ba02af32483cfc. All scheduled checks, including the aggregateCI result, Windows high-risk, all Desktop recovery E2E, Linux offline tests, and Windows packaged installation/upgrade acceptance, passed. The real two-process receipt restart case ran in the Windows serial phase and passed in 7.82 seconds with its original per-process 30-second guard and identity assertions. Merge-queue validation remains the final integration gate.Production integration was validated on
04010e2f7, which mergesmainata1a255de1after PR #2027. Current head4e6614021includes the follow-ups below. Historical integration/build results remain labeled by their original source state; the new head's CI is required:ruff check src testsand stagedgit diff --check: passed.Added integration regressions for explicit remote router/ensemble recommendation application while account credentials are selected: persisted manual Key and endpoint, primary provider, selected credential source, and unsaved frontend drafts remain intact. Account leases are never persisted into manual configuration. Main's dependency updates address the previous audit/wheelhouse findings. GitHub CI run 41202046193 passed on integration head
04010e2f7, including the full Linux offline matrix, Windows high-risk tests, dependency audits, cross-platform desktop checks, and Windows packaged installation/upgrade acceptance. Two timing-sensitive Windows tests failed on the first attempt and passed in the failed-job rerun; no production code, assertions, or timeouts were changed for that rerun.Queue follow-up (
9fd5c0392): make Store-reference compaction tests offline and independent of optional tokenizer data. Preserve the full 87KB fixture and all reference/raw-content assertions; explicitly prove that the complete unprojected final request fits before asserting no-pressure behavior. The prior fixture's 32k window could not fit the conservative fallback estimate. The corrected file passed all 5 cases; 47 related compaction tests passed with real conservative estimates, including unchanged pressure-recovery coverage. Ruff and diff checks passed. Production code, timeout limits, and merge gates are unchanged, so prior production build evidence remains applicable. The corrected reference tests passed in subsequent CI.The queue also encountered a 200ms telemetry-shutdown watchdog timeout. Its complete related file passed locally (14 tests), the same code passed on the preceding PR CI, and controlled event-loop delay reproduced the timeout. No telemetry code, timeout, or assertion was changed; the new head's CI must verify it again.
Desktop cleanup follow-up (
87f51b3c8): preserve the existing idle/graceful exit assertions and timeouts while capturing the verified Python owner PID/start identity, loopback listener state, ownership-record relationship, and bounded allowlisted Gateway shutdown events on failure. A failed full run and a passing isolated retry did not establish the underlying shutdown cause; the subsequent full rerun reproduced it, so the added evidence is diagnostic, not a claimed production fix. No raw logs, credentials, or ownership nonces are printed. The existing CI telemetry/helper unit script, JavaScript syntax checks, and diff checks passed. Windows CI must verify the new head before merging. Partial profile-matrix retries cannot satisfy the existing same-attempt coverage proof; preserve that gate and use complete evidence cohorts.Shutdown follow-up (
6495a2a6e, diagnostics/fixture follow-up3ddd449e4): denied or disabled launch telemetry and its pending-retry check now return before scheduling state I/O. A deterministic occupied-executor reproduction showed the previous no-op could delay cancellation of the launch task before Gateway cleanup started. All three new regressions fail against the original production code; 111 focused growth/shutdown/CLI cases pass after the fix, including authorized-write cancellation durability. Fullruff check src testspasses. Consent enforcement, authorized transactions, process budgets, and graceful-exit assertions are unchanged. This confirmed mechanism is fixed; whether it caused the observed Windows E2E timeout is still subject to the new Windows run, not inferred from local tests.The failed Windows diagnostic run confirmed the Python owner was gone and its port closed after the 10-second forced cleanup, but the lifecycle parser missed the actual prefixed-JSON log format. The parser now covers that producer format; this isolated fixture also enables the existing bounded stall sampler and prints only allowlisted frame basenames/function/line metadata. Helper tests, producer-format controls, syntax checks and independent review pass. Separately, the macOS healthy-resume fixture now waits for the current renderer's handshake and first successful RPC, including same-generation recovery, before measuring connection preservation. The failed run had resumed an unready connection, which production intentionally replaces. All original assertions/timeouts remain. The local native E2E attempt did not execute because its Electron binary was unavailable and downloading stalled; it is not counted as passing evidence.
Windows receipt-test follow-up (
4e6614021): the only failing executable check on3ddd449e4was the restart test's first child exceeding its unchanged 30-second guard;CI resultreflected that same failure. The same test previously passed on Windows in 45.76 seconds across its two children, so the evidence does not establish a product persistence failure. This current-schema test now uses the repository's existing migrated database fixture and runs its real-process case in the existingci_serialphase. Both real child processes,SessionStorage.connect/close, receipt SQLite, credential derivation, all identity assertions and each 30-second guard remain intact. The serial phase is executed and merged into the required JUnit/exit result. The complete modified file passes all 6 cases; phase selection executes 1 serial and 5 parallel cases. A control reintroducing the old account-authority restoration error fails as expected. Full Ruff and independent review pass. The new head's Windows CI is required before merging. On3ddd449e4, Windows cleanup, macOS resume, all Linux offline tests, and Windows packaged install/upgrade acceptance passed; those results are historical evidence, not a claim that the new head's full CI is already green.The new billing regression fails against immutable pre-fix production modules and passes after the fix. The receipt regression likewise fails before the fix and passes afterward, using two independent processes and real SQLite. Coverage includes changed leases, reopened storage, wrong account/origin rejection, manual-key controls, no duplicate generation, and preservation of the original billing owner. All upstream responses and credentials are synthetic.
The full Python suite and real Windows/Linux desktop installers were not run in this local checkout. The Python identity/persistence changes and personal-menu code are platform-neutral. Shutdown behavior was tested through production functions with Darwin/Linux/Windows boundaries; real cross-platform installer acceptance remains separate.
Maintainer Live Check
Maintainer live check: yes
Surface: browser / local gateway / account authorization
The maintainer reported successful testing against the real local account host and Gateway before authorizing the menu commit. No paid model generation or recharge transaction was performed as part of this review.
Review Fixes
account_authorityin video receipts and restore its tuple representation after JSON round trips. Reject malformed bindings and retain legacy manual-key compatibility.No new network request or startup phase is added for billing identity. Legacy records whose binding metadata was never saved are not guessed or reassigned to the currently signed-in account, and no video generation is replayed to repair billing.
Safety
No real credentials, account runtime data, private prompts/transcripts, local preview servers, test logs, or machine-specific paths are committed. Regression tests use synthetic data. The menu reads usage/balance and opens the existing recharge link; it does not initiate payments.
Third-Party Origin
Third-party origin: maintainer-supplied design asset.
The 240 × 240 default avatar PNG was supplied by the maintainer and imported unchanged into
opensquilla-webui/src/assets/account/default-avatar.png; it is not a screenshot recreation. No new third-party dependency was added by the personal-menu change. Existing Office font provenance and notices remain in place.Documentation Changes