Skip to content

fix(rate-limit-guard): fail-open downgrade is whole-guard where the reader contract is per-window #1612

Description

@kyle-sexton

The three lane skills inline the rate-limit-guard fail-open rule as a whole-guard downgrade:

  • plugins/work-items/skills/work-loop/SKILL.md:137
  • plugins/work-items/skills/attend-queue/SKILL.md:168
  • plugins/source-control/skills/babysit-loop/SKILL.md:428

All three read "tee file absent, stale, missing rate_limits, or absurd values → mode unknown → reactive-only", which collapses the guard wholesale as soon as any value is absurd.

The reader contract is per-window:

  • plugins/rate-limit-guard/reference/reader-contract.md:46-49rate_limits "is present only when the session observes subscription windows; each window may be independently absent".
  • :67-70 — an absurd used_percentage or resets_at "makes that window unknown".

Combined with the operable floor's "pause when either window reports used_percentage >= 90", the correct behavior when one window is absurd and the other is valid at, say, 95% is to pause on the valid window — not to drop to reactive-only and keep working until a reactive failure lands. The current wording produces the second outcome.

Note the reader contract is itself internally inconsistent and should be fixed in the same pass: its mode table at :62-65 lists "absurd values" as a whole-guard unknown → reactive-only row, while the prose immediately below scopes absurdity to a single window. The table is the line the three skills copied.

Wanted:

  1. Reconcile reader-contract.md's mode table with its own per-window prose — absent / stale / missing rate_limits are whole-guard; absurd values are per-window.
  2. Update the three lane skills to classify validity per window, keep applying the floor to every still-plausible window, and fall to reactive-only only when no window is plausible.

Found while reviewing #1582's burn-down prompt. prompts/loops/loop-lane-prompts.md was corrected to the per-window form in PR #1594, so until this lands, that prompt and the three skills deliberately differ — the difference is recorded in that file's "Known gaps" section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.priority: mediumReal value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions