Repository navigation
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: the same config metadata false-success bug is already tracked by a better canonical PR that preserves the documented auto-managed contract, while this branch makes those system-owned fields user-controlled and lacks real behavior proof. So I’m closing this here and keeping the remaining discussion on the canonical linked item. Review detailsBest possible solution: Continue the fix on the canonical rejection-at-the-CLI-boundary PR, keeping stampConfigVersion authoritative for meta.lastTouchedVersion and meta.lastTouchedAt. Do we have a high-confidence way to reproduce the issue? Yes. The linked issue has live command output, and current-main source shows config set values are applied before serialization, then stampConfigVersion overwrites those fields while the CLI reports Updated. Is this the best way to solve the issue? No. This PR solves the false-success symptom by changing the documented auto-managed fields into user-preserved fields, while the narrower maintainable fix is to reject or diagnose those paths before writing as tracked in #80856. Security review: Security review cleared: The diff only changes local config serialization behavior and tests; I found no dependency, workflow, permission, secret-handling, or external code-execution change. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against ac017fa4439b. |
Summary
Fixes #80849.
stampConfigVersion()insrc/config/io.tsunconditionally overwrotemeta.lastTouchedVersionandmeta.lastTouchedAton every config write. This causedopenclaw config set meta.lastTouchedVersion <value>to silently report success while the value was immediately overridden.Changes
stampConfigVersionnow accepts an optionalexplicitSetPathsparameter.meta.lastTouchedVersionormeta.lastTouchedAt(viaexplicitSetPaths), the stamp skips overwriting that field.explicitSetPaths(e.g., normal gateway startup) continue to stamp both fields as before.Verification
src/config/io.write-config.test.tscovering:meta.lastTouchedVersionwhen explicitly setmeta.lastTouchedAtwhen explicitly setexplicitSetPathsis absent