Repository navigation
fix: require approval for delegated changes without effective authority - #196984
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
|
@clawsweeper explain |
|
ClawSweeper status:
|
|
Codex review: blocked before merge. What this changesThis PR requires current execution authority or an explicit standing grant for automatic delegated changes and adds global and per-agent approval controls. Example: A Default agent with exec denied requests logging.level = warn.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains This PR addresses an authority gap still present on main; no introduced correctness defect was found, and the new evidence resolves the previous proof requests. Priority: P1 Before merge
FindingsNone. Agent review detailsHow this fits togetherAgent tool assembly supplies host-owned caller authority to the Gateway approval owner, which authorizes an exact system-agent proposal and rechecks authority through the persistent writer. flowchart TD
A[Agent tool assembly] --> B[Host caller authority]
B --> C[Gateway approval owner]
D[Live configuration] --> B
C --> E[Exact human approval]
C --> F[System agent executor]
E --> F
F --> G[Persistent config writer]
B --> G
Technical reviewBest possible solution: Retain the existing approval and writer owners with live delegation checks, exact approval for grant expansion, and documented independent standing authority. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the settings-only authorization path, and the published negative control shows the old reader persisting logging.level = error after revocation; no target code was executed during this review. Is this the best way to solve the issue? The patch repairs authority at the existing delegation and persistent-effect boundaries, preserves exact human approval, and uses one shared execution predicate rather than another executor. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ec1549a15e36. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +426, Tests +1155, Docs +95, Generated 0, Other +1. Total +1677 across 44 files. Added test files: 2. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 10, 2026, 10:40 PM ET / November 11, 2026, 03:40 UTC (Revision 2). |
Inspectable delegated-administration validation evidenceThis republishes sanitized observed results from the completed isolated runs. It adds no new execution claim. The JSON below is an allowlisted projection of captured results: host paths, device/session identifiers, transcripts, environment values and credentials are omitted. The package effects were checked from persistent configuration, rather than inferred from model replies. Source and artifact bindingAll 37 frozen source paths match commit Candidate package SHA256: Installed Gateway and persistent effectsLinux AWS and macOS arm64 UTM each passed fresh installation and published-stable-to-candidate replacement. Both replacement lanes preserved existing config bytes exactly. Candidate omitted/true/false/unset round trips and validation passed, with Gateway health/readiness successful. Linux replacement preserved config SHA256 Every lane exercised the following eight effects through the installed Gateway, agent runner, approval owner and persistent writer. Only model Responses HTTP was synthetic. The owner connection was normally paired and signed, held admin authority, and remained live. The permanent source test is system-agent-delegation-authority.e2e.test.ts.
Pending exact approvals left logging and the target standing grant unchanged. Four distinct exact decisions were observed per lane. These self-revocation scenarios do not establish revocation during another operation's preparation; that is separate proof. Native and externally registered CLI flows
The nearest allowed/forbidden Claude pair is concrete: managed exec denial plus Default/omitted requested Codex Default/omitted required exact allow-once for The external child actually executed and host-mediated exec worked where allowed, yet neither backend self-report nor that mediated tool independently authorized automatic Default delegation. Exact denials preserved Execution receipts and limitsThese run links identify the captured AWS executions; the sanitized results below are included directly so inspection does not depend on portal access:
macOS proof ran on an isolated macOS 27.2.1 (26B131) arm64 VM with Node 24.22.1. Its initial driver hit Windows remains untested. macOS results cover packaged CLI/Gateway, not native-app TCC/signing or Codex/Claude on macOS. These bounded versions and direct-tool/managed-policy cases do not certify arbitrary native policy engines. Unknown Default native authority without an independent grant still requires approval. All task-owned AWS/UTM resources and isolated native policy/state for these runs were cleaned. Sanitized captured results and full frozen source hash map{
"scope": "Sanitized observed results from completed isolated proof. No new tests were executed to prepare this publication.",
"source": {
"proofBaseHead": "afa73f35c911300fb096043e713dc393ff2b7a32",
"frozenChangedPathCount": 37,
"frozenChangedPathFingerprint": "01228ee9f35db09450aeff4196622bf0faaabe961f9e62a086a160ae8c0bb763",
"fingerprintAlgorithm": "sha256(canonical compact sorted-key JSON of sha256 map)",
"publicationHead": "d1d386499328591a8711ba4f08cdf4d926d55e0a",
"currentMatch": "36 of 37 frozen paths byte-identical; the only difference is regression-test allocation 968 to 969. Three-path final commit only repairs a test mock, removes its obsolete mock-export exception and updates that allocation. No production runtime source changed.",
"frozenPathSha256": {
"SECURITY.md": "daefeaf9c585716faaa8faf5eabe0a2968a630870e6e815fcee7fd43cd0bb75a",
"config/test-lines-allocations/delegated-administration-policy.txt": "93d3681329edb640b10dc2fdc69d4811d243a9bd03cc8fbb3f48ec425133a396",
"docs/cli/openclaw.md": "0f0f99ded179f47140a74001fe33d549b75278bb593d808060a156a43589e7d7",
"docs/gateway/config-tools.md": "480a5f629e20989dc547f16d676d5c445e8e3a30250c3b6f87d1bb4e390d87d9",
"docs/gateway/config-tools/built-in-tools.md": "6d5ce083ede95dc05772a77703a20181c28e012046762acb3f99e601d880480d",
"docs/gateway/permission-modes.md": "b4b594bd39cf5c82f814f52ada8374198acebba25f675e63390c895846986925",
"docs/gateway/security/tool-permissions.md": "b48a92a7b0d359527d0fdac0c36f71df48fd05b86b705ca190d433559ac71f3f",
"src/agents/agent-tools.assembly.ts": "9c25ad3f8a6f82f896649fcc82bd4d56d6e1ae17330f051a5e09bb594a37d513",
"src/agents/agent-tools.async.ts": "85d8b6185fc59ec09b6477fea5741c490a0bc3935e7d6d99c626e240152ab555",
"src/agents/agent-tools.options.ts": "6834cd18eac794d6ee597ea79dc58f2ac631c8441332254b70e44621a85c7094",
"src/agents/agent-tools.ts": "1171422f70a0f3cf3220d97a4cdd94cb9bd3b42b2ffeb35beba732b6e853c55b",
"src/agents/exec-defaults.preparation.ts": "395789508c8e1f856cbc5527f9a0a588e6f8ac8cbbf070cc7f81d5933ec15455",
"src/agents/execution-authority.ts": "1b08b4ebf0d3879f3f872cba55b21f68a29775c96f5670646c9a11c0d2f8c36c",
"src/agents/harness/host-capability.ts": "c05a0c61e1f4f2fb3e8acdf7c8861e4184af45410667fbc25bfe1961904cddfc",
"src/agents/openclaw-tools.types.ts": "59eebcda77cd3f9f62e31a382983250adf17925baf624d0d5f54580e75d1d4a9",
"src/agents/tools/gateway-caller-context.test.ts": "67db979adbfec339b465fca881b50c698b163feeefb2edfc33e201891ceb7353",
"src/agents/tools/gateway-caller-context.ts": "785210a1049bbc2674b93cdd69c730e1e52b0747c86594cc780ba430d429cec4",
"src/agents/tools/gateway-caller-context.types.ts": "b6b11b0d37bb48c1fd853503a0ed58fce70cf40f34abdeb49b76699b55d186c3",
"src/agents/tools/openclaw-delegate-tool.exec-preparation.test.ts": "a476add6de710c029fff67ec84b1f2d9ca5913364bf38d2f8911df32f1201213",
"src/agents/tools/openclaw-delegate-tool.test.ts": "c6476a5357ea8c98470010796cbd11439ec5a37ccea4e6ebbed954c1d16ff31c",
"src/agents/tools/openclaw-delegate-tool.ts": "9f6d1a71268a8995dd728f55c3ed7d8e8148c41ae6184867c9e6ea8ff108b085",
"src/config/schema.help.runtime.ts": "e338a9a402482bcaef934d55d86e48bbf7618b9b23ad174750e526e32e467a22",
"src/config/schema.labels.ts": "78890214c254a719f2c862de1548c5ac63bf201e7649ab2883e1bf10cfd31f7b",
"src/config/zod-schema.agent-runtime.ts": "df0b6b5af0a2ccfe790fd85828ae918ec13a665970be0b33c74b03624c2006ee",
"src/config/zod-schema.agents.test.ts": "0050e8c67e14fae5d8a12382941911f84eeb71c35cd55e316e5de4a994d31aa0",
"src/gateway/mcp-http.test-support.ts": "5e13b6806213b777024babea85068f740744e06993b7aa8d610d55f6ec6865e3",
"src/gateway/server-methods/system-agent-approval-authority.test.ts": "fdd71e0b13f5fb14b8e5a900a078c69d0e80a4c437b11e11b65434609a7dfe60",
"src/gateway/server-methods/system-agent-approval.test.ts": "ab3155445c56434540e4e75b79f6863db1b8fc088c34b7904eec6b7ee5dba4df",
"src/gateway/server-methods/system-agent-approval.ts": "cb4616208e46241abdb58be18665cec2354454fc9dfc63190e45ebc5ba504b40",
"src/gateway/server-methods/system-agent-owner-write.integration.test.ts": "7b1220ad604d6b53e318cf14cc7d03fcd4f7e909b4cfe9c8896ab8653fb36d9b",
"src/gateway/server-methods/system-agent.host-lifecycle.test.ts": "4c02e63cf4d7b4f50b44b69967c0a55033aac0c13c4a53fd1d455298b767ea5c",
"src/gateway/session-utils-store.ts": "41edf67505943f2e213cc99cf7ed1a03101eda9266078a1a6729cabecab06af7",
"src/gateway/session-utils.permissions.test.ts": "2920f7cab1b4375eaba49b62c8f0a86af723b1dc3cd010d7d3ddda159af71760",
"src/gateway/tool-resolution.effects.test-support.ts": "4f5ee7adb444ea298e9412ac20ede4e115beb716f0e8f86939e932fa60ebecce",
"src/gateway/tool-resolution.ts": "2cb8bad568af25bebabe02bee52a3da233b2149be614a139d20f13c453f13932",
"src/system-agent/delegated-change-policy.ts": "cb43fc95fc76ca4b09f35d3266f4185d64ae5ca2438183553d2044380068b7c7",
"test/system-agent-delegation-authority.e2e.test.ts": "4ceedba598419a78298a48c38b1b1bbdcf1f33ba57e81885ed3349e0528aa76c"
}
},
"packageIdentity": {
"version": "2026.11.3",
"candidateSha256": "4731603560f3616a923f8b2765278116264ab630ab54b01da62441d75a400857",
"candidateBytes": 117873704,
"publishedStableSha256": "dae4c4f7549561db2fe5ac43af7ba0c9491f876380f070f7ffb87bf9721a10df",
"comparison": "Distinct artifacts with the same version; not a version-increasing upgrade or a shipped-fixed-release claim.",
"canonicalPackageIntegrity": "passed",
"portableFixtureSha256": "273c060b683a2dc7ec44ce2398b2a195695281599a0cc702812890274759932f"
},
"linuxInstallation": {
"result": "passed",
"node": "24.22.1",
"lanes": [
{
"name": "fresh",
"healthz": 200,
"readyz": 200,
"settingRoundtrip": [
"omitted",
"true",
"false",
"unset"
]
},
{
"name": "replacement",
"healthz": 200,
"readyz": 200,
"settingRoundtrip": [
"omitted",
"true",
"false",
"unset"
],
"existingConfigByteExact": true,
"preservedConfigSha256": "252b6320b9b3fb6b4de33c50a432dacdb97ee543462b3aa0163f6870405e3c86"
}
]
},
"macosInstallation": {
"result": "passed",
"os": "macOS 27.2.1 (26B131)",
"arch": "arm64",
"node": "v24.22.1",
"lanes": [
{
"name": "fresh",
"result": "passed",
"settingRoundtrip": [
"omitted",
"true",
"false",
"unset"
],
"candidateGatewayReady": true
},
{
"name": "replacement",
"result": "passed",
"baselineGatewayReady": true,
"byteExactConfigPreserved": true,
"settingRoundtrip": [
"omitted",
"true",
"false",
"unset"
],
"candidateGatewayReady": true
}
],
"recovery": "Initial driver hit kill EPERM on a negative process-group probe after replacement readiness. Guest process/listener checks showed no runtime remained; only unfinished replacement behavior was resumed on the retained candidate. Both lanes and final task-only cleanup passed."
},
"installedPersistentEffects": [
{
"platform": "linux",
"lane": "fresh",
"result": "passed",
"scenarios": [
{
"name": "restricted default",
"decision": "allow-once",
"expectedLogging": "warn",
"persistedLogging": "warn"
},
{
"name": "unrestricted default with edit denied",
"decision": "automatic",
"expectedLogging": "debug",
"persistedLogging": "debug"
},
{
"name": "explicit full with exec denied",
"decision": "automatic",
"expectedLogging": "error",
"persistedLogging": "error"
},
{
"name": "standing delegation grant",
"decision": "automatic",
"expectedLogging": "info",
"persistedLogging": "info"
},
{
"name": "explicit off overrides full",
"decision": "deny",
"expectedLogging": "info",
"persistedLogging": "info"
},
{
"name": "node execution does not authorize Gateway changes",
"decision": "deny",
"expectedLogging": "info",
"persistedLogging": "info"
},
{
"name": "grant expansion through a parent config object",
"decision": "allow-once",
"expectedLogging": "info",
"persistedLogging": "info"
},
{
"name": "revoking its own standing grant",
"decision": "automatic",
"expectedLogging": "info",
"persistedLogging": "info"
}
]
},
{
"platform": "linux",
"lane": "replacement",
"result": "passed",
"scenarios": [
{
"name": "restricted default",
"decision": "allow-once",
"expectedLogging": "warn",
"persistedLogging": "warn"
},
{
"name": "unrestricted default with edit denied",
"decision": "automatic",
"expectedLogging": "debug",
"persistedLogging": "debug"
},
{
"name": "explicit full with exec denied",
"decision": "automatic",
"expectedLogging": "error",
"persistedLogging": "error"
},
{
"name": "standing delegation grant",
"decision": "automatic",
"expectedLogging": "info",
"persistedLogging": "info"
},
{
"name": "explicit off overrides full",
"decision": "deny",
"expectedLogging": "info",
"persistedLogging": "info"
},
{
"name": "node execution does not authorize Gateway changes",
"decision": "deny",
"expectedLogging": "info",
"persistedLogging": "info"
},
{
"name": "grant expansion through a parent config object",
"decision": "allow-once",
"expectedLogging": "info",
"persistedLogging": "info"
},
{
"name": "revoking its own standing grant",
"decision": "automatic",
"expectedLogging": "info",
"persistedLogging": "info"
}
]
},
{
"platform": "macos",
"lane": "fresh",
"result": "passed",
"scenarios": [
{
"name": "restricted default exact allow-once",
"decision": "allow-once",
"persistedLogging": "warn"
},
{
"name": "unrestricted default edit denied",
"decision": "automatic",
"persistedLogging": "debug"
},
{
"name": "explicit full exec denied",
"decision": "automatic",
"persistedLogging": "error"
},
{
"name": "standing grant exec denied",
"decision": "automatic",
"persistedLogging": "info"
},
{
"name": "false overrides full exact deny",
"decision": "deny",
"persistedLogging": "info"
},
{
"name": "node execution exact deny",
"decision": "deny",
"persistedLogging": "info"
},
{
"name": "parent-object grant expansion exact allow-once",
"decision": "allow-once",
"persistedLogging": "info"
},
{
"name": "self-revocation automatic",
"decision": "automatic",
"persistedLogging": "info"
}
]
},
{
"platform": "macos",
"lane": "replacement",
"result": "passed",
"scenarios": [
{
"name": "restricted default exact allow-once",
"decision": "allow-once",
"persistedLogging": "warn"
},
{
"name": "unrestricted default edit denied",
"decision": "automatic",
"persistedLogging": "debug"
},
{
"name": "explicit full exec denied",
"decision": "automatic",
"persistedLogging": "error"
},
{
"name": "standing grant exec denied",
"decision": "automatic",
"persistedLogging": "info"
},
{
"name": "false overrides full exact deny",
"decision": "deny",
"persistedLogging": "info"
},
{
"name": "node execution exact deny",
"decision": "deny",
"persistedLogging": "info"
},
{
"name": "parent-object grant expansion exact allow-once",
"decision": "allow-once",
"persistedLogging": "info"
},
{
"name": "self-revocation automatic",
"decision": "automatic",
"persistedLogging": "info"
}
]
}
],
"nativeCodex": {
"result": "passed",
"version": "0.164.0",
"models": "Real OpenAI API and real delegated helper; no synthetic model responses.",
"uniqueExactDecisions": 5,
"wholeConfigAssertions": "Pending approval preserved entire config; each final state compared against the entire previous config with only the explicitly allowed target changed.",
"scenarios": [
{
"name": "default-omitted-allow-once",
"permissionMode": "default",
"decision": "allow-once",
"delegatedApprovalCount": 1,
"target": "logging.level",
"requestedValue": "warn",
"persistedLevel": "warn",
"offGrant": false,
"directHostExec": "allowed",
"hostExecMarkerPresent": true,
"confirmedToolResult": true
},
{
"name": "default-next-proposal-denied",
"permissionMode": "default",
"decision": "deny",
"delegatedApprovalCount": 1,
"target": "logging.level",
"requestedValue": "trace",
"persistedLevel": "warn",
"offGrant": false,
"confirmedToolResult": true
},
{
"name": "explicit-full-automatic",
"permissionMode": "full",
"decision": "automatic",
"delegatedApprovalCount": 0,
"target": "logging.level",
"requestedValue": "error",
"persistedLevel": "error",
"offGrant": false,
"confirmedToolResult": true
},
{
"name": "false-overrides-explicit-full",
"permissionMode": "full",
"decision": "allow-once",
"delegatedApprovalCount": 1,
"target": "logging.level",
"requestedValue": "info",
"persistedLevel": "info",
"offGrant": false,
"confirmedToolResult": true
},
{
"name": "standing-true-with-denied-direct-exec",
"permissionMode": "default",
"decision": "automatic",
"delegatedApprovalCount": 0,
"target": "logging.level",
"requestedValue": "debug",
"persistedLevel": "debug",
"offGrant": false,
"directHostExec": "denied",
"hostExecMarkerPresent": false,
"confirmedToolResult": true
},
{
"name": "grant-broadening-denied-despite-full",
"permissionMode": "full",
"decision": "deny",
"delegatedApprovalCount": 1,
"target": "agents.entries.off.tools.openclaw.autoApproveChanges",
"requestedValue": "true",
"persistedLevel": "debug",
"offGrant": false,
"confirmedToolResult": true
},
{
"name": "grant-broadening-fresh-exact-allow",
"permissionMode": "full",
"decision": "allow-once",
"delegatedApprovalCount": 1,
"target": "agents.entries.off.tools.openclaw.autoApproveChanges",
"requestedValue": "true",
"persistedLevel": "debug",
"offGrant": true,
"confirmedToolResult": true
}
]
},
"nativeClaude": {
"result": "passed",
"version": "2.1.319 (Claude Code)",
"models": "Real Claude API and delegated helper.",
"uniqueExactDecisions": 5,
"restrictedDefaultInvariantSatisfied": true,
"scenarios": [
{
"scenario": "unknown-default-allow",
"permissionMode": "default",
"managedExecDenyActive": false,
"execMarkerPresent": true,
"delegatedApproval": true,
"decision": "allow-once",
"confirmedToolResult": true,
"previousLevel": "info",
"requestedLevel": "warn",
"persistedLevel": "warn",
"standingPolicyUnchanged": true
},
{
"scenario": "managed-deny-default-reject",
"permissionMode": "default",
"managedExecDenyActive": true,
"execMarkerPresent": false,
"delegatedApproval": true,
"decision": "deny",
"confirmedToolResult": true,
"previousLevel": "warn",
"requestedLevel": "error",
"persistedLevel": "warn",
"standingPolicyUnchanged": true
},
{
"scenario": "managed-deny-fresh-allow-once",
"permissionMode": "default",
"managedExecDenyActive": true,
"execMarkerPresent": false,
"delegatedApproval": true,
"decision": "allow-once",
"confirmedToolResult": true,
"previousLevel": "warn",
"requestedLevel": "error",
"persistedLevel": "error",
"standingPolicyUnchanged": true
},
{
"scenario": "managed-deny-allow-once-not-standing",
"permissionMode": "default",
"managedExecDenyActive": true,
"execMarkerPresent": false,
"delegatedApproval": true,
"decision": "deny",
"confirmedToolResult": true,
"previousLevel": "error",
"requestedLevel": "trace",
"persistedLevel": "error",
"standingPolicyUnchanged": true
},
{
"scenario": "explicit-full-independent-grant",
"permissionMode": "full",
"managedExecDenyActive": true,
"execMarkerPresent": false,
"delegatedApproval": false,
"decision": "automatic",
"confirmedToolResult": true,
"previousLevel": "error",
"requestedLevel": "debug",
"persistedLevel": "debug",
"standingPolicyUnchanged": true
},
{
"scenario": "explicit-false-overrides-full",
"permissionMode": "full",
"managedExecDenyActive": false,
"execMarkerPresent": true,
"delegatedApproval": true,
"decision": "allow-once",
"confirmedToolResult": true,
"previousLevel": "debug",
"requestedLevel": "info",
"persistedLevel": "info",
"standingPolicyUnchanged": true
},
{
"scenario": "standing-true-with-managed-deny",
"permissionMode": "default",
"managedExecDenyActive": true,
"execMarkerPresent": false,
"delegatedApproval": false,
"decision": "automatic",
"confirmedToolResult": true,
"previousLevel": "info",
"requestedLevel": "warn",
"persistedLevel": "warn",
"standingPolicyUnchanged": true
}
]
},
"externalCli": {
"result": "passed",
"scenarioCount": 6,
"executedTestSha256": "e11020050be9728bccd069020f2c75b165915a7089a9db827593235c7b3c3238",
"runtime": "Real plugin registration, child process, scoped MCP bridge, tool effects, approval owner and persistent writer; synthetic helper model HTTP.",
"observedByPassingAssertions": [
{
"name": "backend self-report",
"decision": "allow-once",
"persistedLogging": "debug"
},
{
"name": "mediated exec does not certify native authority",
"decision": "allow-once",
"persistedLogging": "error"
},
{
"name": "denied exec",
"decision": "deny",
"persistedLogging": "error"
},
{
"name": "false overrides Full Access",
"decision": "deny",
"persistedLogging": "error"
},
{
"name": "operator true",
"decision": "automatic",
"persistedLogging": "info"
},
{
"name": "explicit Full Access",
"decision": "automatic",
"persistedLogging": "warn"
}
],
"successLogExcerpt": "observes external CLI delegated authority through registration, child execution, MCP, and persistence: passed (24672 ms); Test Files 1 passed; Tests 1 passed."
},
"limitations": [
"This existing proof does not demonstrate revocation during preparation at the real persistent writer; that is a separate new proof task.",
"Windows untested: no suitable licensed/verified media or disposable VM was available.",
"macOS proof covers installed CLI/Gateway, not native-app TCC/signing or native Codex/Claude on macOS.",
"Backend versions, managed-policy cases and direct-tool effects are bounded evidence, not general native-policy certification."
],
"cleanup": "All task-owned AWS and UTM resources for these completed runs were released; isolated native policy/config and test state cleaned."
} |
|
Followup head: The persistent-writer proof is now part of the branch. It found and corrected a retained-reader gap: an admitted configuration copy could match the active runtime's values and resolution provenance while carrying a different origin object. Its delegation check then retained the old grant across a later operator revocation. The existing reader now also binds equivalent active-runtime copies; scoped or differently resolved configurations remain separate. The test runs the authenticated Gateway, real OpenClaw agent/delegation engine, shared authority owner, CLI config writer, and persistent config file. Model HTTP responses are synthetic. It first proves an automatic permitted write. A second proposal pauses after operation parsing, before the writer reads/prepares its base snapshot. The operator then sets the per-agent grant to false through Reproduction on unchanged The previously collected live/native/package/config-preservation results are published as sanitized embedded data with their original source hashes and limits. They remain evidence for that recorded snapshot, not a claim that those older package artifacts contain this reader correction. Local autoreview of the followup through P2 completed with no actionable findings. The subsequent fixture-only type correction makes the unused restart-recovery callback synchronous, as its contract requires. The test allocation grows by exactly 186 LF lines: the 182-line real Gateway regression and four net lines extending the existing reader contract. No shared scalar or unrelated test allowance was raised. The local ratchet reports seven lines of inherited debt; the branch adds exactly its allocated 1,155 net test lines. Independent human review of Sanitized observed results and source binding{
"head": "e24c54fb2919594b2f4be2a3bc2c630043fff336",
"provider": "aws",
"lease_id": "cbx_d6b7ee6cd84d",
"environment": {
"node": "24.22.1",
"pnpm": "12.15.0",
"cpus": 32,
"mem_total_kib": 64418960
},
"negative_control": {
"run_url": "https://crabbox.openclaw.ai/portal/runs/run_58f5255f02b9577f216d7c5c9a200db2",
"mutation": "Restore old reader binding behavior by disabling only the active-runtime equivalence clause.",
"exit_code": 1,
"expected_persisted_logging": "warn",
"observed_persisted_logging": "error"
},
"restored_candidate": {
"run_url": "https://crabbox.openclaw.ai/portal/runs/run_58f5255f02b9577f216d7c5c9a200db2",
"test_files": 5,
"tests_passed": 115,
"exit_code": 0,
"fixture_note": "This run preceded the callback signature type correction; the production bytes match final HEAD."
},
"final_fixture": {
"run_url": "https://crabbox.openclaw.ai/portal/runs/run_1773e48851f3fd5e9c6de228df2ede0e",
"test_files": 1,
"tests_passed": 1,
"exit_code": 0
},
"source_sha256": {
"src/config/runtime-snapshot.ts": "cd522430f2370e237745944cac9d30c39e3ef1768941597ecf7fa7ca1a31e2a9",
"src/config/runtime-snapshot.test.ts": "9c6964da90b287d1a311ef4e689146c0cdd67b7cf6e3e377501dc808c8b92831",
"src/gateway/server.delegated-administration.product.test.ts": "cb897e1f1c2c297b540b1c159f325db2662f37e1c2f30dae1e40a7b64838749d",
"config/test-lines-allocations/delegated-administration-policy.txt": "9ce4b3f9da775ba459cb4b343b4ac5751a6e001f1d3b237b6d359e8bbed55133"
},
"local_review": {
"base": "d1d386499328591a8711ba4f08cdf4d926d55e0a",
"status": "scoped-clean",
"priority": "P0-P2",
"findings": 0,
"post_review_delta": "Fixture-only synchronous callback signature correction; no production change."
},
"checks": {
"gateway_server_types": "passed",
"config_cli_types": "passed",
"focused_type_aware_lint": "passed",
"format": "passed",
"diff_check": "passed",
"test_line_ratchet": "7 lines inherited debt; branch allocation equals its own +1155 LF delta"
},
"limits": [
"Model HTTP responses in this new product test are synthetic.",
"Prior live/native/package artifacts retain their separately published source binding.",
"Independent human SecOps review remains pending."
]
}Task-owned AWS validation resources are released; exact-lease inspection confirmed cleanup complete. Current-head CI has settled: 76 jobs passed, 26 skipped, three test jobs and the aggregate gate failed. The PR description links the exact jobs and records source/control evidence attributing those failures to existing UI, Telegram and provider-auth fixtures. CI remains failed; no branch-caused failure is currently identified. |
|
@clawsweeper re-review Current head: Please reassess the real persistent-writer revocation proof and retained-reader correction, plus the published live/native/package/config-preservation evidence. The proof includes an allowed write, operator revocation through the real config owner, a failing old-reader control, unchanged config after rejection, and 115 passing focused tests. Independent human SecOps review remains requested and pending; this request does not substitute for it. Evidence: #196984 (comment) and #196984 (comment). Current CI is complete but failed; exact-job attribution and its limits are in the description. |
|
🦞👀 Re-review progress:
|
…ty (openclaw#196984) * fix: honor effective authority for delegated OpenClaw changes * test: preserve exec policy exports in scoped tool fixture * fix: follow live configuration in delegated authority checks
Since #196984, Gateway session utilities import the run-entry CLI runtime selector. The suite's static placement-admission import now evaluates that graph before the shared harness registers its model-selection mock, so the selector keeps the real isCliProvider and routes codex-cli turns to the embedded runner. Import placement admission after harness setup. Co-authored-by: obviyus <[email protected]>
… fence The 2026-11-10 main merge brought openclaw#196984, which stopped deriving an automatic delegated OpenClaw change from `fullPermission` alone: `prepareDelegatedSystemAgentApproval` now also requires a live `assertAutoApproveChangesCurrent` grant on the caller identity, and falls through to the exact-approval path when one is absent. This branch's channel-authority fence predates that commit, so its caller identity carried no grant and all three cases died at `OpenClaw approval registry unavailable` instead of reaching the apply owner the test is fencing. Supply the grant the production caller supplies. The fenced behaviour under test is unchanged: live still applies once, and a revocation that lands while the apply owner is awaiting its queued work still rejects before the effect. Also record the branch's exact net test-line growth as a budget allocation; the suites it adds for channel-ingress Gateway delegation put the tree 919 lines over the ceiling. Validation (worktree openclaw-fix-channel-session-gateway-owner): - node scripts/run-vitest.mjs run --config test/vitest/vitest.auto-reply-reply.config.ts src/auto-reply/reply/get-reply.gateway-authority.delegated-effect.test.ts -> Test Files 1 passed (1), Tests 9 passed (9), exit 0 - node --import ./scripts/tsx.mjs scripts/check-test-lines-ratchet.mts --base origin/main --no-merge-base -> Test lines OK: 6652679; ceiling: 6652689; slack: 10, exit 0 - node scripts/run-format.mts --check <file> -> correct format - node scripts/run-oxlint.mjs --tsconfig test/tsconfig/tsconfig.test.root.json <file> -> exit 0 - git diff --check -> clean Co-Authored-By: Claude <[email protected]>
…7050) Since openclaw#196984, Gateway session utilities import the run-entry CLI runtime selector. The suite's static placement-admission import now evaluates that graph before the shared harness registers its model-selection mock, so the selector keeps the real isCliProvider and routes codex-cli turns to the embedded runner. Import placement admission after harness setup. Co-authored-by: obviyus <[email protected]>
Adapt #196984 onto the cold-start split tool owners. Keep one shared assembly, bind authority to surviving callable core exec identity, and mark both public SDK factories and native harness construction unverified. Preserve exact approval fallback, live effect checks, grant protection and honest Full Access labels. Source: b8980ca Prior reviewed adaptation: eb452340eaca22fc5dabec41da67dab2da31b47f Base: 06fe9b8 All 38 original paths retained; 35 byte-identical. Relocate the callback to agent-tools.assembly.ts and the async SDK marker to agent-tools.async.ts; preserve canonical async import paths and lazy factory preparation. Independent integration review found no actionable P0-P2 findings. Proof: targeted transitive typecheck, five-file lint, relocated-file format, cold import-boundary and assembly/delegate/Gateway regression tests pass. Prior full build, base-red durable-write and policy proof are preserved as prior-head evidence, not relabeled as combined-head validation. Allocate the source adaptation's exact 1153 net regression lines. Gap: full-agent model-HTTP proofs remain blocked before inference by loopback transport failure. Denied NO_PROXY remediation was not bypassed. No live-provider or stable-upgrade qualification is claimed. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[email protected]>
Refresh the complete v2026.11.3..09aa644 history: 99 in-range PRs, 35 issues, and direct-commit editorial coverage. Preserve all 62 prior contribution records and original main PR credits. Include typed Telegram callbacks, worker-heartbeat lease renewal, and the narrow large-store startup adaptations without claiming post-ready recovery. Source product: 09aa644 Source tree: f10a88c Main metadata: 3577724 Notes tooling: 514a224 Release provenance: 3768440 -> openclaw#194840, openclaw#179219, openclaw#196984, openclaw#196337 Release provenance: 00275d2 -> openclaw#194362 Release provenance: 66f0339 -> openclaw#186998 Release provenance: 915956a -> openclaw#186998 Co-authored-by: vincentkoc <[email protected]> Co-authored-by: RomneyDa <[email protected]>
Main's openclaw#196984 gate requires callerIdentity?.assertAutoApproveChangesCurrent before a delegated change may be applied automatically. Wire (CLI-backend) callers cross a process boundary and only carry trustedAgentRuntime, so automatic application was structurally unreachable for them. The preparing host now registers the live policy closure in a server-owned handoff map and the signed runtime identity token carries only an opaque correlation id. The target Gateway redeems it only when the id is bound to the same agent, session, operational run instance and delegated authority claim the token verified, and only for a signed full-permission grant; a missing or unbound handoff still routes the change to a human. The id is never authority and openclaw#196984's rechecks and closure fences are unchanged. Tests: wire Full Access lifecycle suite (active/run/tool/gateway/worker/session) now asserts the revalidated contract; fixtures attach the policy assertion and supply delegationExecAuthority where automatic authority is expected.
…9192) ## Problem After saving a provider key in the Control UI (`models.authSetApiKey`), a live Gateway logged `[plugins] typesafe invalid config: apiKey: must be object` once per prepared model runtime rebuild. The TypeSafe plugin's `apiKey` is a SecretRef object, and its manifest declares it as a secret input, so validation must compare against the authored source, not the resolved string. Call chain: 1. The auth mutation rebuilds existing prepared-runtime owners (`prepared-model-runtime-auth-publication.ts` → `publishPreparedModelRuntimeOwnerBatch`). 2. Each owner rebuilds from the config it was admitted with, an older runtime generation (`prepared-model-runtime.build.ts`). 3. `projectConfigOntoRuntimeSourceSnapshot` maps that old config onto the current source snapshot. The config write added a top-level `meta` key that the old config lacks, so the projection returns the resolved config as its own source. 4. `loadAgentRuntimePluginRegistryHandle` passes that as `activationSourceConfig`, and plugin config validation sees the resolved string. ## Fix The runtime snapshot publisher (`publishRuntimeConfigSnapshot`) now records the authored source it publishes with each runtime config object, in a separate map next to the existing captures (`recordPublishedRuntimeConfigSource`). Every publication overwrites it (with the runtime itself when no source is published), so a source republished for the same runtime object (`setRuntimeConfigSourceSnapshotIfCurrent`) stays authoritative. `projectConfigOntoRuntimeSourceSnapshot` uses that record for configs that are not frozen captures, so an older runtime generation projects its own source instead of failing open against a newer one. The record is not a capture: the config keeps its identity, and `captureRuntimeConfig` still freezes an isolated runtime/source pair for rebuilds. ## User impact Saving a provider key no longer produces false invalid-config errors for plugins with secret inputs, and those plugins validate against their real authored config during rebuilds. ## Proof - `src/config/runtime-source-projection.test.ts`: - "keeps an older runtime generation on its own published source": a held generation still projects its SecretRef after a newer generation adds `meta`, and `captureRuntimeConfig` still returns a frozen copy. Fails on `main` (projects the resolved string). - "follows a newer source republished for the same runtime object": republishing the same runtime object with a new source wins, also after the next generation. Fails on the previous head of this PR. - An isolated Gateway reproduction (TypeSafe with an env SecretRef, bundled plugins on, then `models.authSetApiKey` for `particle`) logged `typesafe invalid config` before the fix and zero after, with `models.list` succeeding. The scratch harness is not committed: it needs a 15 s wait. - Projection, runtime snapshot, owner, inbound-registry, sources and loader-shared suites pass. `pnpm check:changed` passes. `pnpm check:madge-import-cycles` reports 0 cycles. Known remaining: `plugins/loader-load-context.ts` (context-engine owner capture) and `decisions/registry-adoption.ts` use the same projection on held configs. They produced no warnings in the reproduction after this fix. No overlap with Pash/Sarah changes. ## Merge danger Two-way door: a revert fully undoes it. No state, config or contract change. Blast radius: prepared model runtime rebuilds after config writes. Co-authored-by: Ayaan Zaidi <[email protected]> Release adaptation: clean -x backport onto 82f1197; production and regression hunks unchanged. Add a separate 38-line test-budget allocation for the two upstream regression tests; shared scalar unchanged. Preserve baseline e13cf15 and audit pin bd692e9. Companion dispositions at pinned audit: - #193903 / b43ad0a: not-applicable; independent catalog/capture-memo optimization, no prerequisite for the source association. - #196984 / b8980ca: present-equivalent; current reader already follows equivalent runtime copies. - #199956 / ea69fcb: not-applicable; independent live-reader ownership retention; authored-source association unchanged. - No later #189192 mention. Existing publication, capture, runtime-plugin, loader and decision consumers retain their interfaces; no generated/registry companion needed. Workflow optimizations excluded from this product-only scope. Release proof: unmocked production publication/projection regression boundary fails on parent (2 failed, 4 passed) and passes after pick; projection plus snapshot suites 50 passed; retained-runtime plugin consumer suites 18 passed. Targeted type-aware lint (4 files), format and diff checks pass. Upstream live Gateway proof above is historical; this lane does not claim a fresh live Gateway/model run or full release qualification. Self-review/pr-simplify: retain the minimal separate weak association because raw publication identity and frozen captures have distinct lifetimes. Delta: 27 production and 38 regression lines, plus the 3-line budget record. (cherry picked from commit 8ca9161) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 7ddb9e2a14671b47081bec40224e1f6f7316690d)
Resolve the identity-token conflict on upstream zod schemas and normalization helpers, retaining explicit signed Full Access and the server-owned current-policy assertion handoff and refusal path. Remove the superseded extracted schema module. Preserve openclaw#196984 effective-authority gates and initialization abort fencing. Validation: 132 focused tests including the six wire lifecycle cases; gateway-methods types; targeted formatting and lint; diff check; line-cap ratchet against pinned upstream 39c3099.
What Problem This Solves
Fixes automatic persistent OpenClaw changes when a Default run's effective authority is restricted or cannot be established.
User Impact
Delegated changes follow the selected permission mode and
tools.openclaw.autoApproveChanges(with per-agent overrides):falsetrueUnknown Default native authority now requires approval unless an independent standing grant exists. Choose OpenClaw Full Access or configure
autoApproveChanges: trueto authorize future permitted delegated changes; allow-once applies only to the current proposal. A standing delegation grant does not enable denied direct tools or override containment, inherited authority, operation limits, or current-run validity. Broadening that grant requires exact approval or direct operator configuration.Why This Change Was Made
Use the existing delegation and approval owners to check current authority at the point of effect. Only available, unrestricted Gateway execution establishes inferred Full Access; requested native modes and tool catalogs cannot establish effective authority. Permission labels use the same execution facts, and approval guidance explains the restriction and recovery controls.
The complete fix includes the runtime, harness, SDK and bridge consumers, configuration/help, labels, and boundary regressions. It adds no new profile or separate policy owner. The simplification pass retained one coherent authority correction and removed the previous settings-only authorization shortcut; the remaining growth supports the affected entry paths and distinct regression boundaries. Against the base, production changes are +469/−43 lines and test changes are +1192/−37 lines (net 1155 test lines).
The generated core config inventory increases by four entries: the global and per-agent
openclawnamespace andautoApproveChangesboolean. The baseline increase records this intentional, documented standing-authority control; no unrelated config budget is added.Evidence
afa73f35c911300fb096043e713dc393ff2b7a32: Codex GPT-6.1 Sol, P0–P2, complete and scoped-clean with no actionable findings. Two generated config-baseline files and one export-preserving test-mock repair were subsequently added without runtime changes; the repaired suite passes all 37 tests, scoped type/lint/format checks, and the mock-export guard. Local ClawSweeper was unavailable; hosted review is requested through the normal ready-for-review flow.Persistent-writer follow-up
The real Gateway regression found a retained-reader gap during revocation: an admitted config copy could match the active runtime values and resolution provenance while carrying a different origin object. The existing reader now binds equivalent active-runtime copies as well as authored-source matches. Scoped configs and differing resolution provenance remain separate; no policy owner or production test hook was added.
The test first permits a real persistent write, then pauses a second proposal before its writer reads/prepares the base snapshot. An operator revokes standing authority through
config.patchand waits for live publication before the writer resumes. The rejected operation must leave the post-revocation config byte-identical and report the false policy. Unchangedd1d3864failed by persisting the forbidden value. AWS reproduced that effect with old reader behavior, restored the candidate source, and passed all 115 focused tests in five files. The final fixture signature is also checked independently. The followup adds exactly 186 net test LF lines; the shared scalar is unchanged. Local ratchet measurement reports seven lines of inherited debt beyond the branch's exact allocation.Local autoreview of the followup delta against
d1d386499328591a8711ba4f08cdf4d926d55e0acompleted through P2 with no actionable findings. A subsequent fixture-only type correction makes the unused restart-recovery callback synchronous. Focused Gateway/config type graphs, lint and format passed. Independent SecOps review ofSECURITY.mdremains requested and pending.Sanitized evidence is directly inspectable in the live/native/package/config-preservation record and persistent-writer revocation record. The older package artifacts retain their original source binding; they do not contain this later reader correction.
CI follow-up
The current-head CI run is complete for head
e24c54fb2919594b2f4be2a3bc2c630043fff336, tested as mergeb3955965330dc8d48523753064dbd9caf3609a68against mainc719f9e11a1063528e16b71bef200feb682941bd: 76 jobs passed, 26 skipped, three test jobs failed, and the aggregate CI gate failed. Build artifacts, baseline ratchets and the test-line budget passed. CI is not green.The three test failures are source-attributed to existing main behavior; no branch-caused failure remains identified:
model-auth.profiles.test.tsresolveActivatableProviderOwnerPluginIds; matching-credential selection also fails. This is a reader-delta control, not a whole-repository baseline run.These are failed checks, not passing proof. Source and captured failure evidence provide attribution where the CI helper has no comparable main job. No CI rerun was requested merely to obtain green.
The initial CI run also found a branch-caused incomplete mock in
tool-resolution.exclude.test.ts; that fixture was repaired to preserve real exports while retaining synthetic executor overrides, and the obsolete mock-baseline exception was removed. Its focused 37-test suite, type/lint/format checks and mock-export guard passed.Current hosted review
ClawSweeper revision 2 reviewed head
e24c54fb2919594b2f4be2a3bc2c630043fff336with no actionable code findings. It accepted the real persistent-writer revocation and source-bound live/native/package evidence, resolving the prior proof requests. Independent current-head SecOps approval ofSECURITY.mdand satisfaction of the CI gate or an authorized inherited-failure exception remain before landing. This PR has not been merged.