Skip to content

fix(workbuddy): correct CN check-in timezone and error reporting - #275

Open
EchoChan314 wants to merge 2 commits into
caigee-cmd:mainfrom
EchoChan314:fix/workbuddy-checkin-timezone-and-errors
Open

EchoChan314 wants to merge 2 commits into
caigee-cmd:mainfrom
EchoChan314:fix/workbuddy-checkin-timezone-and-errors

Conversation

@EchoChan314

@EchoChan314 EchoChan314 commented Oct 7, 2026 •

Copy link
Copy Markdown

Summary

  • WorkBuddy CN automatic check-in times are now read in Asia/Shanghai instead of the process local timezone. Local resolves to the container's zone, and the supported Docker Compose install sets no TZ, so the configured time was treated as UTC: check-ins fired eight hours off the intended local time, and CheckedInLocalDay placed the "already checked in today" boundary eight hours away from the upstream's UTC+8 quota reset. Qoder CN and Trae CN already pin this zone. The global region keeps Local because its reset zone is unverified.
  • DailyCheckin now returns the transport error from do. The retry loop assigned err and never inspected it, so a nil body reached json.Unmarshal, and a dropped connection, TLS failure or timeout was reported as checkin parse: unexpected end of JSON input. That message is what a week of failed daily check-ins looked like, and it read as a malformed response rather than a transport failure. The Trae adapter already surfaces the same condition as EOF.

Test plan

  • go test ./...
  • go vet ./...
  • cd worker && npm test
  • cd frontend && npm run build && npm run lint
  • Added changelog/unreleased/<slug>.md, or this PR has no user-facing change
  • No tokens, auth blobs, raw captures, or host details in the diff

TestDailyCheckinSurfacesTransportError hijacks and closes the connection, then asserts the returned error is not a parse error. It overrides dailyCheckinRetryDelays to {0, 0} the same way the existing retry tests do.

The machine that produced this patch has no Go toolchain, so the Go steps were not run locally. The CI run on this PR is action_required — a first-time contributor needs a maintainer to approve the workflow before any job executes — so nothing has run yet.

EchoChan314 and others added 2 commits October 7, 2026 14:25
Pin WorkBuddy CN check-in times to Asia/Shanghai instead of the process
local timezone. The supported Docker Compose install sets no TZ, so
`Local` resolved to UTC and both the trigger time and the
already-checked-in day boundary sat eight hours off the upstream's UTC+8
quota reset. Qoder CN and Trae CN already pin this zone.

Also return the transport error from DailyCheckin. `do` yields a nil body
and a zero status when the request itself fails, and the retry loop's
error was never inspected, so a dropped connection or timeout surfaced as
`checkin parse: unexpected end of JSON input` and hid the real cause.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant