Skip to content

test(location): rebuild past the changed-build order skew before replanning - #1577

Merged
kvlonge merged 1 commit into
mainfrom
fix/replan-test-waits-past-order-skew
Nov 18, 2026
Merged

kvlonge merged 1 commit into
mainfrom
fix/replan-test-waits-past-order-skew

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Why

The served-location replan test failed intermittently in CI. After a rebuild and its sync, the location's "what changed" report listed daily_orders, order_count and orders instead of nothing.

The location log from the latest failure shows a single publication, and the second plan follows the sync after the rebuild. That sync read the same rows a passing run reads. The plan was right for its input: --changed compares a relation with each of its executions within 5 s of the newest. A rebuild that starts within 5 s of the previous build therefore still reports that build's edit, and lists the rebuilt nodes' consumers as having unknown inputs. Locally the rebuild started 5.6 s after the first build, so a faster runner landed inside the window.

Changes

  • The test starts its rebuild at least the order skew after the first build returned, so the replan settles to nothing changed.
  • The publication tests share one ORDER_SKEW_SECONDS in publication/helpers.py instead of each defining it.

No product change: the skew is deliberate.

Verification

  • With the skew widened to 10 s in a temporary build, the unchanged test failed 3 of 3 times with exactly the CI report. With the real skew and this change it passed 3 of 3, with the rebuild 6.4 to 8.4 s after the first build.
  • test_changed.py still passes with the shared constant.
  • No DuckShop edge case: this fixes a test's timing, not a project shape, data value or lifecycle.
  • make check-ci passed apart from check-control-client, which compared the client with an out-of-date local sqb build; this change touches only tests, and CI runs that check on a fresh build.

…anning

The served-location replan test failed intermittently in CI: after a
rebuild and its sync, the location reported daily_orders, order_count
and orders as changed instead of nothing.

`--changed` compares a relation with each of its executions within 5 s
of its newest, so a rebuild that starts within 5 s of the previous
build still reports that build's edit and its consumers' inputs as
unknown. Locally the rebuild started 5.6 s after the first build; a
faster runner started it inside the window. With the window widened to
10 s the test failed every time with exactly the CI report.

The test now starts the rebuild at least the order skew after the first
build returned. The publication tests share one ORDER_SKEW_SECONDS
instead of each defining it.
@kvlonge
kvlonge enabled auto-merge November 18, 2026 12:59
@kvlonge
kvlonge added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 22ecb47 Nov 18, 2026
33 checks passed
@kvlonge
kvlonge deleted the fix/replan-test-waits-past-order-skew branch November 18, 2026 13:41
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.

1 participant