Skip to content

fix(supervisor): read the Claude Team org-spend wall and its wrapped reset clock (DIVE-4401) - #921

Merged
lodar merged 2 commits into
mainfrom
dive-4401-team-wall
Sep 13, 2026
Merged

fix(supervisor): read the Claude Team org-spend wall and its wrapped reset clock (DIVE-4401)#921
lodar merged 2 commits into
mainfrom
dive-4401-team-wall

Conversation

@5dive-bot

@5dive-bot 5dive-bot commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Delivers DIVE-4401.

Opened by 5dive push --open-pr (DIVE-2605): the branch and this pull request went out on the same root-side rail, as 5dive-bot. The authoring agent holds no GitHub credential.


ops (DIVE-4422): the title check was red on the pre-retitle payload and a re-run replays that old payload, so this body touch fires a fresh pull_request: edited to re-grade the current (conventional) title. No code change.

…reset clock (DIVE-4401)

Two seats on one Claude Team auth profile hit the same wall at 04:31Z on
2026-09-13 and `agent info` disagreed about it: main reported
quotaDeadline=live, olivia reported `unknown` off byte-equivalent reset text.
Both halves of that are pane-reading defects.

1. `_SUP_QUOTA_PAT`'s `hit your <window> limit` arm required the window noun
   immediately after `your`. A Team seat prints the possessive form

     You've hit your org's monthly spend limit · ask your admin to raise it at
     claude.ai/admin-settings/usage · your session limit resets 9am (UTC)

   so `org's` sits exactly where the alternation expected `monthly`, and the
   ONE line in the Team banner that also carries the reset clock matched no arm
   at all. Widened with a single optional non-space qualifier token; the arm
   still requires the window noun followed by the literal word `limit`.

2. The deadline was read off the SELECTED line only. The banner is a sentence
   and the pane is a fixed width, so the signature and the clock land on
   different physical lines whenever it wraps — which is the whole of the
   main-vs-olivia disagreement: the same sentence, wrapped differently.
   `_sup_quota_match` now keeps the whole pane and, when a selected match
   carries no parseable deadline of its own, borrows one from an immediate
   neighbour.

DIVE-3880's stale-scrollback false positive stays closed: only an UNKNOWN
match is ever extended, the neighbour must satisfy `_sup_quota_deadline` (so a
bare `resets 9am` cannot join), a neighbour that is itself a signature is
skipped as a separate banner, and the scan is nearest-first with forward
preferred at equal distance — a wrapped sentence continues on the line below,
and a backward-first scan hands the newer of two stacked banners the older
one's clock.

tests/supervisor_team_wall_unit.sh — 16 arms over both measured panes, both
wrap shapes, the agreement assertion, two negative controls (prose mentioning
an org spend limit; a bare clock line beside an untimed signature) and the
DIVE-3778 errexit guard. Mutation-proven: reverting the pattern widening reds
3 arms, removing the join reds 6, and neither reds the other's.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@lodar lodar changed the title DIVE-4401: Claude Team usage-limit wall is silent on Telegram: recognize org monthly-spe... fix(supervisor): recognize the Claude Team org-spend banner and a pane-wrapped reset clock (DIVE-4401) Sep 13, 2026
Both sides rewrite `_sup_quota_match`, and the overlap is semantic, not
textual: DIVE-4405 (#923) drops our own echoed alert lines before the pane is
matched; DIVE-4401 (#921) keeps the whole pane so an untimed banner can borrow
a reset clock from an immediate neighbour.

Taking either hunk alone re-opens the other's defect. #923's filter sat
immediately in front of the grep, which covers only the line that MATCHES —
but the join reads NON-matching lines too, so an echoed alert quoting a reset
time would be lent to a real untimed banner. The resolution moves the filter
upstream of the pane read (`pane_text=$(_sup_pane_drop_echoes)`), so the array
the join scans never contains our own output at all. One call, both doors.

tests/supervisor_team_wall_unit.sh +6 arms: an echoed alert is not a wall; an
echoed neighbour cannot lend its clock; the untimed signature is emitted
unjoined; a positive control (the same neighbour unmarked DOES join, live, at
the banner's 9am) so the pair cannot pass on a function that never joins; and
the DIVE-3778 errexit contract re-asserted on an all-echo pane, which is the
path where grep -v drops every line.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@5dive-bot 5dive-bot changed the title fix(supervisor): recognize the Claude Team org-spend banner and a pane-wrapped reset clock (DIVE-4401) fix(supervisor): read the Claude Team org-spend wall and its wrapped reset clock (DIVE-4401) Sep 13, 2026
@lodar
lodar added this pull request to the merge queue Sep 13, 2026
Merged via the queue into main with commit b887fa7 Sep 13, 2026
33 checks passed
@lodar
lodar deleted the dive-4401-team-wall branch September 13, 2026 11:12
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.

2 participants