Skip to content

fix(roadmap): intake places an issue whose board card is archived by restoring the card, instead of failing every round #1403

Closed

Description

@dan-petty

Problem

Found while reviewing #1361 on 2026-10-08; the behaviour predates #1361.

Acceptance criteria

  • When item-add returns an archived card, add_item restores it with gh project item-archive --undo and returns it as an active card. The store contract and the in-memory store keep the same behaviour.
  • A GitHubFake test: an issue whose card is archived is placed in one round, with one unarchive request and no repeated failure.
  • The dry-run request plan lists the unarchive step and still makes no request.
  • Tests are offline, each call phase stays under 1 s, and uv run devops ci passes. changelog.d/<n>.md records the change.

Key questions

  • Unarchive, or treat an archived card as off the board and add a fresh card? Proposed: unarchive. GitHub keeps one card per issue per board, so a fresh add returns the archived card anyway, and unarchiving keeps the card's field history.

Strategic alignment


Found on 2026-10-08 while reviewing #1361. Filed directly with no priority; the roadmap service's intake sets Priority, Value and Effort.

Update 2026-10-08: delivered scope

  • The error intake raised was "Board #N does not hold card that #N was just added as.", not "#N is not on the board". It also stopped the round's later placements, because apply_intake has no per-candidate isolation; that is now fix(roadmap): an intake placement that fails stops only its own candidate, and the round still reports the failure and exits non-zero #1443.
  • Intake selects candidates from store.items(), not candidates(). Both leave archived cards out.
  • Restoring the card reverts a person's archive: auto-archive is off on board feat(release): v0.1.8 #2, and no code archives a card. That is deliberate. An open issue is an item (CONTEXT.md), GitHub keeps one card per issue, and closing an issue as not planned is how to keep it off the roadmap. devops roadmap intake --help now says so.
  • Planning can't see an archived card, so it plans the issue as one off the board. For an item of the current release that is not a critical fix, that meant clearing its milestone. Intake now decides again on the card the add returns. A card that holds a Priority is left exactly as it was: no milestone, field or job record write, no comment, no refine hook. A card without one keeps its milestone, gets only its empty fields, and gets a reason comment for those writes. A value a person set is never overwritten or claimed by the job record (ADR 0002).
  • add_item returns AddedItem with restored, because a card's values can't tell a restored card from a new one: the board's add workflow sets Status New.
  • Before the restore, the store checks the GraphQL reserve against the card read's budget, and it fails closed unless gh's reply names the same card. It does not read the card again.
  • GitHub does not document whether addProjectV2ItemById unarchives an item. The store branches on the card's own isArchived, so it is correct either way.
  • Known limits, recorded on fix(roadmap): an intake placement that fails stops only its own candidate, and the round still reports the failure and exits non-zero #1443: for an unfinished restored card, the plan printed before the writes shows the planned placement and values, and the Service's placed_critical_or_p0 also comes from the plan.
  • No live trigger was found (Service on v0.2.28, no matching log lines). The defect is latent.

Pending a person, after v0.2.29 deploys: pick an open backlog issue that intake placed and whose card has Priority, Value and Effort. Read its milestone, comment count, isArchived and fields, then archive the card (gh project item-archive 2 --owner dan-petty --id <card id>). After the next Service intake round, read them again: isArchived should be false, and everything else unchanged. kubectl -n devops logs deploy/roadmap-service --since=1h | grep -E 'does not hold card|answered with card' should print nothing.

Activity

  1. added
    type/bug
    scope/github
    source/agent
    on Oct 8, 2026
  2. dan-petty-bot commented on Oct 8, 2026

    @dan-petty-bot
    Collaborator

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Priority: P2-Medium. It permanently blocks intake for any issue with an archived card, but only affects that subset and does not take down the whole service, so it is a real but contained defect.
    • Value: Medium. When it triggers it is a hard failure loop, but it only affects issues whose card happens to be archived, a minority of intake cases.
    • Effort: Low. The fix is a single 'gh project item-archive --undo' call plus a store-contract update and a few targeted tests, all clearly scoped in the acceptance criteria.
  3. added this to the v0.2.29 milestone on Oct 8, 2026
  4. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Placed in v0.2.29 by the owner on 2026-10-08. The owner's instruction was to pull every issue that keeps the roadmap service from working into the current milestone and complete them. This is a person's placement and should stay in the release (#1349). Implementation started the same day, so the board Status is In Progress.

  5. dan-petty-bot commented on Oct 8, 2026

    @dan-petty-bot
    Collaborator

    What changed

    #1444, merged into release/v0.2.29 as 55c235e.

    Closes #1403

    Intake now places an open issue whose board card a person archived, instead of failing every round with "Board #N does not hold card … that #N was just added as." and stopping the round's later placements (per-placement isolation is #1443).

    • GitHubRoadmapStore.add_item reads the card gh project item-add names once, by node id, archived or not. When the card is archived, it checks the GraphQL reserve, restores it with gh project item-archive --undo --format json (item_unarchive_args), and fails closed if the reply names another card. It does not read the card again.
    • RoadmapStore.add_item returns an AddedItem, marked restored when the add brought back an archived card with its fields and job record. InMemoryRoadmapStore holds archived cards apart, with a person helper archive_card, and restores them on add.
    • Planning can't see an archived card, so intake decides again on the card the add returns (_on_card). A card that holds a Priority gets nothing more: no milestone, field or job record write, no comment and no refine hook, and --confirm names it as left as it was. Otherwise only empty fields are written, a restored card keeps its milestone as an item does, and the reason comment is written for the writes made. A value a person set is never overwritten or claimed by the job record (ADR 0002).
    • The --dry-run request plan lists the restore under the add, under "the card the add names is archived", and still makes no request.
    • `devops…

    21 file(s) changed.

    How it was verified

    Check runs at ca19973:

    • Prune PR DevContainer Images: pass
    • CodeQL: pass
    • Static Analysis: pass
    • Analyze (actions): pass
    • Analyze (python): pass
    • Tests & Coverage: pass
    • DevContainer Image: skipping
    • Service Image: skipping
    • Dependency Freshness: skipping

    Acceptance Criteria of docs/agent/tasks/task-1403-intake-restores-archived-card.md:

    • When item-add names an archived card, add_item restores it with gh project item-archive --undo and returns it as an active card with its fields, marked restored. An active card sends no restore. A reply naming another card raises. A card read that leaves fewer points than the reserve refuses the restore, with item-add already sent and the card still archived (test_adding_an_issue_whose_card_is_archived_restores_that_card_with_its_fields, test_adding_an_issue_whose_card_is_on_the_board_restores_nothing, test_a_restore_that_answers_with_another_card_raises_before_any_edit, test_a_restore_refuses_while_the_card_read_leaves_fewer_points_than_the_reserve).
    • The store contract and the in-memory store behave the same way: an archived card leaves every read and the issue is a candidate again, then the add restores the same card, marked restored, with its Status and job record (test_an_archived_card_leaves_the_board_and_adding_its_issue_restores_it_with_its_fields, test_archiving_a_card_that_is_not_on_the_board_raises).
    • On GitHubFake, an issue whose card is archived, holding the Status New, Value and Effort a person set, is placed in one round. The round sends one item-archive --undo and edits only Priority, so the person's values stay and the job record holds only Priority. The next round finds no candidate and sends no add or restore. On the base commit the same test fails with "Board Release v0.1.8 #1 does not hold card PVTI_1 that Release v0.1.8 #1 was just added as." (test_an_issue_whose_card_a_person_archived_is_placed_in_one_round_on_that_card).
    • A card a person set In Progress and P1-High in the current release, then archived, gets only the add and the restore, in memory and on GitHubFake. The milestone stays, and there is no comment, no field or job record write and no refine hook, and the run names the issue as left as it was. On 833c467 the same round cleared the milestone, wrote Value and Effort with their job record and commented "to the backlog" (test_a_finished_card_a_person_archived_in_the_current_release_is_only_restored, test_a_finished_card_a_person_archived_in_the_current_release_gets_only_its_restore, test_intake_hook_skips_a_finished_card_the_add_restored, test_confirm_names_a_restored_card_it_left_as_it_was).
    • A restored card with no Priority in the current release keeps its milestone and the Value a person set. Intake writes Status, Effort and Priority, and its reason comment says "kept in" the release and gives no Value (test_a_restored_card_with_no_priority_keeps_its_milestone_and_the_values_it_holds).
    • The dry-run request plan lists the restore under the add, as a GraphQL write under its own condition, and makes no request (test_a_board_write_plans_its_card_read_and_an_edit_by_node_ids, test_an_add_plans_the_restore_of_the_card_it_names_only_when_that_card_is_archived).
    • Tests are offline, at the gh process edge (GitHubFake, RecordedGh) or in memory, and each passes run alone (-n0 -p no:randomly) with its call phase well under 1 s. changelog.d/1403.md records the fix, and CHANGELOG.md and docs/ROADMAP.md are untouched.
    • Pending a person: after v0.2.29 is deployed, pick an open backlog issue <N> that intake placed, so it carries intake's reason comment and its card has Priority, Value and Effort. Read the card with gh api graphql -f query='query { repository(owner: "dan-petty", name: "devops-cli") { issue(number: <N>) { milestone { title } comments { totalCount } projectItems(first: 5) { nodes { id isArchived priority: fieldValueByName(name: "Priority") { ... on ProjectV2ItemFieldSingleSelectValue { name } } value: fieldValueByName(name: "Value") { ... on ProjectV2ItemFieldSingleSelectValue { name } } effort: fieldValueByName(name: "Effort") { ... on ProjectV2ItemFieldSingleSelectValue { name } } } } } } }'. Archive the card with gh project item-archive 2 --owner dan-petty --id <card id>, and run the same query after the Service's next intake round. isArchived should be false, and Priority, Value, Effort, the milestone and the comment count should be what they were. kubectl -n devops logs deploy/roadmap-service --since=1h | grep -E 'does not hold card|answered with card' should print nothing.
  6. added a commit that references this issue on Oct 8, 2026
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

    scope/githubsource/agenttype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions