Repository navigation
fix(patchy): login gives the code's deadline as minutes left, not a UTC timestamp - #675
Merged
Merged
Conversation
…TC timestamp Text-mode `patchy login` printed the raw ISO expiry; it now says how many minutes are left and the local clock time, from Effect's Clock and the current time zone. The onboarding reference tells agents to count the minutes down from `expiresAt` and to name a zone with any clock time. `--json` and the stored login keep the ISO instant. Co-Authored-By: Claude Opus 5.5 <[email protected]>
allisonmahmood
force-pushed
the
fix/671-login-expiry-minutes
branch
from
October 14, 2026 13:38
5376a5e to
d2c1843
Compare
Owner
Author
GPT 6.1 Sol review (xhigh), round 1No blocker, should-fix or nit findings at
All five judgment calls are acceptable:
NOT READY — code review is clean, but CI on the latest commit is still running. |
allisonmahmood
added a commit
that referenced
this pull request
Oct 14, 2026
… Patchy is smoother (#679) Release 12's What's new entry, written from `b58b899`, ahead of deploying it. `patchy` and `CURRENT_RELEASE` move to `0.12.0`, so CLIs and patch repos installed before this deploy are told to upgrade. | Change | PRs | | --- | --- | | Fixed: Links within a page jump to their section | #677 | | Improved: Set up Patchy however you ask | #672, #674 | | Improved: Claude Code can know Patchy is your company's own | #676 | | Fixed: Your agent remembers Patchy after a Node.js update | #673 | | Fixed: Sign-in codes say how many minutes they have left | #675 | | Behind the scenes: uploaded pages and logos are checked within strict limits | #678 | Made by Claude Opus 5.5 via Claude Code in T3 Code Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
During a real setup an agent told the person "the code works until 12:29 UTC" while their clock read 14:20. Onboarding step 2 had agents relay the raw
expiresAtinstant, and text-modepatchy loginprinted that same ISO string on itsExpires:line to a person at a terminal. A login code lasts ten minutes, so the useful thing to say is how long is left.patchy loginnow printsExpires in about 10 minutes, at 14:29(orExpired at 14:29for a code that already ran out locally). Minutes left come from Effect'sClock; the clock time comes fromDateTime.CurrentTimeZone, which the CLI entrypoint provides as the machine's zone (DateTime.layerCurrentZoneLocal). The time is a locale-independentHH:MM. An unparseable storedexpiresAtfalls back to the old raw line instead of failing the login.--jsonand stored state are unchanged:expiresAtstays the canonical ISO instant.references/onboarding.mdstep 2: thependingline now says "the same link and code work for about<n>more minutes". A code lasts ten minutes,<n>is counted down from the current time to the returnedexpiresAt(fixed across polls), and any clock time names its zone, since the agent's machine may not share the person's.SKILL.mdnever relays the expiry, so the global skill andskills-lock.jsonare untouched.packages/patchy/README.mdand ADR-0004 only showexpiresAtin the JSON tables, which did not change, so neither needed an edit.Closes #671
How it was verified
New focused test in
packages/patchy/src/Login.test.ts: a text-mode handoff underTestClockand a fixedAsia/Kolkatazone, checking the whole printed handoff at 10 minutes left, 1 minute left, and past expiry. It passes whatever the machine'sTZand locale are (also run withTZ=America/Los_Angeles LANG=de_DE.UTF-8).Ran the built CLI against a stub instance with
TZ=America/New_YorkandTZ=Europe/Berlin. Each printed minutes left with that zone's clock time, and--jsonstill returned the ISOexpiresAt.pnpm verifyon the rebased branch: format, lint, typecheck, synth, postgres-concurrency, cli-smoke, tier2-smoke and browser passed. The offlineteststep was hit by load on the shared machine: a CLI child killed by signal in an unrelatedretiretest and a SIGKILLed vitest worker. Rerun alone,pnpm testpassed with 177 files and 1737 tests.pnpm testpasses locallyAdded or updated tests covering this change
Surface walk (CLAUDE.md › Hit every surface)
--jsonshape changed.patchy loginchanged. Flags, exit codes and JSON are unchanged. README and ADR-0004 do not show that line. The global skill'sSKILL.mddoes not mention the expiry. The onboarding reference was updated, and a reference-only edit needs no lock refresh.Release impact
Only the text-mode wording of one line changed. The
--jsoncontract agents use and the stored login state are the same.Made by Claude Opus 5.5 via Claude Code in T3 Code