Skip to content

fix(auth): preserve Copilot tenant credentials during Doctor repair - #139131

Merged
steipete merged 10 commits into
openclaw:mainfrom
VasuBansal7576:codex/copilot-tenant-ownership-20260905
Sep 25, 2026
Merged

steipete merged 10 commits into
openclaw:mainfrom
VasuBansal7576:codex/copilot-tenant-ownership-20260905

Conversation

@VasuBansal7576

@VasuBansal7576 VasuBansal7576 commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Related: #127373

What Problem This Solves

Doctor can delete an agent's GitHub Copilot credential when a fresher shared credential belongs to a different tenant.

User Impact

Doctor preserves credentials for different tenants while allowing stale same-tenant credentials to share the fresher account. Agents that previously relied on cross-tenant or invalid-scope sharing must authenticate independently for their intended tenant; do not delete a working tenant-specific credential to restore fallback.

The maintainer accepted the bounded sharing contract during the requested landing: absent scope means public GitHub; normalized matching supported tenants may share under the existing identity/freshness rules; cross-tenant or unparseable scope and a missing shipped policy artifact deny sharing. The provider-owned public policy export is included in that acceptance. If the artifact is missing, repair the incomplete installation. This acceptance does not waive the current security guard or enforced reviews.

The released v2026.9.4 tenant documentation already requires fresh authentication when changing tenants. Raw persisted URL scopes retain existing full-Doctor validation behavior; this change does not broaden accepted stored formats.

Why This Change Was Made

The provider normalizes tenant scope, and the shared OAuth identity/adoption boundary checks it before transferring ownership. This covers Doctor cleanup, adoption, mirroring, logout, and refresh-peer settlement without a separate Doctor-only policy. Settlement now requires the same normalized routing scope before either identity-bearing or identity-less peers can inherit the shared credential. Shared-credential ownership applies that routing-scope check before the identical-refresh-generation shortcut, so persisted ownership, runtime metadata, and Doctor health cannot treat a cross-tenant local credential as main-owned. A cross-tenant peer remains terminally fenced and cannot replay consumed refresh material. Non-Copilot identity rules and refresh-generation fences remain intact. The provider guide explains tenant-separated sharing and the operator action. No configuration, schema, or dependency changes.

Thanks @VasuBansal7576 for the fix.

Evidence

A real SQLite-backed settlement reproduction at d632f0fec05a0706fec639428cb09df1aa703bd5 showed the missing fence: the same normalized tenant inherited as expected, but an identity-less peer from a different tenant also inherited and lost its terminal fence. After the settlement gate, the focused suite passed all 14 cases, including the same-tenant control and cross-tenant terminal-fence regression. A later ownership review found that identical refresh generations could still bypass the tenant check before settlement. The final repair moves the routing-scope check ahead of that shortcut; five focused files passed all 134 cases, including identical-refresh cross-tenant and same-normalized-tenant controls across ownership, concurrent-agent, usage, Doctor shared-health, and agent auth execution paths. pnpm check:changed passed formatting, Doctor contract tests, core and extension type checks, lint, dead-export scans, database/auth guards, and related static checks. Fresh P0-P2 review found no actionable findings.

The 7f0d270bf45f2679eef847de11f07071cf17fb61 settlement change is qualified by the local 14-case RED/GREEN proof. The final 082688f424aea3438972e6750e50fa6fc453de21 ownership repair is qualified by the separate 134-case source proof and changed-path checks. The retained installed/updater proof remains bound to the earlier 3cb830e78e1d9b566f22ccb48517e01d42efa465 / d632f0fec05a0706fec639428cb09df1aa703bd5 unchanged production paths; it is not execution of either later settlement or ownership repair.

A final-head isolated SQLite trace at 082688f424aea3438972e6750e50fa6fc453de21 then exercised the production persisted-owner resolver, Doctor auth-health path, and owner-store removal with identical refresh material. In the cross-tenant case, ownership stayed local, Doctor reported the expired local SQLite credential, logout removed only that local row, and the healthy shared credential remained. In the normalized matching-tenant control, ownership resolved to shared, Doctor did not report the stale local copy, and logout removed both inherited rows. Both SQLite databases were created and read back through the production store; the synthetic state was removed after the run. The trace used synthetic credentials and no live credential source. It did not apply network isolation or claim an observed absence of network activity.

Exact-head CI at 082688f424aea3438972e6750e50fa6fc453de21 exposed an unrelated Gateway plugin-lifecycle test race: the pending-install writer returns after persistence while runtime application continues asynchronously, but the test polled for only one second. A controlled reproduction captured that exact timeout while application was legitimately unfinished, then released the existing runtime-application receipt and observed the expected channel and sibling ownership. The final test-only commit 342d0c4693e3bead4b2b7baaf56f8530cd24f157 asserts that the Gateway claimed the receipt, awaits its existing applied result, and retains all real channel, PID, connection, sibling, and recovery assertions. It changes no production code or timeout. The three lifecycle cases pass on the composed branch; formatting, targeted lint, Gateway-server typecheck, and the relevant structural guards pass. A heavily contended broader replay also hit two unrelated HTTP timeouts, and the full changed-path workflow stopped on pre-existing unused exports in six unchanged script files; neither is attributed to this patch.

Exact-head CI at b4af2fb095919856808b9f5755ba9818460fb537 passed preflight, build, static analysis, types, and most test shards, but exposed existing current-main fixture repairs that were not yet in that branch. Three context-maintenance tests waited on polling or late-created cleanup state; current main replaces those waits with existing lifecycle signals and closes the shutdown cleanup hole. The synchronized branch passes all 41 tests across the three affected files without changing their deadlines. A separate Windows snapshot case completed abnormally with no exit code or stderr after 34.36 seconds; the helper did not retain enough termination detail to distinguish timeout, signal, spawn, or cleanup failure. Current main also carries the canonical snapshot preparation repair that removes a duplicate backup. No deadline, assertion, or product behavior was weakened. Two other CI jobs ended with their test step still reported in progress and no downloadable log; they had no attributable test result.

The signed auth merge checkpoint is 0e64be4158e56a7c1d357748917887dd252b4c03, with parents 160c7dfbe50e1a551f40c9e1225bec0240a12538 and current main at 429b4211de79091b0aa98fd6c7791e356dda7c3c, and tree 5e561132fb06d2cb29b7839af396503baa9a7421. Its two-file auth conflict composes both policies in the shared identity owner: Copilot provider and enterprise routing is checked first, then current main's OIDC issuer, client, and account binding applies. The main transition semantics remain intact, so missing-identity policy cannot bypass tenant isolation. Seven focused files passed all 164 cases, covering the prior ownership/Doctor/exec paths plus current OIDC adoption, mirroring, refresh, and settlement behavior; formatting and lint passed. Fresh independent P0-P2 review was scoped-clean. Normal hooks and the SSH signature passed, the source is clean, and @VasuBansal7576's credit remains preserved in the branch history.

Exact-head CI at that revision passed the auth, security, static, type, build, Windows, and nearly all test shards, but one unrelated real WebSocket fixture polled for node terminal delivery for only one second after request execution settled. The failed shard passed 811 sibling tests; its terminal callback had not fired before the poll expired. The final test-only commit 17e8344f8c4e4dd5d7b4e27bf7c11132c57dfaf7 waits on the real final/error onEvent callbacks with the file's existing five-second WebSocket delivery budget, rejects inside the test body so cleanup still runs, and retains full payload plus exactly-once assertions. The original-order two-test file passes, formatting and lint pass, and fresh P0-P2 review is scoped-clean. The final signed checkpoint has parent 0e64be4158e56a7c1d357748917887dd252b4c03 and tree de20f25369af7ff5c37e02268d5de672d7c7c87c; normal hooks and its SSH signature verified.

Exact-head CI for the final checkpoint passed every selected build, static, type, platform, and test job, including the repaired node-auth shard and the full Windows/context/Gateway suites. The final openclaw/ci-gate passed. Security Review accepted the fresh exact-head maintained approval; dependency review, security-sensitive review, CodeQL, OpenGrep, and the combined security gate pass.

Exact-head CI at 160c7dfbe50e1a551f40c9e1225bec0240a12538 passed every selected build, static, type, platform, and test job, including the complete Windows shard, both context-maintenance shards, and the Gateway lifecycle shard. The final openclaw/ci-gate, exact-head Security Review analysis, CodeQL, dependency review, and OpenGrep checks also passed. Those results remain historical evidence for the pre-OIDC-synchronization parent; exact-head gates apply again to the final checkpoint.

The installed-package and published-updater evidence exercises the packaged Doctor, persisted SQLite credentials, and installed provider selection in separate processes. Four canonical fresh-install cases preserve cross-tenant credentials and retain same-tenant sharing; two raw-URL negative controls retain existing fencing. The official 2026.9.4 updater replaces itself with the candidate and preserves the original cross-enterprise child credential without reseeding.

That runtime proof was executed on 3cb830e78e1d9b566f22ccb48517e01d42efa465. All five changed production blobs are identical at 6b19b81459398a56f155300d3dc8e3aebd32870c and the documentation-adjusted candidate d632f0fec05a0706fec639428cb09df1aa703bd5, verified again after its normal signed checkpoint. Exact-head CI for that revision passed. The historical ClawSweeper review found no actionable code/security defects and accepted the installed/updater proof for the earlier revision. Fresh enforced review still applies to the final ownership repair.

This is isolated Linux ARM64 proof with synthetic invalid credentials. Live Enterprise authentication/refresh, every platform/install-manager combination, system-service restart, and network isolation are not claimed. The documentation-only change passed an independent review, the exact repository formatter with maintained Mintlify Accordion repair, MDX validation, and git diff --check; normal commit hooks preserved the reviewed bytes. Exact-head CI, automated security analysis, and enforced maintainer approval passed for the final 17e8344f8c4e4dd5d7b4e27bf7c11132c57dfaf7 revision.

@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations agents Agent runtime and tooling size: M labels Sep 5, 2026
@VasuBansal7576
VasuBansal7576 marked this pull request as ready for review September 5, 2026 13:49
@VasuBansal7576
VasuBansal7576 requested a review from a team as a code owner September 5, 2026 13:49
@VasuBansal7576

VasuBansal7576 commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Current head: c1f01ffef98870e2369bba09a3e698b73f22b89b. Full CI run 33982517394 completed successfully, including the required openclaw/ci-gate, built artifacts, and the formerly failing shards. No failed or pending checks remain; one superseded ClawSweeper dispatch was cancelled and another succeeded. The spawn-authority conflict was resolved by adopting upstream #139176. All 166 relevant local tests and the fresh independent review also passed. Browser inspection of the latest ClawSweeper review and all three earlier cycles found no actionable code/security findings. Real Copilot authentication proof after Doctor repair and maintainer acceptance of the sharing policy remain outstanding; CI success does not establish either.

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 24, 2026, 6:45 PM ET / 22:45 UTC (Revision 31).

ClawSweeper review

What this changes

The branch makes Copilot tenant scope part of shared OAuth credential ownership and refresh settlement, adds persisted-store and Doctor regressions, and documents tenant-specific authentication.

Merge readiness

⛔ Blocked before merge - 2 items remain

This PR remains necessary: current main still permits cross-tenant Copilot credential ownership. The final branch preserves main’s OIDC identity check, and I found no actionable patch defect. Final-head sensitive-path approval remains required.

Priority: P1
Reviewed head: 0e64be4158e56a7c1d357748917887dd252b4c03
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has substantial persisted-store and upgrade evidence with no identified correctness defect; final-head security approval remains a workflow gate.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): Packaged Doctor and published-updater evidence exercises persisted Copilot credentials, and the later production SQLite-store trace observes local-only cross-tenant ownership, Doctor health, and logout after the ownership repair. Focused tests cover the final OIDC composition; no new installed run of that merge checkpoint is claimed. No stored-data shape changes; the reported updater case covers existing-state behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): Packaged Doctor and published-updater evidence exercises persisted Copilot credentials, and the later production SQLite-store trace observes local-only cross-tenant ownership, Doctor health, and logout after the ownership repair. Focused tests cover the final OIDC composition; no new installed run of that merge checkpoint is claimed. No stored-data shape changes; the reported updater case covers existing-state behavior.
Evidence reviewed 7 items Introduced ownership guard: The pinned introduced diff checks Copilot routing scope before shared-owner selection, including the identical-refresh shortcut.
Final effect boundary: Doctor rechecks identity before removing a local shadow; persisted owner resolution supplies the owner used by profile removal.
Current main still needs the fix: The fetched main ownership path selects a shared owner before checking tenant routing scope.
Findings None None.
Security None None.

How this fits together

OpenClaw stores OAuth credentials in shared and agent-local stores. Ownership decisions determine which credential Doctor may remove and which credential an agent may adopt, refresh, or use.

flowchart LR
A[Shared credential] --> C[Tenant scope check]
B[Agent credential] --> C
C --> D[Identity and freshness check]
D --> E[Ownership decision]
E --> F[Doctor repair]
E --> G[Agent authentication]
Loading

Decision needed

Question Recommendation
Does the listed auth owner approve the final 0e64be4 credential-ownership and refresh-settlement boundary for merge? Approve final head: Review the exact final auth paths and record the required sensitive-change approval if the tenant and OIDC boundaries are acceptable.

Why: The sensitive-path guard names an earlier head, while the final head composes that boundary with main’s newer OIDC check. Automated source review cannot grant the required human approval.

Before merge

  • Complete next step (P2) - Obtain the required listed-owner sensitive-change approval for the final 0e64be4 head.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source +63, Tests +514, Docs +4. Total +581 across 14 files.

View PR surface stats
Area Files Added Removed Net
Source 6 80 17 +63
Tests 7 529 15 +514
Docs 1 4 0 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 14 613 32 +581

Review metrics

Metric Value Why it matters
Production versus regression coverage production +63 net, tests +514 net The production growth centralizes tenant policy; the larger test delta covers distinct ownership, Doctor, refresh, and persisted-store effects.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #127373
Summary: This PR is the candidate repair for the issue’s documented cross-tenant OAuth ownership and credential-removal path.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep tenant normalization with the Copilot plugin and enforce it at each shared credential ownership decision; complete final-head security approval before landing.

Do we have a high-confidence way to reproduce the issue?

Yes, at source level: current main can classify equal-generation credentials from different Copilot tenants as shared. The issue supplies a frozen reproduction; this read-only review did not execute it.

Is this the best way to solve the issue?

Yes. The branch places tenant scope checks in the shared ownership decisions used by Doctor, logout, adoption, and settlement, while retaining main’s OIDC registration check.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 1dc005c7cb34.

Labels

Label changes:

No label changes.

Label justifications:

  • P1: A cross-tenant ownership error can remove a working agent credential or select the wrong shared credential.
  • merge-risk: 🚨 compatibility: Existing agents that relied on cross-tenant sharing must authenticate for their own tenant; the maintainer-authored tenant guidance records that tradeoff.
  • merge-risk: 🚨 security-boundary: The patch changes which tenant’s credential may be adopted, inherited, or removed across agent stores.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): Packaged Doctor and published-updater evidence exercises persisted Copilot credentials, and the later production SQLite-store trace observes local-only cross-tenant ownership, Doctor health, and logout after the ownership repair. Focused tests cover the final OIDC composition; no new installed run of that merge checkpoint is claimed. No stored-data shape changes; the reported updater case covers existing-state behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. Packaged Doctor and published-updater evidence exercises persisted Copilot credentials, and the later production SQLite-store trace observes local-only cross-tenant ownership, Doctor health, and logout after the ownership repair. Focused tests cover the final OIDC composition; no new installed run of that merge checkpoint is claimed. No stored-data shape changes; the reported updater case covers existing-state behavior.

Evidence

What I checked:

  • Introduced ownership guard: The pinned introduced diff checks Copilot routing scope before shared-owner selection, including the identical-refresh shortcut. (src/agents/auth-profiles/ownership.ts:22, 0e64be4158e5)
  • Final effect boundary: Doctor rechecks identity before removing a local shadow; persisted owner resolution supplies the owner used by profile removal. (src/commands/doctor/shared/stale-oauth-profile-shadows.ts:169, 0e64be4158e5)
  • Current main still needs the fix: The fetched main ownership path selects a shared owner before checking tenant routing scope. (src/agents/auth-profiles/ownership.ts:19, 1dc005c7cb34)
  • OIDC integration: The final identity path applies Copilot scope checking before main’s OIDC issuer, client, and account binding. This addresses the previous review’s merge-conflict concern. (src/agents/auth-profiles/oauth-identity.ts:85, 0e64be4158e5)
  • Maintainer-authored tenant contract: Branch commits by steipete document tenant-separated sharing and add the refresh-settlement and ownership fences. The PR body says this bounded compatibility tradeoff was accepted; final security approval is separate. Public docs: docs/providers/github-copilot.md. (docs/providers/github-copilot.md:160, d632f0fec05a)
  • Contributor runtime proof: The reviewed PR body reports packaged Doctor and published-updater cases on persisted SQLite credentials, plus a later production-store trace observing cross-tenant local ownership and local-only logout after the ownership repair. The final OIDC composition has focused test evidence rather than a new installed run.

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Tobias Oort: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (30 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-19T05:39:43.798Z sha 6b19b81 :: blocked before merge. :: none
  • reviewed 2026-09-24T05:06:59.285Z sha d632f0f :: needs changes before merge. :: none
  • reviewed 2026-09-24T11:19:50.762Z sha 7f0d270 :: blocked before merge. :: none
  • reviewed 2026-09-24T17:01:19.378Z sha 082688f :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-24T18:10:28.261Z sha 082688f :: blocked before merge. :: none
  • reviewed 2026-09-24T19:53:17.337Z sha 342d0c4 :: blocked before merge. :: none
  • reviewed 2026-09-24T21:33:59.498Z sha 160c7df :: blocked before merge. :: none
  • reviewed 2026-09-24T22:25:57.249Z sha 160c7df :: blocked before merge. :: none

freeqaz-openai added a commit that referenced this pull request Sep 5, 2026
Reuse the existing runtime-plan fixture so the synthetic workshop tool
does not trigger unrelated provider discovery during startup. Preserve
all context and terminal assertions, and remove the temporary timing
observations now that the startup path is identified.

Reuse the matching fixture correction from #139131.
freeqaz-openai added a commit that referenced this pull request Sep 5, 2026
Reuse the existing runtime-plan fixture so the synthetic workshop tool
does not trigger unrelated provider discovery during startup. Preserve
all context and terminal assertions, and remove the temporary timing
observations now that the startup path is identified.

Reuse the matching fixture correction from #139131.
@VasuBansal7576
VasuBansal7576 force-pushed the codex/copilot-tenant-ownership-20260905 branch from c1f01ff to 1ca6654 Compare September 12, 2026 20:37
@clawsweeper clawsweeper Bot removed the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Sep 12, 2026
@VasuBansal7576
VasuBansal7576 force-pushed the codex/copilot-tenant-ownership-20260905 branch 2 times, most recently from 9e2e526 to 3cb830e Compare September 12, 2026 21:23
@VasuBansal7576

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The requested fresh installed-artifact and published-updater-to-candidate proof is now in the PR body, pinned to current head 3cb830e78e1d9b566f22ccb48517e01d42efa465: immutable logs, harness and hashes. Four canonical fresh-install cases pass, two legacy URL cases remain explicit fencing controls, and the released 2026.9.4 updater successfully replaces itself with the candidate and preserves the preexisting cross-tenant fixture. No live authentication or owner acceptance is claimed.

@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 12, 2026
steipete
steipete previously approved these changes Sep 24, 2026

@steipete steipete 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.

Reviewed the current revision's tenant ownership and settlement changes, persisted SQLite behavior, Gateway application-receipt test repair, and synchronized fixture repairs. The scoped review found no actionable issues, and exact-head CI plus automated security analysis pass.

@steipete

Copy link
Copy Markdown
Contributor

/allow-security-sensitive-change

@steipete

Copy link
Copy Markdown
Contributor

/allow-security-sensitive-change

@steipete
steipete merged commit 104e67f into openclaw:main Sep 25, 2026
419 of 420 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit 'ef2dd3235123371860c9154da7b47b2c1e940788': (41 commits)
  fix(ci): prevent Security Review checkout retry collisions (#157652)
  fix(ci): recover interrupted Security Review response bodies (#157651)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131)
  refactor(msteams): share stored service URL validation (#157706)
  fix(codex): honor configured tool PATH in native commands (#157290)
  refactor(msteams): share approval kind labels (#157705)
  fix(sessions): keep session results current during cold reads (#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (#157535)
  refactor(i18n): reuse native branch candidate extraction (#157636)
  fix(update): preserve recovery files after ownership refusal (#148890)
  fix(test): prevent late announcements from contaminating registry tests (#157681)
  fix(e2e): scan full onboarding logs for prompts (#157624)
  refactor(session-tools): derive contracts from schemas (#156365)
  refactor(channels): derive config contracts from schemas (#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (#157689)
  refactor: reuse prepared fixtures in slow core tests (#157685)
  refactor(codex): reuse marketplace reference selection (#157621)
  chore(ui): refresh control ui locales (#157710)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit '05edd36e124dc376f63475256f45e82ec437412c': (30 commits)
  refactor(matrix): reuse bounded direct-room cache insertion (#157775)
  fix: preserve channel-owner revocation across recovery (#157709)
  fix(ci): stop blocking CI during release validation (#157757)
  refactor(tlon): remove unreachable DM summary branches (#157789)
  chore: speed up worktree recovery tests with Bun (#157674)
  fix(sessions): release PR caches when pending viewers leave (#157776)
  refactor(twitch): reuse setup account selection (#157787)
  test: skip empty task ledger resets in cron fixtures (#157767)
  perf: reduce gateway and state test startup (#157711)
  fix: preserve maintenance leases during slow heartbeat renewal (#157696)
  fix(channels): match non-TTY setup advice to registered flags (#157551)
  fix: keep failed update report uploads in the CLI (#156633)
  fix: preserve rejected settings reason when opening config (#157731)
  test(update): load real filesystem dependencies in swap fixture
  fix(ci): prevent Security Review checkout retry collisions (#157652)
  fix(ci): recover interrupted Security Review response bodies (#157651)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131)
  refactor(msteams): share stored service URL validation (#157706)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit '229ab8a1fe957d3d4822309a39ddf9c7ec616395': (25 commits)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131)
  refactor(msteams): share stored service URL validation (#157706)
  fix(codex): honor configured tool PATH in native commands (#157290)
  refactor(msteams): share approval kind labels (#157705)
  fix(sessions): keep session results current during cold reads (#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (#157535)
  refactor(i18n): reuse native branch candidate extraction (#157636)
  fix(update): preserve recovery files after ownership refusal (#148890)
  fix(test): prevent late announcements from contaminating registry tests (#157681)
  fix(e2e): scan full onboarding logs for prompts (#157624)
  refactor(session-tools): derive contracts from schemas (#156365)
  refactor(channels): derive config contracts from schemas (#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (#157689)
  refactor: reuse prepared fixtures in slow core tests (#157685)
  refactor(codex): reuse marketplace reference selection (#157621)
  chore(ui): refresh control ui locales (#157710)
  docs(gateway): show how we build OpenClaw on Team (#157675)
  refactor: verify IRC surrogate chunking over loopback (#157580)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* fix(ui): keep Stop available while drafts cannot send

* chore: integrate main fixes for Stop UI validation

* commit 'ef2dd3235123371860c9154da7b47b2c1e940788': (41 commits)
  fix(ci): prevent Security Review checkout retry collisions (#157652)
  fix(ci): recover interrupted Security Review response bodies (#157651)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131)
  refactor(msteams): share stored service URL validation (#157706)
  fix(codex): honor configured tool PATH in native commands (#157290)
  refactor(msteams): share approval kind labels (#157705)
  fix(sessions): keep session results current during cold reads (#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (#157535)
  refactor(i18n): reuse native branch candidate extraction (#157636)
  fix(update): preserve recovery files after ownership refusal (#148890)
  fix(test): prevent late announcements from contaminating registry tests (#157681)
  fix(e2e): scan full onboarding logs for prompts (#157624)
  refactor(session-tools): derive contracts from schemas (#156365)
  refactor(channels): derive config contracts from schemas (#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (#157689)
  refactor: reuse prepared fixtures in slow core tests (#157685)
  refactor(codex): reuse marketplace reference selection (#157621)
  chore(ui): refresh control ui locales (#157710)
  ...

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
…penclaw#139131)

* fix(auth): preserve Copilot tenant credentials during Doctor repair

* test(auth): split Copilot ownership cases below file-size limit

* docs(copilot): clarify tenant credential sharing

Document that agents share Copilot credentials only when supported tenant scopes
match, and direct affected agents to authenticate for their intended tenant.

Co-authored-by: VasuBansal <[email protected]>

* fix(auth): preserve Copilot tenant fences during peer settlement

Require refreshed shared Copilot credentials to match the fenced peer's
normalized routing scope before local fence removal. Cross-tenant peers remain
terminally fenced.

Co-authored-by: VasuBansal <[email protected]>

* fix(auth): preserve Copilot tenant scope in ownership

Require Copilot OAuth ownership to validate normalized routing scope before
accepting an identical refresh generation. Same-tenant peers keep the shared
owner shortcut while cross-tenant credentials remain locally owned.

Co-authored-by: VasuBansal <[email protected]>

* test(gateway): await plugin application receipt

* test(gateway): await node terminal events

---------

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: VasuBansal <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
* fix(ui): keep Stop available while drafts cannot send

* chore: integrate main fixes for Stop UI validation

* commit '5dae23c843013fce2e0bb80037d232bbabfc70e5': (41 commits)
  fix(ci): prevent Security Review checkout retry collisions (openclaw#157652)
  fix(ci): recover interrupted Security Review response bodies (openclaw#157651)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (openclaw#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (openclaw#139131)
  refactor(msteams): share stored service URL validation (openclaw#157706)
  fix(codex): honor configured tool PATH in native commands (openclaw#157290)
  refactor(msteams): share approval kind labels (openclaw#157705)
  fix(sessions): keep session results current during cold reads (openclaw#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (openclaw#157535)
  refactor(i18n): reuse native branch candidate extraction (openclaw#157636)
  fix(update): preserve recovery files after ownership refusal (openclaw#148890)
  fix(test): prevent late announcements from contaminating registry tests (openclaw#157681)
  fix(e2e): scan full onboarding logs for prompts (openclaw#157624)
  refactor(session-tools): derive contracts from schemas (openclaw#156365)
  refactor(channels): derive config contracts from schemas (openclaw#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (openclaw#157689)
  refactor: reuse prepared fixtures in slow core tests (openclaw#157685)
  refactor(codex): reuse marketplace reference selection (openclaw#157621)
  chore(ui): refresh control ui locales (openclaw#157710)
  ...

Co-authored-by: Vincent Koc <[email protected]>
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* refactor(ui): share slash-command failure results

* Merge main to incorporate the upstream update type fix

* commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits)
  fix(subagents): stop completion transcript retry loops (#157571)
  perf(sessions): remove duplicate foreground history reference scans (#157572)
  improve(typesafe): defer startup work until the first decision (#157380)
  fix(update): restore npm-pack helper typechecking (#157659)
  fix(packaging): avoid heap exhaustion on large bundles (#157471)
  refactor(infra): share process error handler registries (#157632)
  chore(ui): refresh control ui locales (#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (#157592)
  perf(plugins): reuse declared tool membership during resolution (#156205)
  fix(ui): pasted text previews fail before sending (#157390)
  fix(agents): wait for database resources during deletion (#157631)
  improve: move operator profile database reads off the Gateway thread (#155800)
  fix: explain rejected settings without losing edits (#157549)
  fix: keep Gateway responsive while recording trajectory events (#157598)
  fix(auth): show SIWC email and selected model account identity (#157629)
  docs: explain Codex app approval precedence (#155089)
  refactor(wizard): share select prompt requests (#157607)
  fix(ui): omit empty sections from conversation Markdown exports (#157590)
  fix(doctor): explain update lint supervisor refusals (#156547)
  fix(ui): GitHub folder links lose repository context (#157619)
  ...

* Merge frozen main to include the question fixture authority fix

* commit '229ab8a1fe957d3d4822309a39ddf9c7ec616395': (25 commits)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131)
  refactor(msteams): share stored service URL validation (#157706)
  fix(codex): honor configured tool PATH in native commands (#157290)
  refactor(msteams): share approval kind labels (#157705)
  fix(sessions): keep session results current during cold reads (#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (#157535)
  refactor(i18n): reuse native branch candidate extraction (#157636)
  fix(update): preserve recovery files after ownership refusal (#148890)
  fix(test): prevent late announcements from contaminating registry tests (#157681)
  fix(e2e): scan full onboarding logs for prompts (#157624)
  refactor(session-tools): derive contracts from schemas (#156365)
  refactor(channels): derive config contracts from schemas (#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (#157689)
  refactor: reuse prepared fixtures in slow core tests (#157685)
  refactor(codex): reuse marketplace reference selection (#157621)
  chore(ui): refresh control ui locales (#157710)
  docs(gateway): show how we build OpenClaw on Team (#157675)
  refactor: verify IRC surrogate chunking over loopback (#157580)
  ...

* chore: merge frozen main prerequisite repairs

Co-authored-by: Vincent Koc <[email protected]>
roboclaw-bot added a commit that referenced this pull request Sep 26, 2026
Backport #153187: de3010b
Backport #139131: 104e67f

Keep prepared input reads with the exact active plugin invocation and use
nonjoining ordinary work without granting cleanup authority. Preserve
physical disposal settlement and provider-owned Copilot routing scope
across credential ownership, peer refresh, adoption and Doctor.

Adapt the frozen identity-less shortcuts without importing OIDC identity
features. Scope normalization matches formatting for absent, empty and
whitespace-only persisted metadata. No credential schema or config change.

Targeted corrected proof and independent review pass. Earlier broad/built
proof remains bound to its source tree; current composed CI and packaging
qualification remain separate.

Co-authored-by: Jon Brown <[email protected]>
Co-authored-by: Patrick Erichsen <[email protected]>
Co-authored-by: VasuBansal7576 <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: jalehman <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
* refactor(ui): share slash-command failure results

* Merge main to incorporate the upstream update type fix

* commit 'dda1f68bfa102cb804392c0e7cc22c0566a0944a': (68 commits)
  fix(subagents): stop completion transcript retry loops (openclaw#157571)
  perf(sessions): remove duplicate foreground history reference scans (openclaw#157572)
  improve(typesafe): defer startup work until the first decision (openclaw#157380)
  fix(update): restore npm-pack helper typechecking (openclaw#157659)
  fix(packaging): avoid heap exhaustion on large bundles (openclaw#157471)
  refactor(infra): share process error handler registries (openclaw#157632)
  chore(ui): refresh control ui locales (openclaw#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (openclaw#157592)
  perf(plugins): reuse declared tool membership during resolution (openclaw#156205)
  fix(ui): pasted text previews fail before sending (openclaw#157390)
  fix(agents): wait for database resources during deletion (openclaw#157631)
  improve: move operator profile database reads off the Gateway thread (openclaw#155800)
  fix: explain rejected settings without losing edits (openclaw#157549)
  fix: keep Gateway responsive while recording trajectory events (openclaw#157598)
  fix(auth): show SIWC email and selected model account identity (openclaw#157629)
  docs: explain Codex app approval precedence (openclaw#155089)
  refactor(wizard): share select prompt requests (openclaw#157607)
  fix(ui): omit empty sections from conversation Markdown exports (openclaw#157590)
  fix(doctor): explain update lint supervisor refusals (openclaw#156547)
  fix(ui): GitHub folder links lose repository context (openclaw#157619)
  ...

* Merge frozen main to include the question fixture authority fix

* commit 'dc64cc3a3a3cf38fff1e44c1d7af42a32929d7e4': (25 commits)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (openclaw#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (openclaw#139131)
  refactor(msteams): share stored service URL validation (openclaw#157706)
  fix(codex): honor configured tool PATH in native commands (openclaw#157290)
  refactor(msteams): share approval kind labels (openclaw#157705)
  fix(sessions): keep session results current during cold reads (openclaw#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (openclaw#157535)
  refactor(i18n): reuse native branch candidate extraction (openclaw#157636)
  fix(update): preserve recovery files after ownership refusal (openclaw#148890)
  fix(test): prevent late announcements from contaminating registry tests (openclaw#157681)
  fix(e2e): scan full onboarding logs for prompts (openclaw#157624)
  refactor(session-tools): derive contracts from schemas (openclaw#156365)
  refactor(channels): derive config contracts from schemas (openclaw#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (openclaw#157689)
  refactor: reuse prepared fixtures in slow core tests (openclaw#157685)
  refactor(codex): reuse marketplace reference selection (openclaw#157621)
  chore(ui): refresh control ui locales (openclaw#157710)
  docs(gateway): show how we build OpenClaw on Team (openclaw#157675)
  refactor: verify IRC surrogate chunking over loopback (openclaw#157580)
  ...

* chore: merge frozen main prerequisite repairs

Co-authored-by: Vincent Koc <[email protected]>
steipete added a commit that referenced this pull request Sep 28, 2026
Whitespace-only Copilot enterpriseUrl metadata cannot be formatted, so routing-scope normalization now treats it as invalid instead of public; ownership, copy and adoption no longer match it to a public-scope credential.

Forward-port of release/2026.9.7 3d0390e (normalization correction on #139131).

Co-authored-by: Patrick Erichsen <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
Whitespace-only Copilot enterpriseUrl metadata cannot be formatted, so routing-scope normalization now treats it as invalid instead of public; ownership, copy and adoption no longer match it to a public-scope credential.

Forward-port of release/2026.9.7 3d0390e (normalization correction on openclaw#139131).

Co-authored-by: Patrick Erichsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations docs Improvements or additions to documentation extensions: github-copilot gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. security-sensitive-changed size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants