Repository navigation
Conversation
…d restore The image's pg_dump major is the highest server major HealthLog can run against, and nothing compared the two before running the tool. A server newer than the client stopped the boot at the dump before migrating with pg_dump's own mismatch line, the container restarted into the same error every few seconds, and the nightly dump failed the same way (#1431). Every path that runs pg_dump or pg_restore against a server now reads server_version_num and the tool's --version first and, when the server is newer, refuses with one message that names both majors and the way out: createDatabaseDump (the nightly dump and the dump before migrating) and db-restore. The dump before migrating exits 3 for this case; the entrypoint says why once and waits ten minutes before it exits, so a restart policy does not loop, and docker stop ends the wait. A boot with nothing to migrate starts and logs the same line as a warning. The recovery readiness model reads the stored failure back and calls the database dump failing from the first run (client_too_old), so admins get it as a backup alert instead of "the last dump failed". The upgrade guide and the self-hosting pages state the ceiling and how to check it.
The stress score, the intraday resting baseline, the overview's resting series, the pulse and BMI status snapshots, the GLP-1 plateau check, the same-hours comparison, the graded series' recent weeks, medication effect segments, plan progress and the tiered context each chose a source for themselves: a mean across sources, or the row that synced last. They now go through the ladder and the day picker. A structural guard freezes the rule: every readDayAggregates call passes the ladder, and every file under insights, daily, analytics and dashboard that reads measurement rows applies it or is listed with its reason. (cherry picked from commit c8462b9)
…ne source a day The status snapshots' recent readings (rows, or hour cells beyond the cap) and the low-percentile resting proxy pooled every source's readings into a day. The recent readings now keep each local day to its first source on the person's ladder through the day picker, with hour cells read per source so the pick can still choose. The proxy folds each (day, source) and keeps the day's first source in ladder order, with the ladder in the closed block's cache key. The ladder rank of one type is one helper in source-rank-sql, shared with readDayAggregates. The day-value guard lists no open reader any more, and its reason type has no open arm. (cherry picked from commit 5d3e005)
…flight fix(backup): check the client major against the server before dump and restore
The guard was written against the 1.50 tree. On main the morning load reader does not exist, the recovery empty-state reader applies no raw read the matcher sees, and the same-time baseline reads only the newest row's unit; its hourly profiles come from the per-sample source alone.
…nSSL's text decryptOffhostFile recognised a failed GCM tag by matching the error message against /auth|unable to authenticate/. Node 22 words it that way; Node 26 on OpenSSL 4 says "bad decrypt", so a restore on a newer Node showed the raw OpenSSL error instead of the explanation, and the dump-core test failed there. The decipher now runs inside a Transform whose flush calls final(); a throw there is the tag refusal and surfaces as OffhostTagRefusedError (code OFFHOST_TAG_REFUSED) with the original error as its cause. Other failures keep their reason and carry it as the cause as well. The test asserts on the class and code. The health-record route test loads the route graph once in a beforeAll, so the first test no longer spends its 5 s budget on a cold import on a loaded machine.
zxcvbn ran on the whole submitted password on the request thread, and its work grows with the square of the length times the l33t substitutions it tries. Registration with open sign-ups and the profile claim are anonymous, so a crafted password of a few hundred characters cost seconds of CPU per request and held up every other request. checkPasswordStrength now scores passwordEstimateInput(password): at most PASSWORD_STRENGTH_MAX_LENGTH (32) characters, cut before the seventh distinct l33t character. New passwords are capped at 1024 characters on registration, the profile claim and password change; sign-in and the current-password check stay uncapped, so an existing longer password still verifies. password-estimate-cost.test.ts pins the bound, measures the worst shapes under 50 ms a call, keeps the server's zxcvbn call in src/lib/auth/password.ts alone and pins the length cap.
A night starting yesterday at 22:00 UTC is still running until about 05:30 UTC, so a run in the first hours of a UTC day read only the part already behind it and the summary came out short.
fix(insights): follow the source order for every daily value
The latest seeded night started at 22:00 UTC the evening before the run's day and ended about 05:30 UTC on it. A run between midnight and then saw that night only in part, and the summary read 140 to 175 minutes instead of 420. Anchoring the seed a day earlier keeps every segment before the run's clock.
fix(backup): tell a refused off-host copy by where it failed, not OpenSSL's text
fix(auth): bound the password strength estimator
Brings the pg client/server preflight, the off-host tag refusal in dump-core, the password estimate bound and the day-value source readers from main. The release branch keeps its own password estimator, route, meter and day-value guard; main's length-cap cases join the one estimate-cost test. The per-night sleep seed keeps the release fix only.
The chart tests imported Recharts and the chart kit inside their first test, and the PDF tests render real pages through pdf.js and Skia. On a loaded machine either took past the default 5 s and failed a test that had nothing wrong with it. The chart files now load their graph once in a beforeAll on a 60 s hook budget, and the two render files carry a budget sized for rendering.
…into-150-2026-11-27b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings main's fixes since the last sync into the release branch: the pg client/server major preflight (#1591), the day-value source readers (#1594), the off-host tag refusal in dump-core (#1595) and the password estimate bound (#1596).
Resolution, one implementation per concept:
passwordEstimateInput,PASSWORD_STRENGTH_MAX_LENGTH, route and meter stay; main's duplicate definition is dropped. Main's new-password length-cap cases join the onepassword-estimate-cost.test.ts.day-value-source-rule-guard.test.tsand changelog line stay.messages/*.jsonmerged as a union; OpenAPI regenerated, no drift.