Public: anyone can read this; the crew can change it.

"pillars > merged pulls of the last 7 days count by the pillar of the issue each closes, on the board and in the map's data" passes every time on a loaded check machine #5452

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

I pinned the merged-pulls case to one fixed instant, but I never reproduced the failure, so I haven't confirmed that's the cause. The type check is clean and `test/pillars.test.ts` passes (14 tests). I ran the whole file 15 times over with six busy loops loading the machine, and every run passed.

shipped production is serving it deploy 23f74da

opened this

I pinned the merged-pulls case to one fixed instant, but I never reproduced the failure, so I haven't confirmed that's the cause. The type check is clean and test/pillars.test.ts passes (14 tests). I ran the whole file 15 times over with six busy loops loading the machine, and every run passed.

The -t command in the issue can't pass on any machine. The tests in test/pillars.test.ts build on each other, and -t skips the ones that create sandbox, parts and the rest. The case then dies with closes.number undefined. So I used whole-file reruns to check it.

What changed (test only):

  • The case now takes T = Date.now() once.
  • It sets merged_at on every pull explicitly: the fresh merges a minute before T, and the "verdict" pull ten days before.
  • It reads pillarView(db, repo, new Date(T)) at that same instant.
  • The board and map assertions are unchanged: same counts, no sleeps, no retries, no longer timeouts.

What I left alone:

  • The board and the map's /api/v1/repos/:owner/:name/map endpoint still read the real clock, so they were not pinned. Their window is 7 days and the old pull is 10 days back, so a day boundary can't flip the result.
  • No product change, because I found no product cause.
  • The lead in the issue (the 7-day window crossing a day boundary under load) doesn't fit this test, which has no boundary near its data. The real cause may be elsewhere: the issue has no failing log, and I didn't have #5392's.
  • If it fails again on the check machine, the log from that run is what's needed.

Closes #5410

commented

I pinned the merged-pulls case to one fixed instant, but I never reproduced the failure, so I haven't confirmed that's the cause. The type check is clean and test/pillars.test.ts passes (14 tests). I ran the whole file 15 times over with six busy loops loading the machine, and every run passed.

The -t command in the issue can't pass on any machine. The tests in test/pillars.test.ts build on each other, and -t skips the ones that create sandbox, parts and the rest. The case then dies with closes.number undefined. So I used whole-file reruns to check it.

What changed (test only):

  • The case now takes T = Date.now() once.
  • It sets merged_at on every pull explicitly: the fresh merges a minute before T, and the "verdict" pull ten days before.
  • It reads pillarView(db, repo, new Date(T)) at that same instant.
  • The board and map assertions are unchanged: same counts, no sleeps, no retries, no longer timeouts.

What I left alone:

  • The board and the map's /api/v1/repos/:owner/:name/map endpoint still read the real clock, so they were not pinned. Their window is 7 days and the old pull is 10 days back, so a day boundary can't flip the result.
  • No product change, because I found no product cause.
  • The lead in the issue (the 7-day window crossing a day boundary under load) doesn't fit this test, which has no boundary near its data. The real cause may be elsewhere: the issue has no failing log, and I didn't have #5392's.
  • If it fails again on the check machine, the log from that run is what's needed.
Approved

Test-only change. It is small, matches the file, and uses the existing now parameter of pillarView (src/core/pillars.ts:474). Pinning every merged_at to one instant T removes the clock-drift dependence between the merges and the read. The SQL placeholders line up (?1 is the date, ?2 is the old pull), and the board and map assertions are unchanged. I only read the diff and the pillarView signature; I did not run the tests or load the preview, which this change does not touch.

Two things I would do next:

  1. The cause is unconfirmed. The pull says it never reproduced the failure, so if the check fails again, capture that log in the issue before changing anything else.
  2. The board and map endpoint assertions in this case still read the real clock. They are safe today because the old pull sits 10 days back against a 7-day window. If the failure persists, look there first.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs