Skip to content

Pause rollup refreshes while seeding equal-timestamp rows - #1024

Closed
zlareb1 wants to merge 1 commit into
mainfrom
fix/marked-rollup-test-refresh
Closed

zlareb1 wants to merge 1 commit into
mainfrom
fix/marked-rollup-test-refresh

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 20, 2026

Copy link
Copy Markdown
Member

Related: #1019

Changelog category (leave one):

  • CI Fix or Improvement

Why

The rollup migration test inserts three already eligible rows with the same timestamp in separate requests. The migration resumes scheduled refreshes. A refresh between inserts can advance the global high-water mark past the rows inserted afterward, because the next refresh selects timestamps strictly above that mark.

CI reports a missing marked-only row after the shared marked row passes its assertions. This outcome is consistent with that race; the log does not record the refresh interleaving.

Scope and risk

Pause and drain the test-owned refresh immediately after the migration, before seeding the three-row cohort. This restores the fixture's existing paused-and-drained setup. The test still runs the migration, refresh, aggregate-state assertions, part merge and repeated-refresh assertions. The separate test of draining an active append remains unchanged.

Compatibility, rollout and rollback

Wire changes and operator steps: none. Production queries, migrations and refresh scheduling are unchanged. Reverting changes only test setup.

Tests

  • The failing native integration case is retained as the regression. Fresh hosted integration results are required.
  • Static AST comparison confirms the complete file is unchanged after removing the two added control statements; all original assertions remain.
  • The focused lint command was refused by resource admission before execution. Local lint and native tests have no passing result from this change. Required full checks run in CI.
  • No retry, skip, timeout increase or assertion change.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated: Codex wrote the test setup change; source and failure evidence were checked against the refresh query and migration controls.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Required format, lint, typing, unit and native integration checks pass on this head.
  • No generated files, migrations, plugin files, frontend files or wire contracts change.
  • Commits are signed off.
  • Fresh independent review has no findings.

zlareb1 added a commit that referenced this pull request Nov 20, 2026
## Linked issues

Related: #1024

## Changelog category

- Not for changelog (changelog entry is not required)

## Changelog entry

Not required.

## Why

The placement HTTP tests share a short phase allowance between mock transport construction and a delayed reply. Their fake connection cleanup also consumes wall time while waiting for task scheduling. A hosted run failed the two timely-reply cases and a cancellation cleanup assertion. The exact scheduling interval in that run was not recorded.

Prepare the inert transport before the phase and use the existing manual-clock pattern for the fake connection's cleanup allowance. The asynchronous work timer remains real, as does the delayed reply.

## Scope and risk

The placement test fixture changes. All six cases and their assertions remain unchanged, including cancellation order, termination checks, no local write after refusal, and separate local and HTTP phase bounds. The HTTP allowance, local allowance, reply delay and elapsed-time assertions keep their values. This does not change production code or establish the cause of every prior deadline failure.

The branch also includes the published native rollup fixture checkpoint from the linked pull request. That checkpoint pauses and drains the test-owned view before three equal-timestamp inserts, retaining every aggregate-state assertion. It is included so current CI can test both corrections after the preceding run reported a missing marked-only row. The exact scheduled-refresh interleaving in that failure was not recorded. No production query or migration changes.

## Compatibility, rollout and rollback

No wire, schema, setting or operator changes. Revert the test fixture changes to roll back.

## Tests

- Source parsing, unchanged test-function AST comparison and whitespace checks pass.
- Focused command: `.venv/bin/python -m pytest tests/unit/test_cell_place_http_deadline.py -q`. The supervised local attempt was refused before execution below the unchanged memory admission floor; no local pass is claimed.
- The published placement component passed all six cases in hosted CI on its exact reviewed tree. Its full run still failed the native rollup case; those results are retained and do not qualify this composed head.
- The rollup component passed static AST comparison; its focused local lint attempt was refused before execution. On this composed head, the native integration job passed 545 tests with 173 skipped. Its quiet output does not list individual passing nodes.
- Fresh independent whole-change review found no findings. All required checks and workflows passed on this composed head. No CI retry or waived test is part of this change.

## AI assistance

AI assistance was used for diagnosis and the fixture change. Independent source review and hosted execution remain separate checks.

## Checklist

- [x] Production behavior and existing assertions are unchanged; the inherited fixture checkpoint is disclosed.
- [x] Local execution limits and prior failures are disclosed.
- [x] Fresh independent review has no findings.
- [x] Required current-head CI passes.
@zlareb1 zlareb1 closed this Nov 20, 2026
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