Skip to content

fix(roadmap): a job posts no comment that repeats a recent one - #4978

Merged
dan-petty merged 4 commits into
mainfrom
fix/4793-no-repeat-job-comment
Nov 12, 2026
Merged

dan-petty merged 4 commits into
mainfrom
fix/4793-no-repeat-job-comment

Conversation

@dan-petty

@dan-petty dan-petty commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

A roadmap job posted the same comment again when a later round found the same facts: refine at each new commit, and the implement checks with the same stop and clear.

Before a store posts a comment with a job marker, it reads the comments of the issue. It refuses the comment when the same text, with commits, digests and run IDs left out, is in the trailing run of that job's comments and is less than 7 days old. A person's reply or another job's comment ends the run. A counter counts each refusal by row.

After a refused refine comment, refine records the round time in refine.repeated_at. The wait starts at the later of that time and refine's last comment, so one change of a cause gives one new look.

tests/support/write_stops.py stops a job after each write and runs it again (ADR 0021).

Closes #4793

Change: openspec/changes/archive/2026-11-12-4793-no-repeat-job-comment/

A store reads the comments of an issue before it posts a comment of a
roadmap job. It refuses the comment when the same text, with commits,
digests and run IDs left out, is in the trailing run of that job's
comments and is less than 7 days old. Each refusal counts in
devops_cli_roadmap_comment_repeats_refused_total by row.

The implement marker joins CONST_ROADMAP_JOB_COMMENT_MARKERS, and
tests/support/write_stops.py stops a job after each write and runs it
again (ADR 0021).
@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 12, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Measurement: the guard replayed on real comments

I replayed the comments of devops-cli through the shipped comment_repeat functions, oldest first for each item. A refused comment does not join the comments that later checks read, as on GitHub. Data: 7,272 comments changed since 2026-10-12 (devops gh api --paginate repos/dan-petty/devops-cli/issues/comments?since=2026-10-12T00:00:00Z), and the 142 comments of dotfiles #2.

Rule All items: refused of 4,262 job comments Items Open items of the 2026-11-11 census: refused of 1,331 Items
Raw text, any comment of the job in 7 days 1 1 0 0
Fingerprint, any comment of the job in 7 days (the plan of the issue) 176 (116 implement, 60 refine) 66 29 (28 refine, 1 implement) 20
Fingerprint, trailing run of the marker, 7 days (this PR) 128 (115 implement, 13 refine) 27 9 (8 refine, 1 implement) 6

dotfiles #2: the guard refuses 46 of the 137 implement comments. The other stop comments quote log lines that differ from run to run, so their fingerprints differ.

The 20 comments on open items that only the plan's rule refuses follow a person's reply (12) or a stage comment (8). This PR posts them on purpose: the job answers the reply, and retry_asked, replies_after_marker and _stage_return read the comments after the job's last comment. If the answer did not post, refine would read the old reply again on each round.

Raw text finds almost no repeat: each refine comment names the commit it read, and each clear names two image digests. The fingerprint leaves these out.

Effect on the success rate of the jobs

The guard changes no Status and no job result, so it does not change the success rate of a job directly. It removes about 4 comments a day (128 in 31 days) that a person had to read, and it stops refine from reading an implement comment as a person's reply (the implement marker is now a job marker): 56 implement comments sit on open items.

Live steps

None. The change adds no setting and no ConfigMap key. The Service takes it with the next release, and devops_cli_roadmap_comment_repeats_refused_total shows a series after the first refusal.

The fail-to-pass replay runs the tests of the branch on the base source.
The fake store imports the repeat guard only for a job comment, so the
replay loads it, and the unchanged refine and stage tests stay as on main.
@dan-petty
dan-petty force-pushed the fix/4793-no-repeat-job-comment branch from 5d90e2c to 44476a2 Compare November 12, 2026 08:46
@dan-petty

Copy link
Copy Markdown
Owner Author

Fail-to-pass

uv run devops ci fail-to-pass --base origin/main at 44476a2 exits 0: 17 tests fail on base and pass on this branch (273 pass on base, 42 errored on base).

Tests that fail on base:

  • tests/roadmap/stage/test_roadmap_stage_write_stops.py::test_a_stop_after_each_write_of_a_dependency_return_posts_no_second_comment
  • tests/roadmap/refine/test_roadmap_refine_write_stops.py: the two cases of test_a_stop_after_each_write_of_a_result_leaves_no_second_comment and test_a_round_that_asks_the_same_question_again_posts_no_second_comment
  • tests/roadmap/stores/test_roadmap_store_contract.py::test_a_job_comment_that_repeats_the_jobs_last_one_is_refused[memory]
  • tests/roadmap/test_roadmap_stop_clear.py::test_a_later_pass_lists_no_comments_of_a_stop_whose_issue_did_not_change (the read of the comments before the clear comment)
  • tests/roadmap/intake/test_roadmap_intake_github_requests.py::test_a_placement_sends_the_same_few_requests_whatever_the_number_of_items (both cases: 12 requests, not 11)
  • 7 tests of tests/roadmap/test_roadmap_dry_runs.py (the plan lists the read of the comments and the condition of the post)
  • 3 tests of tests/roadmap/stores/test_roadmap_store_contract.py that build the GitHub world with the new clock argument

The 42 errors on base are the collection of tests/roadmap/stores/test_comment_repeat.py, which imports the new module, and the setup of the [github] contract cases, which pass the new clock argument.

The first CI run of the replay could not run: the fake store imported the new module at load time. The fake now imports it only for a comment of a job, as tests/support/roadmap_alternatives.py does, and the stop-after-each-write tests are in files of their own, so the unchanged refine and stage tests stay as on main.

A refused refine comment kept the start of the wait at refine's last
comment. A change of a cited path or a named issue after that comment
then gave a new model call in each round for up to 7 days.

RoadmapStore.comment now returns whether it posted. When the store
refuses a comment of refine, refine records the time of the round in
refine.repeated_at, and the wait starts at the later of that time and
refine's last comment. The dry-run plan lists the record.
@dan-petty

Copy link
Copy Markdown
Owner Author

Review findings

1. Blocking, src/devops_cli/roadmap/stores/comment_repeat.py: a refused refine repeat makes refine call the model again in each round. Confirmed and fixed in c55673f.

  • Check: A probe test ran 6 refine rounds after one commit that changed the cited path. On the branch, the rounds made 6 model calls and posted 1 comment. On main, they made 1 model call and posted 2 comments. The new test in tests/roadmap/refine/test_roadmap_refine_cited_paths.py also failed on the branch with assert ([3, 3], 1) == ([1, 1], 1), for both blocked and suspected-block. The cause: _wait_state takes the start of the wait from refine's last comment on GitHub, and a refused comment does not move it.
  • Fix: RoadmapStore.comment now returns whether it posted. After a refused refine comment, _apply_refined writes the time of the round to refine.repeated_at. _wait_start starts the wait at the later of that time and refine's last comment, and _cited_code_changed and _person_wait_over use that start. Refine writes the mark after the refusal, not with the marks before the comment. So if the Service stops between the marks and the comment, the next round looks at the item again and posts the comment. The dry-run plan lists the conditional read and PATCH (condition repeat_refused). docs/roadmap/refine.md, docs/ROADMAP_WORKFLOW.md and the OpenSpec change (requirement "A refused refine repeat starts the wait at its round") describe the mark.
  • Tests: For each of two changes of a cited path, the test runs 3 rounds and expects 1 model call: [1, 1], with 1 refine comment. The store contract test expects comment to return [True, False, True] for a post, a refused repeat and a changed fact. A dry-run test expects the read and the PATCH of the record, both in a round and for --item. With the fix, the probe gives 1 model call after the change, the same count as main. Its comment count is now 1, because the store refuses the repeat.
  • Fail-to-pass: https://github.com/dan-petty/devops-cli/actions/runs/43196985072/job/131110342555 (success).

One part not done: the wait requirement in openspec/specs/roadmap-refine/spec.md ("The exits of a wait need no comment read") still names only refine.commented_at. Open PR #4981 removes that file and moves the requirement to roadmap-refine/waits/spec.md, so a change there would conflict. The new requirement is in roadmap-job-comments. After #4981 merges, a follow-up can add refine.repeated_at to the waits spec.

Live steps: none. The mark is a new job-record key, and the change adds no ConfigMap or Secret setting.

@dan-petty
dan-petty merged commit fff903a into main Nov 12, 2026
33 checks passed
@dan-petty
dan-petty deleted the fix/4793-no-repeat-job-comment branch November 12, 2026 12:05
dan-petty pushed a commit that referenced this pull request Nov 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.118.0](v0.117.2...v0.118.0)
(2026-11-12)


### Features

* **ci:** devops ci stops its rows when timeout ends it
([#5031](#5031))
([1fa4e9c](1fa4e9c))
* **roadmap:** keep the stage gate problems as a list with a code
([#5022](#5022))
([5819627](5819627))
* **roadmap:** log one result line for each roadmap job attempt
([#4966](#4966))
([2b6fe3f](2b6fe3f))
* **telemetry:** record each CLI usage error by name and kind
([#4973](#4973))
([a179fd9](a179fd9))


### Bug Fixes

* **ai:** chat loads each persona prompt and challenger gets tools
([#5037](#5037))
([c40b0ad](c40b0ad))
* **ai:** keep the HTTP status of a Claude reply after retries
([#4976](#4976))
([5bf9466](5bf9466))
* **deps:** keep Renovate uv bumps green and groups on Monday
([#4987](#4987))
([b19e153](b19e153))
* **k8s:** raise the limits that 7 d of use shows are too low
([#5030](#5030))
([028c62b](028c62b))
* **roadmap:** a job posts no comment that repeats a recent one
([#4978](#4978))
([fff903a](fff903a))
* **service:** alert when GitHub cannot deliver a webhook
([#5045](#5045))
([2bfbfcb](2bfbfcb))
* **service:** delete the stream route that sends canned verified text
([#5038](#5038))
([e9d51b5](e9d51b5))
* **telemetry:** keep one upstream status series per service
([#4986](#4986))
([3e4ca56](3e4ca56))
* **tests:** remove the runner variable in the test floor
([#4988](#4988))
([093aa61](093aa61))


### Performance Improvements

* **ai:** make the ast graph walk and call search faster
([#5039](#5039))
([3b25cc6](3b25cc6)),
closes [#4662](#4662)
* **ci:** build the devcontainer only on its own inputs
([#4977](#4977))
([c5b15ac](c5b15ac))
* **ci:** test each merge once, on the push to main
([#5043](#5043))
([c6992b1](c6992b1))
* **tests:** remove fixed waste in six slow tests
([#4995](#4995))
([1c7044e](1c7044e))


### Code Refactoring

* **ai:** delete devops ai pipeline and persona leftovers
([#5044](#5044))
([d5fefde](d5fefde)),
closes [#4827](#4827)
* **openspec:** split big capabilities into nested ones
([#4981](#4981))
([dfb09bd](dfb09bd))
* **pr:** devops pr update acts only on a failed check
([#4990](#4990))
([aa4fa1a](aa4fa1a))

---
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): a job posts no comment that repeats a recent one

1 participant