Skip to content

Cross-check REST and GraphQL candidate listings to avoid missed Ready/Triage issues (#2304) - #2313

Merged
JacobStephens2 merged 6 commits into
mainfrom
issue-2304
Nov 19, 2026
Merged

JacobStephens2 merged 6 commits into
mainfrom
issue-2304

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Cross-check REST ?labels= candidate listings against GraphQL repository.issues (union of both sources) in Pickup and Triage Passes, and log any disagreement so a stale REST label index cannot silently hide eligible work.

Confirmed root cause: ready::search and triage::pass::run queried only REST repos/{repo}/issues?state=open&labels=... via GitHub::open_issues_labelled, so when GitHub's REST label index omitted an open ready-for-agent or needs-triage issue, Pickup saw no candidates and logged only no Ready issue.

 ready::search (Pickup, Architect, Security) / triage::pass::run (Triage Pass)
-  └── GitHub::open_issues_labelled (REST ?labels= only)
+  ├── GitHub::open_candidate_issues
+  │     ├── REST issues?state=open&labels=...          (unchanged baseline read)
+  │     ├── GraphQL repository.issues(labels, OPEN)    (+1 point/page; fetches title + first 100 labels)
+  │     └── issue_labels fallback ONLY if omitted by REST && labels.pageInfo.hasNextPage
+  └── logs::listing_disagreement(&repo, &listed)
+        ├── stderr / Command log: once per (repo, label) per Pass (held on quiet_skips)
+        └── activity.log: once per change under ADR-0011 (History::ListingDisagreement)

Evidence

Execution evidence

  • Before:
    Command:

    cargo test --test pickup_run a_ready_issue_omitted_by_rest_is_found_via_graphql_and_the_disagreement_is_logged -- --exact --nocapture
    

    Output (Command exited with code 101, panicked at tests/pickup_run.rs:182:5):

    stderr:
    thirdshift: Pickup run starting, 2026-11-19 -0500
    thirdshift: no Ready issue on acme/widgets
    
  • After:
    Command:

    cargo test --test pickup_run a_ready_issue_omitted_by_rest_is_found_via_graphql_and_the_disagreement_is_logged -- --exact --nocapture
    

    Output:

    running 1 test
    test a_ready_issue_omitted_by_rest_is_found_via_graphql_and_the_disagreement_is_logged ... ok
    
    test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 159 filtered out; finished in 1.39s
    
  • Full validation on HEAD (5b11c9d1):

    • cargo fmt --check: passed.
    • cargo clippy --all-targets --locked -- -D warnings: passed.
    • scripts/affected-tests refs/remotes/origin/main < /dev/null: PASS cargo test (1553.94s) (4867 passed; 0 failed; 219 ignored across 119 test result summaries, with < /dev/null so spawned child processes in tests/experiments did not treat the wrapper PTY as an interactive confirmation terminal).
    • verify-pickup model and mutation checks:
      • cargo test --locked --test pickup_model -- --nocapture: 4 passed; 0 failed; 1 ignored
      • Literal property & mutation checks (assert_requested_property, no-claim-count, no-empty-lease): produced the expected counterexamples.

Merge Danger

Door: Two-way

Reverting restores REST-only candidate listing in ready::search and triage::pass::run without affecting repository state or persisted logs.

Blast Radius: Low

Adds 1 GraphQL request (repository.issues, 1 GraphQL rate-limit point per 100-issue page) per Pickup or Triage Pass. GitHub::open_issues_labelled callers (Sweep, agent-failed, architect-plan/architect-idea, base-fix) remain REST-only. Unchanged listing disagreements in activity.log deduplicate per label under ADR-0011 without altering activity::last_of skip deduplication or history::read.

Review Coverage

All 16 changed files were read by both Standards and Spec reviewers against refs/remotes/origin/main; 0 changed files remain unread and no generated-output exclusions apply.

Unaddressed findings

None — Spec review raised 0 actionable findings, and all 4 Standards findings (activity.log deduplication under ADR-0011, verify-pickup multi-request documentation and commit sync, LabelledCandidates/logs::listing_disagreement interface cleanup, and open_candidate_issues docstring wording) were addressed on branch issue-2304.

Closes #2304

Built with agy 1.5.6 · gemini-4-hydrogen-xhigh · default effort

Security review outcome

No unaddressed introduced findings.

@JacobStephens2
JacobStephens2 merged commit 01c1d44 into main Nov 19, 2026
25 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-2304 branch November 19, 2026 15:47
@JacobStephens2 JacobStephens2 mentioned this pull request Nov 20, 2026
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.

Pickup can't see a ready-for-agent issue that GitHub's label listing omits (tourbot #2814 skipped for 12 hours)

1 participant