docs: record the two gate fixes queued behind Phase 4a - #584
Merged
Conversation
4a relocates intra_period_discharge_gate into core/bess/execution_model.py (D1) and is required to stay behaviour-neutral so 4b's delta stays readable. Two open gate fixes sit in exactly that code, and nothing in the plan said so -- both were only recorded on their own issues and in a commit message 4a's author has no reason to read. #579 is the one with a structural consequence for 4a: it adds _value_slope_below as a third peer dV/dSoE estimator and a new PUBLIC has_value_cell_below on dp_battery_algorithm.py, exposed so the gate tests stop mirroring the DP's index rule. Both are new surface on a module 4a is about to empty, so 4a should absorb them rather than inherit them at their current home. #571 is recorded because it is easy to assume #579 closed it. It does not: at the reported state idx = 324.0 sits exactly on a grid point, so round() and ceil()-1 pick the same cell and the half-cell correction is zero there. Its actual mechanism is np.round snapping making V locally non-concave. The reproduce-from-period-58 note is included because the period-59 fixture is a different run and matches nothing in the bundle -- that already cost one session a wrong "does not reproduce" conclusion. States plainly that neither fix depends on 4a technically, so the hold can later be overruled on its merits rather than mistaken for a hard dependency. ./scripts/quality-check.sh passes (exit 0, 0 errors, 0 warnings). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y2NCCmmhjBxgFGQE6zZLTS
johanzander
marked this pull request as ready for review
August 14, 2026 19:12
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.
Summary
intra_period_discharge_gateintocore/bess/execution_model.py(D1) and must stay behaviour-neutral so 4b's delta stays readable. Two open gate fixes sit in exactly that code and the plan didn't say so.Why this, and not just the issues
Both fixes were recorded only on their own issues and in a commit message. 4a's author has no reason to read either, and the plan is what a session reads first — the same failure mode #582 fixed for the stale Phase 4 figures.
What it records
#579 (open,
blocked) — theround()/floor()half-cell offset. Fixed and green, 142 of 2168 golden gate booleans flip. The part 4a must act on: it introduces_value_slope_belowas a third peer dV/dSoE estimator, and a new publichas_value_cell_belowondp_battery_algorithm.py, exposed so the gate tests stop mirroring the DP's index rule. Both are new surface on a module 4a is about to empty, so 4a should absorb them rather than inherit them.#571 (open,
blocked, unfixed) — recorded because it is easy to assume #579 closed it. It does not: at the reported stateidx = 324.0is exactly on a grid point, soround()andceil()-1select the same cell. Its mechanism isnp.roundsnapping makingVlocally non-concave. The reproduce-from-period 58 note is included because the period-59 fixture is a different run that matches nothing in the bundle — that already cost one session a wrong "does not reproduce" conclusion.It also states plainly that neither fix depends on 4a technically — this is sequencing — so the hold can later be overruled on its merits rather than mistaken for a hard dependency.
Test plan
./scripts/quality-check.shpasses (exit 0, 0 errors, 0 warnings)4abullet, so 4b/4c stay siblingsEvidence the test discriminates
N/A — documentation only, no code or test changes. Nothing to mutate.
Outcome-level coverage
N/A — no behaviour changes. The claims it records are pinned elsewhere: #579's 142-flip delta by the action-selector goldens on its own branch, and #571's numbers by the reproduction in its issue comment.
Documentation
This PR is the documentation check for the two gate fixes.
docs/agents/bess-knowledge.mdwas already updated by #579 for the mechanism it changed;docs/SOFTWARE_DESIGN.mdmentions neithershadow_pricenor the gate, so nothing to change there.Refs #571, #579. Closes neither.