Skip to content

test(reporting): run the row-upload lease test at the wall clock - #1813

Merged
bokelley merged 1 commit into
mainfrom
claude/issue-1792-main-lease-test-wall-clock
Nov 2, 2026
Merged

bokelley merged 1 commit into
mainfrom
claude/issue-1792-main-lease-test-wall-clock

Conversation

@bokelley

@bokelley bokelley commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Backport of #1767 (c1c6d6eb) from next to main. Refs #1792.

Since 2026-11-01 every main-based CI run fails the Postgres conformance tests (Postgres 16, core) job on test_the_producer_stages_object_uploads_outside_its_publication_transaction:

ReportingRowStoreError: Reporting row store: STATE_UNAVAILABLE: no live worker lease covers this row upload

The settling harness pins its clock at 2026-11-01T02:10Z, the producer stamps lease_expires_at from that clock, and row_write.py checks the lease against the database's clock_timestamp(). Once real time passed the frozen instant plus the lease, no upload was covered. main's last green CI run (2026-10-31T11:58Z, bf6d5309) predates that moment; #1798 and #1753 hit it now.

The change is the one #1767 made on next: run the producer's turn at the wall clock so the stamped lease lies in the database's real future. The lease check keeps its production semantics; only the test's clock moves. Test-only, one file, no ledger SQL or storage package change.

Not verified locally: this sandbox has no Postgres, so the conformance job on this PR is the verification.

🤖 Generated with Claude Code

Backport of #1767 (c1c6d6e) from `next`. Since 2026-11-01 every
`main`-based CI run fails
`test_the_producer_stages_object_uploads_outside_its_publication_transaction`
with `STATE_UNAVAILABLE: no live worker lease covers this row upload`
(#1792): the settling harness pins its clock at 2026-11-01T02:10Z, the
producer stamps `lease_expires_at` from that clock, and `row_write.py`
checks the lease against the database's `clock_timestamp()`. Once real
time passed the frozen instant plus the lease, no upload was covered.

Run the producer's turn at the wall clock so the stamped lease lies in
the database's real future. The lease check keeps its production
semantics; only the test's clock moves.

Refs #1792

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ladon verdict: Approve

Approve — clean test-only backport.

Single file changed (tests/conformance/reporting/test_reporting_row_storage_object_pg.py, +7/-1). Sets clock[0] = datetime.now(timezone.utc) before run_worker() so the producer's stamped lease_expires_at lands in the DB's real future, fixing a conformance test that failed CI due to a guaranteed-past frozen instant. Lease window and production lease semantics are unchanged; no production/wire/public-surface/generated-code touch. Verification path is the conformance CI job (correct for a Postgres-backed conformance test).

No critical, high, medium, or low findings. high_risk=false, gated_paths=false, no no-auto-approve team match. Rows 1–8 do not fire; falls through to row 9.

@bokelley
bokelley merged commit 1fcc331 into main Nov 2, 2026
47 checks passed
@bokelley
bokelley deleted the claude/issue-1792-main-lease-test-wall-clock branch November 2, 2026 03:52
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