fix: round the predictor window up, so it holds the points it promises - #90
Conversation
A required job failed on the conductivity panel guard with assert 899.9999999999999 >= 900.0 and it is not a timing flake. The predictor window is the observed cadence times the minimum point count. The cadence is a MEASURED median of gaps, so a nominal 30-second feed arrives as 29.999999999999996 and the product lands one unit in the last place BELOW the window that holds the required number of points. A window a hair too short holds one point fewer than the count the method exists to guarantee, which is exactly the "silently never producing a valid prediction" failure its own docstring names. Rounding up is therefore the fix in production, not a tolerance in the test. Measured at master on Ubuntu 22.04.5 with the workspace flake tool: the guard failed 1 run in 12. So besides the defect it cost a CI round in eight, on a queue that is already the constraint on merging anything. The test lives in a NEW sibling module rather than in the panel's own test file. That file is a registered guard of record CONDUCTIVITY-AUTO-EVIDENCE-AUTHORITY-081 and a red-reproduction receipt binds its exact blob, so adding a test there invalidates the receipt and drags an unrelated governance repair into a one-line arithmetic fix. Measured, not assumed: the first attempt did exactly that and the whole-tree gate refused until the receipt was re-run and its locator re-pointed. The new tests drive the real method and fail with production reverted to master. Nothing rendered changes; the window is a numeric input to prediction and is not displayed.
# Conflicts: # docs/architecture-montana-important.svg # docs/current_candidate_metrics.md
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
The hosted job still fails here, and it is a DIFFERENT assertionThis branch fixes the window floor. The Not What that most likely is, stated as a hypothesis rather than a findingThe test feeds thirty samples spanning I have not proved that. What is measured:
So the branch removes one failure mode and does not remove this one. I am not claiming it does. What I did not doI did not touch One thing worth fixing regardlessThe job summary prints only Written with assistance from Claude (Anthropic). |
…assumed The hosted job kept failing this guard on a DIFFERENT assertion from the floor this branch already fixed: the window check passed and the predictor then returned nothing valid, with tau, amplitude and settled all zero. Read from the predictor rather than guessed: it prunes at now - window_s and refuses below min_points. N points spaced by one cadence SPAN (N-1) cadences, so a window of exactly cadence times points fits the required points with a single cadence to spare. Any delay longer than one cadence between the oldest sample and the update tick drops that sample, leaves N-1 points, and the prediction goes invalid -- the "silently never producing a valid prediction" failure this method exists to prevent, arriving through the window instead of through the count. Measured directly against the predictor, thirty points at a thirty-second cadence, span 870 s: window 900s, tick 0s late -> valid True window 900s, tick 15s late -> valid True window 900s, tick 45s late -> valid FALSE window 930s, tick 45s late -> valid True window 930s, tick 90s late -> valid False So one cadence of headroom is exactly the difference, and two cadences of lateness still fails, which is the honest limit of this change. For the laboratory this is the sweep-advance path of the conductivity feature: a feed one cycle late would sit at twenty-nine points and never advance. The probe is a workspace tool so the numbers can be re-run rather than believed. Overlay suite: 534 passed, including the guard that was failing.
|
@codex review Head is |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
# Conflicts: # docs/architecture-montana-important.svg # docs/current_candidate_metrics.md
|
@codex review Head is |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
The protected evidence gate refuses evidence from any run attempt after the first, so a cancelled round cannot be repaired by re-running it. This commit changes no content and exists only to produce the fresh run the gate requires.
|
@codex review Head is |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This change has now been shown to fix a real, random Linux failure — and here is exactly how much it fixesWhile tracing why That is the test this change exists for, failing on a branch that cannot have caused it, on Linux, while master's own gui job had been green on it the same day. So it is not a branch defect — it is a margin that is zero by construction on master. The arithmetic, and then the measurementMaster derives the window as Measured against the predictor directly, with no GUI in the path, the delay expressed in the
What this change does, stated without overclaimingIt widens the tolerance by exactly one cadence — from about 30 seconds of lateness to about 60. It does not remove the knife edge; it moves it one sample further out. A tick 90 seconds late still yields nothing valid. That is still the right change, for a reason that does not depend on the test: asking for What it means for the laboratory, which is the part that mattersOn the instrument the samples arrive continuously, so the window holds its thirty points as long as the tick is not late. A late tick does not lose data and does not stop acquisition — the sweep shows stabilizing for that tick and recovers on the next one. So the cost of the present margin is a sweep that occasionally refuses to advance, not a measurement that is lost or misreported. That is a lower severity than a data fault, and it is still worth fixing before a week of running, because a sweep that will not advance needs a person in front of it. |
# Conflicts: # docs/architecture-montana-important.svg # docs/current_candidate_metrics.md
|
@codex review Head is |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Not a flake
A required job failed on the conductivity panel guard with
The predictor window is the observed cadence times the minimum point count. The cadence is a measured median of gaps, so a nominal 30-second feed arrives as
29.999999999999996and the product lands one unit in the last place below the window that holds the required number of points.A window a hair too short holds one point fewer than the count the method exists to guarantee — which is exactly the "silently never producing a valid prediction" failure its own docstring names. So the fix belongs in production, not in a tolerance in the test.
What it costs
Measured at master on Ubuntu 22.04.5 with
evidence/tools/flake_loop.sh: 1 run in 12 failed. Besides the defect, that is a lost CI round in eight, on a queue that is already the constraint on merging anything.Where the test lives, and why not next to its neighbours
In a new sibling module,
tests/gui/shell/overlays/test_conductivity_predictor_window.py.tests/gui/shell/overlays/test_conductivity_panel.pyis a registered guard file of recordCONDUCTIVITY-AUTO-EVIDENCE-AUTHORITY-081, and a red-reproduction receipt binds its exact blob. Adding a test there invalidates the receipt and drags an unrelated governance repair into a one-line arithmetic fix.That is measured, not assumed: the first attempt did exactly that. The receipt had to be re-run at its defective commit and its locator re-pointed, and the whole-tree documentation gate still refused. The sibling module costs nothing and leaves the guard's evidence untouched.
Evidence
The two new tests drive the real method rather than recomputing its arithmetic, and the first fails with production reverted to master. Panel suite plus the new module: 73 and 2 passed.
ruff check src/ tests/clean; the workflow-exact format check clean over 703 changed files.Nothing rendered changes. The window is a numeric input to prediction and is not displayed anywhere.
Written with assistance from Claude (Anthropic).