Skip to content

fix(roadmap): intake keeps the fields a person set on a card added during its planning #1404

Closed

Description

@dan-petty

Refreshed plan (2026-10-17, unblocking review)

This section supersedes any text below that conflicts with it.

Decisions

Scope

Delivery

  • One pull request, size S. _on_card logs the fields it skipped.

Acceptance criteria

  • If _on_card drops any planned write, intake logs the issue and the skipped fields once for that candidate. The message lives in src/devops_cli/lang/en/messages.py.
  • GitHubFake test: the issue already carries a type/* label, and a person adds it to the board between plan_intake and apply_intake and sets Priority. Intake's only write is the add: no label, field, job record, milestone or comment write. The issue appears in IntakeApplied.finished.
  • GitHubFake test: the same, but the person sets Value and a milestone with no Priority. Intake writes Status, Effort and Priority and its reason comment, which gives no Value and says the issue stays in the person's milestone. The person's Value and milestone stay, and the job record holds neither.
  • Tests are offline, each call phase stays under 1 s, and uv run devops ci passes.

Current references (main 3dd7fa6)

  • src/devops_cli/roadmap/intake.py: _unset :1321-1327, _on_card :1330-1343, _apply_placement :1346-1366 (add at :1360), _write_fields :1369-1379, IntakeApplied :459-469 (finished at :468).
  • src/devops_cli/roadmap/github_store.py: add_item :1521-1542 reads the issue (:1528), so AddedItem.release is the milestone at the time of the add.
  • src/devops_cli/commands/roadmap.py:424-425 prints intake_finished for each finished card.
  • tests/test_roadmap_intake.py: on_github :1852-1869 and _intake_on_github :1872-1876 build the GitHubFake runs the new tests use.

Dependencies and order


Problem

Gaps left by #1361's "changed since it was read" rule (2026-10-08), both in src/devops_cli/roadmap/intake.py:

  1. A person's card added during intake's planning can be overwritten. Intake plans every candidate with a model call (about 75 s each), and only then places them. If a person adds the issue to the board and sets its fields during that window, add_item returns the person's card. That add-time read becomes the baseline, so intake's planned Priority, Value and Effort overwrite the person's values without a RoadmapCardChangedError.
  2. The refine hook swallows errors. _maybe_refine_intake catches every exception and logs it as a warning. A RoadmapCardChangedError from refine's Status write is logged as a warning instead of failing the job, and so is any other failure. Swallowed errors are a stop signal under the repository's fail-closed rule.

Acceptance criteria

  • When add_item returns a card that already carries field values for an issue intake planned while it was off the board, intake writes none of the planned fields the card already holds. It records the person's values as the baseline and logs the skipped fields once.
  • _maybe_refine_intake catches only the errors it documents as expected for an optional hook, and none of them is a write conflict. RoadmapCardChangedError and unexpected exceptions fail the intake job with their message, and the next round plans again.
  • GitHubFake tests cover a person adding the card and setting Priority during planning, and refine's Status write meeting a person's change.
  • Tests are offline, each call phase stays under 1 s, and uv run devops ci passes.

Strategic alignment


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

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. A person's deliberate field choices can be silently overwritten and write-conflict errors are hidden, but the window is limited to the ~75 s planning phase and the refine hook is optional.
    • Value: Medium. Protects a person's explicit board edits from being clobbered and surfaces real failures, but only in a narrow timing window during intake planning.
    • Effort: Medium. Two targeted changes in one file plus GitHubFake tests for both scenarios, scoped by clear acceptance criteria.
  3. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Linked: #1365. Its 2026-10-08 comment asks this same catch (roadmap/intake.py:1389-1390) to re-raise GitHubRateLimitError; one change serves both. Found by the 2026-10-08 backlog review.

  4. dan-petty commented on Oct 9, 2026

    @dan-petty
    OwnerAuthor

    Finding: v0.2.29 Service gap assessment (2026-10-09)

    In the Service, intake's refine hook runs against the pod's working directory and fails: Intake refine hook failed for #1298/#1299: Checkout at . origin (None) does not match expected repository (22:07Z). _run_intake_adapter calls apply_intake(store, plan) with no refine argument, so it falls back to refine_item with source .. The refine job, which does get the clone, selects only New items in the next planned release and the backlog (select_candidates), never the current release, so #1298 and #1299 (P0, placed into v0.2.30) stay New.

    Proposed (simplest): in the Service, intake passes no refine hook, and select_candidates also takes the current release's New critical fixes and P0 items; the refine row is already due in that round and already gets the clone. Note: making hook errors fatal as written here would turn each such placement into a failed intake round, so this should land first or together.

  5. dan-petty commented on Oct 9, 2026

    @dan-petty
    OwnerAuthor

    Folded in from the owner's roadmap Service requests (2026-10-09)

    Amendment 2026-10-09: delete the intake refine hook

    The owner asked (2026-10-09):

    Keep the next milestone that will be worked in a ready state before the release so that there is minimal delay in starting the next release, but we can still utilize our slow, background llm services

    Checked at release/v0.2.32 (a9d7fd8) and in the Service's logs (read-only).

    The hook never works in the Service. It is the subject of this item's second problem. apply_intake falls back to refine_item (roadmap/intake.py:1403), whose default source is . (roadmap/refine.py:1045), not the job's clone. Every call therefore fails with "Checkout at . origin (None) does not match expected repository": 10 of 10 calls in the 7 days to 2026-10-09. The latest were #1496 at 14:50Z and #1499 at 15:03Z. The 2026-10-09 comment above already proposed passing no hook in the Service.

    Simplest fix: delete the hook rather than narrow its except.

    This replaces acceptance criterion 2 and the refine half of criterion 3:

    • Intake has no refine hook. refine_item, _should_refine_on_intake, _maybe_refine_intake and apply_intake's refine parameter are gone, along with tests/test_roadmap_refine.py::test_intakes_refine_hook_still_reports_a_failed_refine. The intake module docstring no longer mentions refining.
    • A run.py test shows that a round in which intake places a P0 item runs refine in the same round, with the job's clone.
  6. changed the title [-]fix(roadmap): intake keeps the fields a person set on a card added during its planning, and its refine hook stops swallowing errors[/-] [+]fix(roadmap): intake keeps the fields and milestone a person set on a card added during its planning[/+] on Oct 18, 2026
  7. changed the title [-]fix(roadmap): intake keeps the fields and milestone a person set on a card added during its planning[/-] [+]fix(roadmap): intake keeps the fields a person set on a card added during its planning[/+] on Oct 23, 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

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions