Repository navigation
Conversation
|
Codex review: needs real behavior proof before merge. What this changesAdds explicit-null emoji/avatar clearing through the Gateway, stored identity, Swift clients, and Control UI while preserving empty and omitted API values. Example: Agent work has emoji 🐢 and avatar avatars/work.png; a client sends emoji:null and avatar:null.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Partial Merge readiness⛔ Blocked before merge - 6 items remain Keep open: this PR contains distinct identity-clearing work, remains assigned, and has an unresolved companion issue; both previously reported implementation defects remain on the published head. Priority: P2 Decision needed
Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe identity editor and SDK send agents.update requests through Gateway validation to configuration and workspace-file owners; identity projections then supply refreshed display values. flowchart LR
A[Control UI or SDK] --> B[Gateway schema]
B --> C[Agents update handler]
C --> D[Configuration mutation owner]
C --> E[Workspace identity file]
D --> F[Identity projections]
E --> F
F --> A
Technical reviewBest possible solution: Extend the existing identity owners with an accepted null-only contract, non-destructive failure recovery, and Remove controls based on stored avatar sources. Do we have a high-confidence way to reproduce the issue? Source and the supplied Gateway transcript establish the missing clear operation; inspection also establishes the rollback race and fallback-avatar predicate failure, without running target code. Is this the best way to solve the issue? Best-fix verdict: useful owner placement, unsafe failure recovery. A UI-only change cannot remove file-backed identity, and a second read cannot make a later filesystem mutation conditional; retain the existing owners and replace destructive compensation with recovery that preserves newer bytes. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 140dda0308c3. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +291, Tests +928, Other +80. Total +1299 across 24 files. Added test files: 3. View PR surface stats
Review metrics
LabelsLabel changes: No label 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 (24 earlier review cycles; latest 8 shown)
Reviewed October 17, 2026, 4:16 PM ET / 20:16 UTC (Revision 25). |
|
@clawsweeper re-review Exact head: |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
4239ea0 to
5134849
Compare
|
@clawsweeper re-review Exact head: |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Exact-head tip
PR marked ready; body checklist + Evidence tip-matched. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…ites Restore IDENTITY.md after a config-commit failure only when the file still contains this mutation's write, and generate mixed modelvalue overloads for none, emoji-only, avatar-only, and both String labels. Signed-off-by: zyw02 <[email protected]>
|
@clawsweeper re-review Exact head: Addressed the current-head P1s from the review on
Validation on this tip:
Not claimed on this tip: redacted served Control UI Remove → Save against a real Gateway. Empty-string vs null remains the existing null-only tombstone contract pending maintainer decision. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Re-read current bytes immediately before rollback write/delete, and serialize agents.files.set of IDENTITY.md on the config lock, so a concurrent authorized edit that lands after the first snapshot is not overwritten. Signed-off-by: zyw02 <[email protected]>
|
@clawsweeper re-review Exact head: Addressed the current-head P1 from the review on
Validation on this tip:
Not claimed on this tip: redacted served Control UI Remove → Save against a real Gateway. Empty-string vs null remains the existing null-only tombstone contract (keep null-only; empty/whitespace preserve). |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
Thanks for the PR. We're closing older pull requests that have gone stale against current This XL change has had no commits since 2026-09-02 and CI is failing. If clearing emoji/avatar via agents.update is still needed, please open a fresh, narrowly scoped PR against current main. |
Maintainer status — local candidate, not published
This PR remains open at contributor head
a86cfd4e370614dfbbaffc05b23a26dd9710af0c. The integration described here is an uncommitted, unpublished maintainer candidate (staged tree4862cde3fbe12995820c4fc4b088fe9988ce170b), not the current PR branch. Original work and contributor ancestry from @zyw02 are preserved.Proposed repair and user impact
Related: #119929. Remove → Save clears a stored avatar; clearing the custom emoji input clears that stored value. The proposed API clear contract is explicit
null; empty, whitespace, and omitted API fields preserve existing values.On a configuration-write failure after the identity file changes, the candidate saves the previous bytes (or a prior-absence marker) and returns an actionable pending-recovery error. It never restores or deletes the current identity file, which may contain a newer external edit. Operators must compare the recovery artifact, current file, and configuration before retrying and remove the artifact after reconciliation. This is not automatic rollback or a multi-file transaction. The earlier conditional-rollback claims below are historical contributor notes, not an accepted correctness claim.
Current ownership checks, authenticated avatar rendering, generated protocol declarations, and legacy Swift initializer call shapes are retained. Text-only default avatars do not expose a misleading Remove action after reload.
Candidate validation
Inspected served-UI proof
These sanitized, synthetic-state screenshots are from the unpublished candidate and a real local Gateway, not a mocked Gateway.
Before removing the stored avatar and custom emoji:
After Save and browser reload (generic avatar and default emoji placeholder, no saved custom values):
Remaining gates
Independent source-bound review remains unavailable under the inherited quota hold; no unchanged retry or provider switch was made. Explicit additive-null/pending-recovery contract acceptance and current required owner review remain pending. Swift compatibility compilation/tests, app lint, and the macOS CI lane (142 passed, 10 failed) are blocked by this host's unaccepted Xcode license/SourceKit setup; generated-output consistency is not compilation or lint proof. Originating-chat screenshot delivery is not established by this PR update. Reviewed publication, exact-head CI, and native landing remain pending.
Historical contributor notes for the published head (not current maintainer validation)
Review feedback addressed
Follow-up on
479698f24256882db910081831bc1e9ce4d0fe12. New head:a86cfd4e370614dfbbaffc05b23a26dd9710af0c.ClawSweeper review on
479698frequired the IDENTITY.md rollback to be conditional at its final write, not only before an awaited restore. This tip:restoreWorkspaceFilere-reads current IDENTITY.md bytes immediately before write/delete and skips when the file is no longer this mutation's content. Same-processagents.files.setof IDENTITY.md now takeswithConfigMutationExclusive, serializing it withagents.updaterollback. Regression:does not restore IDENTITY.md over a concurrent agents.files.set edit that lands after the rollback comparison.agents.files.setedit is left in place. Also covered:does not restore IDENTITY.md over a concurrent agents.files.set edit after config commit failure.AgentsUpdateParamsoverloads now cover none (agentid:modelvalue:), emoji-only, avatar-only, and both String labels. Mixed labels still omit defaults so the raw initializer stays unique. Compile-oriented coverage is inGatewayModelsCompatibilityTests.IDENTITY.mdbefore rewrite, write rebuilt content, then commit config. If that later commit throws and the file is still this mutation's write, restore the previous file bytes (or remove a newly created file) before rethrowing. Regression:restores IDENTITY.md when it still contains this mutation's write after config commit failure.agentsList.scope: "workspace"(check-test-types-core-2);mergeAgentIdentityiteratesIDENTITY_PATCH_KEYSinstead of an uncommentedObject.entriesassertion (checks-fast-baseline-ratchets); dropped invalidNodeInvokeRequestEvent.sessionKeySwift coverage (macos-swift).android-ktlint429 / promisor fetch on the previous head was infrastructure. Current-headmacos-swiftfailure on479698fwasCronJobsStoreTests(GatewayProcessManager.shared.status → .starting == .stopped), unrelated to this identity-clear diff.42f5717from2db308f06b9onto671e41a8773bb9df6f044372fe227f7415a45b38. Conflict files:src/gateway/server-methods/agents.ts,src/commands/agents.config.ts,packages/sdk/src/types.ts,ui/src/pages/agents/panels-overview.ts,ui/src/pages/agents/view.test.ts.agents.deletestill usesagentOwnsSharedAuthStore,isInheritedAuthStoreOwner,tryResolveSoleAgentId, andnormalizeAgentIdStrict. Roster updates still pinownership: "explicit"andpinLegacyInheritedAuthOwnerForRosterTransition.AgentsUpdateParamsstays a re-export from@openclaw/gateway-protocol(nullable emoji/avatar live in the schema, not a local SDK duplicate).AgentsUpdateParams(agentid:modelvalue:)uniquely matches the raw initializer.Empty-string vs null remains the existing null-only tombstone contract (ClawSweeper recommendation: keep null-only clearing). Direct empty/whitespace requests still preserve stored identity.
What Problem This Solves
Addresses #119929: agents.update empty/null emoji/avatar handling must clear intentionally without breaking shipped Swift call shapes or turning legacy empty-string requests into destructive clears.
Why This Change Was Made
Null is the additive clear tombstone. Empty-string requests remain non-destructive for compatibility. Generated Swift keeps String-facing and raw AnyCodable initializers, including mixed modelvalue plus none / emoji-only / avatar-only / both String labels, without overlapping
agentid:modelvalue:call sites. File-first identity writes stay unsafe-write gated; config-commit failures restore the previous IDENTITY.md bytes only when the file is still this mutation's write at the final syscall, so a concurrentagents.files.setedit is not overwritten.User Impact
Explicit null clears identity fields through config and IDENTITY.md. Empty-string updates no longer wipe stored emoji/avatar. Existing Swift clients compiling mixed update initializers, including emoji-only and avatar-only raw-model calls, keep working.
AgentsUpdateParams(agentid:modelvalue:)compiles as the raw initializer. A failed config commit after a successful identity rewrite no longer leaves a cleared IDENTITY.md against the retained roster identity, and no longer clobbers a concurrent authorized IDENTITY.md write that lands after the rollback snapshot.Evidence
Focused validation on
a86cfd4e370: gateway mutate + clear-identity 116 tests and identity-file 15 tests passed (including still-ours restore, before-compare skip, after-compare files.set win, and the exact-head Gateway transcript).git diff --check, oxfmt, oxlint, andprotocol:check:swiftpassed.swift test --filter GatewayModelsCompatibilityTestswas skipped locally (no Swift toolchain on this Linux runner); please use exact-headmacos-swift.Exact-head Gateway transcript excerpts (clear vs empty-string preserve, still valid on this tip):
AI-assisted development
This change was implemented with an OpenClaw coding agent and published through a guarded human-approval workflow. The exact diff and exact-head validation evidence were verified before publication.