Skip to content

fix: normalize fractional credential expiry timestamps#246

Merged
griffinmartin merged 2 commits into
griffinmartin:mainfrom
vupv:fix/normalize-fractional-expiry
Jul 25, 2026
Merged

fix: normalize fractional credential expiry timestamps#246
griffinmartin merged 2 commits into
griffinmartin:mainfrom
vupv:fix/normalize-fractional-expiry

Conversation

@vupv

@vupv vupv commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • truncate fractional OAuth expires_in values to integer epoch milliseconds
  • normalize fractional expiry timestamps already stored in Keychain or the credentials file
  • add regression coverage for both credential ingress paths

Root cause

OpenCode validates OAuth expires as a non-negative integer. A fractional expires_in from the OAuth endpoint produced a fractional expiresAt, which the plugin persisted unchanged to Keychain and auth.json. OpenCode then ignored the Anthropic credential.

Testing

  • pnpm test
  • pnpm run lint
  • pnpm run build

@griffinmartin
griffinmartin merged commit 686a543 into griffinmartin:main Jul 25, 2026
4 checks passed
griffinmartin pushed a commit that referenced this pull request Jul 25, 2026
🤖 I have created a release *beep* *boop*
---


##
[2.0.1](v2.0.0...v2.0.1)
(2026-07-25)


### Bug Fixes

* keep API errors out of terminal UI
([#244](#244))
([baf1ffd](baf1ffd))
* normalize fractional credential expiry timestamps
([#246](#246))
([686a543](686a543))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@vupv vupv changed the title fix: normalize fractional credential expiry timestamps fix: harden OAuth credential rotation handling Jul 25, 2026
@vupv vupv changed the title fix: harden OAuth credential rotation handling fix: normalize fractional credential expiry timestamps Jul 25, 2026
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.

2 participants