Skip to content

threshold_derivation: quantity-aware RESISTANCE vs WORK positions#5

Merged
TrevorKagin merged 1 commit into
mainfrom
fix/band-quantity-aware-derivation
Jun 9, 2026
Merged

threshold_derivation: quantity-aware RESISTANCE vs WORK positions#5
TrevorKagin merged 1 commit into
mainfrom
fix/band-quantity-aware-derivation

Conversation

@TrevorKagin

Copy link
Copy Markdown
Contributor

Summary

threshold_derivation previously offered only the resistance band positions (LOWER / TARGET / UPPER, 1/3 … 1/φ²). Deriving a WORK quantity — buffer capacity, rate budget, queue depth — from TARGET (~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

  • BandPosition gains WORK_TARGET (work-zone midpoint ~0.441) and WORK_CEILING (0.50 pivot); LOWER/TARGET/UPPER are documented as the RESISTANCE positions.
  • New derive_work_target / derive_work_target_float for carried-load quantities.
  • Module docstring states the RESISTANCE-vs-WORK distinction and that sustained-vs-spike is the caller's SustainedLoadTracker concern, not a static derivation.
  • redis-rate-limiter adoption guide: the sustained refill rate is a WORK quantity, now derived from the work zone.
  • CHANGELOG entry (v0.3.0 candidate).

Verification

8 new tests; full suite green; pyright 0 errors; pylint 10.00.

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>
@TrevorKagin TrevorKagin merged commit 5ab68e5 into main Jun 9, 2026
0 of 4 checks passed
@TrevorKagin TrevorKagin deleted the fix/band-quantity-aware-derivation branch June 9, 2026 18:24
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