Repository navigation
fix(config): preserve plugin metadata for missing config - #119421
Conversation
Punchcard-Session: amber-orchard-valley-s4
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 11:17 PM ET / August 5, 2026, 03:17 UTC. ClawSweeper reviewWhat this changesThe PR loads plugin metadata for explicit valid missing-config snapshot reads and adds direct and two-process checkpoint regression coverage. Merge readiness✅ Ready for maintainer review Keep open. Current main still omits plugin metadata for a valid missing config, while preflight uses that metadata in its checkpoint identity; this producer-side repair is targeted and has no concrete correctness finding. As a member-authored PR, it should remain for normal maintainer merge handling. Priority: P2 Review scores
Verification
How this fits togetherConfig I/O produces snapshots used by gateway startup and doctor preflight. Preflight includes plugin metadata in its migration checkpoint identity before reporting the gateway ready. flowchart LR
A[Config path] --> B[Config snapshot]
B --> C{Snapshot valid?}
C -->|Yes| D[Plugin metadata]
C -->|No| E[Invalid snapshot]
D --> F[Preflight checkpoint identity]
E --> F
F --> G[Gateway readiness]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +9, Tests +182. Total +191 across 3 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Land the metadata restoration at the explicit snapshot-read boundary after routine exact-head merge checks; do not weaken checkpoint convergence or add a caller-side retry. Do we have a high-confidence way to reproduce the issue? Yes. Current source shows the valid missing-file fast path bypasses metadata creation, while preflight consumes that metadata's fingerprint for checkpoint identity. Is this the best way to solve the issue? Yes. Completing the explicit metadata read at the snapshot producer is narrower and safer than weakening the preflight comparison or adding retries. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1f3d45b76f51. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(config): preserve plugin metadata for missing config This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
* origin/main: fix(channels): honor explicit preview streaming settings refactor(telegram): consolidate outbound contracts and targets (#119438) fix(qa): retry transport cleanup and always stop owned labs (#119442) fix(mcp): guard stdio stdout frame parsing against oversized-buffer crash (#119379) refactor(auto-reply): centralize delivery deduplication and routing (#119436) fix(qa): preserve scenario isolation in serial suites (#119439) perf(xai): lazy-load optional capability runtimes (#119374) refactor(browser): consolidate browser CLI and normalization helpers (#119432) fix(qa): require ready transport accounts (#119431) refactor(media): share image and video geometry normalization (#119416) fix(config): preserve plugin metadata for missing config (#119421) fix: retry delivery when outbound adapter is unavailable (#119371) fix(cli): retire invalid secret flags and prove doctor recovery (#118926) refactor(signal): share outbound and reaction transport (#119415)
…9421) Restore plugin metadata for valid missing-config snapshot reads while preserving scan-free plain reads and fail-closed invalid snapshots.
What Problem This Solves
Fixes an issue where operators starting OpenClaw without an existing config file could have a second fresh process reject gateway startup because the validation snapshot omitted plugin metadata and could not prove convergence.
Why This Change Was Made
The config I/O owner now loads plugin metadata for explicit metadata reads whenever the config snapshot is valid, including the valid missing-file
{}snapshot. Plain snapshot reads remain scan-free, invalid snapshots remain fail-closed, and the preflight checkpoint contract is unchanged.Root cause: the missing-config fast path returned a valid source config without the plugin metadata snapshot required by the cross-process convergence comparison.
Architectural owner:
src/config/io.snapshot.ts, where config snapshots and optional validation metadata are assembled.Canonical fix: complete the explicit plugin-metadata read at the producer instead of adding another caller retry or weakening convergence checks.
Removed paths: none. No compatibility path, checkpoint fallback, retry, config persistence, public type, or schema change was added.
Production delta: +12/-3 lines (+9 net), justified by restoring the existing explicit metadata-read contract at its owner boundary. Tests add 190 net lines.
User Impact
Fresh gateway processes can converge when no config file exists. Ordinary config reads still avoid plugin discovery, invalid config remains invalid, and no config file is created as a side effect.
Evidence
git diff --checkand targeted formatting passed.plugin-sdk:surface:checkbaseline drift that was independently reproduced on clean base50c7444edf4; this branch does not touch Plugin SDK or generated baseline files.019fcfbf-192a-7f01-92e2-77632c90b2c7reported no findings and rated the patch correct at 0.98 confidence.AI-assisted: yes. The maintainer understands the change and verified the exact diff and focused proof.
Punchcard-Session: amber-orchard-valley-s4