Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 4:30 AM ET / 08:30 UTC. ClawSweeper reviewWhat this changesThe PR snapshots the commit that produced the loaded Gateway artifact and uses it in status output, schema diagnostics, and update-restart validation instead of reading a checkout that may have moved. Warning SQLite table change This PR modifies persisted SQLite tables in Merge readinessKeep this PR open for normal maintainer review: the inspected introduced code centralizes the correct process-bound build identity and routes all three stated runtime consumers through it, with no concrete patch defect found. A current-main source comparison could not complete because this partial checkout could not retrieve the fetched-main tree. Priority: P2 Review scores
Verification
How this fits togetherGateway status, schema-refusal messages, and restart validation all identify the running build for operators. Build stamps and packaged build information feed a process-bound identity so a later checkout update cannot change those running-service outputs. flowchart LR
A[Built Gateway artifact] --> B[Build stamps or build info]
B --> C[Process-bound build identity]
C --> D[Gateway status]
C --> E[Schema diagnostic]
C --> F[Restart validation]
G[Current checkout revision] --> H[Workspace provenance]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +39, Tests +162, Docs 0, Other 0. Total +201 across 14 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one process-bound loaded-artifact identity resolver beside the existing build ID, use it for running-service diagnostics and restart checks, and retain live Git lookup only for explicitly workspace-scoped provenance. Do we have a high-confidence way to reproduce the issue? Yes. The supplied real-Gateway trace gives a concrete build, start, checkout-move, status, schema-diagnostic, and restart-finalization sequence; source inspection independently identifies the former live-Git reads. I did not re-execute contributor code in this read-only review. Is this the best way to solve the issue? Yes. A single process-lifetime artifact identity owner is the narrowest maintainable repair: it replaces exactly the three running-service reads while trajectory metadata retains the deliberately live workspace resolver. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 43d259069c83. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
58c5242 to
f450415
Compare
06bca06 to
9331922
Compare
9331922 to
1b4b2c6
Compare
1b4b2c6 to
dbd794c
Compare
|
Thanks @PollyBot13! Proof: A built Gateway stayed running while its source checkout moved to another commit. CLI and Gateway status remained healthy, status and SQLite diagnostics kept the loaded commit, and restart validation stayed successful.
Example
|
Bind Gateway diagnostics to one process-lifetime loaded-build commit. Status output, SQLite schema-refusal errors, and restart validation now keep reporting the artifact that the Gateway loaded after its source checkout moves. Conflicting build metadata fails closed instead of guessing from live Git state. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
A built OpenClaw process could report the current source-checkout commit instead of the commit that produced its loaded code. If the checkout moved while the Gateway kept running, status output and SQLite refusal diagnostics changed identity. Update restart validation could also reject the correct running build.
Root cause
The three runtime diagnostics called the mutable Git resolver when they rendered or finalized. OpenClaw already records loaded build provenance, but no process-lifetime commit owner consumed its three real forms:
build-info.jsonfor packaged or source-archive builds;Fix
src/version.tsnow snapshots the loaded commit once beside the existing loaded build ID. Status, SQLite diagnostics, and restart finalization use that owner. Incomplete or conflicting loaded metadata returns an unknown commit instead of guessing from a mutable checkout. Workspace and trajectory provenance keep the live Git resolver.The repair preserves the current
SqliteSchemaVersionErrorcontract and updates the database troubleshooting guide.Evidence
Current-main red at
49a8b1cb2138b5545465d10f866962157bb49529:357078cf7087534443dac92eb86e8aa32abb7b08without rebuilding or restarting.357078c.oktorestart-revision-mismatch.Exact-head green at
256d643ae63b17bc31ad967acefbdd28a8060fb8:c9476275b86cd7b037ac9a33d762d0c6032b5d2fwithout rebuilding or restarting.256d643.okwith no mismatch reason.The changed checkout commit is the anti-cache probe: it differs from the loaded build while every diagnostic remains bound to the build metadata.
Sanitized terminal evidence
Validation
AI-assisted: yes (Codex).