Skip to content

Fix explicit-year Claude reset parsing#2038

Merged
steipete merged 1 commit into
mainfrom
codex/fix-claude-explicit-year-resets
Jul 10, 2026
Merged

Fix explicit-year Claude reset parsing#2038
steipete merged 1 commit into
mainfrom
codex/fix-claude-explicit-year-resets

Conversation

@steipete

@steipete steipete commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Parse explicit-year Claude reset timestamps before recurring yearless/time-only forms, preserving the stated year and exact local DST occurrence.
  • Keep recurring resets on the existing forward/5-hour/7-day occurrence policy; reject nonexistent local wall times and retain raw text when parsing fails.
  • Route the public JSON fixture parser through the canonical reset parser with one injected clock, then remove its duplicate formatter path.
  • Add focused explicit-year, DST, malformed-input, and caller-horizon regressions plus an Unreleased changelog entry.

Why

An existing Claude CLI fixture contains Resets Jan 2, 2026, 10:59pm (Europe/Helsinki). CodexBar preserved that text but returned no structured reset date because the canonical parser only accepted yearless forms. That removed countdown, pace, warning, and reset-scheduling behavior from an otherwise valid quota window. The public JSON helper also anchored partial reset dates to year 2000 through a separate formatter.

This is a focused follow-up to #2022. Explicit years are authoritative and never become annual recurrences; existing yearless/time-only behavior remains unchanged.

Verification

Exact candidate: becac52c39183fee8f0c351c0561b3e94bf41c46

  • Focused reset/fixture tests: 261 passed, including the real explicit-year punctuation, 12-hour/hour-only/24-hour forms, past stated years, repeated DST, nonexistent spring-forward time, malformed raw fallback, and 5-hour versus 7-day caller wiring.
  • make check: passed; SwiftFormat and SwiftLint report zero violations.
  • make test: 599/599 selections and 50/50 groups passed with zero failures, retries, or timeouts.
  • Independent review: clean after aligning the public parser documentation with authoritative explicit-year behavior.
  • autoreview --mode branch --base origin/main: clean; no accepted/actionable findings.
  • Signed packaged/source-blind CLI proof: all 7/7 contract clauses passed. The exact Developer-ID debug artifact was Gatekeeper-accepted; explicit 2030/2020 resets stayed exact, malformed tertiary text stayed unstructured, and identical six-hour-old yearless text resolved forward for the session lane but backward for the weekly lane. Fresh final runs used disposable state, dual Keychain denial, and network/securityd/real-home denial; an initial login-shell PATH escape was detected, rejected, and eliminated before both reruns passed.
  • Exact-head CI: run 29104479860 passed both macOS shards, both Linux builds, lint, aggregate, change detection, and GitGuardian.
  • Current-main composition: clean virtual merge with e0ee6a04 (Fix stale native menu hover highlight geometry #2035), producing tree 069be2ea with the exact five-file +171/-41 delta. The only overlap is independent changelog additions; all four runtime/test blobs are byte-identical to the proven candidate. GitHub's cached merge ref still uses the older base, so this is reported separately as current-main merge-tree proof.
  • ClawSweeper repeatedly acquired and expired infrastructure leases without producing a review or finding; GitHub reports no review threads or inline comments.

No provider login, browser session, real Claude request, or Keychain access is required for this parser-only change.

Public Model Identifier Gate: PASS (model-free diff and fixtures).

Dependency freshness: N/A (no dependency changes).

@steipete

Copy link
Copy Markdown
Owner Author

Exact-head proof for becac52c39183fee8f0c351c0561b3e94bf41c46:

  • Focused reset/parser coverage: 261 tests passed.
  • make check: passed with zero formatting or lint violations.
  • make test: 599/599 selections and 50/50 groups passed; zero failures, retries, or timeouts.
  • Branch autoreview: clean; no accepted/actionable findings.
  • Signed packaged/source-blind CLI validation: 7/7 contract clauses passed; Gatekeeper accepted the Developer ID artifact. Explicit-year, malformed-input, and quota-window behavior matched the contract without provider login, browser access, real provider requests, or Keychain access.
  • Exact-head CI: run 29104479860 passed both macOS shards, both Linux builds, lint, aggregate, change detection, and GitGuardian.
  • Main advanced afterward through Default Agent Sessions to off #2039 and Fix stale native menu hover highlight geometry #2035. A current-main three-way merge at e0ee6a04 is conflict-free (tree 069be2ea), preserves the exact five-file +171/-41 delta, and has only independent changelog overlap; all four runtime/test blobs are byte-identical to the proven candidate. Both intervening PRs had fully green exact CI. This is compositional current-main proof, not current-base merge-ref CI.
  • ClawSweeper repeatedly acquired and expired infrastructure leases without producing a review or finding; GitHub reports no review threads or inline comments.
  • Public Model Identifier Gate: PASS. Dependency freshness: N/A.

@steipete steipete merged commit ce62f4a into main Jul 10, 2026
8 checks passed
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