Skip to content

test: pick the newest handbook commit by author date, not traversal order - #5751

Merged
Yndira-E merged 1 commit into
mainfrom
fix/handbook-changes-week-order
Sep 7, 2026
Merged

Yndira-E merged 1 commit into
mainfrom
fix/handbook-changes-week-order

Conversation

@dimitrieh

@dimitrieh dimitrieh commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes a latent flaky assertion in handbookChanges.test.mjs. Test-only; the module is unchanged and was never at fault.

The test asked git for log -1 and asserted weeks[0] was that commit's week. But:

  • git orders traversal by commit date
  • getHandbookChanges buckets weeks by author date, and says so in a comment

Those agree only while author dates happen to be monotonic with merge order. Any rebase breaks it, so does a PR that sat open while a later-authored one merged ahead of it.

Caught while rebasing an unrelated branch: tip authored 09-03, newest handbook change authored 09-07, two different weeks.

The test now takes the maximum author date, which is what weeks[0] is built from. Verified on main and on the history that exposed it.

Side note

This could not have failed CI. git isn't on the PATH in test_website, so getHandbookChanges returns [] and every integration assertion in this file silently doesn't run. Left alone here, since fixing it is a workflow change.

Related Issue(s)

None.

Checklist

  • I have read the contribution guidelines
  • I have considered the performance impact of these changes
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
  • For blog PRs, an Art Request has been created (instructions)

…l order

The handbook recent-changes test asked git for `log -1` and asserted that
weeks[0] was that commit's week. Those are two different commits whenever a
change is authored before, but lands after, another one.

git ranks traversal by COMMIT date. getHandbookChanges buckets weeks by AUTHOR
date and sorts on it, which the module already documents and does deliberately.
So the two agree only while author dates happen to be monotonic with merge order:
any rebase breaks it, and so does an ordinary PR that sat open while a
later-authored one merged ahead of it.

Caught while rebasing another branch: the tip was authored 2026-09-03 while the
newest handbook change was authored 2026-09-07, putting the test's "latest" and
the module's weeks[0] in different weeks. Nothing was wrong with the module.

The test now parses the full log and takes the maximum author date, which is what
weeks[0] is built from. Ties on a date are harmless, since same-date commits share
a week.

Worth knowing: this never failed CI. git is not on the PATH in that job, so
getHandbookChanges takes its documented git-unavailable path and the assertions
never run. The failure is only reachable locally, which is where it was found.
@netlify

netlify Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for flowforge-website ready!

Name Link
🔨 Latest commit cbca27f
🔍 Latest deploy log https://app.netlify.com/projects/flowforge-website/deploys/6a9ee06bc6aef50009d7ec2d
😎 Deploy Preview https://deploy-preview-5751--flowforge-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 62 (🟢 up 13 from production)
Accessibility: 96 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

@dimitrieh

Copy link
Copy Markdown
Contributor Author

came across this while developing #5750

@Yndira-E
Yndira-E merged commit 9467a11 into main Sep 7, 2026
7 checks passed
@Yndira-E
Yndira-E deleted the fix/handbook-changes-week-order branch September 7, 2026 16:43

This branch was successfully deployed

1 active deployment
Preview — cbca27f8 Deployed Sep 7, 2026 by github-actions[bot]
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.

2 participants