Commit Graph
10114 Commits
Author SHA1 Message Date
Marc-André Bombeck 0fedabde13 fix(labs): let an import's first number set a text-only marker's unit
Both the Health Records import and the CSV import checked the unit
before writing and refused a numeric reading against a marker whose
unit was still empty, although the write itself lets the first number
choose it. An empty marker unit now fits any unit in unitFitsMarker;
the write's conversion stays the authority.
2026-11-17 20:54:54 +01:00
Marc-André Bombeck 8f1af43891 fix(measurements): keep per-type reads on the live index whatever the statistics say
The per-type reads descend measurements_live_covering_idx once per type and
stop at their cap, but the planner chose that descent only when its row
estimates favoured it. The type is a lateral parameter, so one generic
estimate covered every type; an account whose rows arrived after the last
ANALYZE was expected to hold about one row; and statistics taken while the
table held one type made the type condition look free. In those states the
planner walked the type-less (user_id, measured_at) index through every row
of the account once per type, or read every row of each type into a sort.
On a 9,300-row account that was 33,900 row visits for 6,300 rows returned,
1.66 million for the span probe and 845,000 for the dashboard's latest
reading per type.

One shared fragment now holds the descent: the account and the cap reach
the planner through scalar subqueries, and the type is matched as a closed
range it is also ordered on, so only an index leading (user_id, type,
measured_at) can return the rows without a sort. readNewestRowsPerType,
readLiveMeasurementSpan, the dashboard's readLatestEver and the latest-instant
probe of readLatestCanonical use it, and readLatestReadingsPerType reads
through readNewestRowsPerType.

The plan guard moves to its own file, which builds four statistics states on
purpose (none, predating the account over many types and over one type, and
analysed with other accounts) with autovacuum off, and holds every read to
its bound in each. The previous guard depended on statistics another file
had left behind, so it failed in the full suite and passed alone.

Refs #1398
2026-11-17 20:51:39 +01:00
Marc-André Bombeck 5bb77b975a Merge branch 'feat/apple-clinical-labs' into release/v1.47.7
# Conflicts:
#	CHANGELOG.md
#	src/__tests__/baselines/source-file-lines.json
#	src/__tests__/baselines/source-function-lines.json
#	src/__tests__/write-rate-limit-guard.test.ts
2026-11-17 19:42:40 +01:00
Marc-André Bombeck bb59938904 Merge branch 'feat/nutrient-macros' into release/v1.47.7 2026-11-17 19:42:24 +01:00
Marc-André Bombeck 8ba07ecfdf test(modules): list the FHIR lab batch route as labs data layer 2026-11-17 19:06:11 +01:00
Marc-André Bombeck d7a44956f2 docs(changelog): note energy, macros, targets and the day-total rule 2026-11-17 19:05:32 +01:00
Marc-André Bombeck 33debe777f test(nutrients): pin the token arm, the day fold and the macro surfaces
Integration coverage for the nutrient batch under each credential (the
source row, the 403s, the module gate, re-post, backfill, coexistence
with the phone's row and the bridge bucket), kcal and g ingest with kJ
skipped, the day fold on the overview and in the correlation read, and
composition refusing energy, macros and alcohol. Route-level checks run
against Postgres rather than a stubbed handler. The energy card reports
a failed save through the shared error toast.
2026-11-17 19:05:32 +01:00
Marc-André Bombeck db0e4f9688 feat(nutrients): carry daily targets through backup, wipe and the API contract
Nutrient targets travel in the account-settings slice of the full
backup and are admitted code by code on restore, so an unknown code or
an out-of-range value is dropped and named while the rest come back. A
data wipe clears them. The targets route joins the OpenAPI registry,
and the regenerated contract carries the wider nutrient enums, the new
sources and the target and authority fields. Refs #1402.
2026-11-17 19:05:31 +01:00
Marc-André Bombeck 07e3babc9e test(apple-health): build the ZIP64 fixture without BigInt literals
The project targets below ES2020, where tsc refuses 44n.
2026-11-17 19:03:08 +01:00
Marc-André Bombeck b2aed1f66d docs(apple-health): describe the Health Records lab import
The integration docs said clinical records became measurements; they
never did. They now describe what the export import reads from Health
Records, how lab results are matched and deduplicated, the parser
revision 4 re-upload, and ZIP64 support. CHANGELOG entries for #1400
and the ZIP64 fix.
2026-11-17 18:54:38 +01:00
Marc-André Bombeck 89b3019c79 test(labs): pin the Health Records lab import against Postgres
The export import through the real worker (LOINC matching, unit
conversion, panels, skips, a hand-typed duplicate, re-upload and a
deleted result), and the batch route (resend, an export-written result
recognised, token scope, size and shape refusals, idempotent replay).
2026-11-17 18:53:53 +01:00
Marc-André Bombeck 72a05ea411 feat(backup): carry a lab result's external identity through backup and restore
Both the disaster-recovery and the portable file now carry
lab_results.external_id, and a restore writes it back, so a restored
account still recognises a Health Records result when it arrives again
and a deleted one stays deleted. Older files restore unchanged.
2026-11-17 18:53:52 +01:00
Marc-André Bombeck 376102a71e feat(labs): add POST /api/labs/fhir-batch for Health Records lab results
The iOS app reads lab results from HealthKit's Health Records and sends
them here as FHIR resources, up to 200 per batch. The route maps and
writes them with the same mapper and writer as the export import, so a
result already imported from an export is a duplicate, sending a batch
again is safe, and a deleted result stays deleted. Owner-only (cookie or
full-scope login token), its own 60-a-minute bucket, Idempotency-Key
supported, per-record status with closed reasons, counts-only audit.

The OpenAPI contract documents the route and the source values a lab
result can carry, and the import status result names its lab counts.
2026-11-17 18:49:42 +01:00
Marc-André Bombeck 7c40ba8202 feat(nutrients): accept measurements:write tokens on the nutrient batch
A bridge such as a food tracker can now post daily nutrient totals with
the measurement token. The credential picks the source row: a scoped
token writes EXTERNAL, the native client keeps writing APPLE_HEALTH, and
the body has no say. Bridge tokens count in their own rate-limit bucket,
and the source is recorded in the audit row.

The write phase moves into writeNutrientDayTotals so the route keeps
only parsing, validation and bookkeeping. The scope guard now freezes
four doors for measurements:write. Refs #1402.
2026-11-17 18:47:11 +01:00
Marc-André Bombeck 8f96c2f0a2 feat(nutrients): track energy, macronutrients, sodium, potassium and alcohol
The catalog gains energy (kcal), protein, carbohydrates, fat, sugar and
fiber (g), sodium and potassium (mg) and alcohol (g of ethanol, no
HealthKit type). Each code now names its group and whether a
supplement's composition may list it; references name their authority
(EFSA, or IOM for protein and carbohydrates, NIH ODS for chromium).

Day totals fold through one rule everywhere: the largest of the
day-total sources (Apple Health, Health Connect, an external bridge)
counts, manual water and supplement doses add on top. This also stops
Apple Health and Health Connect totals for the same day from adding up.

The nutrients page gets an energy and macronutrient card with an inline
daily target, and an alcohol card next to caffeine. The correlation scan
gives the macros their own budget of two channels and leaves logged
alcohol out. Daily series and the MCP tool return the target the person
set. Refs #1402.
2026-11-17 18:47:02 +01:00
Marc-André Bombeck a68ec9421f feat(nutrients): store daily nutrient targets per account
A nullable users.nutrient_targets_json column (migration 0499) holds a
target or limit per catalog code in the code's canonical unit. GET and
PATCH /api/nutrients/targets read and merge it behind the nutrients
module; PATCH refuses unknown codes and values above the code's
plausibility cap, and audits the codes set, never the amounts.
2026-11-17 18:46:48 +01:00
Marc-André Bombeck 14c3c6696a feat(import): show lab results from health records under an Apple Health import
A finished import now lists the lab results it found next to the ECG
line, and an archive whose only new data is lab results no longer says
nothing was imported. The status endpoint bounds the lab counts the
same way it bounds the ECG counts.
2026-11-17 18:46:27 +01:00
Marc-André Bombeck 736e6e9c86 feat(apple-health): import lab results from Health Records in the export
The export parser counted every <ClinicalRecord> as skipped. Lab-result
records are now handed to a pass after the export.xml rows are written:
each referenced clinical-records/ JSON file is read from the archive
one at a time, mapped with the shared FHIR mapper, given its panel's
name and written through the shared writer. Other clinical types stay
skipped. The pass is fail-soft like the ECG and route passes, and the
job result carries bounded lab counts only.

The ECG pass moves out of the worker into ecg-import.ts, and the parser
revision goes to 4 so an archive imported before can be uploaded again
to pick up its lab results.
2026-11-17 18:42:21 +01:00
Marc-André Bombeck e40de2a654 feat(apple-health): read ZIP64 exports and Health Records members
The auxiliary member reader refused ZIP64 archives, which is what the
Health app writes for a large export, so ECGs and workout routes were
counted as failed exactly for the accounts with the most history. It
now resolves the ZIP64 end record and the per-member extended sizes,
with the same bounds as before.

It also learns the clinical-records/ JSON members, and a stored
(uncompressed) member is no longer returned as zeros: its bytes were
the read buffer the reader wipes after use.
2026-11-17 18:39:15 +01:00
Marc-André Bombeck 5994762c74 feat(labs): map FHIR lab observations into lab readings
A shared mapper and writer for lab results arriving as FHIR resources
(DSTU2 and R4 Observations): final results only, laboratory category,
quantity / string / coded values, comparator results kept as printed
text, the report's own reference range in the reading's unit, panel
headers naming their members, notes sealed at rest. UCUM units map onto
the spellings the labs feature uses, and a LOINC code hints the catalog
analyte when the account's markers are matched.

Readings carry an identity (lab_results.external_id, a digest of the
issuer and the record identifier) so the same result is recognised
whether it arrives again from an export or from a phone, and a deleted
result stays deleted. A reading the record already holds by value is
skipped as well.
2026-11-17 18:37:56 +01:00
Marc-André Bombeck 291fdb9988 refactor(labs): move the reading duplicate keys into their own module
The CSV import owned readingKeys and LAB_TEXT_LIMITS; the FHIR import
needs the same rules, so they move to src/lib/labs/reading-keys.ts.
2026-11-17 18:37:44 +01:00
Marc-André Bombeck d32036b003 Merge pull request #1399 from mailuminatti/fix/scoped-feature-read
fix(insights): restrict the scoped feature bulk read to the requested blocks' types
2026-11-16 08:23:37 +01:00
Marc-André Bombeck 9c29fd1121 fix(insights): cap bulk measurement reads per type so a dense stream cannot starve sparse ones
The bulk measurement reads behind the insight features, the Coach snapshot
timelines, the mood cross-metric pairing, the correlation windows and the
weight and blood pressure status cards read newest-first across all their
types under a single row cap. On an account with a wearable heart rate
stream the cap filled within hours, and every weight, blood pressure or
other sparse reading fell out of the read, so blocks reported no data for
metrics with years of it.

All of them now go through one read that descends the live partial index
once per type, each type stopping at its own cap. The feature extraction
and the Coach snapshot cap each type at 6000, so a block built from one
type's read equals the block the full read builds (worst case 72,000 rows
for the twelve feature types). The mood, correlation and status reads keep
their old totals and share them fairly: each type keeps at least its share,
a sparse one all of its window.

The feature context's data span now comes from index probes over every
type in the window rather than from the capped rows, and its measurement
count is the readings the blocks were built from.

Refs #1398
2026-11-16 08:05:00 +01:00
Marc-André Bombeck ea2f84b483 Merge #1399 for follow-up 2026-11-16 07:25:57 +01:00
mailuminatti 383500b5fa fix(insights): update Coach source snapshot comment for type-restricted scoped read 2026-11-15 19:44:38 -05:00
mailuminatti dc947a5c2b fix(insights): restrict scoped feature bulk read to requested blocks' measurement types 2026-11-15 19:42:41 -05:00
mailuminatti 4d87643a0f fix(insights): update scoped feature read comment for type-restricted bulk read 2026-11-15 19:39:56 -05:00
Marc-André Bombeck 759f407c29 Merge pull request #1397 from MBombeck/chore/deps-2026-11-15
build(deps): weekly updates, Node 22.23.5 and Next 16.4.6
2026-11-16 00:24:52 +01:00
Marc-André Bombeck e451f64c3a Merge remote-tracking branch 'origin/main' into chore/deps-2026-11-15
# Conflicts:
#	CHANGELOG.md
2026-11-16 00:06:17 +01:00
Marc-André Bombeck 6926828872 Merge pull request #1396 from MBombeck/fix/1393-unitless-biomarker-edit
fix(labs): let a marker without a unit be edited
2026-11-15 23:51:01 +01:00
Marc-André Bombeck 6debd62326 build(deps): bump next and eslint-config-next to 16.4.6
16.4.6 keeps a single header value as a string, so the compression
middleware now sees a route handler's Content-Type and gzips the
response when the client accepts it. Route handlers were never
compressed before. Measured on a production build: JSON and CSV
exports go out gzipped with their Content-Disposition intact and still
flush chunk by chunk, so a streamed download keeps arriving as it is
written. The Coach and document chat streams send
Cache-Control: no-transform, which the middleware honours, so they stay
uncompressed and each frame arrives when it is written. A guard now
holds every text/event-stream surface to that directive.

The notification journey failed twice on the release candidate at the
same step: the e-mail address typed into the card was wiped. The spec
waited for the settings read with waitForResponse, which settles on the
headers, and treated that as the card having copied the server value
into the input. With compression the body follows the headers after a
round through zlib on the thread pool, which a loaded runner can hold
up, and the late copy overwrote the typed value. The spec now also
waits for each card's enable switch, which is disabled until its read
has landed and is enabled in the same render that does the copy.
2026-11-15 23:43:32 +01:00
Marc-André Bombeck 31253ff615 fix(labs): let a marker without a unit be edited
A marker minted from a text result (OCR, CSV import, inbound document)
stores an empty unit: none has been chosen yet, and its first numeric
reading sets it. The editor read that empty unit as a unit still to be
typed and refused to save, ticking "No unit" sent "1", and the update
route refused any unit change on a marker with readings. Every save of
such a marker failed, a plain rename included, because the form always
sent the unit.

- The form opens an empty unit with "No unit" ticked and sends the unit
  only when it changed; the empty unit and the unity count as the same
  "no unit" there, so a rename leaves the stored unit as it is.
- PUT /api/biomarkers/{id} locks the unit only on a real change while
  numeric readings exist (deleted ones included). Another spelling of
  the stored unit is no change, and text results carry no number the
  unit could misstate, so a text-only marker may take any unit.
- The empty unit stays distinct from "1": it still adopts the unit of
  its first number, which "1" must not. No stored value changes.

Refs #1393
2026-11-15 23:32:18 +01:00
Marc-André Bombeck f602336fcb build(deps): bump web-push from 3.6.7 to 4.0.0
4.0.0 moves the package to ESM and class syntax and drops minimist from
the CLI. The sender and the VAPID route load it with a dynamic import
and call generateVAPIDKeys, setVapidDetails and generateRequestDetails,
which keep their names, arguments and module-level VAPID state; the
request is still dialled through safeFetch, so the library's own
transport and error shapes are not on our path.

Every sender test mocks the library, so a contract test now runs the
real one: a stored VAPID pair is accepted, the request carries the same
headers (TTL of four weeks, Urgency, aes128gcm), the VAPID JWT verifies
against the public key with the endpoint origin as audience, and the
subscriber's keys decrypt the body back to the payload. It passes on
3.6.7 and on 4.0.0.
2026-11-15 23:21:37 +01:00
Marc-André Bombeck 0d5f1ec04a build(deps): bump the production-weekly group
@aws-sdk/client-s3 3.1169 and lib-storage 3.1167, @napi-rs/canvas 1.1.1,
@simplewebauthn/server 14.1.0, @tanstack/react-query 5.107.1,
dotenv 18.0.10, jose 6.2.17, lucide-react 1.73, mmdb-lib 3.0.5,
nodemailer 10.5.0 and pg-boss 12.38.2.

The pins that hold these move after reading the installed sources:

- pg-boss 12.38.2 keeps the failed-row ledger the 72-hour reader relies
  on: deletion still runs on completed_on + deletion_seconds against
  job_now(), with the 14-day retention, 7-day deletion, 15-minute expiry
  and two retries unchanged. The release only moves keep_until along
  with start_after on retry and resume.
- @simplewebauthn/server 14.1.0 adds passkeyProviderMetadata to the
  registration result. It is filled only by an initialised FIDO metadata
  service, which downloads from the FIDO Alliance; HealthLog initialises
  none, so the contract now pins the field as absent. The stored key
  bytes are unchanged. The new origin and RP ID checks reject a trailing
  slash or non-ASCII form, and both values already come from URL.origin
  and URL.hostname.
- dotenv 18.0.10 moves its CLI to a separate entry; the library API is
  unchanged. The Prisma CLI stage installs the same version.
2026-11-15 23:18:42 +01:00
Marc-André Bombeck 685645db3d build(deps): move the pgclient stage to the rebuilt postgres 18.6 image
postgres:18.6-trixie now resolves to e3d24f6, a multi-arch index with
linux/amd64 and linux/arm64 on the current Debian trixie-slim base. The
PostgreSQL package is unchanged (18.6-1.pgdg13+2).
2026-11-15 23:14:21 +01:00
Marc-André Bombeck b2281e12c1 build(deps): move the Node base image to 22.23.5
node:22-trixie-slim now resolves to 68c76cf, a multi-arch index with
linux/amd64 and linux/arm64 that carries Node 22.23.5, a security
release with HTTP, HTTP/2 and TLS fixes. All four Node stages and the
release guard move to the new digest together.
2026-11-15 23:14:04 +01:00
dependabot[bot] 78c2601e2d chore(deps-dev): bump @next/bundle-analyzer from 16.4.5 to 16.4.6 (#1392)
Bumps [@next/bundle-analyzer](https://github.com/vercel/next.js/tree/HEAD/packages/next-bundle-analyzer) from 16.4.5 to 16.4.6.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Commits](https://github.com/vercel/next.js/commits/v16.4.6/packages/next-bundle-analyzer)

---
updated-dependencies:
- dependency-name: "@next/bundle-analyzer"
  dependency-version: 16.4.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-15 17:18:19 +00:00
dependabot[bot] a87fa9df08 chore(deps-dev): bump the development-weekly group with 5 updates (#1389)
Bumps the development-weekly group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@playwright/test](https://github.com/microsoft/playwright) | `1.64.1` | `1.65.0` |
| [@tailwindcss/postcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-postcss) | `4.3.4` | `4.3.5` |
| [knip](https://github.com/webpro-nl/knip/tree/HEAD/packages/knip) | `6.44.1` | `6.45.1` |
| [prettier](https://github.com/prettier/prettier) | `3.9.10` | `3.10.1` |
| [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) | `4.3.4` | `4.3.5` |


Updates `@playwright/test` from 1.64.1 to 1.65.0
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.64.1...v1.65.0)

Updates `@tailwindcss/postcss` from 4.3.4 to 4.3.5
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.3.5/packages/@tailwindcss-postcss)

Updates `knip` from 6.44.1 to 6.45.1
- [Release notes](https://github.com/webpro-nl/knip/releases)
- [Commits](https://github.com/webpro-nl/knip/commits/knip@6.45.1/packages/knip)

Updates `prettier` from 3.9.10 to 3.10.1
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.9.10...3.10.1)

Updates `tailwindcss` from 4.3.4 to 4.3.5
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.3.5/packages/tailwindcss)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-version: 1.65.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-weekly
- dependency-name: "@tailwindcss/postcss"
  dependency-version: 4.3.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development-weekly
- dependency-name: knip
  dependency-version: 6.45.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-weekly
- dependency-name: prettier
  dependency-version: 3.10.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-weekly
- dependency-name: tailwindcss
  dependency-version: 4.3.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development-weekly
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-15 16:48:49 +00:00
Marc-André Bombeck 93f68915db Merge pull request #1385 from MBombeck/release/v1.47.6
release: v1.47.6
v1.47.6
2026-11-15 11:34:48 +01:00
Marc-André Bombeck 39a855b6ad Merge branch 'fix/1384-pregenerate-without-provider' into release/v1.47.6 2026-11-15 11:16:13 +01:00
Marc-André Bombeck 5152e68586 fix(jobs): step over a briefing night that attempted nobody
A night on which every account was skipped, for instance because every
provider was paused for background work, wrote all_failed false. The
repeated-failure alert read that as a successful run: it ended the
streak and announced a recovery while the provider was still down, and
nights then alternated between failed and paused so the streak never
reached the alert again.

The run now also records run_attempted. A completed run with
run_attempted 0 is neither a failure nor a recovery: the alert and
readConsecutiveRunFailures step over it.

Refs #1384
2026-11-15 11:16:13 +01:00
Marc-André Bombeck b4927e1ea4 Merge branch 'fix/e2e-flakes' into release/v1.47.6
# Conflicts:
#	CHANGELOG.md
2026-11-15 10:59:09 +01:00
Marc-André Bombeck e84c358fdf fix(charts): match chart loading shells to the charts they become
The footer reserve under a day-linked chart's loading shell still held the
caption line that was dropped from those charts, so every such shell stood
20 px taller than its chart (40 px on a phone). The dashboard's mood chart
loaded behind the generic shell, which is about 30 px shorter than the
mood card. When the shared chart chunk arrived late the dashboard's chart
row changed height under a reader already scrolled past it; the tablet
shell journey measured <main> right after such a swap and found it no
longer at its end.

The reserve now holds only the day rug, and the mood chart gets a shell
built from the same card primitives and boxes. The tablet journey also waits
for every chart cell to reveal and every loading shell to go before it
scrolls to the end, instead of trusting two equal heights 250 ms apart.
2026-11-15 10:58:13 +01:00
Marc-André Bombeck 23a6f85b0f fix(sharing): drop an account read answered across a record switch
Raising the record-session hold clears the query cache, which remounts the
account query, so the switching tab has a GET /api/auth/me in flight beside
its own POST /api/account/switch. When the server answered that read from
the record being left and the answer was applied after the commit, fetchMe
rewrote the scope mirror back to the old record. A peer tab that had already
settled read that write as a foreign switch and published a hold expecting
the old record, which no /me would ever confirm, so every tab sat behind the
hydration gate until the stored transition aged out.

The transition store now counts the changes a tab applies, and fetchMe
repeats a read whose request straddled one instead of applying it.
2026-11-15 10:58:06 +01:00
Marc-André Bombeck 883df7b569 chore(release): keep an empty Unreleased heading 2026-11-15 10:46:54 +01:00
Marc-André Bombeck e19b9299b7 chore(release): date the 1.47.6 changelog 2026-11-15 10:46:41 +01:00
Marc-André Bombeck 42c8b11fca chore(release): v1.47.6 2026-11-15 10:46:35 +01:00
Marc-André Bombeck f2cf316ad8 Merge branch 'fix/1384-pregenerate-without-provider' into release/v1.47.6 2026-11-15 10:46:20 +01:00
Marc-André Bombeck 75f8a648dc fix(jobs): stop counting an unusable provider as a failing briefing run
The nightly briefing pass settled an account as failed whenever its
generation failed, including when every provider of its chain was
benched for background work and no request was sent, and when the
provider refused the account's own credential. A key revoked at its
issuer stays saved and is refused every night, so a single-account
instance read as all-failed night after night and the repeated-failure
alert reported a broken job.

- A chain that sent nothing settles as skipped (provider_benched), with
  no 45-minute retry.
- A refused credential of the account's own settles as auth_failed,
  which the run reports as partial but does not fail over; a refusal of
  the operator's shared key still fails the run.
- The generator's failed outcome names the provider that failed first,
  whether its credential was refused and whether anything was sent.
- The run's facts carry failure_cause and failure_provider.

The admin Background jobs card listed only pg-boss failures, while the
alert also counts runs that completed with every account failed, so an
operator sent to the card read that nothing had failed. The card now
lists those runs, and the card and the alert describe them in words
with the cause and provider instead of quoting the run's JSON.

The warm tally counted a status card that fell back to its deterministic
text as a warmed assessment; it now counts model-written notes only.

Refs #1384
2026-11-15 10:45:21 +01:00
Marc-André Bombeck ac4a4b2fbc Merge pull request #1376 from ferges123/fix/illness-episode-dates-publish
fix(illness): allow adding episodes before noon
2026-11-15 09:58:20 +01:00