Skip to content

sweep/2026-09-21: 9 fixes + 3 refactors (bohosluzby maintenance) - #33

Open
Chartres wants to merge 12 commits into
mainfrom
sweep/2026-09-21
Open

Chartres wants to merge 12 commits into
mainfrom
sweep/2026-09-21

Conversation

@Chartres

Copy link
Copy Markdown
Owner

Sweep 2026-09-21 — bohosluzby

3 cycles (Red → Green → Refactor). 343 tests pass, typecheck clean.

Findings table

# File Severity Status
1 src/App.tsx:266 medium FIXED — dayFromParam Sunday key=7 returned 0 (today) instead of 7 (next Sunday)
2 src/ChurchDetail.tsx:329 medium FIXED — raw fetch('/data/services/…') replaced with loadData to use OTA cache
3 src/App.tsx:259-270 medium FIXED — added missing Sunday key=7 round-trip unit test
4 src/domain/feedback.ts:118 low FIXED — one-off service date parsed as UTC noon, not local timezone
5 src/MapView.tsx:304-306 low FIXED — witness-filtered clustering uses full church index (pan-invariant)
6 src/lib/feedbackStore.ts:14 low FIXED — CORROBORATION_MIN defaults to 3; reduced only for preview/test builds
7 src/domain/cities.ts low FIXED — unexported normalizeCity/fold/slugify (internal helpers)
8 src/lib/geo.ts:48 low FIXED — deadline timer cleared when read() wins the race
9 scripts/linkcheck-www.mjs:195 medium FIXED — flip.example selftest assertion corrected to drop:false
c2-1 src/domain/notes.ts:153 high CONTESTED — regex already uses \d{1,2}, test already covers single-digit months; false positive

Refactors

  • pragueIsoDate deduplicated into src/domain/occurrences.ts (was in 3 files)
  • Dead verifiedYear key removed from i18n.ts (replaced by season banner)
  • noteRunsOn shared from src/domain/notes.ts (was duplicated in 3 files)

Test evidence

Test Files  30 passed (30)
Tests  343 passed (343)

🤖 Generated with Claude Code

Chartres and others added 12 commits September 21, 2026 00:41
…nday

?den=nedele on a Sunday now decodes to key=7 (next Sunday) instead of 0
(today). off=0 matched because today IS that weekday, but dayToParam(0)
always produces 'dnes', so a weekday slug can only mean next occurrence.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Raw fetch('/data/services/…') bypassed the OTA filesystem cache on native.
Switch to loadData() so native OTA-refreshed registry and detail data
stay in sync, matching the pattern already used for photos and confession.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers the previously untested case: ?den=nedele on a Sunday must
decode to key=7 (next Sunday), not 0. Also verifies the non-Sunday
case (Friday → off=2).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
new Date(`YYYY-MMT HH:MM`) is local-timezone; users far east of Prague
got a Prague weekday one day off. Use T12:00:00Z so the UTC timestamp
always falls on the correct Prague calendar date regardless of locale.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
clusterChurches used visible (viewport subset) when witness tags were
active, so cluster boundaries shifted on pan. Use churches (full index)
filtered by witness tags, matching the pan-invariant pattern used for
the unfiltered case.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…view

Removes the TODO foot-gun: production builds (no VITE_WITNESS_PREVIEW)
now require 3 independent witnesses before a chip is publicly visible.
Prototype/TestFlight builds (VITE_WITNESS_PREVIEW=1) keep min=1. A
separate VITE_CORROBORATION_ONE=1 is set in test env to preserve the
local-store test behaviour without enabling WITNESS_ENABLED in App tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
No production code outside cities.ts imported them; only the test file
did. Removing the exports and their direct test cases — the behaviour
is covered by the aggregateCities and searchPlaces integration tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…pies

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ced by the season banner

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…alse

401 is in KEEP_STATUS so rounds that return 401 are not hard-fails.
The old mock consumed two m-increments per round (HEAD+GET fallback),
making all three rounds land on 456; the assertion passed for the wrong
reason. Group increments by round (Math.ceil(m/2)) so rounds 1 and 3
see 401 (not a hard fail) and round 2 sees 456 — correctly yielding
drop:false.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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