Skip to content

Preserve fractional task repair deadlines (2.11.1) - #905

Merged
rmcdaniel merged 5 commits into
mainfrom
fix/878-precise-repair-cutoff
Oct 22, 2026
Merged

rmcdaniel merged 5 commits into
mainfrom
fix/878-precise-repair-cutoff

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Problem

An actual published Server 2.11.1 / Core 2.10.2 worker-loss consumer failed its unchanged 30-second observation in #878. Its only explicit repair pass ran 150 ms after the stored fractional lease expiry and selected no candidate. That original remains failed, with no browser acceptance or rescue.

Investigation reproduced the missing scan boundary: Laravel's default DateTime binding format drops microseconds. For a stored expiry 11:53:50.114071, a cutoff at 11:53:50.264071 binds as 11:53:50, leaving the expired task unselected until the next whole second.

Change

  • Format lease, availability and dispatch/claim repair-backoff query cutoffs with the task model's existing microsecond precision.
  • Preserve the original deadlines, ownership, run selection, backoff policy and scan limits. Candidate selection does not mutate task rows.
  • Add 12 real selector cases: one microsecond before, exactly at and 150 ms after each of the four boundaries.
  • Prepare compatible patch 2.11.1 metadata and release notes. No new schema, wire contract, SDK or rejection-audit event is included.

Evidence and remaining work

  • Final counterfactual uses the exact preceding production class from d7db4a2e with the final 12-case fixture: all eight at/after-deadline cases FAIL; all four before-deadline controls PASS.
  • Tested implementation cf6b616: 46 SQLite repair/lease tests, 342 assertions PASS; this includes the 12 new cases. The same 12 new cases pass separately on PostgreSQL 17.11 and MySQL 8.0.46, 24 assertions each.
  • Focused ECS and PHPStan pass for that implementation. Reflection confirms the tested runtime loads this worktree's corrected class, SHA-256 c30906ff3d0eab3d456be827130fdc97bc786a8c9fcfb2ed8577bddb18896fe2.
  • Sonar correctly refused cf6b616a for repeating the format literal five times (php:S1192). The private-constant correction 4f8d6ce passes fresh Sonar: grade A, 0% new duplication and zero OPEN/CONFIRMED issues, with unchanged quality settings. That head's ECS gate then found a long nested query line. Current cd6e372 / whole 01b14c8f only wraps that line to repository style; focused ECS passes. The three fractional boundary values also round-trip through the constant in a read-only PHP control. Fresh build 39780212557 and Sonar 39780212946 qualify the current whole head. Earlier failed gates remain failed.
  • Earlier dispatch and availability fixtures were corrected to preserve existing failed-dispatch and redispatch-grace semantics. The first broader run lacked the Redis service required by existing dispatch controls. Those failed attempts are retained and excluded from passing totals; the final broader run uses its own Redis service.
  • Final source review confirms the production diff only changes the four query cutoff values and their shared format; row mutation, retry and owner fencing remain in the existing policies. Normal CI, immutable publication and installed Server/Waterline acceptance remain pending. This PR does not close the broader Long activities without heartbeats are re-run every 5 minutes and never complete #878 requirement. The original published-image observation has not been retried or rescued.

Refs #878.

@rmcdaniel
rmcdaniel marked this pull request as ready for review October 22, 2026 12:36
@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel
rmcdaniel merged commit 30974a3 into main Oct 22, 2026
23 checks passed
@rmcdaniel
rmcdaniel deleted the fix/878-precise-repair-cutoff branch October 22, 2026 12:56
@rmcdaniel

Copy link
Copy Markdown
Member Author

Core 2.11.1 is published from immutable 30974a3, reviewed tree 01b14c8f. Packagist independently resolves that exact source. Published verification 39782710469 passes all 17 jobs, including every supported Laravel/PHP upgrade cell. Candidate source checks and Sonar passed before normal merge; the merged branch is retired.

The patch preserves microsecond precision in all four repair-candidate timestamp bindings. The prior-source counterfactual retained eight actual at/after-deadline failures and four passing before-deadline controls; corrected SQLite/PostgreSQL/MySQL source controls pass. No timeout, retry budget or expectation was weakened.

The original installed Server 2.11.1 / Core 2.10.2 lease-loss observation remains failed, not retried or rescued. Next is the coordinated PHP-only image adoption and a fresh original with the same observation budget, followed by the cold result and real Waterline reason display. That downstream acceptance is still required before #878 is delivered across the product. No unpublished #901 audit/schema adoption.

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