Skip to content

test: pin the variant epoch date to formatDate's UTC rendering - #1650

Merged
mrbobbytables merged 1 commit into
mainfrom
quality/test-epoch-date-utc-pin
Oct 19, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
quality/test-epoch-date-utc-pin

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Tightens EPOCH_DATE in tests/e2e/member-directory-freshness-variant.spec.js
from /December 31, 1969|January 1, 1970/ to /January 1, 1970/, and corrects
the premise behind it where it is restated in
tests/e2e/fixtures/data-variant/community-people.json (overlay description)
and tests/e2e-data-fixtures.test.mjs.

The spec justified the alternation with "nothing pins TZ for the Playwright
run, and 0ms is the last day of 1969 west of UTC". But
src/components/shared/formatDate.js formats with timeZone: 'UTC', so the
browser's zone never enters into it: formatDate(null) is January 1, 1970 in
every zone, which tests/format-date.test.mjs already asserts by value across
Los Angeles, Berlin and Kiritimati.

So the December 31, 1969 arm was not caution. It is dead, and it is exactly
what deleting the timeZone: 'UTC' option renders west of UTC — the regression
formatDate's own docblock says the pin exists to prevent. Neither coverage
lane can see that deletion, because it executes the identical lines and
regions; a by-value assertion is the only thing that can. This spec was the one
positioned to witness it in a browser, and was written to accept its output.

No production code changes. Files touched: the three named above only —
disjoint from the open held PRs (#1628 composite action, #1638 SECURITY.md,
#1648 GOVERNANCE.md, #1636 tests/e2e-coverage-build-reach.test.mjs).

Verification

Rendered output rather than inference. npm run build:e2e:coverage at
65f64be (exit 0), then reading the prerendered
build/e2e-coverage-variant/community/members/index.html:

Architecture-derived profiles last synced from cncf/architecture on January 1, 1970.
Award data last verified on January 1, 1970.
string occurrences
January 1, 1970 2
December 31, 1969 0
Directory membership data last synced 0
Invalid Date 0

The real /community/members route still carries the membership sentence (1
occurrence), so both arms of the spec's pair still hold.

Also run locally:

  • TZ=UTC node --test tests/e2e-data-fixtures.test.mjs tests/format-date.test.mjs — 45 pass, 0 fail.
  • npx playwright test --list tests/e2e/member-directory-freshness-variant.spec.js — 2 tests enumerated.
  • npm run check:duplication — ok, 270 clones against ceiling 270.
  • npx prettier --check on all three changed files — clean.
  • formatDate(null) evaluated directly under TZ=UTC, America/Los_Angeles,
    Pacific/Honolulu, Asia/Tokyo — January 1, 1970 in all four.

The spec itself was not executed in a browser here: this host's Chromium cannot
launch (exitCode=127, no root for playwright install-deps), so the
assertions were verified against the prerendered HTML the browser would have
been served. The End-to-end coverage job runs it for real.

Related Issue

Closes #1649


Filed by quality agent (hold-gated mode). Human review required.

— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88

EPOCH_DATE in tests/e2e/member-directory-freshness-variant.spec.js accepted
"December 31, 1969" as well as "January 1, 1970", on the stated premise that
nothing pins TZ for the Playwright run.

src/components/shared/formatDate.js formats with timeZone: 'UTC', so the
browser's zone never enters into it and formatDate(null) is January 1, 1970 in
every zone. tests/format-date.test.mjs already asserts that by value.

The accepted 1969 arm is therefore dead, and is also exactly what deleting the
timeZone: 'UTC' option renders west of UTC -- the regression formatDate's own
docblock says the pin exists to prevent. Neither coverage lane can see that
deletion, since it executes the identical lines and regions, so this assertion
was the one placed to witness it in a browser and was written to accept it.

Correct the same false premise where it is restated, in the data-variant
overlay description and in tests/e2e-data-fixtures.test.mjs.

Verified against the committed variant build rather than inferred: the
prerendered build/e2e-coverage-variant/community/members/index.html carries
"January 1, 1970" twice and "December 31, 1969" not at all.

Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Important

Held for human review by the hive's ACMM level gate.

This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Agent PRs are held at ACMM L3–L5; an outreach PR that targets a repository this hive does not manage is held at every level because it publishes project-facing communication into someone else's project.

Hive will keep the hold label until a human removes it. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for endusers ready!

Name Link
🔨 Latest commit 60537b5
🔍 Latest deploy log https://app.netlify.com/projects/endusers/deploys/6ad621a21fa0d3aa1eed9397
😎 Deploy Preview https://deploy-preview-1650--endusers.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mrbobbytables mrbobbytables left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the diff and current required checks; approved in the requested merge order. Hold released per explicit maintainer instruction.

@mrbobbytables
mrbobbytables added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit 4e77e8b Oct 19, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] e2e variant spec accepts the rendering that dropping formatDate's UTC pin produces

1 participant