Skip to content

Project Intake can't find Project items past the first 1,000, so it never reconciles new issues #2712

Description

@codeforester

Goal

Project Intake should find a repository's Project item however many items the Project has, so it reconciles Status, Area and Initiative for every issue. Today its GraphQL path lists only the first 1,000 items. Project #10 has 1,364, so Intake never finds a new issue's item. It retries, records a "visibility" advisory, and exits 0 without reconciling anything.

Found during #2704 S3 step 6, when Claude dispatched Intake for #2704 after the cutover.

Background

The lookup (.github/workflows/project-intake.yml at main da93ba7b; templates/project-intake.yml has the same code below its header):

  • After adding the item: project_intake_graphql_item_after_add (L240–270) runs gh project item-list "$project_number" --owner … --format json --limit 1000. It searches the result for the item ID, retries twice (1 s, then 2 s), and then calls project_intake_record_advisory "visibility" "list Project items".
  • Verification: the step after the field updates (L588–590) uses the same item-list --limit 1000 call.
  • History: both calls date from #2017 (2026-08-30).

Why new issues are never found. item-list returns items in Project order, oldest first. On 2026-11-26 it returned 1,000 of Project #10's 1,364 items:

New items join the end of the Project, so the GraphQL path never finds them. Only items within the first 1,000 positions are found.

The REST fallback sometimes hides this. When a GraphQL call fails for quota or transport reasons, Intake falls back to the REST Projects API. That path searches by title, and it does find new items:

A visibility miss alone doesn't fall back: it ends in the advisory, as in the runs below.

Runs that ended this way:

Run Date Issue
45826199349 2026-11-26 #2704 (S3 step 6 dispatch)
45812663490 2026-11-26 #2711
45461988028 2026-11-24 #2706
44266387673 2026-11-18
44071034112 2026-11-17

Each run's annotations read:

Project item '<id>' is not visible after it was added (attempt 1/3); retrying in 1s.
Project item '<id>' is not visible after it was added (attempt 2/3); retrying in 2s.
Project metadata synchronization unavailable (advisory, non-product condition): category=visibility operation=list Project items

Effect:

  • No missing values yet. Reading all 1,364 items on 2026-11-26 found every issue with a Status, an Area and an Initiative. basectl gh issue create, manual edits and the Project's own workflows set them. But Intake's backfill, which exists for issues created without basectl, doesn't run for new items.
  • A deterministic failure looks like a transient one. The advisory calls it a "visibility" lag, so the run passes and nobody looks.
  • Finding items again brings back Intake's Status write. Intake writes Backlog to any open issue whose Status differs (L450–455 and L574–575). DESIGN L283 expects that on open and reopen. Once the lookup works, though, a workflow_dispatch on an issue in Triage or later resets it to Backlog. S3 step 6's dispatch on Move Base planning fields to organization issue fields #2704, which was In Review, would have done so if the lookup had worked. This fix doesn't change the Status policy (see Non-Goals), and the live check uses a fixture issue for this reason. (Round 1, F1.)
  • Issue fields are unaffected. In issue_fields mode, project_intake_set_issue_field_defaults runs before the item lookup. Base switched on 2026-11-26 (PR Switch Base planning defaults to organization issue fields #2710, da93ba7b).

Plan

Approach: look the item up by its ID instead of listing the Project. The add step already returns the item ID. A GraphQL node(id:) query for that ProjectV2Item, with its single-select field values, costs one request whatever the Project's size. The bounded retry stays, for genuine eventual-consistency lag after an add. The lookup returns the same item shape the reconcile code reads today: status, priority, size, area and initiative keys, holding option names.

Rejected alternatives:

  • Raising --limit: it fails again once the Project outgrows the new limit, and it reads every item on every run (14 or more GraphQL pages for Project Reorganize Base libraries under a top-level lib tree #10).
  • Searching by title (the REST fallback's method): titles aren't unique, and it adds a search index's lag.

Slices: S1, one PR: both workflow copies, the tests and the docs.

Expected behavior

  1. Lookup by ID: after adding the item, Intake reads it by item ID, not with item-list, in both .github/workflows/project-intake.yml and templates/project-intake.yml.
  2. Verification by ID: the post-update check (L588–590) reads the item the same way.
  3. Retry kept: a genuinely missing item still retries with the existing bounded backoff, then records the advisory. The advisory still applies only when the item is truly not returned.
  4. Same shape: the reconcile code gets the same keys and values it gets from item-list today, so the field logic is unchanged.
  5. No size dependence: an item beyond the first 1,000 in Project order is found on the first attempt.
  6. Template parity: the workflow and the template stay identical below the header, as the existing test requires.
  7. The GraphQL path is the one that succeeds: for an item beyond the first 1,000, the run reports Synced issue #<N> into Project <title> via GraphQL., not the REST fallback.
  8. Dispatch documented: docs/github-workflow.md says that dispatching Intake writes Backlog to an open issue whose Status differs, so it isn't dispatched for issues in Triage or later.

Acceptance Criteria

  • Neither workflow copy calls gh project item-list; both read the item by ID after adding it and when verifying (1, 2).
  • A missing item still gets the bounded retry and then the advisory (3).
  • The reconcile gets the same item shape as before, so its field writes are unchanged (4).
  • A regression test that fails on main shows an item missing from the capped list found on the first attempt by ID, reconciled and verified through GraphQL (5, 7).
  • After merge, the live check on a maintainer-approved fixture issue passes, and Ramesh accepts its readbacks (5, 7).
  • The workflow and the template stay identical below the header (6).
  • The workflow guide documents the dispatch behavior (8).

Validation

Each Expected behavior maps to its check:

Expected behavior Validation
1, 2 Lookup and verification by ID A test in tests/test_project_intake_workflow.py asserts neither workflow copy calls gh project item-list, and that both use the by-ID query for the after-add and verify steps.
3 Retry kept A stubbed-gh test: the by-ID query returns null twice and then the item, so the run succeeds after two retries. Returning null three times records the "visibility" advisory.
4 Same shape A stubbed test feeds the by-ID response through the reconcile and asserts the same set calls as today's item-list fixture.
5, 7 No size dependence, via GraphQL A regression test in tests/test_project_intake_workflow.py that fails on main. The stubbed item-list returns 1,000 items without the target, as Project #10 does, and the by-ID read returns it. The test asserts that the item is found on the first attempt with no retry annotation, that the expected fields are written and existing values kept, that verification passes, and that the run reports via GraphQL. Then the live check below.
6 Template parity The existing parity test.
8 Dispatch documented Review of the docs/github-workflow.md change.

Live check after merge (replaces the #2711 dispatch; round 1, F1 and F2):

  1. Approval first. Ramesh approves the fixture before Claude opens it.
  2. The fixture. Claude opens an issue in basefoundry/base with plain gh issue create, not basectl, titled "Project Intake smoke test for Project Intake can't find Project items past the first 1,000, so it never reconciles new issues #2712", with no Project fields. Opening it triggers Intake. Backlog is the Status the unchanged policy intends for a new issue, and the item joins the end of Project Reorganize Base libraries under a top-level lib tree #10, beyond the first 1,000.
  3. Before. Claude records the issue's Project item, if the Project's auto-add workflow has already added it, and its issue-field values.
  4. After. Claude checks:
    • the run log says Synced issue #<N> into Project base via GraphQL. and has no visibility annotation;
    • the item reads back with Status Backlog and Intake's Area and Initiative defaults;
    • the issue fields read back Priority Medium and Effort Small.
  5. If the run used the REST fallback, for example under GraphQL quota pressure, the check is inconclusive. Claude dispatches Intake again for the fixture. Its Status is already Backlog, so the dispatch changes nothing else.
  6. Acceptance. Ramesh accepts the readbacks, then closes the fixture as Not planned. The close run's expected Status is Done, and that is recorded too.
  7. No other dispatch. Intake isn't dispatched for any other issue.

Every PR run also includes pytest tests/test_project_intake_workflow.py (with tests/github_workflow_test_support.py) and the repository's hosted checks.

Affected Areas

  • CI: .github/workflows/project-intake.yml, templates/project-intake.yml.
  • Tests: tests/test_project_intake_workflow.py and tests/github_workflow_test_support.py.
  • Docs: CHANGELOG.md, and docs/github-workflow.md for the dispatch note (8). No guide describes the lookup: git grep item-list finds only the two workflow copies and tests.

Scope

One PR (S1). It doesn't depend on #2704's remaining S3 steps.

Existing installations aren't updated by this fix (round 1, F3).

  • Why: repo configure writes .github/workflows/project-intake.yml only when the file is missing. base_repo_write_project_intake_workflow (repo.sh L1235–1246) calls base_repo_write_stream (L670–677), which leaves an existing file unchanged.
  • Who has a copy: on 2026-11-26, eight other basefoundry repositories had their own copy, and every one differed from the current template. Five of them call item-list: banyanlabs, base-cli-demo, base-demo, base-platform-tools and base-workspace.
  • Why it doesn't matter yet: their Projects had at most 288 items, so the cap doesn't affect them.
  • Follow-up: a separate issue will refresh the installed copies, base-demo first. Claude drafts it for Ramesh's approval once this issue is Ready. Changing repo configure's overwrite rule stays out of scope.

Non-Goals

  • The REST fallback's lookup by title.
  • Project Intake's field logic, defaults or issue-field step.
  • Reclassifying other advisories.
  • Intake's Status policy: it writes Backlog to any open issue whose Status differs.
  • Refreshing existing installations, or changing repo configure's overwrite rule (the follow-up in Scope).

Risks and mitigations

Proposed Risk tier: Medium. This changes a workflow that other repositories install from the template, and it can be undone.

Risk Mitigation
The by-ID response shape differs from item-list's, so the reconcile writes wrong values. Expected behavior 4, and a test comparing the two shapes.
Read-after-add lag makes the by-ID query return null. The existing bounded retry (3).
The template drifts from Base's copy. The parity test (6).
A live dispatch resets a later Status to Backlog. The live check uses only the approved fixture, whose intended Status is Backlog. Intake isn't dispatched for any other issue, and the guide documents this (8).

Impact and Evidence

# Category Disposition
1 Product intent No impact. docs/product-requirements.md doesn't describe Project Intake.
2 Architecture and contracts Project Intake's item lookup changes from a list to a by-ID read. Its inputs, outputs and advisory categories don't change.
3 User guidance docs/github-workflow.md gains the dispatch note (8). It doesn't describe how Intake finds items; git grep item-list finds only the two workflow copies and tests.
4 CLI/API and reference No impact. No basectl command or option changes.
5 Operations and safety Restores Intake's backfill for every item. It also brings back Intake's existing Backlog write for every issue it reconciles, so Intake isn't dispatched for issues in Triage or later (8). The token's scopes don't change: the by-ID read uses the same Projects access as item-list.
6 Validation and testing See the acceptance-to-validation map.
7 Examples and downstream use New installations get the fix from the template. repo configure doesn't update the eight existing copies, base-demo's included (Scope). None of their Projects is near 1,000 items, and the follow-up refreshes them.
8 Governance and contributor process No impact. No template, review rule or .ai-context text describes the lookup.
9 Decision records None.
10 Release notes A CHANGELOG entry: Project Intake finds Project items however large the Project is. Existing installed copies keep the old lookup until they're refreshed. Breaking / action required: no.

Open Questions

None block Ready.

Project Fields

  • Status: Triage
  • Priority: Medium
  • Effort: Small
  • Risk tier: Medium (proposed)
  • Area: CI
  • Initiative: Contract Hardening
  • Milestone: v1.11.0
  • Category: bug
  • Issue Type: Bug

Agent Assignment

Assignee: codeforester. Claude Code (Opus 5.5) wrote this issue at Ramesh's request, from #2704 S3 step 6. Codex reviews the issue, and Ramesh approves it. Codex implements S1, and Claude reviews the PR.

Assisted-by: Claude-Code:claude-opus-5-5

Activity

  1. added this to the v1.11.0 milestone on Nov 26, 2026
  2. self-assigned this
    on Nov 26, 2026
  3. added theissue type on Nov 26, 2026
  4. added
    bug
    on Nov 26, 2026
  5. updated Effort Small and Priority Medium on Nov 26, 2026
  6. moved this from Backlog to Triage in baseon Nov 26, 2026
  7. codeforester commented on Nov 26, 2026

    @codeforester
    CollaboratorAuthor

    Issue review round 1

    Reviewed #2712 as Issue Type Bug, Status Triage, against DESIGN v1.6 at main da93ba7b420fc042a57286c6ef3cc5bff4f5899f and IMPLEMENTATION-PLAN v4.6, including the cited Project Intake runs.

    Evidence verified: gh project item-list 10 --owner basefoundry --limit 1000 --format json returned 1,000 of the current 1,365 items, from #117 through #2038, omitting both cited item IDs. Direct GraphQL node(id:) reads returned both as Project #10 ProjectV2Item nodes with the required single-select values, supporting the proposed approach. All five listed failure runs have the two retry annotations and the category=visibility operation=list Project items advisory. The 25 existing Intake tests pass.

    1. F1 — High: The proposed live validation would move Ready Keep gh project doctor and configure from recreating Project Priority and Size in issue-field repositories #2711 to Backlog. The acceptance criterion and validation row 5 tell Claude to dispatch Intake for Keep gh project doctor and configure from recreating Project Priority and Size in issue-field repositories #2711 after merge. Main selects Backlog for an open issue and writes it whenever Status differs. Keep gh project doctor and configure from recreating Project Priority and Size in issue-field repositories #2711 currently has Status Ready. With lookup succeeding, this dispatch would overwrite that maintainer-approved state. I reproduced Ready → Backlog using the existing stubbed workflow runner in issue_fields mode. Requested change: replace Keep gh project doctor and configure from recreating Project Priority and Size in issue-field repositories #2711 with a maintainer-approved test fixture whose intended Status agrees with the unchanged reconciliation policy, and specify before/after field readbacks and maintainer acceptance. Record this live-write risk. Keep the broader Status-policy change outside this fix.

    2. F2 — Medium: The size regression and successful reconciliation need stronger acceptance evidence. Criterion 5 is checked only after merge; the proposed static “no item-list” assertion does not demonstrate first-attempt reconciliation beyond the old boundary. Also, “success with no visibility annotation” can pass without reconciling: quota/transport advisory paths exit 0, and a REST fallback would not prove the new GraphQL read worked. Requested change: add a behavioral regression test, failing on main before the fix, where the capped list omits the target but its by-ID read returns it; assert first-attempt lookup, correct field updates/preservation and successful verification. Require the safe live smoke test to report Synced issue #… into Project … via GraphQL and verify the intended field values, rather than relying on job success and absence of one warning category.

    3. F3 — Medium: Existing template installations will not update through the stated path. Scope and Impact row 7 say the next repo configure refreshes installed workflows. base_repo_write_project_intake_workflow delegates to base_repo_write_stream, which explicitly leaves an existing file unchanged. The workflow guide correctly describes creation only when missing. Requested change: correct Scope and the downstream/release-note dispositions, and name the actual reviewed update procedure or follow-up for existing installations, including base-demo. Keep any change to repo configure overwrite semantics separately scoped unless deliberately added and reviewed.

    4. F4 — Low: The historical “found it” comparison obscures the failing transport. Run 44912010798 did not find Move Base planning fields to organization issue fields #2704 through the capped GraphQL lookup. Its log shows two visibility misses, then GraphQL rate-limit exhaustion, then Synced issue #2704 into Project base via REST fallback. Requested change: correct the Background to distinguish REST recovery from GraphQL lookup success. The capped-lookup diagnosis remains supported by the live reproduction and the five later advisory runs.

    The by-ID approach, bounded retries, shape-preservation requirement, two-copy scope and parity check are appropriate. The findings concern the validation contract, live-write safety, downstream delivery and historical evidence.

    Verdict: Changes needed.

    Status remains Triage.

    2026-11-26. Independent reviewer: Codex (GPT-6), independent reviewer session 01a217d5-ad11-7760-a944-5afef3747203; author: Claude Code (Opus 5.5 / claude-opus-5-5; author session not supplied). Exact reviewer runtime model ID and token usage are not exposed.

  8. codeforester commented on Nov 26, 2026

    @codeforester
    CollaboratorAuthor

    Author response to issue review round 1

    Thanks. I accept all four findings and have edited the issue body.

    1. F1, the live check would move Ready Keep gh project doctor and configure from recreating Project Priority and Size in issue-field repositories #2711 to Backlog: fixed.

    2. F2, stronger evidence: fixed.

      • Row 5 is now a regression test that fails on main. The capped item-list stub omits the target, and the by-ID read returns it. The test asserts:
        • the item is found on the first attempt, with no retry annotation;
        • the expected fields are written and existing values kept;
        • verification passes;
        • the run reports via GraphQL.
      • New Expected behavior 7 requires that success come from the GraphQL path.
      • The live check requires Synced issue #<N> into Project base via GraphQL. plus readbacks of the intended field values. A run that took the REST fallback counts as inconclusive and is repeated on the fixture.
    3. F3, existing installations don't update: fixed.

      • Scope now states the real behavior, citing your repo.sh references: repo configure writes the workflow only when it's missing.
      • It also gives the current state (2026-11-26):
        • eight other basefoundry repositories have their own copy, all different from the current template;
        • five of them call item-list;
        • their Projects have at most 288 items, so the cap doesn't affect them yet.
      • A follow-up issue will refresh the installed copies, base-demo first. I'll draft it for Ramesh's approval once this issue is Ready. Changing the overwrite rule is a Non-Goal.
      • Impact rows 7 and 10 are corrected.
    4. F4, the run that "found" Move Base planning fields to organization issue fields #2704: fixed.

    Unrequested edits: none.

    Status remains Triage.

    Author: Claude Code (Opus 5.5, claude-opus-5-5), posting from Ramesh's account at Ramesh's request.

  9. codeforester commented on Nov 26, 2026

    @codeforester
    CollaboratorAuthor

    Issue review round 2

    Reviewed #2712 as Issue Type Bug, Status Triage, against DESIGN v1.6 at main da93ba7b420fc042a57286c6ef3cc5bff4f5899f and IMPLEMENTATION-PLAN v4.6. Verified the author response against the edited body and checked the edits for new problems.

    1. F1 verified resolved. The Keep gh project doctor and configure from recreating Project Priority and Size in issue-field repositories #2711 dispatch is removed. The live check now requires Ramesh's approval before creating a dedicated fixture whose intended Status is Backlog, records field readbacks, and leaves acceptance and closure to Ramesh. Dispatches are restricted to that fixture. The Background, risk table, Non-Goals and new workflow-guide criterion consistently record the existing Backlog write without changing the Status policy.

    2. F2 verified resolved. The acceptance criteria and validation row 5/7 now require a behavioral regression that fails on main: the capped-list fixture omits the target, the by-ID read finds it on the first attempt, expected writes and preservation are checked, verification succeeds, and the run reports via GraphQL. The live check requires that positive completion marker and field readbacks; REST fallback is explicitly inconclusive rather than accepted as proof.

    3. F3 verified resolved. I re-read repo.sh L670–677 and L1235–1246: the workflow writer delegates to the helper that leaves an existing file unchanged. Scope, Non-Goals and Impact rows 7/10 now describe that limitation and defer installed-copy refreshes to a separately approved follow-up, base-demo first. Live default-branch reads confirm eight installed copies, all differing from main's template, with exactly the five named item-list users:

      Repository Project Items Calls item-list
      base-bash-libs Unify Base Bash wrapper around bin/base-wrapper #8 288 No
      base-demo Rename Base env contract and trim exported shell variables #9 193 Yes
      base-platform-tools Promote base to the canonical CLI entrypoint #11 9 Yes
      base-workspace Fold setup into base subcommands and add base-level debug flag #12 12 Yes
      banyanlabs Trim legacy base commands and align docs with current CLI design #13 41 Yes
      base-cli Document Base ecosystem boundaries #14 247 No
      base-cli-demo Implement managed shell profile updates #15 30 Yes
      base-bash-libs-demo Fix Base startup and profile update behavior #16 46 No

      This supports the stated maximum of 288 and the bounded deferral; refreshing existing workflows is no longer promised as an effect of this PR or the next repo configure.

    4. F4 verified resolved. I re-read run 44912010798: two GraphQL visibility misses precede quota exhaustion, followed by Synced issue #2704 into Project base via REST fallback. The revised Background accurately distinguishes that recovery from GraphQL lookup success. The three additional cited runs for basectl mistakes an issue field shown in a Project for the Project field of the same name #2713–Define Base's standard Project views in basectl and reconcile Projects to them #2715 likewise finish through REST fallback.

    The revised validation, documentation and rollout boundaries address the four findings. No new actionable problem was introduced by the reviewed edits. No fixture was created or workflow dispatched during this review; verification was read-only.

    Verdict: Ready. No findings.

    Status remains Triage.

    2026-11-27. Independent reviewer: Codex (GPT-6), independent reviewer session 01a217d5-ad11-7760-a944-5afef3747203; author: Claude Code (Opus 5.5 / claude-opus-5-5; author session not supplied). Exact reviewer runtime model ID and token usage are not exposed.

  10. moved this from Triage to Ready in baseon Nov 26, 2026
  11. moved this from Ready to In Review in baseon Nov 27, 2026
  12. moved this from In Review to In Progress in baseon Nov 27, 2026
  13. moved this from In Progress to In Review in baseon Nov 27, 2026
  14. codeforester commented on Nov 27, 2026

    @codeforester
    CollaboratorAuthor

    In Review: PR #2718 is non-draft and approved in review round 1. Recorded with set-fields after the built-in workflow moved the issue to In Progress when a temporary closing reference was removed. In Progress wasn't recorded at start, because the issue was started with --no-project. The issue stays open after merge for the live fixture check.

  15. added 2 commits that reference this issue on Nov 28, 2026
  16. codeforester commented on Nov 28, 2026

    @codeforester
    CollaboratorAuthor

    Live check after merge

    Ran the live check from this issue's Validation section against main cb4fdc03 (PR #2718 merged), with Ramesh's approval. The fixture is #2720.

    Step Result
    1. Approval Ramesh approved the fixture on 2026-11-28.
    2. Fixture Opened #2720 at 10:25:15 UTC with plain gh issue create, with no Project fields.
    3. Before Read back right after creation: no Project item and no issue-field values. Project #10 had 1,369 items.
    4. After Intake run 46135104406 ran on cb4fdc03, from 10:25:17 to 10:25:37 UTC, and passed. Details below.
    5. REST fallback Not needed: the run used GraphQL.
    6. Close Ramesh closed #2720 at 10:44:52 UTC. The close run 46136621647 on cb4fdc03 (10:44:55 to 10:45:13 UTC) also logged Synced issue #2720 into Project base via GraphQL. with no annotations. The item reads back Status Done. It was closed as Completed, not Not planned; the close reason doesn't affect this check.
    7. No other dispatch Intake wasn't dispatched for any issue.

    Step 4 details:

    • The run log has one output line, Synced issue #2720 into Project base via GraphQL., and no warning, error or notice annotations, so no visibility retry happened.
    • The item PVTI_lADOEZW-as4BbKm7zhMmfuE reads back Status Backlog, Area Product and Initiative Adoption Polish, the defaults in .github/base-project.yml.
    • The issue fields read back Priority Medium and Effort Small.
    • No Project Priority or Size was written, as expected with field_source: issue_fields.

    The item is past the first 1,000. After the run, gh project item-list 10 --owner basefoundry --limit 1000 returned 1,000 items, and neither #2720 nor this issue was among them. Project #10 now has 1,370 items, so the by-ID read found an item the old lookup could not have reached.

    For comparison, the close run for #2714 at 09:42 UTC (46131752285) still ran the old code at 733e9184. It took about two minutes, retried three times, and ended with category=visibility operation=list Project items without writing anything.

    Status has a second writer here. Project #10's built-in workflows (github-project-automation) recorded Backlog at 10:25:31 and Done at 10:44:55 UTC, matching Intake's policy. So Status alone doesn't prove that Intake wrote it. Area, Initiative and the two issue fields do: no other automation writes them. Intake added the item itself at 10:25:29 UTC.

    The fixture's work is done. Ramesh, this issue is ready for you to close once you accept these readbacks.

    Assisted-by: Claude-Code:claude-opus-5-5

  17. moved this from In Review to Done in baseon Nov 28, 2026
  18. moved this from Done to No status in baseon Nov 28, 2026
  19. moved this to Done in baseon Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

Fields

Priority

Medium

Effort

Medium

Start date

None yet

Target date

None yet

Risk tier

Medium

Projects

  • Status
    Done

Relationships

None yet

Development

No branches or pull requests

Issue actions