Skip to content

0.148.2: a stored calendar no longer sets what one date label costs - #50

Merged
tmoosting merged 1 commit into
mainfrom
calendar-cost
Nov 24, 2026
Merged

tmoosting merged 1 commit into
mainfrom
calendar-cost

Conversation

@tmoosting

Copy link
Copy Markdown
Member

A stored calendar no longer sets what one date label costs: the collapse around an empty token and the edge trim are one pass, and a month is one run of days instead of a list built on every call. Every answer is the same as the previous release's.

How it is held:

  • the release and this build compared on 7,071 steps (the profile fixture's calendars and made ones; format, weekday, breakdown and the parse of each label), identical, with six planted faults each turning the compare red;
  • eight timed cases in the shared calendar-cost.cases.json (the same bytes in both packages, its sha256 pinned in each test), run on the previous release first: they fail there on time, with the words right, and pass here;
  • the profile fixture's own tests, unchanged.

The commit message has the numbers.

🤖 Generated with Claude Code

format_step collapsed the separators around an empty token with a regular
expression that took cubic time on a long run of white space (4,000 spaces in
a template: about a minute for one label), and trimmed a label's edges with
one that took quadratic time on a long run of commas. Both are one pass now.

A year was built as a list of every day on each call, so a month of
5,000,000 days cost seconds a label in format_step, weekday_for_step,
breakdown_step and parse_date. A month is one run now, and each answer is
arithmetic; a config whose month lengths are not all whole ints keeps the
list, so an odd input answers as before.

Every answer is the same: the release and this build compared on 7,071
steps of the profile fixture's calendars and of made ones, with six planted
faults each turning the compare red. Eight timed cases, the same bytes as
the npm SDK's test/fixtures/calendar-cost.cases.json, each fail on 0.148.1
and pass here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tmoosting
tmoosting merged commit b4a722a into main Nov 24, 2026
11 checks passed
@tmoosting
tmoosting deleted the calendar-cost branch November 24, 2026 12:19

This branch was previously deployed

1 inactive deployment
pypi — b4a722ac Deployed Nov 24, 2026 by tmoosting via publish #237
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