Repository navigation
fix(acp): keep configured aliases as session owners - #136165
service-cyber wants to merge 19 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed September 4, 2026, 3:08 PM ET / 19:08 UTC. ClawSweeper reviewWhat this changesThis PR makes a configured ACP alias own its session and lifecycle while its configured ACP agent remains the external execution harness, with Doctor migration for legacy harness-owned sessions. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 11 items remain Keep open: the alias-owner repair is still absent from current main, but the new Doctor migration can delete rehomed delivery records when a shared-store source race rolls back the staged target. It also needs real exact-head authority-path proof and maintainer acceptance of the canonical-only legacy-session upgrade behavior. Priority: P1 Review scores
Verification
How this fits togetherACP spawn requests resolve an OpenClaw alias and an external ACP harness; the alias determines the durable session key, workspace, account binding, and lifecycle controls while the harness executes the turn. Doctor migrates old harness-owned session records into that owner namespace before normal runtime use. flowchart LR
Requester[Requester session] --> Resolve[Resolve alias and harness]
Resolve --> Owner[Configured session owner]
Owner --> Runtime[External ACP harness]
Owner --> State[Session state and bindings]
State --> Controls[Resume and lifecycle controls]
Legacy[Legacy harness-owned records] --> Doctor[Explicit Doctor migration]
Doctor --> State
Decision needed
Why: The PR intentionally removes runtime promotion for existing persisted sessions; this is an upgrade-policy choice beyond the mechanical rollback repair. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +670, Tests +2083, Docs +25. Total +2778 across 17 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Make the owner migration preserve or restore all shared-store artifacts on rollback, add a shared-SQLite delivery regression, and retain canonical-only runtime reads only after maintainers accept the explicit Doctor upgrade path. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: use an exact shared SQLite session store with a conversation-delivery row, then change the source entry between target staging and source removal. The existing source-race harness provides the injection point but lacks the shared-store artifact assertion. Is this the best way to solve the issue? No: alias/harness separation is the right owner boundary, but the staged-target rollback must not delete copied shared-store artifacts and the upgrade policy still needs maintainer confirmation. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d2a674a6c859. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
0e04116 to
28489b2
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
28489b2 to
79af7db
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
Related: #126539
What Problem This Solves
Configured OpenClaw ACP aliases could dispatch through an external harness and then persist that harness as the session owner. Session lookup, workspace/account routing, bindings, resume authorization, cancellation, and cleanup could consequently disagree about who owned the session.
Why This Change Was Made
Configured ACP aliases now remain the persistent OpenClaw owner.
agents.entries.*.runtime.acp.agentis used only as the external dispatch harness. Owner identity is carried through session keys/stores, workspace and account selection, bindings, runtime initialization, lifecycle registration, resume, cancel, and cleanup.Runtime compatibility fallback has been removed. Resume and lifecycle commands read only the canonical configured-owner store.
Legacy harness-owned rows are handled explicitly:
openclaw doctorinventories eligible legacy ACP sessions without changing them.openclaw doctor --fixmigrates a row only when its harness maps to exactly one configured owner.agent:<owner>:..., so retries can finish a partial move and another alias cannot replay the source.This PR deliberately excludes Codex command detection,
CODEX_HOMEpolicy, and shell/interpreter/package-runner parsing.User Impact
Evidence
Exact reviewed head:
79af7db588a4bd6f1e0dd9f775936fdd7b1bd0d0Reviewed base:
9b95e87c4b2b506cc35c62e714f05cce4b71c61dDiff: 17 files,
+2894/-116(+728/-58production,+2130/-47tests,+36/-11docs).Exact-head proof
/acplifecycle and process proof: 257/257 passed across seven Vitest shards, including concurrent target-write rejection, source-removal race compensation, concurrent successful-migration preservation, divergent interrupted-stage retry rejection, expected-harness discovery, and strict source/canonical/legacy-target ACP metadata agreement.reviewer, harnessowner-fixture, owner workspace/account/binding, then rejects a foreign resume before any ACPX peer-state byte changes.globalandshared-projectscopes.globalsessions while continuing to reject ambiguous bare keys in fixed shared stores.Environment-only baseline exceptions
check:changedcompletes candidate-owned checks, then production core typecheck stops on four unrelated upstreamassertBeforeRenameerrors insrc/infra/install-package-dir.ts; the ACP diff does not touch that path.@sindresorhus/slugify.ENOEXEC); verification uses the installed pnpm 10.30.1 with automatic version switching disabled via an external temporary user config. No package files or dependencies are changed.Standard CI will rerun missing-package lanes from a clean install.
Deploy / rollback
No migration, deployment, or production configuration change is performed by this PR. Operators must invoke
openclaw doctor --fixexplicitly to migrate eligible legacy rows. Before that action, rollback is the previous draft head28489b2985f4d6befc8b6ab8d2377276ba9d8738. If an operator runs Doctor repair, normal state backups are the rollback boundary for migrated persisted data.Reviewer routing
Please review configured-alias ownership, canonical-only runtime reads, Doctor's single-owner claim/consumption protocol, ambiguity/collision handling, and owner-consistent account/binding lifecycle. Generalized command parsing is intentionally absent.
Worked on by
Devmon (implementation, verification, and technical review) under Scott's authorization; coordinated by Asimov.