Skip to content

fix(agents): clear emoji/avatar on agents.update empty or null - #119930

Closed
zyw02 wants to merge 19 commits into
openclaw:mainfrom
zyw02:auto/prospect-agents-update-clear-identity
Closed

zyw02 wants to merge 19 commits into
openclaw:mainfrom
zyw02:auto/prospect-agents-update-clear-identity

Conversation

@zyw02

@zyw02 zyw02 commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

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 tree 4862cde3fbe12995820c4fc4b088fe9988ce170b), 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

  • The unchanged baseline reproduced the null-schema failure and all four failed-config recovery cases.
  • Focused protocol, identity-file, agent-config, Gateway, and UI suite: 221 tests passed before the final UI regression additions.
  • Final acceptance passed all four selected Vitest shards: Gateway mutation coverage, 38 UI tests, a real Gateway serving the built Control UI, and SDK coverage. One optional external-live SDK test was skipped; this is not authenticated external-service proof.
  • The real served-UI test verifies empty/omitted RPC preservation, Remove → Save, persisted config/file clearing, unrelated Markdown preservation, and browser reload with no remaining Remove action.
  • 16 final validation lanes passed. Unavailable/failing final lanes: FINAL-LINT-APPS, FINAL-MACOS-CI. See limitations below. Task-file lint and Swift generated-output consistency passed. These are local results, not exact-head CI.

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:

Before Remove and Save — unpublished maintainer candidate

After Save and browser reload (generic avatar and default emoji placeholder, no saved custom values):

After Save and reload — unpublished maintainer candidate

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 479698f required the IDENTITY.md rollback to be conditional at its final write, not only before an awaited restore. This tip:

  1. [x] Make the rollback conditional at its final write (P1) — restoreWorkspaceFile re-reads current IDENTITY.md bytes immediately before write/delete and skips when the file is no longer this mutation's content. Same-process agents.files.set of IDENTITY.md now takes withConfigMutationExclusive, serializing it with agents.update rollback. Regression: does not restore IDENTITY.md over a concurrent agents.files.set edit that lands after the rollback comparison.
  2. [x] Prevent rollback from overwriting concurrent IDENTITY.md edits (P1) — after a config-commit failure, restore the previous file only when IDENTITY.md still contains this mutation's write at the mutating syscall. A concurrent agents.files.set edit is left in place. Also covered: does not restore IDENTITY.md over a concurrent agents.files.set edit after config commit failure.
  3. [x] Preserve partial raw Swift identity initializers (P1) — generated mixed AgentsUpdateParams overloads 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 in GatewayModelsCompatibilityTests.
  4. [x] Make file and config identity updates failure-safe (P2) — snapshot destination IDENTITY.md before 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.
  5. [x] Current-head CI caused by this diff — Control UI Remove-avatar fixture no longer uses agentsList.scope: "workspace" (check-test-types-core-2); mergeAgentIdentity iterates IDENTITY_PATCH_KEYS instead of an uncommented Object.entries assertion (checks-fast-baseline-ratchets); dropped invalid NodeInvokeRequestEvent.sessionKey Swift coverage (macos-swift). android-ktlint 429 / promisor fetch on the previous head was infrastructure. Current-head macos-swift failure on 479698f was CronJobsStoreTests (GatewayProcessManager.shared.status → .starting == .stopped), unrelated to this identity-clear diff.
  6. [x] Resolve merge conflicts (P1) — replayed on 42f5717 from 2db308f06b9 onto 671e41a8773bb9df6f044372fe227f7415a45b38. 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.
  7. [x] Preserve current agent ownership safeguards — agents.delete still uses agentOwnsSharedAuthStore, isInheritedAuthStoreOwner, tryResolveSoleAgentId, and normalizeAgentIdStrict. Roster updates still pin ownership: "explicit" and pinLegacyInheritedAuthOwnerForRosterTransition.
  8. [x] Keep SDK types on the protocol contract — AgentsUpdateParams stays a re-export from @openclaw/gateway-protocol (nullable emoji/avatar live in the schema, not a local SDK duplicate).
  9. [x] Make Swift raw-model overloads non-overlapping — mixed String-label initializers omit defaults so AgentsUpdateParams(agentid:modelvalue:) uniquely matches the raw initializer.
  10. [ ] Served Control UI proof — still outstanding: redacted Remove → Save against a real Gateway. The existing UI E2E remains mock-gateway and is not claimed as served-UI proof.

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 concurrent agents.files.set edit 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

PREV=479698f24256882db910081831bc1e9ce4d0fe12
TIP=a86cfd4e370614dfbbaffc05b23a26dd9710af0c

git diff --check
./node_modules/.bin/oxfmt src/gateway/server-methods/agents.ts \
  src/gateway/server-methods/agents-mutate.test.ts
node scripts/run-oxlint.mjs \
  src/gateway/server-methods/agents.ts \
  src/gateway/server-methods/agents-mutate.test.ts
node --import tsx scripts/protocol-gen-swift.ts --check

node scripts/run-vitest.mjs \
  src/gateway/server-methods/agents-mutate.test.ts \
  src/gateway/server-methods/agents-update-clear-identity.gateway.test.ts \
  src/agents/identity-file.test.ts \
  --reporter=verbose

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, and protocol:check:swift passed. swift test --filter GatewayModelsCompatibilityTests was skipped locally (no Swift toolchain on this Linux runner); please use exact-head macos-swift.

Exact-head Gateway transcript excerpts (clear vs empty-string preserve, still valid on this tip):

----- rpc-agents-update-clear -----
{
  "ok": true,
  "agentId": "clear-identity-agent",
  "emoji": null,
  "avatar": null
}

----- rpc-agents-list-readback -----
{
  "agentId": "clear-identity-agent",
  "identity": {
    "name": "Clear Identity Agent"
  },
  "emoji": null,
  "avatar": null
}

----- identity-md-readback -----
# IDENTITY.md - Agent Identity

- Name: Clear Identity Agent
Creature: Familiar
----- end -----

----- rpc-agents-update-empty-preserve -----
{
  "ok": true,
  "agentId": "preserve-empty-agent",
  "emoji": "",
  "avatar": ""
}

----- rpc-agents-list-empty-preserve-readback -----
{
  "agentId": "preserve-empty-agent",
  "identity": {
    "name": "Preserve Empty Agent",
    "emoji": "🦞",
    "avatar": "https://example.com/keep.png",
    "avatarUrl": "https://example.com/keep.png"
  }
}

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.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime commands Command implementations agents Agent runtime and tooling size: M labels Aug 6, 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: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 6, 2026
@clawsweeper

clawsweeper Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

Adds 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.

  • Before: The Gateway rejects null identity fields.
  • After: The PR accepts the request and removes those fields from configuration and IDENTITY.md.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful cross-client implementation with two unresolved correctness findings and an unaccepted public-contract expansion.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Product

Kind: Feature · Worth it: Needs a maintainer decision · Fix scope: Partial
User problem: Operators can replace an agent's custom emoji or avatar but cannot remove it through the existing editor.
Reason: Clearing has clear utility, but deliberately expands the original set/replace-only contract; the paired issue remains open and the candidate is not published.

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
Reviewed head: a86cfd4e370614dfbbaffc05b23a26dd9710af0c
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should agents.update gain explicit-null emoji/avatar clearing, with empty and whitespace API strings continuing to preserve stored values?
  • Recommendation: Accept null-only clearing: Sponsor the additive clear operation while preserving existing empty-string behavior and client call shapes.
  • Why: The original editor deliberately supported set/replace only, and no written owner approval of this expanded public contract appears in the inspected discussion.

Before merge

  • Add real behavior proof - The published-head WebSocket transcript supports null clearing and empty-string preservation through the Gateway harness; inspected served-UI screenshots show the explicitly unpublished candidate, leaving the published branch's Remove → Save → reload flow unproven. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Prevent rollback from overwriting a later external edit (P1) - When the config commit fails, an editor or agent tool can change IDENTITY.md after the second read returns but before workspaceRoot.write/remove completes. Both filesystem calls are asynchronous and receive no expected-content condition, so rollback can overwrite or delete the newer edit. The config lock only protects cooperating writers; the added regression injects its change after the first observation, leaving this final window uncovered. This previously reported blocker remains on the published head; the unpublished candidate does not resolve it there.
  • Exclude generated text avatars from the Remove predicate (P2) - For an agent with no stored avatar, agent.identity.get still returns a generated avatar such as A or the identity emoji. hasStoredAvatar treats that display value as stored image state, so Remove appears when nothing is removable and reappears after Remove → Save → reload. Use actual avatar-source metadata or configured/file-backed avatar presence; retain removal for stored non-previewable URLs. The new browser fixture hides this case by returning avatar:"" after clearing. This prior finding remains unchanged.
  • Complete next step - Resolve the reported merge conflicts while preserving current main's workspace, upload-policy, and generated-client ownership boundaries.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [P1] Prevent rollback from overwriting a later external edit — src/gateway/server-methods/agents.ts:847-852
  • [P2] Exclude generated text avatars from the Remove predicate — ui/src/pages/agents/panels-overview.ts:117-123

Tests

  • Missing end-to-end proof: Provide published-branch Remove → Save → reload evidence against a real Gateway, a stable-release upgrade preserving existing identity and unrelated data, and coverage for an external edit after the final rollback read.
Agent review details

How this fits together

The 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
Loading

Technical review

Best 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:

  • [P1] Prevent rollback from overwriting a later external edit — src/gateway/server-methods/agents.ts:847-852
    When the config commit fails, an editor or agent tool can change IDENTITY.md after the second read returns but before workspaceRoot.write/remove completes. Both filesystem calls are asynchronous and receive no expected-content condition, so rollback can overwrite or delete the newer edit. The config lock only protects cooperating writers; the added regression injects its change after the first observation, leaving this final window uncovered. This previously reported blocker remains on the published head; the unpublished candidate does not resolve it there.
    Confidence: 0.99
  • [P2] Exclude generated text avatars from the Remove predicate — ui/src/pages/agents/panels-overview.ts:117-123
    For an agent with no stored avatar, agent.identity.get still returns a generated avatar such as A or the identity emoji. hasStoredAvatar treats that display value as stored image state, so Remove appears when nothing is removable and reappears after Remove → Save → reload. Use actual avatar-source metadata or configured/file-backed avatar presence; retain removal for stored non-previewable URLs. The new browser fixture hides this case by returning avatar:"" after clearing. This prior finding remains unchanged.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 140dda0308c3.

Provenance checked

  • Control UI identity editing changes intended behavior with a stated reason (9086389: The editor explicitly kept unsupported blank edits visible because agents.update had no clear operation.)
  • Identity Markdown synchronization keeps the original intent (0f0a192: Synchronize configured identity while preserving richer Markdown and source/destination content on workspace moves.)
  • Nullable Swift update representation keeps the original intent (b7e099d: The model-clear repair retained String-facing source compatibility while distinguishing explicit null from omission.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Published scope and current merge state: Live REST confirms published head a86cfd4, assignee fuller-stack-dev, mergeable:false, and mergeable_state:dirty; the body explicitly identifies its repaired candidate as unpublished. (a86cfd4e3706)
  • Current main and stable release lack identity-null clearing: Current main still validates emoji/avatar as optional strings and builds identity through createAgentIdentityConfig; v2026.10.4 also exposes string-only identity fields. (packages/gateway-protocol/src/schema/agents-models-skills.ts:169, 140dda0308c3)
  • Non-atomic rollback: Two awaited reads precede a separate asynchronous remove/write; neither mutation receives the expected file bytes as an atomic precondition. (src/gateway/server-methods/agents.ts:847, a86cfd4e3706)
  • Direct dependency contract: The handler executes @openclaw/fs-safe 0.5.6 through the local facade, making its contract applicable. Inspected tagged source and AGENTS.md: Root.write/remove accept no expected-content condition, and write publication follows asynchronous filesystem preparation. (src/root-impl.ts:524, 01ef06f04e49)
  • Fallback avatar reaches Remove predicate: hasStoredAvatar accepts agentIdentity.avatar, but resolveAssistantIdentity synthesizes avatar A when no stored avatar exists; the added browser fixture substitutes an empty avatar instead. (ui/src/pages/agents/panels-overview.ts:117, a86cfd4e3706)
  • Original editor contract: Feature-history search traces the explicit set/replace-only restriction to the merged identity-editor implementation, rather than an accidental omission inferred from this PR. (ui/src/pages/agents/identity-actions.ts:103, 9086389527b1)

Likely related people:

  • Peter Steinberger: Raw commit 9086389 adds ui/src/pages/agents/identity-actions.ts:77 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9086389527b1; files: ui/src/pages/agents/identity-actions.ts)

PR surface

Source +291, Tests +928, Other +80. Total +1299 across 24 files. Added test files: 3.

View PR surface stats
Area Files Added Removed Net
Source 11 377 86 +291
Tests 12 950 22 +928
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 97 17 +80
Total 24 1424 125 +1299

Review metrics

Metric Value Why it matters
Production versus tests Production/tooling +402/-89, net +313; tests/support net +928; generated Swift net +58. Growth implements cross-client clear semantics and file/config coordination; relocated test coverage contributes no net growth, and the redundant rollback observations do not establish atomicity.
Public request changes 2 existing RPC fields gain null; 0 configuration options added. Emoji and avatar acquire destructive clear semantics without storing null in canonical configuration.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Identity editing has limited scope, although failed-write compensation can overwrite later workspace edits.
  • merge-risk: 🚨 compatibility: The PR expands two public request fields and generated Swift representations while changing persisted identity mutation semantics.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (24 earlier review cycles; latest 8 shown)
  • reviewed August 27, 2026, 12:26 PM ET / 16:26 UTC sha unknown :: needs real behavior proof before merge. :: [P2] Make file and config identity updates failure-safe
  • reviewed 2026-08-27T18:52:23.853Z sha cec5a30 :: needs real behavior proof before merge. :: [P1] Preserve partial raw Swift identity initializers | [P1] Prevent rollback from overwriting concurrent IDENTITY.md edits
  • reviewed 2026-08-27T22:48:51.488Z sha 479698f :: needs real behavior proof before merge. :: [P1] Resolve the empty-string clear contract
  • reviewed 2026-09-02T15:56:44.181Z sha 479698f :: needs real behavior proof before merge. :: [P1] Make the rollback conditional at its final write
  • reviewed 2026-09-02T18:50:58.057Z sha a86cfd4 :: needs real behavior proof before merge. :: [P1] Eliminate the post-check rollback write race
  • reviewed 2026-09-17T12:28:57.851Z sha a86cfd4 :: needs real behavior proof before merge. :: [P1] Eliminate the post-check rollback write race | [P2] Exclude fallback text avatars from the Remove predicate
  • reviewed 2026-09-25T18:41:16.430Z sha a86cfd4 :: needs real behavior proof before merge. :: [P1] Prevent rollback from overwriting a later file edit | [P2] Hide Remove for a fallback text avatar
  • reviewed 2026-10-03T06:40:02.586Z sha a86cfd4 :: needs real behavior proof before merge. :: [P1] Prevent rollback from overwriting a later file edit | [P2] Hide Remove for a fallback text avatar

Reviewed October 17, 2026, 4:16 PM ET / 20:16 UTC (Revision 25).

@zyw02

zyw02 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact head: 4239ea0e75c84b9e842429432e788eaf3a2bda94.
Addressed unbulleted IDENTITY.md clears, SDK null types, Control UI null tombstones, and exact-head Gateway proof. Prefer null as canonical clear; empty string remains accepted on the Gateway for legacy callers.

@clawsweeper

clawsweeper Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

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

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 6, 2026
@zyw02
zyw02 force-pushed the auto/prospect-agents-update-clear-identity branch from 4239ea0 to 5134849 Compare August 7, 2026 01:16
@zyw02

zyw02 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact head: 5134849e4a4f69d992b4bac5640383485dfc51a1.
Removed stale createAgentIdentityConfig import; Control UI Remove now appears for stored non-previewable avatars with a rendered regression.

@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

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

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 7, 2026
@zyw02
zyw02 marked this pull request as ready for review August 7, 2026 06:05
@zyw02

zyw02 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact-head tip 28e8d70f3672256ab6274f1d323fbcfe10647387 answers the 2/6 Before-merge items:

  • Whitespace-only emoji/avatar no longer tombstones stored identity (Gateway + Control UI)
  • Served Control UI proof: Remove → Save → agents.update { avatar: null } → refreshed cleared state (ui/src/e2e/agents-identity-avatar-clear.e2e.test.ts)
  • Unit regressions for whitespace preserve vs explicit empty/null clear

PR marked ready; body checklist + Evidence tip-matched.

@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

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

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 7, 2026
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts and removed size: L labels Aug 7, 2026
…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]>
@zyw02

zyw02 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact head: 479698f24256882db910081831bc1e9ce4d0fe12.

Addressed the current-head P1s from the review on cec5a30011e80900b13b618ca5e2cc814cd0899e:

  • Preserve partial raw Swift identity initializers: mixed AgentsUpdateParams now has distinct none / emoji-only / avatar-only / both String-label forms. AgentsUpdateParams(agentid:modelvalue:) still uniquely matches the raw initializer. Bindings regenerated; compile-oriented coverage is in GatewayModelsCompatibilityTests.
  • Prevent rollback from overwriting concurrent IDENTITY.md edits: config-commit failure restores the previous file only when IDENTITY.md still contains this mutation's write.

Validation on this tip:

  • node --import tsx scripts/protocol-gen-swift.ts --check
  • node scripts/run-vitest.mjs src/gateway/server-methods/agents-mutate.test.ts src/gateway/server-methods/agents-update-clear-identity.gateway.test.ts --reporter=verbose → 2 files / 115 tests passed
  • git diff --check + targeted oxfmt/oxlint passed
  • swift test --filter GatewayModelsCompatibilityTests skipped here (no Swift toolchain); please use exact-head macos-swift

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.

@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

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

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 27, 2026
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]>
@zyw02

zyw02 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact head: a86cfd4e370614dfbbaffc05b23a26dd9710af0c.

Addressed the current-head P1 from the review on 479698f24256882db910081831bc1e9ce4d0fe12:

  • Make the rollback conditional at its final write: restoreWorkspaceFile re-reads IDENTITY.md immediately before write/delete and skips when the file is no longer this mutation's content.
  • Same-process agents.files.set of IDENTITY.md now takes withConfigMutationExclusive, serializing it with agents.update rollback.
  • Added the after-comparison regression: does not restore IDENTITY.md over a concurrent agents.files.set edit that lands after the rollback comparison.

Validation on this tip:

  • node --import tsx scripts/protocol-gen-swift.ts --check
  • node scripts/run-vitest.mjs src/gateway/server-methods/agents-mutate.test.ts src/gateway/server-methods/agents-update-clear-identity.gateway.test.ts src/agents/identity-file.test.ts --reporter=verbose → 3 files / 131 tests passed (including the exact-head Gateway transcript)
  • git diff --check + targeted oxfmt/oxlint passed

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).

@clawsweeper

clawsweeper Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

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

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 2, 2026
@fuller-stack-dev fuller-stack-dev self-assigned this Sep 17, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 17, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This assigned pull request has been automatically marked as stale after being open for 27 days.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Sep 18, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 26, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Sep 26, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This assigned pull request has been automatically marked as stale after being open for 27 days.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Sep 26, 2026
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. label Oct 3, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This assigned pull request has been automatically marked as stale after being open for 27 days.
Please add updates or it will be closed.

@steipete

Copy link
Copy Markdown
Contributor

Thanks for the PR. We're closing older pull requests that have gone stale against current main.

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.

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

Labels

agents Agent runtime and tooling app: web-ui App: web-ui commands Command implementations gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XL stale Marked as stale due to inactivity status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants