Repository navigation
Use the digest's own Asia/Shanghai day in the digest header - #2620
Merged
Merged
Conversation
buildDigest printed the header from a UTC ISO date while the archived day and the idempotency check used dayIn in DIGEST_ZONE, so a digest built between 00:00 and 08:00 named yesterday - and a quiet-hours replay carried that wrong date in its body. The header now calls dayIn(at); the private stamp helper is removed, so this file spells a calendar day one way. Refs #2618
Collaborator
Author
|
Verdict: PASS at 06e996e Ran at this tip: Review points:
Not run: full |
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.
Written-by: Dev
Fixes #2618
Owner: Dev
Reviewer: Reviewer
What changed
buildDigestprinted the header as a UTC date (new Date(at).toISOString().slice(0, 10)) whiledayand the idempotency check used the digest's own Asia/Shanghai calendar day (dayIn). Between 00:00 and 08:00 Asia/Shanghai the header therefore named yesterday, and a digest held by quiet hours and replayed later carried the wrong date in its body too.The header now uses
dayIn(at), the same function as the archive day; the privatestamphelper is gone, so this file spells a calendar day one way.DIGEST_ZONE,DIGEST_TIME, the 09:00 task, the idempotency key, the digest's section wording and the per-owner block are untouched.The regression test pins
2026-11-08T00:30:00+08:00and asserts bothdayand the header name2026-11-08, so the machine'sTZcannot change the answer.docs/subsystems/core-host.mdrecords the change for the owned file;patches/ds-bot/files/mirrors the two changed core files byte for byte andds-bot-patches.mjs checkprovescore/equalsds-bot/+ patches.Ran at this tip:
Not run, and why: full
npm run verify(the brief scopes this to the target test);ds-bot-patches.mjs generate(this box has no git — the two changed core files are whole-file mirrors, copied byte for byte and proven bycheck);check-arch-docs.mjs(needsorigin/main, no git here; the owned page is updated in this diff).Checkpoint
{
"pr": 2620,
"claim": "Dev",
"issue": 2618,
"summary": "The digest header now names the same Asia/Shanghai calendar day the digest is filed under, using dayIn(at) instead of a UTC ISO slice, and the private stamp helper is gone. A digest built between 00:00 and 08:00 used to print yesterday's date, including one held by quiet hours and replayed later. A regression test pins 2026-11-08T00:30:00+08:00 and asserts both day and the header say 2026-11-08; it fails on the base source. DIGEST_ZONE, the 09:00 task, the idempotency key, the digest wording and the per-owner block are unchanged.",
"files": [
"core/src/host/project-assistant.js",
"core/test/project-assistant.test.js",
"patches/ds-bot/files/src/host/project-assistant.js",
"patches/ds-bot/files/test/project-assistant.test.js",
"docs/subsystems/core-host.md",
"changelog.d/2618.fixed.md"
],
"checks": {
"ran": "node --test test/project-assistant.test.js (TZ=UTC); node scripts/ds-bot-patches.mjs check; oxlint src test; node .github/scripts/changelog.mjs check",
"result": "green",
"at": "06e996ebb228a1af8334ddc647fe18a19cce8b18"
},
"next": "none — ready for Reviewer PASS at this tip; not enqueued by Dev"
}