Accept a print longer than the ring

cloud.oversize-stream drives a job the ring cannot hold and checks the
signature of a live feed: the load reporting the job as longer than the
ring, the device in live-feed mode, the kernel's program total growing
during the run, no underrun, and a clean cancel afterwards.

read_program_total gives the catalog the counter that growth is read
from.
This commit is contained in:
ScottW514
2026-08-19 21:21:31 -04:00
parent 4300f7f4a8
commit 7bd9c45fd3
2 changed files with 75 additions and 1 deletions
+13
View File
@@ -148,6 +148,19 @@ def read_ring_residue():
return None
def read_program_total():
"""Bytes of program the kernel has been given for this run, or None when
unreadable. Under a live feed it grows while the job plays: that growth is
what says the ring is being topped up rather than preloaded."""
try:
with open(hw.sysfs_root() + "cnc/position", "rb") as f:
raw = f.read(32)
_, total = struct.unpack("<2I", raw[12:20])
return int(total)
except (OSError, struct.error):
return None
class Leftover:
def __init__(self, item, found, expected, action):
self.item = item