Port the post-v0.229.0 development train - #71
Merged
Merged
Conversation
Boundary confirmed by content: litclock-dev `7438f611` <-> public `49083e3d` (tag v0.229.0). Eight non-stats commits, seven files. Seven of eight files are tests or documentation. The entire runtime delta is a degradation arm in `_runtime_render_enabled()` (`src/literary_clock.py`). ### The runtime change (litclock-dev#886) A validation marker that is not valid UTF-8 used to kill the painter instead of falling back to the pre-rendered images. `open(..., encoding="utf-8")` defers decoding to `.read()`, and a `UnicodeDecodeError` is a `ValueError`, so the `except OSError` beside it never caught one and the exception propagated out of a guard whose whole contract is to return True or False. Every other input to that guard already degraded: a missing marker, an unusable freetype-py wheel, a stale FreeType version, a digest that no longer matches. A corrupt one was the exception, and it is the shape a power loss mid-stamp or a damaged card leaves. Reachable only where `LITCLOCK_RUNTIME_RENDER` is true, which is not nobody: the fielded clock runs with it on, so this was live in production rather than latent. Reproduced on the bench against the code this release replaces (`UnicodeDecodeError` at `literary_clock.py:600`, exit 1) and confirmed to degrade to the PNG tier at exit 0 with the fix. ### Tests - litclock-dev#881 — unit tests can no longer resolve a hostname. `conftest.py` wraps `socket.getaddrinfo` at import, refuses anything but loopback, and fails the run from `pytest_sessionfinish`. New file `tests/test_network_guard.py`. - litclock-dev#883 — the self-test record's `duration_s` had no value coverage; the old `0 <= duration_s < 5` band was satisfied by a hardcoded `0.0`. ### Not in this train litclock-dev#871 Stage B (the runtime-render migration) is held. ### Checks `ruff check .` clean. `pytest tests/ --ignore=tests/test_eink_display.py`: 4697 passed, 66 skipped. Issue refs requalified on ported lines only and validated by `tests/test_issue_ref_namespace.py`. No shell scripts touched. CHANGELOG gets one line: the other seven commits are test infrastructure and engineering-record corrections that an owner cannot see.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports the litclock-dev train that landed after v0.229.0.
Boundary confirmed by content, not by the previous port's stated range: dev
7438f611<-> public49083e3d(tag v0.229.0). Eight non-stats commits, sevenfiles, and seven of those eight commits are tests or documentation.
The runtime change — litclock-dev#886
The whole runtime delta is one degradation arm in
_runtime_render_enabled().A validation marker that is not valid UTF-8 used to kill the painter instead of
falling back to the pre-rendered images.
open(..., encoding="utf-8")defersdecoding to
.read(), and aUnicodeDecodeErroris aValueError, so theexcept OSErrorbeside it never caught one and the exception propagated out ofa guard whose entire contract is to return True or False. Every other input to
that guard already degraded — a missing marker, an unusable freetype-py wheel, a
stale FreeType version, a digest that no longer matches the device's proof
inputs. A corrupt one was the exception, and it is the shape a power loss
mid-stamp or a damaged card leaves behind.
Reachable only where
LITCLOCK_RUNTIME_RENDERis true, which is not nobody: thefielded clock runs with it on, so this was live in production rather than
latent.
Reproduced against the code this release replaces. On a bench device
tracking this repo at v0.229.0, a corrupt marker produced
UnicodeDecodeErrorat
literary_clock.py:600and exit 1; the same marker with the fixedsrc/literary_clock.pylogged a warning naming the file and the re-stampcommand, fell back to the PNG tier, and exited 0. The control failed first,
which is what makes the fixed run evidence.
Not covered: the SPI write.
--dry-runexits beforeepd.init(), so thisproves the render path and the fallback decision, not the panel.
Test infrastructure
tests/conftest.pywrapssocket.getaddrinfoat import (not as a fixture,which would be subject to the very ordering it defends against), refuses
anything but loopback, and fails the run from
pytest_sessionfinishratherthan merely reporting. New file
tests/test_network_guard.py.duration_shad no valuecoverage; the old
0 <= duration_s < 5band was satisfied by a hardcoded0.0.Held back
litclock-dev#871 Stage B, the runtime-render migration, is not in this train.
Port mechanics
git apply -3from the dev range. One conflict, inCLAUDE.md, where publicalready carried a paragraph the dev side adds four more before. Resolved to
dev's ordering; the requalifier then reproduces public's existing line.
own
tests/test_issue_ref_namespace.py, not by a hand regex. That test caughtthe
#860/#864and#879/#881continuation forms my regex let through.~/archives/...references and does not record the bench address; the portedQA prose is rewritten to master's existing convention.
infrastructure and engineering-record corrections that an owner cannot see.
Checks
ruff check .clean (whole repo).pytest tests/ --ignore=tests/test_eink_display.py:4697 passed, 66 skipped. No shell scripts touched, so shellcheck is not
implicated. Reviewed cross-model twice, the second time at the branch's final
HEAD because round one's fixes were themselves unreviewed.