Repository navigation
test: isolate standalone timezone freshness prerequisite - #252
Merged
Merged
Conversation
Backport the two reviewed test files from 84d11af, retaining 30s child and 35s parent deadlines. Add actual runtime entrypoint/loader receipts. The former launcher and actual UTC conversion mutation both fail focused controls; production is restored. All 21 focused freshness cases pass. No Hono, version, lockfile, application or performance-tooling change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The bounded test-harness change preserves production behavior and timestamp coverage, with no unresolved review findings.
No open issues 🎉
What changed in this PR
This test-only prerequisite replaces nested Jest startup with a standalone Node process for endpoint timestamp hydration checks. It leaves production behavior, dependencies, versioning, and performance qualification unchanged; Hono remediation remains separate.
Changes:
- Load the actual TypeScript service and repository through the existing
ts-nodeloader. - Assert the child’s entrypoint, loader, timezone offset, snapshot-read count, and UTC timestamps while preserving both deadlines.
- Document the timeout failure, negative controls, and scope boundaries.
Design disposition: accepted; the small, cohesive fixture needs no new application abstraction. Self-improvement: applied through permanent runtime identity assertions.
| File | Description |
|---|---|
Session_starter.md |
Records prerequisite scope, evidence, and remaining publication steps. |
docs/strategy/ENGINEERING_LESSONS_AND_PATTERNS.md |
Documents standalone-process testing and runtime identity checks. |
docs/ENDPOINT_SNAPSHOT_REVISION.md |
Explains the timeout, correction, and negative-control evidence. |
docs/CONTEXT_INSTRUCTIONS.md |
Updates delivery context without changing release holds. |
CHANGELOG.md |
Records the test-only correction and unchanged product scope. |
api/test/fixtures/endpoint-timezone-probe.cjs |
Adds a real-source Node fixture emitting timestamp and runtime evidence. |
api/src/modules/endpoint/services/endpoint-cache-freshness.spec.ts |
Launches the fixture and validates its complete receipt within existing deadlines. |
Review effort: Balanced
17 of 20 tasks
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
Isolate the reviewed two-file standalone non-UTC freshness test correction
from
84d11af7658d91c3d3392831a088b89f54279b1das a master-based prerequisite.Replace redundant nested Jest startup with a real Node leaf, without changing
the 30-second child or 35-second parent deadline or any application behavior.
The real-source receipt additionally checks the actual entrypoint and loader,
New York January offset 300, exactly one snapshot read and both UTC timestamps.
No product/version/lockfile/Hono or performance-runner changes are included.
Product version remains 0.55.58.
Linked Defect / Plan Reference
docs/ENDPOINT_SNAPSHOT_REVISION.md, "Test-harness prerequisite: real non-UTC leaf (2026-10-23)".The independent Hono branch and all its commits remain preserved at
e18d32c04855e8acf88c8a3e02c9ec7b447cfb21. Qualification #251 remainspreserved at
f6f03a523b6370eccc63f1499c3c111dd5cdf200. No checkpoint053Linux/leaf-finalization or other performance-tooling changes were imported.
TDD Process
observed RED:
spawnSync node.exe ETIMEDOUT, elapsed 30,119ms, null exitstatus, SIGTERM, 6,209 units passed and one failed.
the old isolated PASS is not substituted for it.
byte-identically after the negative control.
api/src/security/)count and exact timestamps; fixture asserts it is the direct main module.
even when its selected child test exits successfully (19.832s).
05:00Z rather than 00:00Z and fails the real-leaf assertion (5.374s).
Neither negative-control edit is committed.
Feature / Bug-Fix Commit Checklist (standing rule)
Every behavioral change must include all that apply. Tick or strike through with N/A + reason.
api/test/e2e/exercising the feature through HTTPscripts/live-test.ps1runnable against local + Docker + Azuredocs/with architecture, RFC references, Mermaid diagrams, test coveragedocs/INDEX.md[Unreleased]entry with full test counts and feature summarySession_starter.mdanddocs/CONTEXT_INSTRUCTIONS.mdapi/package.json(and any other version refs) when behavior changedValidation Output
Exact commands and outcomes:
npm --prefix api test -- --runInBand --runTestsByPath src/modules/endpoint/services/endpoint-cache-freshness.spec.ts: PASS 21/21, initially 5.961s and after both negative controls/restoration 4.423s.npm --prefix api test -- --runInBand --runTestsByPath src/modules/endpoint/services/endpoint-cache-freshness.spec.ts --testNamePattern='checks PostgreSQL timestamp hydration in a real non-UTC Node process': expected FAIL on missing leaf receipt; old selected child succeeds.api,npx --no-install eslint src/modules/endpoint/services/endpoint-cache-freshness.spec.ts: PASS.node --check api/test/fixtures/endpoint-timezone-probe.cjs: PASS.api, withTZ=America/New_YorkandPERSISTENCE_BACKEND=prisma,node --require ts-node/register/transpile-only test/fixtures/endpoint-timezone-probe.cjs: PASS; actual leaf receipt retained.pwsh -NoProfile -File scripts/audit-doc-freshness.ps1 -BaseRef origin/master -Quiet: PASS, 27 docs.$env:VITEST_MAX_WORKERS='2'; $env:PREPUSH_MODE='Fast'; git push -u origin test/timezone-leaf-prerequisite-20261023: PASS, normal hook, all 25 gates.npm testandnpm run test:e2e -- --maxWorkers=2 --testPathIgnorePatterns 'endpoint-scoped-logs.e2e-spec.ts' --testPathIgnorePatterns 'log-config.e2e-spec.ts'under its unchanged InMemory environment: both PASS with counts above.git diff --quiet origin/master -- api/package.json web/package.json package-lock.json api/package-lock.json web/package-lock.json api/src/modules/endpoint/services/endpoint.service.ts: PASS, no product/dependency/production delta.npm testfromapi: PASS, 6,210 tests / 213 suites; unchanged InMemory HTTP command above: PASS, 2,514 tests / 118 suites and 42 existing backend skips.npm testfromweb: PASS, 1,655 tests / 124 files;npm run buildfromweb: PASS.Exact-tip hosted evidence, all at
5a42eb09bbfc5d2a011911e6b01cc114f0665f8c:The review body and inline-thread query were both inspected: there are no findings
and no review threads to address or resolve. This is not human approval.
Only the separately authorized normal prerequisite merge occurred; no Hono
merge, deployment, performance rerun or candidate admission occurred.
The workflow's test-image build and isolated smoke are CI checks, not a live
deployment or qualification of the separate future Hono candidate.
Normal prerequisite merge: immediately rechecked exact head, all seven
successful checks, clean mergeability and absence of comments/threads.
Operator-authorized non-admin
gh pr merge --merge --match-head-commit 5a42eb09bbfc5d2a011911e6b01cc114f0665f8cmerged this PR atfc962a65e03b2a0cb1ad86b96b88c473d6d07b7d. No squash, rebase, admin bypassor human GitHub approval is claimed. The actual configured rules did not
require a separate GitHub approval.
Authoritative merged-source Build Test Image 39962553306
and CodeQL 39962437032
PASS at that exact merge SHA. One hosted matrix owns this proof; no duplicate
manual full matrix was run. Immutable CI test-image digest:
sha256:93ab5bd73465bdd215eeb2e3471022188d854d97a730d50b752c17e00eb238b0.It still contains the old dependencies and is not patched-Hono proof.
Retained focused and protected logs:
test-results/timezone-prerequisite-20261023/.Original observed RED:
test-results/hono-security-20261023/bootstrap-push-final.log.Standing Rules Acknowledgment
U+2014) anywhere in the diff. Verified viaSelect-String -Pattern ([char]0x2014).git commit --amendon history that has been pushed.api/src/security/forbidden-source-patterns.spec.tswill catch known anti-patterns.api/src/scripts/lint-migrations.tsenforces this. N/A: no migrations.Destructive Migration Override (skip if not applicable)
N/A: no database or migration changes.
ALLOW_DESTRUCTIVE_MIGRATION=1in the CI environment for this PRReviewer Hint
Diff areas worth special attention from the reviewer:
timeout remains 30,000ms and the parent remains 35,000ms.
neither timestamp conversion nor cache-freshness logic.
stays independently reviewable.
visual-verification holds remain unchanged. No merge, deployment, benchmark
rerun, candidate admission or waiver is requested.
Self-improvement: applied, permanent actual runtime launcher receipt.
Design disposition: accepted, a cohesive test-only fixture needs no speculative
application abstraction or process framework.