[BUG] Documentation deadline checks disagree at the expiry boundary #25

Closed
opened 2026-10-24 00:25:03 +02:00 by erikinkinen · 1 comment
Owner

Summary

The manual builder can treat the exact original deadline as still live because
elapsed-time subtraction rounds differently from deadline construction. The
converter and documentation-test launcher use the same relative arithmetic.
All three need one validated absolute end computed from the original start.

Reproduction

Run the documentation unit suite, particularly
ManualBoundaryTests.test_expiry_during_serialization_does_not_open_output and
ManualBoundaryTests.test_expired_status_or_stream_does_not_read_or_forward.
Their fake clock returns started + total_seconds.

A deterministic example is (0.4 + 0.1) - 0.4 < 0.1. The guard must reject
the computed end even when subtraction makes the elapsed duration smaller.

Expected and actual behavior

At expiry, return status 124 before opening, reading or forwarding output.
The original 261-test run instead reaches a mocked output operation: one
failure and one error, with successful native cleanup. The original first
error must survive later diagnostic attempts; diagnostics cannot renew time.

Environment and identity

Docs 2968e728ec2be97fd4cc0afb9951b45337a8cf11, Linux x86-64,
Python 3.14, isolated warning-denied documentation runner. The affected Python
bodies were unchanged from earlier passing runs.

Evidence and prior checks

The complete original test output and native status are retained. The guards
use now - started >= total_seconds and
total_seconds - (now - started), while the tests construct the absolute end.
The converter and test launcher share this arithmetic defect. No TeX engine
or manual publication was run for the observation.

Tracking

Related review: Docs PR 4.

  • Use one original finite absolute end in the manual contract and diagnostics.
  • Use the same deadline rule in the converter and documentation-test launcher.
  • Cover exact expiry, pre-expiry, invalid clocks and first-error retention with deterministic controls.
  • Complete the affected documentation tests and retain the original failure.
## Summary The manual builder can treat the exact original deadline as still live because elapsed-time subtraction rounds differently from deadline construction. The converter and documentation-test launcher use the same relative arithmetic. All three need one validated absolute end computed from the original start. ## Reproduction Run the documentation unit suite, particularly `ManualBoundaryTests.test_expiry_during_serialization_does_not_open_output` and `ManualBoundaryTests.test_expired_status_or_stream_does_not_read_or_forward`. Their fake clock returns `started + total_seconds`. A deterministic example is `(0.4 + 0.1) - 0.4 < 0.1`. The guard must reject the computed end even when subtraction makes the elapsed duration smaller. ## Expected and actual behavior At expiry, return status 124 before opening, reading or forwarding output. The original 261-test run instead reaches a mocked output operation: one failure and one error, with successful native cleanup. The original first error must survive later diagnostic attempts; diagnostics cannot renew time. ## Environment and identity Docs `2968e728ec2be97fd4cc0afb9951b45337a8cf11`, Linux x86-64, Python 3.14, isolated warning-denied documentation runner. The affected Python bodies were unchanged from earlier passing runs. ## Evidence and prior checks The complete original test output and native status are retained. The guards use `now - started >= total_seconds` and `total_seconds - (now - started)`, while the tests construct the absolute end. The converter and test launcher share this arithmetic defect. No TeX engine or manual publication was run for the observation. ## Tracking Related review: [Docs PR 4](https://git.erikinkinen.fi/erix/docs/pulls/4). - [x] Use one original finite absolute end in the manual contract and diagnostics. - [x] Use the same deadline rule in the converter and documentation-test launcher. - [x] Cover exact expiry, pre-expiry, invalid clocks and first-error retention with deterministic controls. - [x] Complete the affected documentation tests and retain the original failure.
erikinkinen changed title from [BUG] Manual deadline checks disagree at the expiry boundary to [BUG] Documentation deadline checks disagree at the expiry boundary 2026-10-24 00:44:22 +02:00
Author
Owner

Fixed in eccd89f845. The manual builder, converter and test launcher now compute one finite end from the original start and reject work at that end. Diagnostic attempts keep the same deadline and preserve the first error.

All 269 documentation tests pass, including eight deterministic controls for fractional rounding, exact expiry, invalid clocks and first-error retention. The original failing 261-test run is retained. This check did not rebuild or publish the manual.

Fixed in [eccd89f845](https://git.erikinkinen.fi/erix/docs/commit/eccd89f845028edcdb817d229de8ed5e359a41b2). The manual builder, converter and test launcher now compute one finite end from the original start and reject work at that end. Diagnostic attempts keep the same deadline and preserve the first error. All 269 documentation tests pass, including eight deterministic controls for fractional rounding, exact expiry, invalid clocks and first-error retention. The original failing 261-test run is retained. This check did not rebuild or publish the manual.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:33:41 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/docs#25
No description provided.