Skip to content

feat(runtime-host): bind OAuth login to Connection entities - #3924

Open
me2seeks wants to merge 11 commits into
apache:mainfrom
me2seeks:feat/3852-oauth-connection-entity
Open

feat(runtime-host): bind OAuth login to Connection entities#3924
me2seeks wants to merge 11 commits into
apache:mainfrom
me2seeks:feat/3852-oauth-connection-entity

Conversation

@me2seeks

@me2seeks me2seeks commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • bind every interactive OAuth login to one explicit Connection target: create(providerType) or existing(connectionId)
  • allocate and recover OAuth Connection identity, credential publication, and authenticated receipts in Runtime Host/Storage
  • migrate Desktop add/re-login/status/refresh/logout paths to exact Connection identity and fail closed on mismatch or ambiguity
  • replace silent attempt supersede with operation_conflict and advance the Runtime Host compatibility epoch from 53 to 54

Stack

This is the OAuth entity-binding workstream of #3852 and is stacked after #3882. Review the final commit c88dd63b1 for this PR's isolated change.

Closes #3888.

Validation

  • npm --workspace @maka/core run typecheck
  • npm --workspace @maka/storage run typecheck
  • npm --workspace @maka/runtime-host run typecheck
  • npx tsc -p apps/desktop/tsconfig.main.json --noEmit
  • Storage full suite: 995 tests, 977 passed, 18 skipped
  • Runtime Host OAuth/protocol focused suite: 73 passed
  • Desktop OAuth/Connections focused suite: 17 passed
  • node scripts/protocol-epoch-check.mjs --base f1fa3f9c7 --head HEAD (53 -> 54)
  • git diff --check f1fa3f9c7..HEAD

Propagate stop cancellation through legacy adoption and preserve immutable Connection identity across non-model configuration updates.

Generated-by: Codex
Keep owner registration synchronous while retaining cancelable queued reservations and release the lane after synchronous executor rejection.

Generated-by: Codex
Let AgentRun paths attach and persist cancelled work after stop while keeping no-Run compaction preflight explicitly fenced.

Generated-by: Codex
Carry immutable Connection identity through TUI model selection and make account labels globally unambiguous.

Generated-by: Codex
Make interactive OAuth enrollment create or reauthenticate one exact Connection, recover credential and catalog publication durably, and keep Desktop account actions entity-scoped.

Generated-by: Codex
@me2seeks
me2seeks force-pushed the feat/3852-oauth-connection-entity branch from c88dd63 to 04dd9c1 Compare August 26, 2026 12:45
@me2seeks

Copy link
Copy Markdown
Contributor Author

Addressed the current hosted format:check failure on head 04dd9c1b7 by applying Biome formatting to the two reported Storage files. The follow-up commit changes only line wrapping; two independent reviews confirmed no identity, authority, argument, or control-flow change.

The OAuth entity-binding commit is patch-equivalent across the final restack onto #3882. Validation: Storage 995 tests passed with 18 platform skips, Storage typecheck, Biome check, protocol epoch guard (54), and diff-check.

Generated-by: Codex

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed this head and found no blocking issues.

Binds each interactive OAuth login to an explicit target (create(providerType) or existing(connectionId)) with persistent oauth-login-receipts (monotonic order, attemptId dedup, target↔identity checks), turning silent supersede into operation_conflict; correct identity matching, fail-closed conflict, legacy adoption CAS retry, and onboarding ticket fixing TOCTOU; hosted test+windows_recovery SUCCESS.

No P0-P3.

简体中文该头无阻断。

Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

@github-actions github-actions Bot added the effort/XL Over 1000 readable lines label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XL Over 1000 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[OAuth] Bind interactive login to explicit Connection entities

2 participants