Skip to content

fix(roadmap): refine skips an item that changed during the write - #5392

Merged
dan-petty merged 3 commits into
mainfrom
fix/5299-refine-skips-an-item-that-changed
Nov 13, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/5299-refine-skips-an-item-that-changed

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

A refine round in the Service failed when a person or another job changed an item between the read and the write. The store refused the write with RoadmapItemChangedError (ADR 0002), the round counted a failed write with class=head_moved, and the Service logged an ERROR with a traceback for a normal race.

RefineWriter.settle now catches RoadmapItemChangedError. It logs one INFO line, writes no result line, and counts the item neither as written nor as failed. The body check of _apply_refined gives the same result. Before, it logged the next step of a body that refine did not write. The next round reads the item again. A write that fails for another reason stays a failure. devops roadmap refine --confirm does not change.

A changed item writes no result line, as docs/roadmap/job-success.md says for alternatives, not skipped success=true.

Closes #5299

Change: openspec/changes/archive/2026-11-13-5299-refine-skips-an-item-that-changed/

A refine round in the Service failed when a person or another job
changed an item between the read and the write. The store refused the
write with RoadmapItemChangedError (ADR 0002), the round counted the
item as a failed write, and the Service logged an ERROR with a
traceback for a normal event.

RefineWriter.settle now catches RoadmapItemChangedError before the
other write errors. It logs one INFO line, and does not count the item
as written or as failed. The body check of _apply_refined gives the
same result: before, the round logged the next step of a body that
refine did not write and counted the item as written. The next round
reads the item again. A write that fails for another reason stays a
failure.

A changed item writes no job result line, as an alternatives check
whose body changed writes none (docs/roadmap/job-success.md), so the
job grade counts the race neither as a success nor as a failure. The
issue asked for result=skipped success=true on the claim that intake
counts skipped as intended; intake does not, and #5166 plans no line
for intake too. The CLI path (apply_refine) does not change.
The skip line said that refine wrote nothing, but refine can file the
deferred parts of an item before the store refuses the main write. The
line now says that refine did not write the item. The scenarios of the
spec use the form of the other scenarios.
Move the change folder to the archive and merge its requirements into the roadmap-refine/writes spec.
@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 13, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Evidence and checks for this pull request.

Premise (Loki, {namespace="devops", service_name="roadmap-service"}, 48 hours). Refine logged result=error class=head_moved and then a RoadmapRunError traceback for #5213 (0.124.0), #5100 (0.120.0) and one item of another repository (0.126.0). The body pre-check logged the next step as the result for an item that refine did not write.

Fail-to-pass (uv run devops ci fail-to-pass --base origin/main, head 1c42932):

failed on base: test_only_a_write_that_the_change_of_the_item_refuses_is_a_skip[item-changed] (RoadmapRefineError: refine could not write 1 item(s), and went on: #2)
passed on base: test_only_a_write_that_the_change_of_the_item_refuses_is_a_skip[other-failure]
failed on base: test_an_item_that_a_person_changes_during_the_round_is_skipped_and_read_again (RoadmapRefineError: refine could not write 1 item(s), and went on: #2)
failed on base: test_an_item_whose_body_a_person_edits_during_the_round_is_skipped_not_written (AssertionError: assert ('New', [{'re...3, failed=0.') == ('New', [], '...2, failed=0.'))
3 failed on base (3 failed and 5 passed in tests/roadmap/refine/test_roadmap_refine_round.py; 0 errored).

Local checks.

  • uv run devops ci --check --only lint,format,domain,docs,openspec,typecheck,swallowed-failures,test-tree,constructs: all pass (mypy strict).
  • uv run devops ci test tests/roadmap/refine tests/lang tests/roadmap/test_job_result.py: 454 passed.
  • uv run devops ci test on the job grade, Service run, failure and status sync tests: 218 passed.

Render diff. The branch changes no path under k8s/. No manifest or ConfigMap changes, and nothing restarts.

Acceptance. The issue asks for result=skipped class=head_moved success=true, because it says that intake counts skipped as a success. SUCCESS_RESULTS of intake holds only placed and duplicate. The project rule in docs/roadmap/job-success.md is that a change since the read writes no line, and #5166 plans the same for intake. So this change writes no result line, which gives the 12 of 15 that the issue expects. The design note is on #5299.

Release. A release is needed. The roadmap Service runs this code from the released image, so the fix reaches the Service after release-please makes the patch release and Argo CD rolls the new image. No manual cluster step.

Known limits, not changed here. When a race stops the main write after refine filed the deferred parts of an item, the next round can file them again, as after any failed write before. Intake still logs this race as skipped success=false (#5166).

@dan-petty
dan-petty marked this pull request as ready for review November 13, 2026 09:25
@dan-petty
dan-petty merged commit a863dda into main Nov 13, 2026
24 checks passed
@dan-petty
dan-petty deleted the fix/5299-refine-skips-an-item-that-changed branch November 13, 2026 11:36
dan-petty pushed a commit that referenced this pull request Nov 13, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.127.1](v0.127.0...v0.127.1)
(2026-11-13)


### Bug Fixes

* **ci:** alarm at 360 s, one P0 issue, shards by recorded time
([#5377](#5377))
([2abd6ff](2abd6ff))
* **github:** read the plan diff and the release files from the merge
base ([#5401](#5401))
([c54e14c](c54e14c))
* **infra:** turn off the Ansible color of every playbook run
([#5381](#5381))
([5bafb1a](5bafb1a)),
closes [#5352](#5352)
* install-tools --check passes an older openspec binary
([#5355](#5355))
([625c89d](625c89d))
* **k8s:** allow only the Ingress origins in Open WebUI
([#5357](#5357))
([fdab229](fdab229))
* **pr:** count only the latest run of each check
([#5393](#5393))
([634dc91](634dc91))
* **review:** drop the fixed gateway URL of the review dry run
([#5399](#5399))
([0666d3d](0666d3d))
* **review:** review a pull request at the merge base of its base branch
([#5387](#5387))
([351ba2a](351ba2a)),
closes [#5346](#5346)
* **roadmap:** end fix-plan at a time budget with a result line
([#5380](#5380))
([20468f4](20468f4)),
closes [#5363](#5363)
* **roadmap:** refine skips an item that changed during the write
([#5392](#5392))
([a863dda](a863dda))
* **roadmap:** stage writes RENAMED and REMOVED spec deltas
([#5367](#5367))
([4abbbd2](4abbbd2))
* **roadmap:** title the delivery by the summary of its plan
([#5376](#5376))
([10e1069](10e1069))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(roadmap): refine skips an item that changed during the write

1 participant