test/sports.test.ts had 2 reported failures on main, plus a tsc break and an uncapped refetch bug surfaced while reproducing them:
Typecheck break (blocks ci/typescript on every PR): SportsService.facesOf() (added in the squads-face feature, commit c125d6e) called this.deps.storage.personUrl(...), but personUrl lives on UrlSigner, not LocalStorage. Added signer: UrlSigner to SportsDeps and wired it through app.ts, worker.ts, and the three places test/sports.test.ts constructs SportsService directly.
Uncapped refetch: saveM19Friendlies()'s sportsCompetition.upsert for the new M19-AMIG competition never set lastIngestAt, so refreshDue() always treated the FPA group as due and refetched everything on every call instead of respecting the six-hour cache. Now stamps lastIngestAt: now like every other competition.
Stale test expectations: the "15 vs 16 competitions" and "externalId 228107 number null vs 12" failures were the test lagging behind intentional recent data: M19-AMIG (the Portugal-Spain U19 friendlies) and the real shirt number from the Caminha match report (src/sports/national.ts's M19_POR_2026, already hardcoded as "12"). Updated the assertions to match.
Verified: DATABASE_URL_TEST=... npx vitest run test/sports.test.ts -> 18/18 passing; tsc -p tsconfig.json --noEmit clean on apps/api.
Note: a full apps/api vitest run still shows 4 unrelated failures in autopilot.test.ts/faces.test.ts - that is BIT-32084, already fixed by open PR #230; out of scope here.
Fixes BIT-32085.
test/sports.test.ts had 2 reported failures on main, plus a tsc break and an uncapped refetch bug surfaced while reproducing them:
1. Typecheck break (blocks ci/typescript on every PR): SportsService.facesOf() (added in the squads-face feature, commit c125d6e) called this.deps.storage.personUrl(...), but personUrl lives on UrlSigner, not LocalStorage. Added signer: UrlSigner to SportsDeps and wired it through app.ts, worker.ts, and the three places test/sports.test.ts constructs SportsService directly.
2. Uncapped refetch: saveM19Friendlies()'s sportsCompetition.upsert for the new M19-AMIG competition never set lastIngestAt, so refreshDue() always treated the FPA group as due and refetched everything on every call instead of respecting the six-hour cache. Now stamps lastIngestAt: now like every other competition.
3. Stale test expectations: the "15 vs 16 competitions" and "externalId 228107 number null vs 12" failures were the test lagging behind intentional recent data: M19-AMIG (the Portugal-Spain U19 friendlies) and the real shirt number from the Caminha match report (src/sports/national.ts's M19_POR_2026, already hardcoded as "12"). Updated the assertions to match.
Verified: DATABASE_URL_TEST=... npx vitest run test/sports.test.ts -> 18/18 passing; tsc -p tsconfig.json --noEmit clean on apps/api.
Note: a full apps/api vitest run still shows 4 unrelated failures in autopilot.test.ts/faces.test.ts - that is BIT-32084, already fixed by open PR #230; out of scope here.
facesOf() called storage.personUrl(), but signed URLs live on UrlSigner, not
LocalStorage — a typecheck break that blocks ci/typescript on every PR.
Threaded SportsDeps.signer through app.ts, worker.ts and the tests that
construct SportsService directly.
saveM19Friendlies()'s upsert never set lastIngestAt, so refreshDue() saw the
FPA group as always due and refetched everything on every call instead of
respecting the six-hour cache.
Also updates two sports.test.ts assertions (15 vs 16 competitions, and
externalId 228107's shirt number) that were written before the M19-AMIG
youth friendlies and verified Caminha match-report numbers landed.
Detail: failed contexts: ci / typescript (pull_request)
The bot did not approve or schedule a merge for this head.
Fix the branch, approve as CTO, or close the PR. The bot re-checks on the next run.
@cto — Gitea autopilot needs a CTO decision on BitReport.pt/photoreport#231: CI is red on the PR head.
- Head: `e108c12d2b59`
- Detail: failed contexts: ci / typescript (pull_request)
- The bot did **not** approve or schedule a merge for this head.
- Fix the branch, approve as CTO, or close the PR. The bot re-checks on the next run.
<!-- gitea-autopilot-escalation kind=ci_failure sha=e108c12d2b59 -->
The crop-geometry refactor moved the area→linear sqrt conversion into
cropBiasOf but left two learning.ts test expectations on the old
area-ratio values, and a FoldedCrop.x0/.x1/.y0/.y1 access that no
longer exists now that FoldedCrop is { rect, angle } (silently
NaN -> null through the JSON round-trip, collapsing the learnt crop
factor to null).
In faces/service.ts, the conflicting-number score penalty required
read.votes >= 2, but majorityNumber() already only returns a result
once it has a real majority -- for a single-face group votes is
always 1, so the penalty could never fire.
Merged origin/fix/BIT-32084-ci-regression-tests into this branch to break a circular CI block: this PR's merge-ref inherited the pre-existing autopilot/faces test failures that #230 fixes, and #230's merge-ref inherited the facesOf()/personUrl typecheck break that this PR fixes. Neither could go green alone. Reverified locally after the merge: build/typecheck clean, full apps/api suite 450 passed, 0 failed.
Merged origin/fix/BIT-32084-ci-regression-tests into this branch to break a circular CI block: this PR's merge-ref inherited the pre-existing autopilot/faces test failures that #230 fixes, and #230's merge-ref inherited the facesOf()/personUrl typecheck break that this PR fixes. Neither could go green alone. Reverified locally after the merge: build/typecheck clean, full apps/api suite 450 passed, 0 failed.
spark
merged commit 837e3d70dc into main2026-11-06 23:31:59 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes BIT-32085.
test/sports.test.ts had 2 reported failures on main, plus a tsc break and an uncapped refetch bug surfaced while reproducing them:
c125d6e) called this.deps.storage.personUrl(...), but personUrl lives on UrlSigner, not LocalStorage. Added signer: UrlSigner to SportsDeps and wired it through app.ts, worker.ts, and the three places test/sports.test.ts constructs SportsService directly.Verified: DATABASE_URL_TEST=... npx vitest run test/sports.test.ts -> 18/18 passing; tsc -p tsconfig.json --noEmit clean on apps/api.
Note: a full apps/api vitest run still shows 4 unrelated failures in autopilot.test.ts/faces.test.ts - that is BIT-32084, already fixed by open PR #230; out of scope here.
@cto — Gitea autopilot needs a CTO decision on BitReport.pt/photoreport#231: CI is red on the PR head.
e108c12d2b59The crop-geometry refactor moved the area→linear sqrt conversion into cropBiasOf but left two learning.ts test expectations on the old area-ratio values, and a FoldedCrop.x0/.x1/.y0/.y1 access that no longer exists now that FoldedCrop is { rect, angle } (silently NaN -> null through the JSON round-trip, collapsing the learnt crop factor to null). In faces/service.ts, the conflicting-number score penalty required read.votes >= 2, but majorityNumber() already only returns a result once it has a real majority -- for a single-face group votes is always 1, so the penalty could never fire.Merged origin/fix/BIT-32084-ci-regression-tests into this branch to break a circular CI block: this PR's merge-ref inherited the pre-existing autopilot/faces test failures that #230 fixes, and #230's merge-ref inherited the facesOf()/personUrl typecheck break that this PR fixes. Neither could go green alone. Reverified locally after the merge: build/typecheck clean, full apps/api suite 450 passed, 0 failed.