Skip to content

feat(pr-pipeline): let the monitoring lane read the lanes App quota from the broker #8509

Description

@kyle-sexton

Refs: #8484

Problem

The monitoring lane (#8508) runs on GITHUB_TOKEN and cannot see the lanes App's own hourly API quota. pr-merge's api-budget notices report pr-merge's token. The lanes App read 90.5% on 2026-10-19 around 08Z, and the dry run did not flag it.

Fix

Have the lanes token broker (melodic-software/azure-iac src/lanes-token-broker) publish the App installation's x-ratelimit-remaining, limit and reset from each mint, somewhere GITHUB_TOKEN can read it: a field in the token response that the lane run writes to its step summary or an artifact. Then the monitoring lane's ceiling signal reads it. This needs no new credential and no Azure identity. The owner chose this over a read-only Azure OIDC identity.

Acceptance

  • A lane run's artifact or summary carries the App's remaining quota and reset time.
  • The ceiling signal opens an issue when a reading is over 90%, with a test.

🤖 Generated with Claude Code

Activity

  1. added
    needs-triage
    on Oct 19, 2026
  2. github-actions commented on Oct 19, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Small
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none

    You want the monitoring lane to see the lanes App's own API quota, using a rate_limit field from the broker. The latest recorded decision, quoted below, settles scope, field shape, how the monitor reads the value and the done-when items. It settles the open questions, so I'm asking nothing further.

    Decision recorded.

    The scope and field shape were decided on 2026-10-26 (decision), and the broker half is now tracked at https://github.com/melodic-software/azure-iac/issues/103, which meets that record's third criterion. The ceiling signal already flags lanes-app readings over 90% (signals.mjs:60-62), and the 2026-10-26 lane run stopped on patch-protected-path, so the patch stays inside .github/actions/request-lane-token/action.yml, .github/scripts/maintenance-monitor-signals/collect.mjs and their tests, none of which .github/scripts/apply-patch/protected-paths.mjs refuses. Agents decided this on evidence under standing direction §1.

    Done when

    • request-lane-token reads an optional rate_limit object (remaining, limit, reset in epoch seconds) from the broker's token 200 response and emits an api-budget notice annotation named lanes-app with those values; when the object is absent the step still passes and emits nothing new. A test covers both cases.
    • collect.mjs reads lanes-app api-budget annotations from lane runs, not only from pr-merge's merge job, and a collect.test.mjs case shows a lane-run annotation over 90% becoming a lanes-app reading that the ceiling signal flags.
    • No workflow file changes.

    Source: #8509 (comment)

    Automated triage, applied by the lanes App.

  3. added
    needs-human
    and removed
    needs-triage
    on Oct 19, 2026
  4. removed
    needs-human
    on Oct 25, 2026
  5. kyle-sexton commented on Oct 25, 2026

    @kyle-sexton
    MemberAuthor

    Released for re-triage under the owner's 2026-10-24 rule: an issue stops for a person only for an intent or vision question, a security call, a host or attended run, or spend outside prepaid credit. The hold label came off and intake triage runs again now; it re-applies a hold, with a numbered question, when one of those applies.

    To hold this issue again, add needs-human (or status: needs-decision) and say why in a comment.

  6. added
    needs-triage
    and removed
    needs-triage
    on Oct 25, 2026
  7. added
    status: ready
    needs-owner-decision
    and removed
    status: ready
    on Oct 25, 2026
  8. melodic-automation-lanes commented on Oct 25, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: no trusted-human acceptance criteria: a listed human must put the confirmed - [ ] criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  9. 16 remaining items

  10. added
    status: ready
    admission-deferred
    agent-ready
    and removed
    admission-deferred
    on Oct 31, 2026
  11. melodic-automation-lanes commented on Oct 31, 2026

    @melodic-automation-lanes
    Contributor

    This records a re-fire of an earlier refusal, not a new refusal. The lanes kill switch stopped run 41174108477, the work-resolve-issue run that agent-ready started, before it did any work; that run ended at 2026-10-31T06:10:10Z. work-unblock has now removed and added agent-ready back to start a fresh run. A kill-switch refusal is no fault in this issue or the lanes, so it never counts against later re-fires; after limits.limit-stops-per-issue of them since a person last added agent-ready or a run last reported, work-unblock waits longer before each one, up to 24 hours.

  12. added
    agent-ready
    and removed
    agent-ready
    on Oct 31, 2026
  13. github-actions commented on Oct 31, 2026

    @github-actions
    Contributor
    No description provided.
  14. github-actions commented on Oct 31, 2026

    @github-actions
    Contributor
    No description provided.
  15. melodic-automation-lanes commented on Oct 31, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue run that agent-ready started failed or was cancelled before it reported, or it stopped or the token broker refused it because its workflow files differ from main's. work-unblock removed and added agent-ready back to start a fresh run on main's workflow files. If this run ends the same way, it re-fires the issue again, waiting longer each time.

  16. added
    agent-ready
    and removed
    agent-ready
    on Oct 31, 2026
  17. github-actions commented on Oct 31, 2026

    @github-actions
    Contributor
    No description provided.
  18. github-actions commented on Oct 31, 2026

    @github-actions
    Contributor
    No description provided.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readystatus: ready

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions