Skip to content
This repository was archived by the owner on Nov 7, 2026. It is now read-only.

fix(core): coordinate OAuth credential refreshes - #406

Merged
brentyates-swx merged 15 commits into
swxtchfrom
fm/oc-oauth-lock-390
Nov 4, 2026
Merged

brentyates-swx merged 15 commits into
swxtchfrom
fm/oc-oauth-lock-390

Conversation

@brentyates-swx

@brentyates-swx brentyates-swx commented Nov 4, 2026 •

Copy link
Copy Markdown

Closes #390

Backports anomalyco#54023 (9435378) into the fork's existing Credential, Integration, and EffectFlock owners. Required provider-refresh behavior is complete; upstream-only CredentialLegacy/Bus/ErrorSummary and config/MCP OAuth test-double hunks are omitted. MCP SDK OAuth refresh and provider-401 recovery are out of scope.

Coverage: production Integration.connection.resolve with shared success and failure, credential persistence, initiating-caller and joining-waiter cancellation, a second process using the same on-disk database and lock root, after-lock refresh/missing/type-change checks, bounded timeout and retry, and environment/key/missing/fresh/no-refresh compatibility.

Focused behavior-removal runs made the relevant tests fail when in-process single-flight, cross-process exclusion, the after-lock re-read, global refresh ownership, interruptible waiter joining, the deadline, pending cleanup, and EffectFlock release were removed. Verified with the focused package-local cases and bun typecheck from packages/core.

1. Cherry-pick donor 9435378 with -x; keep refresh ownership in the global Credential node, use EffectFlock, and re-read persisted credentials inside Integration.connection.resolve's lock.

2. Add producer-driven resolver regressions for shared success and failure, caller cancellation, a second process on one credential store, and bounded timeout/retry; prove changed behavior with focused removal runs.

3. Add the actual PR-number backport entry, then run package-local focused tests, typecheck, the required lint wrapper, and the crew identity gate before handing off the draft without merging.
@brentyates-swx

Copy link
Copy Markdown
Author

Session ID: ses_e5b0433c1ffe9GfcGDuV8G9vMw
Working repo: /home/byates/fm-worktrees/fm-llmrouter/oc-oauth-lock-390/swx-opencode

@brentyates-swx
brentyates-swx marked this pull request as ready for review November 4, 2026 18:25
@brentyates-swx
brentyates-swx merged commit 90de436 into swxtch Nov 4, 2026
2 of 4 checks passed
@brentyates-swx
brentyates-swx deleted the fm/oc-oauth-lock-390 branch November 4, 2026 18:26
brentyates-swx added a commit that referenced this pull request Nov 4, 2026
brentyates-swx added a commit that referenced this pull request Nov 5, 2026
* docs: plan Bun 1.4.4 security backport

Task: swxtchio/swx-opencode#392; donor anomalyco#58087 at 37d9737 with the required -x provenance.

- Cherry-pick the donor and resolve fork-path conflicts in the existing runtime, workflow, dependency, and test owners.
- Preserve the fork dependency graph, workflow guards, FFF packaging, and native fetch integrity; record the backport in CHANGESET.md.
- Prove fresh-install photon behavior and Solid TSX component behavior with focused red/green tests, package typechecks, and the workflow guard.
- Qualify clean, source-pinned native candidate bytes on the authorized build box; leave fleet installation to Firstmate after merge.

* chore: bump Bun to 1.4.4 (anomalyco#58087)

Co-authored-by: Hona <[email protected]>
(cherry picked from commit 37d9737)

* chore(opencode): WIP Bun 1.4.4 qualification

Adapt the donor's dependency lock, test preloads, Nix pins, photon WASM patch, and FFF type surface to the fork.

The focused Bun 1.4.4 tests and package-local typechecks are complete. Nix matrix hashes and leased ARM64/x64 candidate qualification remain pending.

* docs(opencode): record Bun 1.4.4 backport status

* chore(nix): update Bun 1.4.4 dependency hashes

* docs(opencode): record Bun 1.4.4 candidate evidence

* chore(nix): refresh combined Bun 1.4.4 hashes

* docs(opencode): record merged-source ARM64 candidate

* docs(opencode): record merged-source x86_64 candidate

* docs(opencode): record #406 base validation

* docs(opencode): record final-source ARM64 candidate

* docs(opencode): summarize final Bun 1.4.4 qualification

* docs(opencode): address Bun evidence review

* test: adapt app and opencode tests for Bun 1.4.4

* test(opencode): assert Bun websocket rejection status

---------

Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Hona <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backport upstream OAuth token-refresh single-flight and per-credential lock

2 participants