Repository navigation
Closed
Labels
scope/githubGitHub Projects v2, Views, Milestones, Labels, and PR automationsource/agentFiled by an agenttype/bugType bug: the code does not do what it must
Milestone
Description
Problem
Found while reviewing #1361 on 2026-10-08; the behaviour predates #1361.
- Intake adds an issue to the board with
gh project item-add. When the issue already has an archived card on the board,item-addreturns that archived card. - The store's card read then finds no active card, and
add_itemraises "#N is not on the board". candidates()leaves archived cards out, so the issue stays a candidate, and intake raises the same error on every round for as long as the card stays archived.- The read-back that fix(roadmap): board writes go to the card by node id and read only that card, so intake keeps the card it added and a write costs a few GraphQL points instead of about 320 #1361 replaced failed the same way.
Acceptance criteria
- When
item-addreturns an archived card,add_itemrestores it withgh project item-archive --undoand returns it as an active card. The store contract and the in-memory store keep the same behaviour. - A
GitHubFaketest: 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 cipasses.changelog.d/<n>.mdrecords 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
- Related: fix(roadmap): board writes go to the card by node id and read only that card, so intake keeps the card it added and a write costs a few GraphQL points instead of about 320 #1361, feat(github): single-entry item intake with duplicate detection and placement (
devops roadmap intake) #742, test(infra): infrastructure tests run on edge fakes #1335.
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_intakehas 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(), notcandidates(). 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 --helpnow 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_itemreturnsAddedItemwithrestored, 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
addProjectV2ItemByIdunarchives an item. The store branches on the card's ownisArchived, 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_p0also 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.
Metadata
Metadata
Assignees
Labels
scope/githubGitHub Projects v2, Views, Milestones, Labels, and PR automationsource/agentFiled by an agenttype/bugType bug: the code does not do what it must
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty-bot commentedon Oct 8, 2026
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.
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.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.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.dan-petty commentedon Oct 8, 2026
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.
fix(roadmap): intake restores an issue's archived board card instead …
dan-petty-bot commentedon Oct 8, 2026
What changed
#1444, merged into
release/v0.2.29as 55c235e.21 file(s) changed.
How it was verified
Check runs at ca19973:
Acceptance Criteria of
docs/agent/tasks/task-1403-intake-restores-archived-card.md:item-addnames an archived card,add_itemrestores it withgh project item-archive --undoand returns it as an active card with its fields, markedrestored. 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, withitem-addalready 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).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).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 oneitem-archive --undoand 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).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).test_a_restored_card_with_no_priority_keeps_its_milestone_and_the_values_it_holds).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).ghprocess 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.mdrecords the fix, andCHANGELOG.mdanddocs/ROADMAP.mdare untouched.<N>that intake placed, so it carries intake's reason comment and its card has Priority, Value and Effort. Read the card withgh 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 withgh project item-archive 2 --owner dan-petty --id <card id>, and run the same query after the Service's next intake round.isArchivedshould 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.feat(release): v0.2.29 (#1455)