Skip to content

pm-aggregator: the needs-you census asks GitHub's search in a form it refuses for some tokens (422; not the one the dashboard runs with) #14103

Description

@dezren39

What. The label census behind "What needs you" (pm-stack/aggregator/src/needs-drew.ts) asks GitHub's issue search for repo:<repo> state:open label:"user/review" (and the same for user/escalated), with neither is:issue nor is:pull-request in the query. GitHub refuses that form:

GET https://api.github.com/search/issues?q=repo:developing-today/code+state:open+label:"user/review"&per_page=1
422  {"message":"Query must include 'is:issue' or 'is:pull-request'", ...}

Its documentation for the endpoint says the same of every request without one of the two, and that issues and pull requests take separate queries.

How I know, and what I do not know. Asked both ways I can ask from a cloud session (through gh api, and with curl through the session's proxy), the answer is the 422 above. With is:issue added the same query answers 13, and with is:pull-request 1; the list endpoint (GET /repos/developing-today/code/issues?state=open&labels=user/review) answers the same 14. I cannot see the laptop's dashboard, so I have not seen the census itself fail there. If the aggregator's token is answered as mine is, every one of its eight queries fails, sources says HTTP 422 for each, items is empty and complete is false, and "What needs you" shows nothing with the laptop's report as its source.

To check on the laptop: curl -s http://127.0.0.1:<aggregator port>/api/needs-drew.json | jq '{complete, n: (.items|length), sources: [.sources[] | {repo, label, ok, error}]}'.

What done looks like.

  • The census gets its items again, by either: two searches per label (is:issue, is:pull-request) folded into one source status; or, better, the list endpoint, which is on the core allowance (the search has its own, thirty a minute), answers 304 Not Modified to a list that has not changed, and is not behind an index.
  • A query that GitHub refuses outright (a 4xx that is not a rate limit) is said as a fault of the query, not only as an incomplete census: this one could not have got better by waiting.
  • pm-stack/aggregator/test/needs-drew.test.ts has a case that fails on the query as it is today (the request it expects carries the qualifier, or is the list endpoint).

Meanwhile. The PM console's edge is being given its own read of the same thing through the list endpoint (#13491), so the app's "What needs you" will be right with or without the laptop. The aggregator's own page (/attention) and its digest still need this.


Generated by Claude Code

Activity

  1. added
    kind/bug
    priority/high
    app/pm-stack
    source/agent
    on Nov 24, 2026
  2. developing-today commented on Nov 24, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Taking this now (the cloud session that filed it), so that a lane does not start on the same thing. Plan: the census asks each repository's own list of open issues by label (GET /repos/<repo>/issues?state=open&labels=<label>), which has pull requests too, is on the core allowance, and is what the console's edge reads since #14112. A PR follows.


    Generated by Claude Code

  4. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Fixed in #14165 (merged as d9a6be492816).

    What changed. The census asks each repository's own list of open issues by label (GET /repos/<repo>/issues?state=open&labels=<label>), which carries the pull requests too, in place of the search GitHub refuses. An answer under a 200 that is not a list is a failed query, never an empty queue. With no token the sweep is made every ten minutes instead of five, so that it fits the sixty requests an hour GitHub allows an address.

    Found on the way. The console looked in other repositories than the dashboard: its default list named developing-today/opencode, developing-today/openchamber and dezren39/nix, which are developing-today-forks/opencode, developing-today-forks/openchamber and dezren39/darwin-nix now. GitHub answers the old names with the present repositories, so nothing was seen to fail, but an item had one name in the app and another on the dashboard, and the console takes a reply only for an item in a repository on its list. The console's default is the dashboard's list now, and a test holds the two to each other.

    Checked. The aggregator's workflow passed on the branch (tests, type check, contract corpus, projector, browser acceptance). Faults were planted one at a time and are listed in the pull request with what caught each.

    Not seen.

    Also filed: #14167, the aggregator's tests leave three files of machine state in the package directory on every run.


    Generated by Claude Code

  5. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Correction: this was not failing in service. I filed this from what GitHub answered my own session's token, and never checked the running dashboard. Checked now, on the machine that runs it (amd, 2026-11-24 08:10Z):

    • The dashboard's census is whole: GET http://127.0.0.1:4870/api/needs-drew.json → complete: true, 8 of 8 sources ok, 54 items, fetched 08:09Z.
    • The search in the old form answers the fleet's identity: fleet gh api search/issues -f q='repo:developing-today/code state:open label:"user/review"' → total_count 13. The repository's own list gives the same 13.

    So the 422 ("needs is:issue or is:pull-request") is what GitHub gives some tokens (a GitHub App's, like the one this session uses) and not the one the dashboard runs with. The title of this issue, "every query failed" in #14165, and the comments in needs-drew.ts that say so are wrong about service, and I am correcting the code comments and the design record in a follow-up.

    What still stands from #14165

    • The census reads each repository's own list: the same items (13 and 13 above), on the core allowance instead of the search's thirty a minute, and it works for either kind of token. Nothing that was broken for the owner was fixed by it.
    • The console's default list of repositories now matches the dashboard's (that was a real difference, with no failure seen).

    Priority high was not warranted.


    Generated by Claude Code

  6. changed the title [-]pm-aggregator: the needs-you census asks GitHub's search in a form it refuses (422: needs is:issue or is:pull-request)[/-] [+]pm-aggregator: the needs-you census asks GitHub's search in a form it refuses for some tokens (422; not the one the dashboard runs with)[/+] on Nov 24, 2026
  7. removed
    priority/high
    on Nov 24, 2026
  8. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    Contributor

    Triage verdict (queue task 22516, drawn and worked 2026-11-24): already resolved in substance before this task was created — no follow-on packet is needed for this issue itself.

    Evidence, verified fresh at triage time:

    Task 22516 therefore completes as triage: resolved elsewhere, evidence above; the follow-ons carry their own tracking.

  9. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    PR #14231 opened from branch xaltha/14103-needs-drew-list-endpoint. The census now uses the GitHub list endpoint per label instead of search (which 422s on a query with neither is:issue nor is:pull-request), and a non-rate-limit 4xx is named as a refused query.

    Verification: the first run (45345444968) failed only on bunx tsc --noEmit with TS2688 — the runner checkout had no node_modules, so @types/bun was absent. That was a verification-environment gap, not a defect in the fix. Re-verified with bun install first (fleet run 45357384375, Execute target command step SUCCESS): 55 packages installed, bun test test/needs-drew.test.ts 23 pass / 0 fail, bunx tsc --noEmit clean.

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

    app/pm-stackkind/bugsource/agentstatus:in-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions