Skip to content

fix: include UTC date in cross-date review timestamps#438

Merged
brokemac79 merged 1 commit into
mainfrom
codex/fix-review-timestamp-date
Jul 9, 2026
Merged

fix: include UTC date in cross-date review timestamps#438
brokemac79 merged 1 commit into
mainfrom
codex/fix-review-timestamp-date

Conversation

@brokemac79

@brokemac79 brokemac79 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Include the UTC calendar date in ClawSweeper review freshness text when the ET and UTC dates differ.
  • Preserve the existing concise UTC time-only format when both zones share the same calendar date.
  • Add regression coverage for the July 8 ET / July 9 UTC boundary case.

Problem

A live ClawSweeper review on openclaw/openclaw#101937 rendered:

Reviewed July 8, 2026, 11:00 PM ET / 03:00 UTC.

That is misleading because 11:00 PM ET on July 8, 2026 is 03:00 UTC on July 9, 2026. The UTC side needs its date when the calendar day differs.

Related live-state checks found no duplicate ClawSweeper PR:

  • gh pr list --repo openclaw/clawsweeper --state open --limit 30 --json number,title,author,headRefName,baseRefName,url,updatedAt,labels,isDraft: only open PR was feat(review): opt-in external CLI engine for offline local review #432, unrelated.
  • gh pr list --repo openclaw/clawsweeper --state merged --limit 20 --json number,title,author,headRefName,mergedAt,url: recent merged PRs were unrelated.
  • gh search prs "timestamp reviewed UTC timezone" --repo openclaw/clawsweeper --state open --json number,title,state,author,url,updatedAt --limit 20: no matches.
  • gh search prs "timestamp reviewed UTC timezone" --repo openclaw/clawsweeper --state closed --json number,title,state,author,url,updatedAt --limit 20: no matches.

Implementation

formatReviewFreshnessTimestamp now formats the ET and UTC calendar dates separately. If they match, the UTC side remains HH:MM UTC; if they differ, the UTC side becomes Month D, YYYY, HH:MM UTC.

Validation

Passed:

  • pnpm run build
  • node --test test\review-comment-rendering.test.ts (19 tests passed)
  • git diff --check
  • pnpm run build:all
  • pnpm run lint
  • pnpm exec oxfmt --check src/clawsweeper.ts test/review-comment-rendering.test.ts
  • codex -c service_tier=fast review --base origin/main

Broad-check notes:

  • pnpm run check reached test:unit and failed on Windows host prerequisites unrelated to this diff: default bash resolves to WSL C:\Windows\System32\bash.exe, whose distro lacks /bin/bash; after using Git Bash, the remaining unrelated failures were missing jq and two --local-range tests whose fake .sh Codex stubs did not execute on this Windows host.
  • pnpm run test:repair passed 620 tests and failed 2 target-validation tests because temp target repos tried to spawn C:\Users\marti\AppData\Local\Corepack\shims\pnpm and hit ENOENT.
  • Repo-wide pnpm run format:check reports existing formatting differences across many files; the touched-file format check above passed.

Proof

Rendered-output proof from PR head (f53b4b8cd80679f773dffc1401e7990735845e4e):

Redacted terminal transcript showing generated review-comment output from the built renderer:

PS> pnpm run build
$ tsgo -p tsconfig.json

PS> node --input-type=module <inline script importing renderReviewCommentFromReport from ./dist/clawsweeper.js and rendering a minimal PR report for same-date/cross-date reviewed_at values>
same-date: Codex review: needs maintainer review before merge. _Reviewed May 22, 2026, 12:43 AM ET / 04:43 UTC._
cross-date: Codex review: needs maintainer review before merge. _Reviewed July 8, 2026, 11:00 PM ET / July 9, 2026, 03:00 UTC._

The focused rendering test now covers both cases:

  • Same-date ET/UTC rendering keeps the existing concise form, for example May 22, 2026, 12:43 AM ET / 04:43 UTC.
  • Cross-date rendering now emits July 8, 2026, 11:00 PM ET / July 9, 2026, 03:00 UTC.

Codex review closeout:

  • Command: codex -c service_tier=fast review --base origin/main
  • Accepted findings: none.
  • Rejected findings: none.
  • Final result: clean; no actionable issues were found in the timestamp formatting change.

Risks / Rollout

Risk is limited to the first-line ClawSweeper review freshness text. This does not touch review decisions, labels, gates, workflow files, repair behavior, auth, or merge automation.

User-facing release-note context: ClawSweeper review comments now avoid misleading UTC-only times around ET/UTC date boundaries.

Links

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Jul 9, 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: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper

clawsweeper Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 9, 2026, 12:02 AM ET / 04:02 UTC.

Summary
The PR changes ClawSweeper review freshness rendering so UTC includes its calendar date when it differs from the ET date, and adds a focused rendering regression test.

Reproducibility: yes. Current main formats the UTC side as only HH:MM UTC, so 2026-07-09T03:00:00.000Z reads as July 8 ET with 03:00 UTC and omits the July 9 UTC date.

Review metrics: 1 noteworthy metric.

  • Diff scope: 2 files changed, +47/-1. The patch is limited to one review-comment timestamp helper and one focused rendering test.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Next step before merge

  • No automated repair is needed because the branch already contains the focused fix, regression coverage, and sufficient proof; it remains a draft pending normal maintainer handling.

Security
Cleared: The diff only changes deterministic timestamp rendering and a focused unit test, with no dependency, workflow, credential, permission, or code-execution surface changes.

Review details

Best possible solution:

Land the narrow formatter and regression-test change after the draft is marked ready and normal gates remain green.

Do we have a high-confidence way to reproduce the issue?

Yes. Current main formats the UTC side as only HH:MM UTC, so 2026-07-09T03:00:00.000Z reads as July 8 ET with 03:00 UTC and omits the July 9 UTC date.

Is this the best way to solve the issue?

Yes. The PR preserves same-date concise rendering and adds the UTC date only when the ET and UTC calendar dates differ, with a focused rendering regression test.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7e27e5dc8055.

Label changes

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes redacted terminal output from the built renderer showing unchanged same-date output and fixed cross-date output; contributors should keep redacting private data in runtime proof.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes redacted terminal output from the built renderer showing unchanged same-date output and fixed cross-date output; contributors should keep redacting private data in runtime proof.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P3: This is a low-risk review-comment clarity bug fix with limited user-facing blast radius.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes redacted terminal output from the built renderer showing unchanged same-date output and fixed cross-date output; contributors should keep redacting private data in runtime proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes redacted terminal output from the built renderer showing unchanged same-date output and fixed cross-date output; contributors should keep redacting private data in runtime proof.
Evidence reviewed

What I checked:

  • AGENTS.md policy: Read the target repository AGENTS.md in full and applied its narrow, evidence-backed, automation-safe review guidance; no maintainer-notes directory was present for these files. (AGENTS.md:1, 7e27e5dc8055)
  • Current main behavior: Current main formats the UTC side from date.toISOString().slice(11, 16), so it cannot show a different UTC calendar date. (src/clawsweeper.ts:8435, 7e27e5dc8055)
  • PR implementation: The PR computes separate ET and UTC calendar dates and keeps UTC time-only unless those dates differ. (src/clawsweeper.ts:8435, f53b4b8cd806)
  • Regression coverage: The PR adds a rendering test expecting July 8, 2026, 11:00 PM ET / July 9, 2026, 03:00 UTC, while the adjacent existing test preserves same-date concise UTC rendering. (test/review-comment-rendering.test.ts:306, f53b4b8cd806)
  • Real behavior proof: The PR body includes redacted terminal output from the built renderer showing same-date output unchanged and cross-date output including the UTC date. (f53b4b8cd806)
  • Checks and mergeability: GitHub reports the PR as mergeable with successful CI and CodeQL checks, but the PR is still marked draft. (f53b4b8cd806)

Likely related people:

  • Mason Huang: git blame attributes the timestamp helper and adjacent rendering-test surface to the commit that introduced this review rendering behavior. (role: introduced behavior; confidence: high; commits: f2fc64e0bc74; files: src/clawsweeper.ts, test/review-comment-rendering.test.ts)
  • Peter Steinberger: Recent current-main history shows repeated work in src/clawsweeper.ts around review/apply automation adjacent to durable review comments. (role: recent adjacent contributor; confidence: medium; commits: 25d7e74e6dc5, 0667396551a4, 0432e4d8e8bf; files: src/clawsweeper.ts)
  • brokemac79: Current-main history shows recent merged work by this contributor in src/clawsweeper.ts, so they are connected to this automation area beyond opening this PR. (role: recent area contributor; confidence: medium; commits: 7e27e5dc8055, 373716be22af, 181d8d0fd662; files: src/clawsweeper.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (3 earlier review cycles)
  • reviewed 2026-07-09T03:46:26.812Z sha f53b4b8 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-09T03:51:38.800Z sha f53b4b8 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-09T03:56:35.212Z sha f53b4b8 :: needs maintainer review before merge. :: none

@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. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. labels Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

1 similar comment
@brokemac79

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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. labels Jul 9, 2026
@brokemac79 brokemac79 marked this pull request as ready for review July 9, 2026 07:32
@brokemac79 brokemac79 merged commit 7af92c1 into main Jul 9, 2026
19 checks passed
@brokemac79 brokemac79 deleted the codex/fix-review-timestamp-date branch July 9, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant