Skip to content

fix(roadmap): intake retries a changed item; schedule errors show #4042

Closed

Description

@dan-petty

Problem

Two faults in the intake and schedule code.

  1. RoadmapItemChangedError is a GitHubOperationError. apply_intake (intake.py) catches GitHubOperationError for each candidate and collects it as a failed placement (_failed_placement).
    • The round then fails, the failure counts toward the suspension, and it is logged at ERROR.
    • The same error means "nothing was written" in claim.py (service_claim returns False).
    • The candidate stays in IntakeRecord.waiting and is decided again. So no data is lost, but the round is marked as failed.
    • A failed placement also stops the refine_due stamp of a P0 item that the same round placed. _run_intake_adapter calls raise_for_failed_placements before _places_critical_or_p0.
  2. _read_schedule (run.py) reads a corrupt schedule.json as empty. It also skips a bad timestamp and a non-string value. Every row with first_run_due then becomes due at once, with model spend and no error.

Expected

  1. In apply_intake, catch RoadmapItemChangedError before GitHubOperationError. Log one INFO line that names the candidate. Do not add a PlacementFailure. The candidate stays in the record and is decided again.
  2. In _run_intake_adapter, compute placed_p0 and write the refine_due stamp before raise_for_failed_placements. Stamp only for a P0 decision whose placement did not fail.
  3. _read_schedule raises RoadmapRunError, naming the file. It does so in four cases:
    • an unreadable file;
    • a file that is not a JSON object;
    • a value that is not a string;
    • a bad timestamp.
      Use the message style of read_intake_record (MESSAGES.roadmap.run_intake_record_unreadable).
      The error reaches the log through the lane worker. server/service.py logs it at ERROR and counts result=error.
      No new alert is added. fix(telemetry): count a round that fails before its first row #3666 counts a round that fails before its first row.

Not in this issue: the failure count and class of a placement. That belongs to the issue #4061.

Acceptance criteria

  • uv run pytest tests/roadmap/intake/test_roadmap_intake_item_changed.py -k item_changed - set_field raises RoadmapItemChangedError for candidate 2 of 3. The others are placed, the round ends with no error, and candidate 2 is still in the record.
  • uv run pytest tests/roadmap/intake/test_roadmap_intake_item_changed.py -k refine_due - a P0 placed in a round with one real placement failure still stamps refine_due before the round raises.
  • uv run pytest tests/roadmap/test_roadmap_schedule_unreadable.py - a corrupt file, a file that is not an object and a bad timestamp each raise an error that names the file. run_due_jobs runs no row.

Every command above fails on the unchanged code. The pull request cites the fail-to-pass run (devops ci fail-to-pass --base <ref>).

Feasibility

I read these files at origin/main: intake.py (apply_intake, _failed_placement, raise_for_failed_placements, IntakeRecord.after), run.py (_run_intake_adapter, _places_critical_or_p0, _read_schedule, run_due_jobs), claim.py (service_claim) and exceptions/roadmap.py. I did not run the code.

No live event is cited as evidence. The case needs a person or another job to change an item between the read and the write. The code allows this.

Existing tool considered

read_state_record-style errors, IntakeRecord and the catch in claim.py. No library is needed.

Cost

Build: about 40k tokens and 2 h (3 changes, 5 tests). Keep: about 2k tokens per quarter. Fix: about 10k tokens and 0.5 h.

Related

Part of #3027. #3666 (round that fails before its first row). Order: this issue changes run.py and intake.py before the issues that add failure classes.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 7, 2026
  2. dan-petty commented on Nov 7, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. Two correctness bugs cause false round failures and silent schedule corruption, but the system still runs.
    • Value: Medium. Users see spurious failures and lose schedule data silently, which erodes trust in the intake and schedule pipeline.
    • Effort: Medium. Three code changes across two files plus five tests, estimated at about 2 hours.
    • Related: fix(roadmap): one failed item does not suspend the stage row #3493, which asks for a different change. Both handle intake failure in run.py and intake.py, but 3493 fixes the suspension count while this candidate fixes error-type ordering and schedule-read validation.
  3. added
    priority/p2-medium
    on Nov 7, 2026
  4. added
    owner/agent
    status/in-review
    and removed
    status/new
    on Nov 7, 2026
  5. removed
    status/in-review
    owner/agent
    on Nov 8, 2026
  6. devops-cli-service commented on Nov 8, 2026

    @devops-cli-service
    Contributor
  7. devops-cli-service commented on Nov 8, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-08 03:31 UTC

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

    effort/mediumpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions