Skip to content

docs: record the two gate fixes queued behind Phase 4a - #584

Merged
johanzander merged 1 commit into
mainfrom
docs/phase4a-gate-work-queue
Aug 14, 2026
Merged

docs: record the two gate fixes queued behind Phase 4a#584
johanzander merged 1 commit into
mainfrom
docs/phase4a-gate-work-queue

Conversation

@johanzander

Copy link
Copy Markdown
Owner

Summary

  • Phase 4a relocates intra_period_discharge_gate into core/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.
  • Adds a queued-work block under 4a — capability model naming both, with the one structural consequence 4a has to act on.

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) — the round()/floor() half-cell offset. Fixed and green, 142 of 2168 golden gate booleans flip. The part 4a must act on: it introduces _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.

#571 (open, blocked, unfixed) — recorded because it is easy to assume #579 closed it. It does not: at the reported state idx = 324.0 is exactly on a grid point, so round() and ceil()-1 select the same cell. Its 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 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.sh passes (exit 0, 0 errors, 0 warnings)
  • Rendered the changed section and checked the list nesting survives — the block sits inside the 4a bullet, so 4b/4c stay siblings

Evidence 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.md was already updated by #579 for the mechanism it changed; docs/SOFTWARE_DESIGN.md mentions neither shadow_price nor the gate, so nothing to change there.

Refs #571, #579. Closes neither.

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
johanzander marked this pull request as ready for review August 14, 2026 19:12
@johanzander
johanzander merged commit fdd66f6 into main Aug 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant