Skip to content

fix(gateway): keep chat admission bound to current session authority - #156941

Closed
galiniliev wants to merge 5 commits into
mainfrom
galiniliev/teamclaw-pr-gateway-ownership
Closed

galiniliev wants to merge 5 commits into
mainfrom
galiniliev/teamclaw-pr-gateway-ownership

Conversation

@galiniliev

@galiniliev galiniliev commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes chat admission that could consume stale session, member, or physical storage facts after a worker read. Rejected uploads also left a pending reservation that blocked corrected input using the same retry key.

User Impact

An authorized member can send a normal turn. Revoked membership and reassigned sessions reject input before transcript or provider effects; unrelated configuration changes preserve valid work. Rejected or failed upload admission releases only its own reservation, so a corrected request can reuse its key. No new configuration, stored format, schema migration, or operator action is required.

Why This Change Was Made

The existing sharing owner consumes exact worker-prepared rows and membership under the retained physical storage owner. The normal lifecycle owner revalidates before registering work, and the upload owner settles its exact reservation on rejection. Existing projection, queued Stop, recovery, and provider ownership contracts remain with their canonical owners.

Published repair head: 17487454baa68c8901b1c9c84393135e93748a55. This branch is rebased on main 82949354d73c910a0b59ed7b2af6cfddde87c0ff; it has no source dependency on the separate native ownership PR.

Evidence

  • Real authenticated Gateway client and local HTTP Responses provider: allowed chat.send started, user and assistant messages persisted, and exactly one provider request contained the submitted input. Membership revoked during the held worker read rejected with INVALID_REQUEST, unchanged transcript, and no additional provider request. Reassignment to a successor session also rejected, with unchanged original transcript and an empty successor transcript.
  • The real client/provider scenario passed in 18.25 s in the final five-file boundary run. The five files passed 43 tests; that Vitest run took 96.65 s including transformation. Earlier independent runs also observed the allowed/revoked/reassigned effects; the historical agent.wait timeout did not reproduce on this reconciled candidate, and no timeout or retry was added.
  • Exact upload-reservation negative control disabled cleanup and failed at the pending dedupe effect. Restored code passed both refusal and thrown-policy paths, plus corrected-key retry; the two admission tests passed in 24.72 s wrapper wall time (235 ms for the upload case).
  • Physical shared-store parent/model-source cases: five passed, 36.72 s wrapper wall time. Existing worker sharing, pending Stop, and profile-binding boundary tests passed in the 43-test run.
  • The selected preparation comparator now scopes model inputs to the canonical primary/fallback provider descriptors and channel inputs to originating/persisted delivery channels, while retaining global tools, plugins, security and creator contracts. Unrelated provider/channel reload controls failed before the repair; relevant model/security/routing changes still reject.
  • Qualified rereads preserve exact selected-source identity and the original full discovery/source-key absence fences. A valid empty counterpart store failed before the redundant singleton-versus-multi-store vector comparison was removed. The final 12-case multi-store, collision, copy, symlink, counterpart arrival and configuration run passed in 33.52 s wrapper wall time.
  • Production and owning Gateway method/other test typechecks passed. Scoped formatting, line caps, assertion safety, dependency/patch and plugin boundaries passed; targeted lint and static guards were run. CI Madge counts type edges; the pre-admission DTO now lives in a leaf module consumed by all three callers. Final Madge and all three Knip scans returned zero; superseded unused readers/projections and an orphan fixture were removed.
  • Fresh independent review found the upload reservation leak and a missing state parameter in a shared-store fixture; both were fixed and directly verified. Final complete-diff independent review was scoped-clean (P2, confidence 0.72). No assertions, authority checks, baselines, expected failures, or retries were weakened.
  • Full local suite/build and a repeat of the broad core-test union were not run: host load caused one broad typecheck attempt to take 4,175 s. Its final missed-await consumer was repaired and the exact owning config passed. Required GitHub checks and exact-head ClawSweeper ratings are pending for the published candidate; older-head green CI is historical evidence only.

The observed GitHub merge conflict was resolved against that pinned main, preserving its subscription access-only committed membership preparation/diagnostics and creator/admin archive requirement alongside retained chat admission. Fresh complete-diff review was scoped-clean through P2 (confidence 0.78); the rebased worker, real-client/provider, narrow mutation and scoped-read run passed 65/65 in 83.17 s wrapper (79.56 s Vitest, real-provider case 18.507 s). The existing assembled archive-tool case separately proved creator self-archive and assignee archive/restore denial (1/1 selected, 12 intentionally unselected, 23.35 s wrapper; case 3.091 s). Previous full-diff proof remains source-equivalent outside the two conflict seams; full suite/build was not repeated.

The final cap repair keeps the existing authorization parameter DTO with its existing authorization owner and reuses the identical predispatch argument object. It passed its own scoped-clean P2 review (confidence 0.94), final production types, scoped typed lint, formatting and type-edge Madge (zero cycles), without cap or baseline exceptions. The conflict replacement is published with a lease against verified prior head 3295154dbeb15c7afa62d810a2ce03a4d9d09be3; previous ratings and CI attempts do not qualify this new head.

CI on 363819fd156a1fce9f7536d12a6954b59428d790 (36772463343) found three ordinary Stop fixture admission failures in compact-small-11 (110082494113). Original-order replay reproduced 3 failures/37 passes; captured admission responses proved its complete session-utils mock removed the canonical model resolver. The fixture now preserves the real module and mocks only its owned lookup. All 40 original-order cases passed (38.22 s wrapper, 36.41 s Vitest); owning Gateway test types, exact CI-config typed lint, formatting and fresh P2 fixture review passed. Three equivalent admission-release expressions keep the existing file cap, with no suppression or weakened assertion.

Remaining CI investigation: compact-large-2 (110082501255) failed setup-inference.first-signin.integration.test.ts:420 expecting a reuse confirmation but receiving a note. One bounded existing-test replay reproduced that exact failure (76.96 s wrapper, 47.32 s Vitest). Its test/setup-admission/wizard source is unchanged against pinned main, which alone does not establish causality; the credential owner is investigating the actual provider context. Confirmation, owner isolation and revoked-retry/no-effect assertions remain intact. 128 CI checks succeeded and 31 were cancelled in that failed attempt; cancelled coverage is unproven. Durable prior-head ClawSweeper review reports overall4/proof5/patch4 with no actionable findings, historical after this fixture-only replacement; latest-head CI/rating remain pending.

The sign-in investigation established a canonical dependency bug: setup supplied current host-authorized existingProfiles, but Copilot reread an ambient runtime auth view and missed the reconnect credential. The vendor now consumes eligible host facts, treats explicitly empty/foreign profiles as unavailable, and carries the selected credential through its existing token/SecretRef resolver. Standalone absence still uses canonical store enumeration, including noninteractive setup; no SDK, config, state/schema, or permission expansion. Original registered sign-in passed with confirmation, same-owner replacement, other-owner isolation, stored-ref activation and revoked-retry no-effects assertions unchanged (61.80 s wrapper, 24.84 s Vitest). Three registered selected/empty/foreign authority cases passed (22.84 s wrapper) and all failed with original index bytes restored; token/interactive/tenant/noninteractive siblings passed 34 cases in 13.57 s wrapper. New cases add no timers, polling, or Gateway/process boots. Production types, scoped typed lint, formatting and fresh final P2 review passed (confidence 0.87).

Known current CI gap: on 35b500088cc8afb71c8011d9b3b99ed7b46b08e3, run 36775165544/job 110091537327 failed four existing global main/work seeded-chat QA cells at prepared authority before provider effects; the working agent-only sibling passed. One assembled replay reproduced the exact denial (687.24 s wrapper, dominated by 9m52s required first build; test49.29 s). A cheaper real qualified-worker/admission replay independently identified raw global versus qualified agent:owner:global comparison; the bounded codec repair is being verified separately and is not included in this Copilot-only commit. Required CI and durable exact-current ratings remain pending; historical 35b5000 review was overall4/proof5/patch4 without actionable findings.

Final global repair: prepared admission now qualifies its expected original selected store key through the same toAgentStoreSessionKey owner as prepareQualifiedSessionEntryTarget. It preserves literal/raw aliases, exact logical agent, selected physical source and all original discovery/key-absence/lifecycle guards. Original assembled QA cell and cheaper actual qualified-worker consumer both rejected valid global work before the fix; fixed owning worker file passed 13 cases, then explicit main/work global plus qualified cases passed 3 (11.13 s wrapper), including independent wrong-owner no-effect controls. Fresh actual correction review was scoped-clean through P2 (confidence 0.87). Fixed assembled four seeded main/work cells and agent-only sibling were not completed locally: the wrapper forced a second full declaration build, stopped under the host limit with joined process-group cleanup (exit130). Those cells remain for required CI; no timeout, retry or assertion was weakened.

The second actual merge conflict was reconciled on the pinned main above, preserving recovery commit 04f77bdb52bcf5b8b2669051e248e9d6bfb6cdfc. Main already contains canonical maintainer Copilot repair 332e4d3ec02df53b18003155fe44a0a102b383e1; the superseded vendor commit was retired rather than retaining competing selection/secret readers or tests. Range-diff confirms all five retained Gateway commits are patch-identical. Final rebased worker/admission run passed 16 cases in 47.77 s wrapper (44.89 s Vitest); production types, line caps and type-edge Madge zero passed. Existing exact-head review/CI of older revisions is historical; durable replacement-head ratings and required CI remain pending.

@clawsweeper

clawsweeper Bot commented Sep 24, 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 gateway Gateway runtime agents Agent runtime and tooling size: XL labels Sep 24, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

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

ClawSweeper review

What this changes

The branch makes Gateway chat admission recheck current session, membership, and storage authority before starting work, clears rejected upload reservations, and refreshes native session ownership reads.

Merge readiness

⛔ Blocked before merge - 3 items remain

Current main does not contain the worker-retained chat authorization in this PR. The current source addresses the prior global-key finding, and the recorded Gateway proof covers allowed, revoked, and reassigned member turns. The assembled global-session cases that previously failed still need an exact-head result.

Priority: P1
Reviewed head: 17487454baa68c8901b1c9c84393135e93748a55

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The branch has strong real-boundary authority proof and no definite patch defect, with one named integrated global-chat validation gap.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body reports an after-fix run through an authenticated Gateway client and local HTTP provider: an allowed member turn reached transcript and provider, while held worker reads followed by revocation or reassignment produced no further effects. Source shows that scenario exercises the changed Gateway admission owner. The later global-key repair has worker-boundary proof, with its assembled seeded-chat result still outstanding. No stored-data contract change was identified.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body reports an after-fix run through an authenticated Gateway client and local HTTP provider: an allowed member turn reached transcript and provider, while held worker reads followed by revocation or reassignment produced no further effects. Source shows that scenario exercises the changed Gateway admission owner. The later global-key repair has worker-boundary proof, with its assembled seeded-chat result still outstanding. No stored-data contract change was identified.
Evidence reviewed 11 items Introduced Gateway path: The pinned merge-base-to-head diff adds an asynchronous sharing authorization path for chat sends and retained worker facts at admission.
Current main remains distinct: Current main retains the earlier synchronous chat admission implementation; its tree does not contain the new sharing authorization or worker test files.
Prior finding addressed in source: The prepared-authority comparison qualifies the original selected store key before comparing it with the worker's session key.
Findings None None.
Security None None.

How this fits together

The Gateway receives authenticated chat requests, resolves the selected session and its sharing permissions, then admits a turn. An admitted turn can write a transcript and call a model provider.

flowchart LR
A[Authenticated chat request] --> B[Session and storage selection]
B --> C[Worker reads row and membership]
C --> D{Current authority?}
D -->|Yes| E[Reserve and admit turn]
D -->|No| F[Reject without effects]
E --> G[Transcript and model provider]
Loading

Before merge

  • Resolve merge risk (P1) - The four assembled seeded main/work global-chat cases that failed on an earlier head have not been completed locally after the final key repair. The added worker test proves the authorization comparison but does not itself show a full global-session chat turn reaching transcript and provider effects.
  • Complete next step (P2) - Confirm the four seeded main/work global-chat cases pass on the exact head, or provide equivalent assembled Gateway proof; address any failure before merge.
  • Resolve review confidence - ClawSweeper must reach high confidence before merge readiness is known.
Agent review details

Security

None.

PR surface

Source +1502, Tests +1538. Total +3040 across 51 files.

View PR surface stats
Area Files Added Removed Net
Source 33 2380 878 +1502
Tests 18 1577 39 +1538
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 51 3957 917 +3040

Review metrics

Metric Value Why it matters
Production and test growth production +2381/-875 lines; tests and support +1576/-42 lines The production growth is substantial but supports retained worker reads and current-authority checks across the admission boundary.

Merge-risk options

Maintainer options:

  1. Verify the integrated global chat path (recommended)
    Confirm the previously failing seeded main/work global-chat cases pass on this exact head, or provide equivalent assembled Gateway evidence before merge.

Technical review

Best possible solution:

Keep the selected-store worker read and live authority guard, while confirming valid global sessions for both main and work agents can complete a chat turn and wrong-owner or revoked requests stop before side effects.

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

Yes, at the source level: current main uses the older admission path, and the PR records a real Gateway client scenario for stale membership and reassignment. This read-only review did not execute that scenario.

Is this the best way to solve the issue?

Yes in principle: the patch reuses the Gateway's sharing and selected-store owners for revalidation. The integrated global-session chat result remains the specific validation gap.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 70219a1b6f2b.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body reports an after-fix run through an authenticated Gateway client and local HTTP provider: an allowed member turn reached transcript and provider, while held worker reads followed by revocation or reassignment produced no further effects. Source shows that scenario exercises the changed Gateway admission owner. The later global-key repair has worker-boundary proof, with its assembled seeded-chat result still outstanding. No stored-data contract change was identified.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P1: The change addresses shared chat admission where stale authority could affect live turns and provider dispatch.
  • merge-risk: 🚨 compatibility: An earlier head rejected valid seeded global-session sends, and the assembled main/work path still needs an exact-head result.
  • merge-risk: 🚨 session-state: The changed admission path binds turns to retained session rows and physical sources across possible reassignment.
  • merge-risk: 🚨 security-boundary: The diff changes when Gateway chat requests consume current membership and caller authority before side effects.
  • 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 (live_output): The PR body reports an after-fix run through an authenticated Gateway client and local HTTP provider: an allowed member turn reached transcript and provider, while held worker reads followed by revocation or reassignment produced no further effects. Source shows that scenario exercises the changed Gateway admission owner. The later global-key repair has worker-boundary proof, with its assembled seeded-chat result still outstanding. No stored-data contract change was identified.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body reports an after-fix run through an authenticated Gateway client and local HTTP provider: an allowed member turn reached transcript and provider, while held worker reads followed by revocation or reassignment produced no further effects. Source shows that scenario exercises the changed Gateway admission owner. The later global-key repair has worker-boundary proof, with its assembled seeded-chat result still outstanding. No stored-data contract change was identified.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Galin Iliev: 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)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Confirm the previously failing seeded main/work global-chat cells pass on the exact head.

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 (21 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-26T02:15:32.623Z sha f2c05fb :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-26T02:55:57.648Z sha 91fc68a :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-26T03:12:48.234Z sha 91fc68a :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-30T19:04:46.959Z sha 5166a83 :: blocked before merge. :: [P2] Limit preparation invalidation to the selected turn
  • reviewed 2026-09-30T20:20:55.985Z sha 3295154dbeb15c7afa62d810a2ce03a4d9d09be3 :: blocked before merge. :: none
  • reviewed 2026-09-30T20:32:24.391Z sha 363819f :: needs maintainer review before merge. :: none
  • reviewed 2026-09-30T20:53:41.442Z sha 35b5000 :: blocked before merge. :: none
  • reviewed 2026-09-30T21:43:00.532Z sha 3c007041aa63bd17fa2f92ff304eae073799f7ca :: blocked before merge. :: [P1] Compare global-session keys in the same canonical form

@galiniliev
galiniliev force-pushed the galiniliev/teamclaw-pr-gateway-ownership branch 2 times, most recently from 7855be2 to c039048 Compare September 24, 2026 03:16
@galiniliev
galiniliev marked this pull request as ready for review September 24, 2026 03:17
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components. This comment is informational because the PR author has repository Maintain or Admin access.

  • Current SHA: 17487454baa68c8901b1c9c84393135e93748a55
  • Maintainer: @galiniliev
  • Repository role: maintain

These security sensitive changes were made:

  • src/gateway/server-methods.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/session-sharing-authorization-async.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/session-sharing-authorization.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. label Sep 24, 2026
@galiniliev
galiniliev force-pushed the galiniliev/teamclaw-pr-gateway-ownership branch from c039048 to 8671700 Compare September 24, 2026 07:06
@galiniliev

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

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. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 24, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Sep 24, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Sep 24, 2026
@clawsweeper clawsweeper Bot added the rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. label Sep 24, 2026
@galiniliev

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Please review exact current head 363819fd156a1fce9f7536d12a6954b59428d790. The actual main conflict is reconciled on 948f45e, preserving subscription access-only membership preparation and archive creator/admin authority. The selected configuration repair, complete source fences, 65 real-provider/worker/read boundary cases, assembled archive denial, fresh full-diff/cleanup reviews, final types/lint and Madge zero are recorded in the updated body.

@clawsweeper

clawsweeper Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 30, 2026
@galiniliev
galiniliev force-pushed the galiniliev/teamclaw-pr-gateway-ownership branch from 3c00704 to 1748745 Compare September 30, 2026 21:58
@galiniliev

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Please review exact current head 17487454baa68c8901b1c9c84393135e93748a55 on pinned main 82949354d73c910a0b59ed7b2af6cfddde87c0ff. The actual global raw/qualified-key mismatch is repaired through the existing selected-store codec, with real qualified-worker main/work and wrong-owner red/green effects, owning tests/types/lint/Madge and fresh correction review in the body. Actual main conflict is reconciled; all five retained commits are patch-identical and canonical main Copilot owner332e4d3 supersedes the earlier vendor cut. Fixed assembled global cells are explicitly locally unrun after the host-limited build was joined/stopped, with required CI now running.

@clawsweeper

clawsweeper Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Continuing this integration in #164682, retaining @galiniliev's original commits and human co-author credit. The replacement incorporates current main, improves the worker-backed lookup and authority checks, and adds reservation/callback cleanup regressions. Source review is complete; isolated execution proof and the schema-facts prerequisite are still pending.

This PR will remain open until the replacement merges.

@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Landed through the credited replacement #164682 as 00daeeb, verified on main. This PR did not allow maintainer edits, so the replacement retained its contributor ancestry and the final squash credits Galin Iliev's linked GitHub identity.

The completed repair moves initial chat/session and membership preparation through the existing database workers while preserving current caller, physical-session, reservation, and accepted-input authority across waits. It also joins accepted work during shutdown and preserves released synchronous SDK contracts. Focused regressions and the real Gateway/provider scenario ran in secretless GitHub CI; nine source-derived negative controls qualified the repaired boundaries. Exact-head CI passed 94 jobs, with only the independently reproduced main cron-authority failure and its aggregate admitted through the native admin exception. Details and evidence are in #164682.

Thank you @galiniliev for the original work. Closing this source PR now that its improved replacement has merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling 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. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. 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: XL 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