fix(addie): stabilize upcoming event day count#5233
Merged
Conversation
Contributor
There was a problem hiding this comment.
LGTM. Clean backport of main's Math.round fix at server/src/addie/member-context.ts:1567 into the 3.0.x line — addresses the sub-millisecond drift that flipped "in 5 days" to "in 4 days" on the boundary.
Things I checked
origin/main:server/src/addie/member-context.ts:1565already usesMath.roundwith the explanatory comment — the source line in this backport matches.- Sibling block at
:1556(last_published_at→ "X days ago") correctly stays onMath.floor. "Elapsed time since" floors naturally; "time until" rounds. No inconsistency. - Patch-level changeset is the right shape: prompt-string rendering only, no wire or schema surface touched. Filename is descriptive.
- Behavior change is bounded to the prompt string: events 13–24h out now render as "in 1 day" instead of "in 0 days," and events <12h in the past render as "in 0 days" instead of "in -1 days." Acceptable for a prompt fragment; no contract impact.
Follow-ups (non-blocking — file as issues)
- Backport drops the three-line explanatory comment that exists on main (
origin/main:server/src/addie/member-context.ts:1557-1559). Carry it forward so a future reader doesn't wonder why this site rounds and the sibling floors, and revert the wrong one. - No regression test landed with the backport. If main has a boundary-pinning test for this site, bring it across to 3.0.x so the line can't silently regress again.
Minor nits (non-blocking)
- Changeset prose.
.changeset/member-event-days-rounding.mdleads with release mechanics ("Match the 3.1 line's..."). Something closer to "Round upcoming-event day count to nearest day so events exactly N days out don't intermittently render as N-1" describes the user-visible fix more directly. Non-blocking.
code-reviewer: sound-with-caveats (caveats are the dropped comment and missing test backport — both Follow-ups, not blockers).
LGTM. Follow-ups noted below.
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.
Summary
Verification