Skip to content

fix(roadmap): intake's refine hook is deleted, and the cross-job rule alone makes refine due in the round intake places a p0 item #1540

Closed

Description

@dan-petty

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

This section supersedes any text below that conflicts with it.

Decisions

  • Decision D18 (owner, 2026-10-17): "intake's refine hook is deleted (fix(roadmap): intake's refine hook is deleted, and the cross-job rule alone makes refine due in the round intake places a p0 item #1540); fix(roadmap): intake keeps the fields a person set on a card added during its planning #1404 is re-scoped to its card-fields criterion."
  • Decision D1 (owner, 2026-10-17): "chore(service): the roadmap service stays at 0 replicas, and its development is blocked, while its machine account is suspended #1562 holds the roadmap Service's deployment only; Service code is built, tested offline and merged at 0 replicas (replicas: 0, its test, and the no-scale/no-restart/no-secret-push rules stay)." This item needs no Service and no live check. The hook also runs in a person's devops roadmap intake --confirm and devops roadmap run, and every criterion is offline.
  • The cross-job rule is the only same-round refine trigger after intake, as one predicate in run.py. Intake makes refine due in the same round when it placed an item at Priority P0 (CONST_ROADMAP_CRITICAL_PRIORITY or CONST_ROADMAP_P0_PRIORITY, the check today's rule makes at run.py:440). Reason: every critical fix is such an item. CONTEXT.md:83-84 defines a critical fix as a P0 item that fixes a defect, a security advisory or a regression. So it makes refine due through its Priority whether or not intake adds its type label, and the run help's promise of refine after "an intake that placed a critical fix or a P0 item" (help.py:1203-1204) holds without a label check.
  • The predicate drops today's label check (run.py:441) and the hook's label-only trigger. A non-P0 issue labelled type/bug or type/security no longer makes refine due in the same round. That covers both an issue intake labels and places in the backlog and one that keeps a milestone a person set or an unfinished item's milestone (intake.py:945-950). Reason: neither is a critical fix, and making refine due on each such placement would queue more calls on the model lane, which answers one call at a time. Refine still reaches the item on its hourly interval (run.py:694), nearest place first.
  • The predicate skips a candidate that apply_intake reports in IntakeApplied.finished, as the hook does today (fix(roadmap): intake places an issue whose board card is archived by restoring the card, instead of failing every round #1403). Reason: intake writes nothing to that card, so it is not a new placement. This closes the gap that docs/agent/tasks/task-1403-intake-restores-archived-card.md:38 left open, where placed_critical_or_p0 came from the plan before any write.
  • refine.refine_item, RefineOutcome and the never-set JobOutcome.critical_fix_or_p0_items are deleted too. Reason: the intake wrapper is the only caller of refine_item in src/, and critical_fix_or_p0_items is never set anywhere, so both are dead code once the hook goes.
  • No help text changes. Reason: the intake help never described the hook, and the run help stays true under the new predicate. The pull request title tells users the behaviour changed.

Scope

Delivery

  1. One pull request, size S: fix(roadmap): delete intake's refine hook; the cross-job rule is the one same-round refine trigger. It closes fix(roadmap): intake's refine hook is deleted, and the cross-job rule alone makes refine due in the round intake places a p0 item #1540.

Acceptance criteria
The body's first criterion stands: an in-memory store test in which an intake that places a P0 item makes no refine call, and the same round's refine row is due through the cross-job rule. The body's other two criteria are replaced by these:

  • tests/test_roadmap_run.py, on the in-memory store, covers three cases. First, an intake that places a P0-Critical issue already labelled type/bug, so intake adds no type label, makes refine due in the same round. Second, an intake that places a P2-Medium issue labelled type/bug does not, whether it goes to the backlog or keeps a milestone a person set. Third, an intake whose only P0 placement is a card reported in IntakeApplied.finished does not.
  • git grep -nE "_maybe_refine_intake|_should_refine_on_intake|refine_hook|critical_fix_or_p0_items|RefineOutcome|def refine_item" -- src/ returns nothing, apply_intake takes no refine argument, and src/devops_cli/roadmap/run.py no longer reads CONST_ROADMAP_CRITICAL_FIX_LABELS.
  • The hook tests at tests/test_roadmap_refine.py:625 and :651 are deleted, because the run tests above cover their cases. tests/test_roadmap_refine.py:1071 is deleted with the hook whose logging it tests. A failed refine in a run stays covered by test_a_failed_item_fails_the_refine_job_of_a_run_without_its_model_text (tests/test_roadmap_refine.py:1028). tests/test_roadmap_intake.py:1876 drops refine=. The tests at tests/test_roadmap_refine.py:370 and :608 call plan_refine and apply_refine instead of refine_item.
  • Each task file that describes the hook or the old predicate as current says fix(roadmap): intake's refine hook is deleted, and the cross-job rule alone makes refine due in the round intake places a p0 item #1540 changed it: docs/agent/tasks/task-744-item-refinement-to-ready.md:22 and :37, task-1363-refine-structured-output.md:21 and :30, task-1403-intake-restores-archived-card.md:15, :24, :33 and :38, and task-1400-graphql-refusal-pauses-service.md:75.
  • devops roadmap intake --confirm on its own no longer refines. devops roadmap run makes refine due in the same round instead when intake places a P0 item. A non-P0 bug or security issue no longer makes refine due in the same round.

Current references (main 3dd7fa6)

  • src/devops_cli/roadmap/intake.py:1382-1389 _should_refine_on_intake; :1392-1396 the refine_item wrapper; :1399-1413 _maybe_refine_intake, which swallows every error at :1412-1413; :1416-1431 _apply_decision; :1441-1466 apply_intake, with refine= at :1445 and the default hook at :1450; :1615 the export.
  • src/devops_cli/roadmap/intake.py:1016-1028 _added_labels adds a type label only when the issue has none; :939-955 _placement, which keeps a person-set or resumed milestone at :945-950.
  • CONTEXT.md:83-84 and src/devops_cli/config/constants.py:2347-2350 define a critical fix as a P0 item.
  • src/devops_cli/roadmap/run.py:115-126 JobOutcome; :392-400 _refine_due; :424-432 _refine_cross_job; :435-444 _places_critical_or_p0, with the priority check at :440 and the label check at :441; :480 the intake adapter's outcome; :692-700 the refine row, with its hourly interval at :694; :876-879 the cross-job check inside one lane's round; :1035-1042 the two Service lanes.
  • src/devops_cli/roadmap/refine.py:162-164 RefineOutcome; :1085-1109 refine_item with source="." at :1089; :205-215 inspect_checkout raises on an origin mismatch. Dockerfile:50 sets a working directory that is not a checkout.
  • src/devops_cli/commands/roadmap.py:418: intake --confirm calls apply_intake.
  • src/devops_cli/lang/en/help.py:1150-1163 is the intake help, and :1198-1205 is the run help.
  • src/devops_cli/config/defaults.py:840 sets the refine limit of 3.

Dependencies and order


Found by the roadmap Service recompute audit requested by the owner on 2026-10-10 (#1539).

Problem

Checked at release/v0.2.33.

  • When intake places a P0 or critical item, it calls a refine hook for that item (src/devops_cli/roadmap/intake.py:1376-1412). The hook is refine_item (src/devops_cli/roadmap/refine.py:1085-1109), called with its default source=".".
  • In the Service, . is the image's working directory, not a checkout of the repository. The intake row has no clone (needs_clone is false; src/devops_cli/roadmap/run.py:150). The Service's logs on 2026-10-08 and 2026-10-09 show the hook failing every time with "Checkout at . origin (None) does not match". _maybe_refine_intake catches the error and logs a warning (src/devops_cli/roadmap/intake.py:1388-1390), so nothing reports it.
  • The hook is redundant in the Service. When intake places a P0 or critical item, the round's cross-job rule makes refine due in the same round (_refine_cross_job, src/devops_cli/roadmap/run.py), and refine runs on its own clone.

Proposed design

  • Delete _maybe_refine_intake, _should_refine_on_intake, intake's refine_item wrapper and the refine= parameter (src/devops_cli/roadmap/intake.py:1359-1412). Refine of a newly placed P0 or critical item comes only from the cross-job rule.
  • devops roadmap intake --confirm run on its own no longer refines in the same command. devops roadmap run and the Service still do, through the cross-job rule. The help text and RELEASE_CYCLE.md say so.

Acceptance criteria

  • A test on the in-memory store: an intake run that places a P0 item makes no refine call, and the same round's refine row is due through the cross-job rule (tests/test_roadmap_run.py).
  • git grep -n "_maybe_refine_intake\|refine_hook" -- src/ returns nothing.

Feasibility

Fits one pull request: one deletion in src/devops_cli/roadmap/intake.py, its tests, and docs. No new code.

Related: #1534 (intake's triage lane), #1535 (engine), #1539.

Activity

  1. added
    type/bug
    source/agent
    scope/roadmap
    on Oct 10, 2026
  2. dan-petty-bot commented on Oct 10, 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. The hook fails every Service run but the error is caught and the cross-job rule still refines correctly, so it is noise and wasted work rather than a functional break.
    • Value: Medium. Removes per-run error noise and redundant code, but the actual refine outcome is unchanged because the cross-job rule already covers it.
    • Effort: Low. The candidate states it is one deletion in intake.py plus its tests and docs, with no new code.
  3. added
    status/blocked
    on Oct 11, 2026
  4. dan-petty commented on Oct 11, 2026

    @dan-petty
    OwnerAuthor

    Blocked by #1562: the roadmap Service's machine account is suspended, and the Service is held at 0 replicas. This item develops the Service or can only be checked on it, so it waits until the account is reinstated or the jobs act as a GitHub App.


    Generated by Claude Code

  5. changed the title [-]fix(roadmap): intake's refine hook is deleted, because it fails on every Service run and the same round's cross-job refine already refines a newly placed p0 or critical item[/-] [+]fix(roadmap): intake's refine hook is deleted, and the cross-job rule alone makes refine due in the round intake places a p0 item[/+] on Oct 18, 2026
  6. added a commit that references this issue on Oct 25, 2026
    90fc109
  7. removed
    status/blocked
    on Oct 30, 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/roadmapsource/agenttype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions