threshold_derivation: quantity-aware RESISTANCE vs WORK positions#5
Merged
Merged
Conversation
The helper only offered the resistance positions (LOWER/TARGET/UPPER, 1/3…1/φ²), so deriving a WORK quantity (buffer capacity, rate budget, queue depth) from TARGET under-provisioned it by ~20% — the work zone (1/φ²…0.50, target ~0.441) is the sustainable cruise for carried load. - BandPosition gains WORK_TARGET (~0.441) + WORK_CEILING (0.50 pivot); LOWER/TARGET/UPPER documented as the RESISTANCE positions. - New derive_work_target / derive_work_target_float for carried-load. - Module docstring states the RESISTANCE-vs-WORK distinction + that sustained-vs-spike is the caller's SustainedLoadTracker concern. - redis-rate-limiter adoption guide: the sustained refill rate is WORK, now derived from the work zone (was the resistance midpoint). - CHANGELOG entry (v0.3.0 candidate). 8 new tests; full suite green; pyright 0/0/0; pylint 10.00. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
threshold_derivationpreviously offered only the resistance band positions (LOWER/TARGET/UPPER,1/3 … 1/φ²). Deriving a WORK quantity — buffer capacity, rate budget, queue depth — fromTARGET(~0.358) under-provisions it by ~20%, since the sustainable cruise for carried load is the work zone (1/φ² … 0.50, target ~0.441).Changes
BandPositiongainsWORK_TARGET(work-zone midpoint ~0.441) andWORK_CEILING(0.50 pivot);LOWER/TARGET/UPPERare documented as the RESISTANCE positions.derive_work_target/derive_work_target_floatfor carried-load quantities.SustainedLoadTrackerconcern, not a static derivation.redis-rate-limiteradoption guide: the sustained refill rate is a WORK quantity, now derived from the work zone.Verification
8 new tests; full suite green; pyright 0 errors; pylint 10.00.