Repository navigation
fix(cli): show UTC marker in sessions tail - #148022
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 6, 2026, 10:43 PM ET / October 7, 2026, 02:43 UTC (Revision 7). ClawSweeper reviewWhat this changesAdds an explicit UTC marker to session-tail timestamps and preserves column alignment for invalid timestamps. Merge readiness✅ Ready for maintainer review This PR remains necessary: current main and the latest release still display unlabeled UTC timestamps. The focused patch has sufficient real CLI proof and no actionable correctness findings; no additional contributor action remains. Priority: P3 Review scores
Verification
How this fits togetherThe sessions-tail CLI reads stored session trajectory events and displays compact progress lines for operators. Existing events and events arriving in follow mode use the same timestamp renderer. flowchart LR
A[Stored session events] --> B[Session selection]
C[CLI options] --> B
B --> D[Initial read or follow]
D --> E[UTC timestamp and aligned columns]
E --> F[Terminal progress lines]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +2, Tests +10. Total +12 across 2 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep the compact UTC time format with an explicit Z and a consistently padded timestamp column. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source deterministically drops the UTC marker, and the supplied real CLI comparison demonstrates the ambiguity on a non-UTC host; this reviewer did not execute target code. Is this the best way to solve the issue? Yes. Labeling the existing UTC value resolves the reported ambiguity without changing time-zone policy, persistence, or session selection. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 27ba9720f2c5. LabelsLabel changes: No label changes. Label 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)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Hi maintainers — when you have a chance, could you please review this PR? CI and ClawSweeper are green, and there’s no action pending from me. Thank you! |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Mark openclaw sessions tail timestamps as UTC so they are not mistaken for local time on hosts with a non-UTC timezone. Fixes openclaw#146449. Co-authored-by: Ayaan Zaidi <[email protected]>
Closes #146449
Summary
sessions tailtimestamps as UTC with an explicitZ.--:--:--fallback without shifting later columns.What Problem This Solves
The formatter sliced
HH:MM:SSfromDate#toISOString()and discarded its UTC marker. On a non-UTC host, operators could mistake that value for local time. AppendingZpreserves the existing time value and makes its meaning explicit. Stored events, session selection, and follow lifecycle are unchanged.Evidence
Candidate:
cfc6121d027b77c4e122dc5c1a3f6e1a4f70e3de, incorporating main16e94f50ee95237a79368fd012c44cd135d8d8aband preserving TUARAN's commits. No overlap with Pash/Sarah changes.Built and exercised the shipped
openclaw.mjsCLI in isolated Linux arm64 containers on Node 24.16.0 withTZ=America/Los_Angeles. A built candidate Gateway completed realopenai/gpt-5-miniturns with low reasoning and a 4096-token output budget; the CLI read the resulting persisted trajectory events, not injected formatter fixtures.For the same stored
session.startedevent:The baseline build uses the current-main command owner with the candidate regression tests retained. The candidate Gateway generated the real session state read by both CLI builds.
Zand column alignment failures.node scripts/run-vitest.mjs src/commands/sessions-tail.test.ts; 49.55 seconds wrapper wall time, 47.38 seconds Vitest duration).pnpm tsgo: passed the real core typecheck.pnpm build: passed for candidate and baseline CLI builds.sessions tail --follow --tail 0streamed the second real turn:02:35:54Z session.startedthrough02:35:57Z session.ended ... success. Its values match the stored ISO event times.sessions tailhas no JSON output mode: registration explicitly rejects inherited--json; its help exposes only human-readable tailing. The patch changes only human-readable rendering, not any JSON serializer.Risk and limits
CLI-output-only: valid timestamps gain one character and later columns shift one position. Invalid timestamps retain the existing fallback with padding. No persistence, configuration, API, or provider behavior changes.
Not tested: packaged installation, Windows terminal rendering. Exact-head hosted CI and review are tracked in the PR checks rather than claiming an earlier head's status.