Commit Graph
210 Commits
Author SHA1 Message Date
spark 8f6af48055 Keep national teams and sessions off the club squads.
ci / rust (pull_request) Successful in 13m11s
ci / typescript (pull_request) Failing after 14m56s
A FPA seleção is its own list for the season: the women's team, the men's team and an age group do not share a roster or a shirt number. A session of that team has no match number. A gala still has no list.
2026-10-21 20:52:54 +01:00
spark ac88d2445d Recognize a player from the club they were at that season.
ci / rust (pull_request) Successful in 12m25s
ci / typescript (pull_request) Failing after 14m4s
The same person keeps one record when they change club, and the shirt number stays the one worn that season. Liga squads are read for every season still published, and face processes grow until the CPU is about 99% full.
2026-10-21 20:37:41 +01:00
spark 7d5efc76b8 Clear wrong face names without re-scoring every game.
ci / rust (pull_request) Successful in 12m46s
ci / typescript (pull_request) Failing after 15m54s
Naming each game again on startup walks every person and stalls the photo analysis. The wrong names are removed; the next read of that game uses the roster.
2026-10-21 20:18:49 +01:00
spark 17e5ff4bee Name a face only from the clubs of that game.
ci / rust (pull_request) Successful in 11m45s
ci / typescript (pull_request) Failing after 14m22s
A weak likeness was compared with every person in the organisation when the match sheet did not explain it, so a player of one club could be named as a player of another. A known game now stays on its roster, and a past season's squad is stored with the calendar.
2026-10-21 20:12:20 +01:00
spark b3df241fdf Merge exposures into a linear DNG in the collection, and stop a card copy before a day that does not fit.
ci / rust (pull_request) Successful in 11m32s
ci / typescript (pull_request) Failing after 13m26s
2026-10-21 13:40:07 +01:00
spark efa9256c87 Confirm a person in one step, and fuse one angle at a time.
ci / rust (pull_request) Successful in 9m31s
ci / typescript (pull_request) Failing after 11m19s
A click waited on every game and each one rescored the library, so the card stayed and the API stopped answering. A property shoot was reading every raw at once, so the first angle never appeared.
2026-10-21 05:35:52 +01:00
spark 9ced09803f Confirm a face without rescoring every other group first.
ci / rust (pull_request) Successful in 11m56s
ci / typescript (pull_request) Failing after 13m47s
The confirm request waited to rescore the whole match and up to 25 other games, so the button looked dead when that outlasted the proxy. The name is saved immediately, and a failed click now says so.
2026-10-21 04:55:51 +01:00
spark 9f9f5715af Accept a camera clock with no timezone when grouping a property shoot.
ci / rust (pull_request) Successful in 14m36s
ci / typescript (pull_request) Failing after 16m6s
A Canon body stores the wall time without an offset. Rejecting that date rejected the whole folder, so the page showed a generic error after counting the sidecars.
2026-10-21 04:37:33 +01:00
spark 3b8cf24974 Read capture metadata with LightCraft, including Canon CR3.
ci / rust (push) Successful in 5m8s
ci / typescript (push) Failing after 8m23s
The property page used exifr, which never sees a CR3, so every frame and its XMP sidecar looked unexposed. JPEG sports ingest still uses exifr for the Photo Mechanic pad, the Lisbon clock and the focus point.

Fixes #77
2026-10-21 04:04:56 +01:00
spark c092ab5f83 Fuse property brackets with the engine's HDR merge, behind an organization switch.
ci / rust (push) Successful in 4m30s
ci / typescript (push) Failing after 8m15s
The area stays out of the menu until an owner turns it on. Grouping uses the exposure data; the browser calls LightCraft's merge so a clipped window and a dark room both survive.
2026-10-21 03:07:30 +01:00
sparkandClaude Opus 5.5 49f50a8f44 Start archive videos' faces while photos keep arriving, and count them per source.
ci / rust (pull_request) Successful in 3m57s
ci / typescript (pull_request) Failing after 7m26s
The face worker took a video only on a tick that claimed no photo. With live games and the
archive's backlog there is nearly always a photo to claim, so the videos queued by #72 never
started. Now one video runs at a time in one of the engine's places beside the photos (the photos
get the rest); with a single place the photos keep it, as before.

The archive's source counts carry videoFacesPending/Done/Failed so the queue can be seen.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SC7s5gwdivkoBXbRGxbnAo
2026-10-20 19:54:13 +00:00
sparkandClaude Opus 5.5 6a5c3044f7 Find faces in archive videos the photos' way: frames through the same engine, appearances in the same face groups.
ci / rust (pull_request) Successful in 3m55s
ci / typescript (pull_request) Failing after 8m33s
The face worker (after the photos, one video at a time) takes ARCHIVE_VIDEO_FACE_FPS frames a second (default 5) out
of a video's web copy and analyses each with the same engine and filters as a photo. The same face in consecutive
frames is one appearance (video_faces: start, end, its clearest frame, the mean of its sharp embeddings), and goes
into the event's face groups by groupEvent, so suggestions, confirming, "não é", false positives, recognition off and
merging are the photos' own.

Viewers: "Rever rostos" shows a group's video appearances beside its photos' faces (rights: every folder its photos
and videos are in); the gallery's videos say who appears and when, and the player jumps there; a person's page lists
the videos they are in, with each moment. Existing videos are queued where face recognition is on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SC7s5gwdivkoBXbRGxbnAo
2026-10-20 19:27:53 +00:00
sparkandClaude Opus 5.5 8a78398fdf Take a replaced zerozero image back again: skip only the "synced-" placeholder, not every id that is not digits.
ci / rust (pull_request) Successful in 3m47s
ci / typescript (pull_request) Failing after 7m20s
d204db4 skipped any id that is not all digits, which also skipped real ids the desk can answer (main's CI has been
red since, on the delivery test that checks a replaced photo's old image is taken back). Only the placeholder that
`upload` returns when the desk already had the file is skipped now, with a test of its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SC7s5gwdivkoBXbRGxbnAo
2026-10-20 14:49:51 +00:00
sparkandClaude Opus 5.5 dd07599447 Merge main into archive videos: videos in the stored galleries, old videos found on the next walk, ffmpeg on deploy.
ci / rust (pull_request) Successful in 3m49s
ci / typescript (pull_request) Failing after 6m55s
Videos count in the galleries main now stores (a game's parts share one card): video_count summed per gallery, the
first video's frame as cover of a videos-only gallery, the videos of every part in the gallery page, and only from
published folders. The face review keeps main's own overlay class (.arq-rlightbox).

The migration (renumbered after main's) clears the folders' etags and walks every cloud at once, so the videos the
walks skipped until now are found; photos already indexed keep their etag and are not indexed again.

The API deploy puts a static ffmpeg in ~/.local/ffmpeg (md5 checked) when the host has none; the worker uses it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SC7s5gwdivkoBXbRGxbnAo
2026-10-20 14:40:08 +00:00
sparkandClaude Opus 5.5 de39705600 Show and play archive videos: a web copy made once by ffmpeg, signed and seekable, in the galleries the cloud shares.
Videos in gallery folders are walked like photos into cloud_videos (a folder of videos only is a gallery too).
The worker makes an H.264/AAC MP4 (short side at most 1080 px, faststart), a poster and a thumbnail; the
original stays on the cloud. Viewers get them by signed links with Range support, above the photos, in a player
like the large photo; download is the web copy, the original's link only for those who edit on the cloud.

Also gives the face review's overlay its own class: it reused .arq-lightbox and broke the large photo's layout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SC7s5gwdivkoBXbRGxbnAo
2026-10-20 14:21:02 +00:00
spark 41eff14356 Merge pull request 'Store the teams list in the background and drop the Equipas helper line' (#70) from task/archive-directory-stored into main
ci / rust (push) Successful in 3m54s
ci / typescript (push) Failing after 7m5s
2026-10-20 11:31:20 +01:00
spark d22ce95b64 Expect the agency sharpen after the crop scales it.
ci / rust (pull_request) Successful in 3m49s
ci / typescript (pull_request) Failing after 7m16s
A frame that does not keep the whole photo no longer leaves sharpen at 40, which is what the test still asked for.
2026-10-20 11:24:18 +01:00
spark 2f4f509f6f Pass a null sport into the crop when the event has none.
ci / rust (pull_request) Successful in 6m26s
ci / typescript (pull_request) Failing after 9m16s
exactOptionalPropertyTypes rejects undefined, and that is what fails the API build on main.
2026-10-20 11:13:23 +01:00
spark 9a61e8bf61 Store the teams list in the background and drop the Equipas helper line.
ci / typescript (pull_request) Failing after 2m9s
ci / rust (pull_request) Successful in 7m33s
The page reads a table the worker rewrites only when a gallery, a club alias, or a known team name changes.
2026-10-20 11:10:49 +01:00
jos-alves d204db4562 Don't call zerozero's delete API with the "synced-<file name>" placeholder id
ci / typescript (push) Failing after 2m3s
ci / rust (push) Successful in 7m13s
Upload returns that sentinel when the desk already had the file (no real
image id ever existed for it); passing it to DELETE /api/images/<id> gets a
400, not a 404, so the prior already-gone handling missed it.
2026-10-20 11:09:43 +01:00
jos-alves 4e99747ff6 Treat an already-removed zerozero image as removed, not a failure
ci / typescript (push) Failing after 1m16s
ci / rust (push) Successful in 4m7s
DELETE /api/images/<id> answers 403 for an image that is already gone
(or no longer this account's), same shape as 404. Every other delivery
transport (Nextcloud, FTP, Dropbox) already treats "already gone" as a
success per the Transport.remove contract; ZerozeroClient.remove did
not, so the caller's catch-and-warn in DeliveryService.process logged
it with an `err`, which the pino hook forwards to the error hub as a
warning. Swallow 403/404 in remove() so it stays silent like the rest.

Paperclip-Agent: José Alves (urlKey jos-alves; id 11179220-3cec-4f0f-880d-2771ff64fce8)
Paperclip-Issue: BIT-31609
Paperclip-Run: a2c6d098-3c45-4603-9846-24f2988747d7
2026-10-20 11:07:18 +01:00
spark 27ed97d79d Frame handball on the ball in the hands, and keep a ball at the feet when the sport plays it there.
ci / typescript (pull_request) Failing after 1m59s
ci / rust (pull_request) Successful in 5m58s
A person who is not the subject stays whole or stays out. A ball on the floor does not decide a handball crop.
2026-10-20 10:42:02 +01:00
spark 4d76fe4726 Cut mid-limb when the feet are already out, and leave a half person at the edge out of the crop.
ci / rust (pull_request) Successful in 7m50s
ci / typescript (pull_request) Failing after 9m48s
Stopping on the sock is the ankle cut, and a body the frame already sliced is background.
2026-10-20 10:15:37 +01:00
spark e41fcd7ae1 Stop greying whites with a highlight pull that was never measured on the photo.
ci / rust (pull_request) Successful in 8m40s
ci / typescript (pull_request) Failing after 10m36s
Auto always asked for highlights −66 and shadows +52, a raw-file recipe. On a camera JPEG that flattens faces. The pull now stops at −20 and the lift at +30, and one slider can be copied on its own.
2026-10-19 23:45:02 +01:00
spark 54c40bd350 Edit on this computer when the link drops, and send it when the socket is back.
ci / rust (pull_request) Successful in 7m24s
ci / typescript (pull_request) Failing after 9m30s
The same autopilot plans the preview before upload, a game's squad can be named offline, and chosen edit groups copy onto the selected photos.
2026-10-19 20:19:32 +01:00
spark 5f1275996a Keep an archive import in the event it names.
ci / rust (pull_request) Successful in 7m14s
ci / typescript (pull_request) Failing after 9m18s
A cloud file with no capture time was treated as taken now, so a put-away event rejected it and the open event of the day took it.
2026-10-19 18:20:11 +01:00
spark caf9ac6a37 Keep a sequence crop only when it does not cut the neck or the hands.
ci / rust (pull_request) Successful in 7m30s
ci / typescript (pull_request) Failing after 9m33s
A half-body plan measured from the top of the group was slicing the lower person at the neck, and a tighter plan was cutting hands the open crop had kept. Those plans are no longer made; the frame stays open.
2026-10-19 17:34:05 +01:00
spark d4fafb9a62 Keep a reportage crop on the whole figure.
ci / rust (pull_request) Successful in 8m1s
ci / typescript (pull_request) Failing after 10m40s
A sharper bust or a face in a window was becoming the frame, and the person actually in the photo was cut through the chest. The crop now stays with the whole figure, and anyone it keeps is in head to foot.
2026-10-19 16:34:57 +01:00
spark c7eaf3edd0 Let a busy edit wait for the database instead of failing.
ci / rust (pull_request) Successful in 8m12s
ci / typescript (pull_request) Failing after 9m48s
Sixteen photos writing at once were hitting the five-second transaction limit, so a few edits were dropped. The write now waits up to twenty seconds for a connection and to finish.
2026-10-19 15:03:15 +01:00
spark 13d984508f Keep structure in proportion to the crop, and edit more photos at once.
ci / rust (pull_request) Successful in 8m31s
ci / typescript (pull_request) Failing after 10m23s
Clarity and sharpening are sized for the whole frame, so a tight crop was showing them enlarged, with a halo around hair and edges. Their strength now follows the share of the frame the crop keeps. The autopilot and the renders use the cores, and a preview decodes only the pixels that crop needs.
2026-10-19 14:53:27 +01:00
spark 15cb3e1d0c Enlarge a 3000 px crop back to a 4000 px export.
ci / rust (pull_request) Successful in 8m11s
ci / typescript (pull_request) Failing after 9m59s
The crop floor can now sit at 3000 px. The develop engine never enlarges, so a delivery at 4000 px would have kept those files short. A file already at 3000 px is brought up, and only as far as a third; a smaller file stays at its own size.
2026-10-19 13:56:27 +01:00
spark 2e08ba4033 Keep the heads of a reportage group, and prefer open eyes.
ci / rust (pull_request) Successful in 7m40s
ci / typescript (pull_request) Failing after 9m22s
A conversation was cropped around one person, so the others lost their heads. The people standing together are one subject, and a crop that keeps a body but not the head is rejected. A shut eye loses to an open one, blocked shadows are opened and blown highlights are pulled, and a large file may crop down to 3000 px.
2026-10-19 13:39:22 +01:00
spark 1cafbfd4f4 Keep a complete foot when the head is already at the top.
ci / rust (pull_request) Successful in 7m29s
ci / typescript (pull_request) Failing after 9m11s
A few millimetres of headroom were enough to give up on the whole body and cut the legs. When the foot is in the photo, the headroom gives way and the leg stays.
2026-10-19 13:27:25 +01:00
spark 39236c3dd5 Crop reportage as a person, not as a match.
ci / rust (pull_request) Successful in 8m5s
ci / typescript (pull_request) Failing after 9m57s
A generic event, and a match photo with no ball, keeps a whole hand and a whole foot. A leg is cut only when the foot already leaves the frame. A stray hand or foot of someone else is left out, and a sharp reportage sequence can keep up to three plans.
2026-10-19 13:06:00 +01:00
spark cfed6298bb Keep a foot that is whole in the photo.
ci / rust (pull_request) Successful in 7m48s
ci / typescript (pull_request) Failing after 9m25s
Tight framing was scoring a cut through the shoe whenever the feet fit in the frame. A complete foot stays in, with a little ground under the sole; mid-shin and mid-thigh remain only when the body runs off the frame or the whole body cannot fit.
2026-10-19 12:50:18 +01:00
spark ba17292a66 Don't let a pin on a game already put away take the next event.
ci / rust (pull_request) Successful in 7m16s
ci / typescript (pull_request) Failing after 9m15s
The desktop was still naming yesterday's match, so photos shot today landed there after it was archived. A photo taken during that match stays; one taken afterwards follows the open event.
2026-10-19 12:22:15 +01:00
sparkandClaude Opus 5.5 3794370dad Archive site: gallery filters and sections, faces waiting, club names joined, review scope.
ci / rust (pull_request) Successful in 7m31s
ci / typescript (pull_request) Successful in 10m6s
- Galleries by type (games, tournaments and events, sessions, refereeing), season and order; without a type,
  in sections, with a tournament's galleries grouped by day or group.
- A gallery shows its season and venue; those who review see the faces waiting (on the gallery and per photo),
  how sure each suggestion is, and false positives they can undo.
- People: clubs grouped (clubs, national teams, others), "Reconhecimento desativado" on the card, and on a
  person what recognition knows: confirmed faces, "não é", the reference photos with a way to take one out.
- "Juntar nomes": the same club under other names counts as one in people and teams (archive_club_aliases).
- Review "Âmbito": one gallery or every folder the viewer edits, with how much is done.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017sovZz1NXBwx4VySojoyA1
2026-10-19 10:21:05 +00:00
spark 4cd83dc8b9 Store each folder's gallery when the archive is scanned.
ci / rust (pull_request) Successful in 7m37s
ci / typescript (pull_request) Successful in 10m5s
The site reads that column instead of grouping folders on each visit. A game or a dated session keeps the folders inside it, and a folder removed from the cloud takes the tree under it.
2026-10-19 10:35:11 +01:00
spark 156474bb7a A slash is two clubs only when both sides are clubs.
ci / rust (pull_request) Successful in 9m15s
ci / typescript (pull_request) Successful in 12m50s
"Avanca / Bioria" is Avanca with that season's sponsor. "ALMADA AC / EXT. GIL EANES" stays two teams, and so do two known clubs such as Benfica / Porto.
2026-10-19 09:11:07 +01:00
spark 9bab5a8c25 Merge pull request 'Autopilot edits the agencies' way: tight handball framing, a finishing look, neutral whites' (#44) from task/autopilot-agency-style into main
ci / rust (push) Successful in 9m35s
ci / typescript (push) Successful in 13m29s
2026-10-19 08:55:12 +01:00
spark 68588e0296 Merge main and read a slash between two club names as two teams.
ci / rust (pull_request) Successful in 12m19s
ci / typescript (pull_request) Successful in 15m22s
A folder such as "ALMADA AC / EXT. GIL EANES" was stored as one team in every archive. A slash with spaces is the two sides; a season written 2025/2026 stays a directory.
2026-10-19 08:54:26 +01:00
jos-alves c61d371819 Stop a not-yet-published Liga round from reaching the error hub as a warning
ci / rust (push) Successful in 4m1s
ci / typescript (push) Successful in 7m33s
Liga 400s competition/round/{n}/nominations until it publishes a round's referee
nominations, days before the match (providers.ts doc comment). syncEventSquadsNow
caught that but logged it at warn, and the pino->error-hub hook forwards any warn
carrying an `err` — so routine early reads of a round show up in the error hub as
warnings (ERRCLUSTER 9d79efd242be).

Give `get()` a typed ProviderHttpError carrying the HTTP status, and have the Liga
referees catch distinguish a 400 (not published yet, read again on the next refresh)
from a real failure: info instead of warn for the former, keeping it out of the hub.

Paperclip-Agent: José Alves (urlKey jos-alves; id 11179220-3cec-4f0f-880d-2771ff64fce8)
Paperclip-Issue: BIT-31543
Paperclip-Run: 5f8f2566-36ea-4f72-9d15-cf0a107111c2
2026-10-19 06:01:31 +01:00
jos-alves 707420a579 Fix a race where matching a gallery onto an event could hit photos_event_id_fkey
ci / rust (push) Successful in 3m56s
ci / typescript (push) Successful in 7m28s
ArchiveService.dropIfEmpty() read an event's photo/folder/gallery/delivery
counts, then deleted it in a second, separate statement if they were all
zero. Between those two statements, another setFolderEvent() racing on the
same event (the normal concurrent paths: a scheduled rematch sweep and a
manual re-match, or two folders moving in the same sweep) could land a fresh
cloudFolder on it; dropIfEmpty's stale read never saw that and deleted the
event anyway, cascading SetNull back onto the folder that had just landed.
The other call then tried to move that folder's photos onto the
now-deleted event and hit `photos_event_id_fkey` (BIT-31531, same cluster
as the ERRSIG in the issue).

dropIfEmpty() now does the emptiness check and the delete as one
`deleteMany` with the relation-count conditions in its own WHERE, so
Postgres re-evaluates "is it still empty" against whatever just committed
instead of against a stale read. Added a regression test that holds the
delete open with a query extension while a second match lands on the
event, proving it survives instead of being dropped (confirmed the test
fails against the old read-then-delete code before restoring the fix).

Paperclip-Agent: José Alves (urlKey jos-alves; id 11179220-3cec-4f0f-880d-2771ff64fce8)
Paperclip-Issue: BIT-31531
Paperclip-Run: c48a8976-d063-4134-b393-fff6a124f0ce
2026-10-19 05:36:57 +01:00
jos-alves 92ceeee2fe Budget one extra API instance during a deploy's rolling reload
ci / rust (push) Successful in 3m52s
ci / typescript (push) Successful in 7m15s
dbConnectionBudget() sized the API cluster's connections at exactly
apiInstances (2), but pm2 startOrReload on the clustered photoreport-api
app brings a new instance online and confirms it healthy before stopping
an old one, so for a few seconds during every deploy there are
apiInstances + 1 processes alive, each with its own Prisma pool and
realtime connections. That transient extra instance (13 connections with
default pool/realtime sizes) was enough to push the cluster over the
budget BIT-31533 set and into Postgres' superuser_reserved_connections,
surfacing as the same "too many database connections ... reserved for
roles with the SUPERUSER attribute" error from the worker's ArchiveService
(BIT-31550, same cluster as BIT-31519/BIT-31533).

dbConnectionBudget() now takes apiReloadOverlap (default 1) and folds it
into the API cluster term so the worker's own pool is sized to leave room
for the overlap. Default worker budget on a 100-max_connections host drops
from 60 to 47.

Paperclip-Agent: José Alves (urlKey jos-alves; id 11179220-3cec-4f0f-880d-2771ff64fce8)
Paperclip-Issue: BIT-31550
Paperclip-Run: 71ac411e-1cce-46e6-b745-7f380228cf79
2026-10-19 05:16:40 +01:00
jos-alves 81bd777e87 Stop a transient Nextcloud blip reading an archive original from reaching the error hub
ci / rust (push) Successful in 3m48s
ci / typescript (push) Successful in 7m9s
BIT-31513 already downgraded this exact self-healing retry to log.info inside
ArchiveService.index(), but DeliveryService.process() hits the same
CloudClient.download() through downloadOriginal() and unconditionally logged the
catch at warn with the raw err, so a 503/423 blip still fingerprinted into
errors.bitreport.pt and reopened the Error Loop (BIT-31522, same cluster pattern
as BIT-31491/BIT-31498/BIT-31505/BIT-31513). The retry behaviour was already
correct (the item is requeued with a backoff); only the log level was wrong.

Use the isTransient() check already imported in this file (and used at the two
other catch sites) to log at info instead of warn when the download blip is
transient, keeping warn for a real failure. Added a regression test mirroring
BIT-31513's.

Paperclip-Issue: BIT-31522
Paperclip-Run: fa16b650-eeb3-4067-81ff-879c78e4c0c1
2026-10-19 04:47:35 +01:00
sparkandClaude Opus 5.5 67765899a6 Autopilot edits the agencies' way: tight handball framing, a finishing look, neutral whites.
ci / rust (pull_request) Successful in 12m32s
ci / typescript (pull_request) Successful in 15m46s
Measured on kolektiff images (600 EHF/IHF handball photos, 2025-26) and Getty/AFP (1093 action photos, Paris 2024):
- Framing "tight" (default): the subject about as tall as the crop, legs cut mid-shin or mid-thigh (never at a
  joint, never below the ball), the photo's own shape. The second pick of a burst gets the whole-body frame.
  A crop over 92% of the width is not made: the photo stays as shot.
- Look "agency" (default, kolektiff) or "natural" (Getty): vibrance, clarity, texture, slightly cool shadows,
  capture sharpening, noise reduction by ISO. Never a vignette or anything local (ethics rules).
- Defaults: white balance on, 75% of the automatic tone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017sovZz1NXBwx4VySojoyA1
2026-10-19 03:30:17 +00:00
spark 1652b6ba3c Merge pull request 'A slow Liga month no longer drops the rest of the season' (#42) from task/liga-sheet-faces into main
ci / rust (push) Successful in 10m31s
ci / typescript (push) Successful in 14m24s
2026-10-19 04:22:13 +01:00
spark 6e956f0ff8 Keep reading a Liga season when one month of the calendar is slow.
ci / rust (pull_request) Successful in 11m31s
ci / typescript (pull_request) Successful in 15m14s
A single timed-out month aborted the whole year and left a few games stored, which then hid the rest. That month is tried again and the other months are still saved.
2026-10-19 04:21:59 +01:00
tiago-neves d6a7edda38 Budget realtime connections per API instance and Postgres superuser reserve
ci / rust (push) Successful in 11m46s
ci / typescript (push) Successful in 15m42s
dbConnectionBudget() only subtracted the API's Prisma pool and the worker's
own 1-connection remote broadcaster, so it never counted the 3 connections
each API process opens for realtime (attachRealtime: a 2-connection publish
pool plus a dedicated LISTEN client), nor the connections Postgres reserves
for superuser roles below max_connections -- exactly what "remaining
connection slots are reserved for roles with the SUPERUSER attribute" means.
With 2 API instances that gap was 9 connections, enough for the worker and
API together to run the cluster right up against the ceiling.

dbConnectionBudget() now takes realtimePerInstance and superuserReserved
(new DB_SUPERUSER_RESERVED_CONNECTIONS env var, default 3) and subtracts
both explicitly instead of leaving them to be absorbed by headroom.

Paperclip-Agent: José Alves (urlKey jos-alves; id 11179220-3cec-4f0f-880d-2771ff64fce8)
Paperclip-Issue: BIT-31533
Paperclip-Run: fc6639aa-bf73-43f0-b3f6-85835a1f809b
2026-10-19 04:13:14 +01:00
spark 8020574415 Merge pull request 'Keep every Liga season, because the fixture code is reused each year' (#41) from task/liga-sheet-faces into main
ci / rust (push) Successful in 11m56s
ci / typescript (push) Successful in 15m34s
2026-10-19 04:09:39 +01:00