Skip to content

Use the site date for "today", not the UTC date (#1479) - #1505

Merged
jonfroehlich merged 4 commits into
masterfrom
1479-site-date-for-today
Dec 5, 2026
Merged

jonfroehlich merged 4 commits into
masterfrom
1479-site-date-for-today

Conversation

@jonfroehlich

Copy link
Copy Markdown
Member

Closes #1479.

"Today" is now the site's date (timezone.localdate()) everywhere shipped code used timezone.now().date(), the UTC date, which is already tomorrow from 16:00 (17:00 in summer) Pacific. Implements the agreed plan in #1479 (comment).

Call sites changed

Site Effect in the Pacific evening before this PR
admin/utils.py get_active_professors_queryset Advisor dropdown dropped a professor on their last day and offered one starting tomorrow
admin/utils.py get_active_mentors_queryset Same, for the mentor dropdown
models/person.py Person.is_alumni_member A member position ending today or tomorrow already counted as ended (see decision 1)
models/person.py Person.save() (2 lines) bio_datetime_modified ("Bio last updated", sitemap lastmod) stamped a day ahead
admin/data_health/registry.py CSV export filename dated a day ahead
models/project.py Project.get_people Ongoing-role duration one day long
models/person.py get_total_time_on_project Coalesced with timezone.now(), a datetime: 3 days 4 h for a role 2 site-days old. Now Value(timezone.localdate(), output_field=DateField())
models/video.py get_age_in_ms, utils/ml_utils.py choose_banners_helper No behaviour change (naive local now().date() was already the site date); converted so the guard needs no allowlist. Unused datetime imports dropped

Also: test_person_save.py's two bio_datetime_modified assertions now compare with timezone.localdate() (they would otherwise fail between 00:00 and 08:00 UTC), and CLAUDE.md gets a coding-convention line: "today" is timezone.localdate(), never timezone.now().date().

Left alone (on purpose)

  • All date.today() sites (position and project-role models, views, data-health checks, news.py default): Django sets TZ from TIME_ZONE, so they already give the site date.
  • sponsor_admin.py end_date__gt=timezone.now(): Django converts an aware datetime to the site date for a DateField lookup, so it is correct. A new control test pins that conversion.
  • modifyprojectpeople.py (naive local, legacy), and real timestamps (banner_admin.py, models/banner.py, backup_status.py, schema_report.py).

New tests: website/tests/test_site_date.py

Clock frozen at 04:00 UTC on 4 Mar 2031 (20:00 on 3 Mar Pacific) with the repo's existing mock.patch("django.utils.timezone.now") pattern; setUp asserts the site and UTC dates differ.

  • 11 behaviour tests (above), plus two controls that pass before and after: a member position that ended yesterday is alumni, and DateField().get_prep_value(aware datetime) gives the site date.
  • A guard (SimpleTestCase) that fails with file:line on any now().date() in the shipped packages only (website, makeabilitylab, image_cropping, sortedm2m_filter_horizontal_widget, ckeditor_uploader, scripts, manage.py; skipping tests and migrations), plus a detector self-test and a check that every listed root exists. Its docstring states its limits: it misses a split form like n = timezone.now(); n.date(), and a new top-level package must be added to the list.

Failing first

Commit e6dba8c (tests only) against the unchanged code, Python 3.13.1 in the project's Docker image:

FAIL: test_bio_date_stamped_on_bio_change
AssertionError: datetime.date(2031, 3, 4) != datetime.date(2031, 3, 3)
FAIL: test_bio_date_stamped_on_create
AssertionError: datetime.date(2031, 3, 4) != datetime.date(2031, 3, 3)
FAIL: test_csv_export_filename_uses_site_date
AssertionError: 'attachment; filename="duplicate-people-2031-03-04.csv"' != 'attachment; filename="duplicate-people-2031-03-03.csv"'
FAIL: test_member_position_ending_today_is_not_alumni
AssertionError: True is not false
FAIL: test_member_position_ending_tomorrow_is_not_alumni
AssertionError: True is not false
FAIL: test_mentor_on_last_day_is_active
AssertionError: <Person: Jane Doe> not found in <QuerySet []>
FAIL: test_mentor_starting_tomorrow_is_not_active
AssertionError: <Person: Jane Doe> unexpectedly found in <QuerySet [<Person: Jane Doe>]>
FAIL: test_person_total_time_on_project_ongoing_role
AssertionError: datetime.timedelta(days=3, seconds=14400) != datetime.timedelta(days=2)
FAIL: test_professor_on_last_day_is_active
AssertionError: <Person: Jane Doe> not found in <QuerySet []>
FAIL: test_professor_starting_tomorrow_is_not_active
AssertionError: <Person: Jane Doe> unexpectedly found in <QuerySet [<Person: Jane Doe>]>
FAIL: test_project_get_people_ongoing_role_duration
AssertionError: datetime.timedelta(days=3) != datetime.timedelta(days=2)
FAIL: test_no_now_date_in_shipped_code
AssertionError: Lists differ: ['website/admin/utils.py:91', 'website/adm[249 chars]109'] != []
FAILED (failures=12)

The guard listed exactly the 9 lines changed here: admin/utils.py:91, :180, models/person.py:425, :721, :723, models/video.py:45, models/project.py:833, utils/ml_utils.py:285, admin/data_health/registry.py:109.

Full suite with the fix

python manage.py test website --settings=makeabilitylab.settings_test, Python 3.13.1 (project Docker image): 1233 tests, 2 failures, 34 skipped. The two failures (test_news_prose_editor...test_cleaner_kwargs_match_snapshot, test_pa11y_ci_config...test_hide_elements_includes_installed_toolbar_host) fail identically on untouched master a643f99 with the same image, which is stale against the pins bumped in #1497 and #1499. CI, which builds from requirements.txt, is the gate.

Decisions (PROVISIONAL, all reversible at review)

  1. Person.is_alumni_member now uses end_date < today instead of <=. This is a behaviour change: on a member's last day they no longer count as alumni (before, they counted as both current and alumni). It restores the rule from before Admin changelist audit: make all listing pages manageable (perf + findability) #1346 (end_date__lt=timezone.now(), compared as the site date) and matches Position.is_alumni_member. The method's comment, which wrongly said <= matched the old filter, is rewritten. To keep <= instead: revert that operator and drop test_member_position_ending_today_is_not_alumni.
  2. date.today() sites left as they are; no follow-up filed.
  3. video.py and ml_utils.py converted (no behaviour change).
  4. get_total_time_on_project included.
  5. Guard test included, scoped to the shipped packages.
  6. Frozen instant is the issue's 04:00 UTC, not the existing tests' 07:59:59 UTC.
  7. No shared frozen-clock helper in tests/base.py yet.
  8. CLAUDE.md convention line added.

No model, template or UI change, so no screenshots or Pa11y run.

🤖 Generated with Claude Code — Opus 5.5, claude-opus-5-5

jonfroehlich and others added 2 commits December 5, 2026 09:05
Freeze the clock at 04:00 UTC on 4 Mar 2031 (20:00 on 3 Mar Pacific)
and check each decision that reads the UTC date as "today": admin
advisor/mentor choices, Person.is_alumni_member, bio_datetime_modified,
the Data Health CSV filename, and time on project for ongoing roles.
Add a guard against now().date() in the shipped packages, and switch
test_person_save's two assertions to timezone.localdate().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
timezone.now().date() is the UTC date, a day ahead from 16:00 (17:00
in summer) Pacific. Switch every such site to timezone.localdate():
admin advisor and mentor choices, Person.is_alumni_member,
bio_datetime_modified, the Data Health CSV filename, and the ongoing
role duration in Project.get_people. Person.get_total_time_on_project
coalesced with timezone.now(), a datetime; it now uses the site date
too. video.py and ml_utils.py used naive local now().date(), which was
already right; they move to timezone.localdate() so the guard needs no
allowlist.

Person.is_alumni_member also goes back to end_date < today, the rule
before #1346, so a member is not counted as alumni on their last day.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@jonfroehlich jonfroehlich left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of head b155889

No blocking and no should-fix findings. Every claim in the PR body that I checked held. Five nits, all in website/tests/test_site_date.py; none needs to hold the merge.

Local runs used Python 3.13.1 in the project's Docker image (stale against the current pins) with an isolated Postgres 16. I did not check the Actions run.

Claims re-derived

Claim Result
New tests fail first on e6dba8c (tests only) Confirmed: 16 tests, 12 failures, same assertion messages as the PR body
The guard hit exactly 9 lines on base Confirmed, same 9 file:line entries
Full suite with the fix: 1233 tests, 2 failures, 34 skipped Confirmed exactly
The 2 failures are not from this change Confirmed: both fail on a643f99 with the same image
Person.is_alumni_member used end_date__lt=timezone.now() before fb356b7 Confirmed from that commit's diff; it introduced <= and the comment wrongly saying the two match
Position.is_alumni_member uses < Confirmed
date.today() is already the site date Confirmed: after django.setup(), TZ is America/Los_Angeles and naive now is 8 h behind UTC
get_people and get_total_time_on_project have no callers outside tests Confirmed by grep
The video.py and ml_utils.py conversions are safe Confirmed: breaking either line makes existing tests error, so the new imports are exercised at runtime

Missed "today" call sites: none found

I grepped the shipped Python for now(, today(, utcnow, localdate, localtime, .date() and the DB-side forms (Now(), CURRENT_DATE, TruncDate, __date), and the templates for {% now %} and timesince. No now().date() remains, what is left matches the PR's "left alone" list, and there is no DB-side "now".

Mutation results

Each call site was reverted one at a time and the new tests run.

Mutation Killed by
admin/utils.py:91 back to now().date() both professor tests, guard
admin/utils.py:180 both mentor tests, guard
registry.py:109 CSV filename test, guard
person.py:289 to now().date() total-time test, guard
person.py:289 to the original timezone.now() datetime total-time test only
person.py:430 (alumni) to now().date() ending-today test, guard
person.py:726, :728 (bio stamp) the matching bio test each, guard
person.py:433 < to <= ending-today test
project.py:833 get_people test, guard
video.py:44, ml_utils.py:285 to naive now().date() guard only, as the PR says
Guard: parents[2] to parents[1] test_every_shipped_root_exists
Guard: rglob("*.py") to rglob("*.pyx") survived (nit 1)
Guard: "website" dropped from SHIPPED_ROOTS survived (nit 1)

Findings

  1. Nit: the guard can pass vacuously. Nothing checks that the scan reads any file or that the root list is complete. Changing rglob("*.py") to rglob("*.pyx"), or deleting "website" from SHIPPED_ROOTS, leaves all 21 tests green. Suggested fix: assert that _shipped_python_files() yields a known file such as website/models/person.py.
  2. Nit: NOW_DATE_RE misses now(<args>).date(). datetime.now(timezone.utc).date() is the UTC date written explicitly, and it passes the guard. No such call exists today. Suggested fix: now\([^)]*\)\s*\.date\(\s*\), which should add no hits on the current tree (not run).
  3. Nit: the guard also matches comments and docstrings. A line like # never timezone.now().date() in shipped code would turn it red. None exists today. A sentence in the failure message would do.
  4. Nit: the module docstring is out of date after the fix. It says video.py and ml_utils.py have no frozen test because the patch can't freeze them. That was true of the old code; both now call timezone.localdate() and can be frozen (a video dated 7 days before the frozen site date reports exactly 7.0 days). Suggested fix: reword to say there was no way to fail first, and optionally add one frozen get_age_in_ms test.
  5. Nit: "current" should be "default" time zone in the DateFieldPrepTests docstring. DateField.to_python uses timezone.get_default_timezone(). The assertion is right, and nothing in the repo activates another zone, so there is no behaviour effect.

On decision 1 (< in Person.is_alumni_member): the history supports it and I agree with it. Note that after this PR the ending-today test is the one guarding both the operator and the date source; the ending-tomorrow test only fails for the old <=-plus-UTC combination.

Second review: Gemini 4 Neon (xhigh) (gemini-4-neon-xhigh)

Four findings, each tested the same way as my own.

# Finding Severity Verdict Reason
1 _now_date_lines runs a line regex over comments, docstrings and strings nit Confirmed Same as my finding 3: the pattern matches a comment that names the banned form. Nothing is red today.
2 NOW_DATE_RE only matches zero-argument now() nit Confirmed Same as my finding 2: no match for datetime.now(timezone.utc).date() or the tz= form.
3 The module docstring falsely says video.py and ml_utils.py can't be frozen, leaving them without frozen tests nit Partly valid The docstring is right about the old code and misleading about the new (my finding 4). The "regression goes uncaught" part is weaker than stated: a revert to date.today() is not a bug, and existing tests already execute both lines.
4 DateFieldPrepTests says the conversion uses the current time zone; Django uses the default one nit Confirmed Checked against Django's source, and under timezone.override the two do diverge. Wording only, since nothing here activates a zone (my finding 5).

no follow-up was needed (no blocking or should-fix finding rejected). The script excluded no files from the diff it sent.

🤖 Generated with Claude Code — review, triage and verdicts by Fable 5.2, claude-fable-5-2; second-review findings by gemini-4-neon-xhigh via Google Antigravity CLI

- Guard: assert the scan reads known shipped files, so a broken glob or
  a dropped root can't pass vacuously.
- Guard regex: match now(<args>).date() too, e.g.
  datetime.now(timezone.utc).date(); self-test covers it.
- Guard docstring and failure message: a hit in a comment counts too.
- Module docstring: video.py and ml_utils.py could not fail first, but
  can be frozen now; add a frozen Video.get_age_in_ms test.
- DateFieldPrepTests: default time zone, not current.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonfroehlich

Copy link
Copy Markdown
Member Author

Fix round 1 for review #1505 (review). All five nits are fixed in fa4c405 (one commit, test file only). I reproduced each finding before fixing it, and re-ran the module (18 tests, OK) in the project's Docker image, Python 3.13.1.

  1. The guard can pass vacuously. Fixed (fa4c405). Reproduced: with rglob("*.pyx"), or with "website" dropped from SHIPPED_ROOTS, the old file stayed green. The new test_scan_reads_known_shipped_files asserts that the scan yields website/models/person.py, website/admin/utils.py, makeabilitylab/settings.py and manage.py, and no file under tests/ or migrations/. Re-run under both mutations, it fails each time.
  2. NOW_DATE_RE misses now(<args>).date(). Fixed (fa4c405). Reproduced: the old pattern did not match datetime.now(timezone.utc).date(). The pattern is now now\([^)]*\)\s*\.date\(\s*\), and the self-test covers the positional and tz= forms. The widened pattern matches nothing in the shipped packages.
  3. The guard matches comments and docstrings. Fixed (fa4c405), as suggested, in the docstring and the failure message rather than by parsing. Reproduced: # never timezone.now().date() matches. The guard docstring now lists this as a limit, and the failure message says a hit in a comment or docstring counts too and should be reworded.
  4. Module docstring out of date for video.py / ml_utils.py. Fixed (fa4c405). The docstring now says no frozen test could fail first on their old code, and that both now call timezone.localdate(). Added test_video_age_counts_from_site_date: a video dated 7 site-days back reports exactly 7 days. It also fails if get_age_in_ms goes back to naive datetime.now().date(), because that reads the real clock, not the frozen one. ml_utils.choose_banners_helper gets no frozen test. It returns a random weighted sample, and the guard already covers its one line.
  5. "current" should be "default" time zone in DateFieldPrepTests. Fixed (fa4c405). The docstring now says "the default time zone (TIME_ZONE)".

🤖 Generated with Claude Code — Opus 5.5, claude-opus-5-5

@jonfroehlich jonfroehlich left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review 2 of head fa4c405

This review covers b155889..fa4c405: one commit, website/tests/test_site_date.py only (+30/-6).

No blocking and no should-fix findings. All five nits from review 1 are closed, and the claims in the fix answers that I checked held. Two new nits, both about what the guard still does not cover; neither needs to hold the merge.

Local runs used Python 3.13.1 in the project's Docker image (stale against the current pins) with an isolated Postgres 16.

Review 1 findings

# Review 1 nit Status How checked
1 Guard can pass vacuously Closed rglob("*.pyx") and dropping "website" from SHIPPED_ROOTS now both fail test_scan_reads_known_shipped_files
2 NOW_DATE_RE misses now(<args>).date() Closed for flat arguments (see nit A) Reverting the regex fails the detector self-test; the widened pattern has no hits on the shipped tree
3 Guard matches comments and docstrings Closed, as suggested Now stated in the class docstring and the failure message (read only)
4 Module docstring out of date for video.py / ml_utils.py Closed Docstring reworded; the new test_video_age_counts_from_site_date is mutation-sensitive (below)
5 "current" vs "default" time zone Closed Docstring now says "the default time zone (TIME_ZONE)"

Full suite

1235 tests, 2 failures, 34 skipped: review 1's 1233 plus the 2 new tests. The 2 failures are the same two that review 1 showed failing on base with this image (test_hide_elements_includes_installed_toolbar_host and test_cleaner_kwargs_match_snapshot); I did not re-run them on base this round. The module alone runs 18 tests, OK. The Actions checks on this head (test, a11y, e2e) are green; I read their status, not their logs.

Mutation results

Each mutation was applied alone and the module run.

Mutation Result
Regex back to zero-argument now\(\s*\) Killed (detector self-test)
Regex requires arguments ([^)]+) Killed (detector self-test)
rglob("*.py") to "*.pyx" Killed (scan test)
Drop "website", "makeabilitylab" or "manage.py" from SHIPPED_ROOTS Killed each time (scan test)
Drop "scripts" or "image_cropping" from SHIPPED_ROOTS Survived (nit B)
SKIP_DIRS loses "tests" Killed (scan test and guard)
SKIP_DIRS loses "migrations" Survived (nit B)
Skip check disabled Killed (scan test and guard)
get_age_in_ms to timezone.now().date() Killed (video test and guard)
get_age_in_ms to naive datetime.now().date() Killed (video test and guard)
get_age_in_ms to date.today() Killed (video test)
get_age_in_ms factor 1000 to 1 Killed (video test)

Findings

A. Nit: NOW_DATE_RE misses now() when its argument contains a call. [^)]* stops at the first ), so datetime.now(ZoneInfo("UTC")).date() and datetime.now(pytz.timezone("UTC")).date() pass the guard. These are common ways to write the UTC date explicitly, which is the case review 1's nit 2 was about. Reproduce: re.search(r"now\([^)]*\)\s*\.date\(\s*\)", 'x = datetime.now(ZoneInfo("UTC")).date()') returns None. No such call exists in shipped code today (a greedy grep finds none). Possible fix: now\(.*?\)\s*\.date\(\s*\) with one more self-test line. That pattern matches the ZoneInfo form and leaves timezone.now() and timezone.localdate() alone in a quick check; I did not run it over the tree. Listing the case under the docstring's "Limits" would also do.

B. Nit: the scan test pins 3 of the 7 roots and half of SKIP_DIRS. Dropping "scripts" or "image_cropping" from SHIPPED_ROOTS leaves all 18 tests green (the other two unpinned roots, sortedm2m_filter_horizontal_widget and ckeditor_uploader, follow by the same logic; not run). Removing "migrations" from SKIP_DIRS also survives, because website/migrations/ is gitignored and absent in a fresh checkout and in CI. The impact is small: the mutation review 1 asked about is killed, and the four unpinned roots hold 10 of the 240 tracked .py files. Possible fix: assert one known file per root, or leave it.

Second review: Gemini 4 Neon (xhigh) (gemini-4-neon-xhigh)

Three findings, each tested the same way as my own.

# Finding Severity Verdict Reason
1 [^)]* in NOW_DATE_RE fails on a timezone argument with nested parentheses nit Confirmed Same as my nit A. All four of its examples (ZoneInfo("UTC"), pytz.timezone("UTC"), datetime.timezone(timedelta(0)), timezone.get_fixed_timezone(0)) return no match. Nothing in shipped code uses the form today.
2 The "/tests/" / "/migrations/" substring check misses top-level directories and ignores the rest of SKIP_DIRS nit Partly valid True that the check repeats two names instead of using SKIP_DIRS, so __pycache__ is not asserted. The top-level case can't happen as written: every scanned path starts with a root name from SHIPPED_ROOTS, so a skipped directory is never the first path part. No .py file sits under a __pycache__ in the tree.
3 test_scan_reads_known_shipped_files checks files from only 3 of the 7 roots nit Confirmed Same as my nit B: dropping "scripts" or "image_cropping" survives.

No follow-up was needed (no blocking or should-fix finding rejected). The script excluded no files from the diff it sent.

🤖 Generated with Claude Code — review, triage and verdicts by Fable 5.2, claude-fable-5-2; second-review findings by gemini-4-neon-xhigh via Google Antigravity CLI

- NOW_DATE_RE allows balanced parentheses two levels deep in now(...),
  so now(ZoneInfo("UTC")).date() and now(timezone(timedelta(0))).date()
  are caught, while a later unrelated .date() on the line is not.
- The scan test pins one known file in every shipped root and checks
  the skip rule against SKIP_DIRS instead of two hard-coded names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonfroehlich

Copy link
Copy Markdown
Member Author

Fix round 2 for review #1505 (review). All fixes are in 3874c1d, which touches only the test file. I reproduced each finding first. After the fix, test_site_date + test_person_save give 23 tests, OK, in the project's Docker image, Python 3.13.1.

A / Gemini 1. NOW_DATE_RE misses nested parentheses in now(...). Fixed (3874c1d), test first. I added detector lines for all four forms (ZoneInfo("UTC"), pytz.timezone("UTC"), datetime.timezone(timedelta(0)), timezone.get_fixed_timezone(0)), and the self-test failed on fa4c405 ([] != [1]). The argument pattern now allows balanced parentheses two levels deep; Python's re has no recursion. I chose this over the suggested .*? because .*? also flags timezone.now() - video.get(1).date(), a later, unrelated .date() on the same line. A new self-test line pins that this is not a hit. The guard still passes on the shipped tree.

B / Gemini 3. The scan test pins only 3 of the 7 roots. Fixed (3874c1d). It now pins one known file per root: image_cropping/fields.py, sortedm2m_filter_horizontal_widget/forms.py, ckeditor_uploader/fields.py, scripts/preflight_settings.py, plus the existing ones. Dropping "scripts", "image_cropping" or "ckeditor_uploader" from SHIPPED_ROOTS now fails the scan test (each run separately).

B, SKIP_DIRS losing "migrations" survives. Disagreed, no change: website/migrations/ is gitignored, so a fresh checkout and CI have no file there for any test to see. Only an assertion on the set's literal contents could catch it, and that would just restate the constant.

Gemini 2. The skip check repeats two names instead of using SKIP_DIRS. Fixed (3874c1d). The check now fails if any scanned path has a directory part in SKIP_DIRS, which covers __pycache__ too. The top-level-directory concern can't arise, as the review notes: every scanned path starts with a SHIPPED_ROOTS name. Dropping "tests" from SKIP_DIRS is still caught, by the main guard (test files quote the banned form).

🤖 Generated with Claude Code — Opus 5.5, claude-opus-5-5

@jonfroehlich

Copy link
Copy Markdown
Member Author

Closing check: nothing found

Read at head 3874c1d: the whole PR (origin/master...HEAD, 4 commits, 9 files) and the code around each changed call site, not only the last fixes.

Findings

None blocking or should-fix.

Disagreed, not closed

None. Neither review (Gemini's findings included) raised a blocking or should-fix finding. The one point the answers disagreed with, pinning "migrations" in SKIP_DIRS, was a nit.

What was checked

  • Review findings. All seven nits from the two reviews are closed at this head, apart from the one disagreed nit above. Read from the code and confirmed by the module run (test_site_date + test_person_save: 23 tests, OK).
  • Commits after review 2 (fa4c405..3874c1d). Test file only. Full suite, Python 3.13.1 in the project's Docker image with an isolated Postgres 16: 1235 tests, 2 failures, 34 skipped. The two failures are test_cleaner_kwargs_match_snapshot and test_hide_elements_includes_installed_toolbar_host; I re-ran both modules on base a643f99 with the same image and they fail there identically, so they are the stale image, not this PR. The Actions checks on this head (test, a11y, e2e) are green; I read their status, not their logs.
  • The nested-parentheses regex. It behaves as its comment says: it matches two levels of nesting, does not match timezone.localtime(timezone.now()).date() (the site date) or a later unrelated .date() on the same line, and returns at once on long unbalanced input (no backtracking blow-up). It misses three levels of nesting, the split form and a call broken across lines; the docstring and comment state the first two limits and "line regex" covers the third.
  • Consistency across files. The dropped datetime imports in video.py and ml_utils.py have no remaining uses. Person.is_alumni_member's new comment matches Position.is_alumni_member (<) and Position.is_current_member (>=). The "left alone" list in the PR body matches what a grep for now(, today( and utcnow still finds in the shipped packages. The CLAUDE.md line agrees with the guard's roots and with the code.

Not blocking, for whoever merges: the PR body's test counts (11 behaviour tests, 1233 in the suite) describe the first head; two tests were added in fa4c405, so the suite is now 1235.

🤖 Generated with Claude Code — Fable 5.2, claude-fable-5-2

@jonfroehlich
jonfroehlich merged commit 76ab2b4 into master Dec 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use the site date (timezone.localdate) instead of the UTC date for "today"

1 participant