Skip to content

fix(roadmap): refine posts a short event only when its result changes - #6353

Merged
dan-petty merged 13 commits into
mainfrom
fix/6196-refine-comment-only-on-change
Nov 19, 2026
Merged

dan-petty merged 13 commits into
mainfrom
fix/6196-refine-comment-only-on-change

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Refine wrote its result twice: in its section of the body and again in its comment, with the commit and the Status. A reply let the same comment post again.

Now the section holds the whole result, also the sorted watched files and the new items of deferred parts. The comment is one event line that names the next step and the parts of the section. It posts only when the next step, the section without its checked-at line or the item of the frame changed. A round with no comment records refine.repeated_at, and the wait starts there; the model still reads each reply since refine's last comment. The refine frame names the section in place of the question, refine.frame records the item of the frame, and the repeat guard keeps the question hash.

Closes #6196

Change: openspec/changes/archive/2026-11-19-6196-refine-comment-only-on-change/

@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 19, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Test record

Head: 86f22e869e14 on origin/main 5e6822d0517d.

Check Result
uv run devops ci test on tests/roadmap/refine/, tests/roadmap/stores/ and the tests of owner_question, request_plan, repair, inbox, alternatives, trust, job_result, the stage and implement owner questions 1227 passed
uv run devops ci test tests/invariants/test_roadmap_workflow_doc.py and the tests that read docs/roadmap/refine.md and docs/roadmap/inbox.md 125 passed
uv run mypy on the 6 changed source files no issues
uv run devops ci --check --only lint,format,docs,constructs,openspec,test-settings,test-tree,startup-imports,swallowed-failures all rows pass
uv run devops docs generate --check up to date

Fail-to-pass

uv run devops ci fail-to-pass --base origin/main exited 0:

46 failed on base (46 failed and 193 passed in tests/roadmap/refine/test_roadmap_refine_alternatives_gate.py, tests/roadmap/refine/test_roadmap_refine_cited_paths.py, tests/roadmap/refine/test_roadmap_refine_covers_check.py, tests/roadmap/refine/test_roadmap_refine_deferred.py, tests/roadmap/refine/test_roadmap_refine_event_comment.py, tests/roadmap/refine/test_roadmap_refine_job_failure.py, tests/roadmap/refine/test_roadmap_refine_next_step.py, tests/roadmap/refine/test_roadmap_refine_owner_question.py, tests/roadmap/refine/test_roadmap_refine_selection.py, tests/roadmap/refine/test_roadmap_refine_stage_return.py, tests/roadmap/refine/test_roadmap_refine_waits.py, tests/roadmap/stores/test_comment_repeat.py, tests/roadmap/test_owner_question.py, tests/roadmap/test_roadmap_dry_runs.py, tests/roadmap/test_roadmap_repair.py; 0 errored).

The changed tests failed on the base for the expected causes: the old comment held the list, the commit and the Status, render_proposal_section had no watched files and no new items, an unchanged round posted again, and the store refused the frame of a new question as a repeat.

Notes

@dan-petty

Copy link
Copy Markdown
Owner Author

Test record (update)

Head: aa46a0942520 on origin/main 5e6822d0517d.

This push fixes the two blocking review findings and one more scenario of the same type:

  • roadmap-refine/proposal, scenario "A decision that AGENTS.md reserves for a person": the Open questions of the refine section hold the question, and the comment names Open questions.
  • roadmap-refine/alternatives, scenario "No reply yet": the Open questions of the refine section hold the adopt-or-keep question, and the step comment names Open questions.
  • roadmap-refine/writes, scenario "A comment point with a code block": the next step holds the point. The comment holds no point now. OpenSpec 1.14.3 refuses a MODIFIED block that drops a scenario name, so the scenario keeps its name.
  • roadmap-refine/waits, scenario "A wait on a person that names an issue and a path": an open question of the refine section names the issue and the path.
  • test_a_question_for_a_person_waits_on_a_person_with_no_investigation now also checks the section and the comment.
Check Result
uv run devops ci test on tests/roadmap/refine/, tests/roadmap/stores/test_comment_repeat.py, tests/roadmap/test_owner_question.py, tests/roadmap/test_roadmap_dry_runs.py and tests/roadmap/test_roadmap_repair.py 619 passed
uv run mypy on the 6 changed source files no issues
uv run devops ci --check --only lint,format,docs,constructs,openspec,test-settings,test-tree,startup-imports,swallowed-failures all rows pass

Fail-to-pass

uv run devops ci fail-to-pass --base origin/main exited 0:

47 failed on base (47 failed and 199 passed in tests/roadmap/refine/test_roadmap_refine_alternatives_gate.py, tests/roadmap/refine/test_roadmap_refine_cited_paths.py, tests/roadmap/refine/test_roadmap_refine_covers_check.py, tests/roadmap/refine/test_roadmap_refine_decisions.py, tests/roadmap/refine/test_roadmap_refine_deferred.py, tests/roadmap/refine/test_roadmap_refine_event_comment.py, tests/roadmap/refine/test_roadmap_refine_job_failure.py, tests/roadmap/refine/test_roadmap_refine_next_step.py, tests/roadmap/refine/test_roadmap_refine_owner_question.py, tests/roadmap/refine/test_roadmap_refine_selection.py, tests/roadmap/refine/test_roadmap_refine_stage_return.py, tests/roadmap/refine/test_roadmap_refine_waits.py, tests/roadmap/stores/test_comment_repeat.py, tests/roadmap/test_owner_question.py, tests/roadmap/test_roadmap_dry_runs.py, tests/roadmap/test_roadmap_repair.py; 0 errored).

The new failure on base is test_roadmap_refine_decisions::test_a_question_for_a_person_waits_on_a_person_with_no_investigation: on base the comment holds the question text and does not name Open questions.

No live step is necessary.

…two questions

A round with the same result reads the comments, and a person replies before the
round writes. The test expects the record to hold the time of the read, so the
reply ends the wait. The frame of two open questions names the first point of
Open questions, which is the question that its hash covers.
…names its question

refine.repeated_at holds the time at which the round read the comments, not the
time of the write, so a reply made while the round runs ends the wait. The frame
names the first point of Open questions, which is the one question that it asks.
The list of parts uses the texts of MESSAGES, the wait text reads the parts of
the section through section_text, and the module docstring wraps at 100 columns.
…ame the first question

The waits spec starts the wait of a cited path and of a named cause at the later
of refine's last comment and refine.repeated_at, as the code does. A round with
no comment records the time of its read. The refine frame names the first point
of Open questions.
…of the wait

A reply between refine's last comment and a round with no comment ends no wait,
so the plan reads a cited path or a named issue when no reply follows the start
of the wait.
@dan-petty

Copy link
Copy Markdown
Owner Author

Second review of aa46a09: how each finding is handled

Head after the fixes: 67fdf10. The archive of the OpenSpec change stays the last commit.

  1. Blocking: the waits spec starts a wait at refine's last comment. Real. Fixed. The change adds MODIFIED blocks to roadmap-refine/waits for "A change to the code that a block cites ends the wait" and "The exits of a wait need no comment read". A path change and a named-issue close now count at or after the start of the wait, the later of refine's last comment and refine.repeated_at. The requirement "A new comment ends the saving" said "A reply since refine's last comment" and is also fixed. The new scenario "A cited path that changed before a round with no comment" uses test_each_change_of_a_cited_path_gives_one_new_look_when_the_look_finds_the_same_wait. The dry-run conditions still_waiting and person_waiting now say "no reply follows the start of the wait". The module docstring and the design and proposal of the change say the same. A fresh openspec archive of the edited change gives the same main specs (diff -r is empty), and openspec validate --all --strict passes 411 of 411.
  2. Minor: refine.repeated_at holds the time of the write. Real. Fixed, test first. RefinedItem.read_at holds the time just before store.comments_on, and apply records it for a round with no comment and for a repeat that the store refuses. The new test test_a_reply_made_while_a_round_with_no_comment_runs_ends_the_wait plans a round, adds a reply, then applies. It fails on aa46a09 and passes now. The same race remains for a round that posts its comment, because the reply is then older than refine's last comment. This was on the base before this PR, so it has its own issue: fix(roadmap): a reply made while a refine round posts its comment is lost #6371.
  3. Minor: the frame names the whole Open questions part, but it asks only the first question. Real. Fixed, test first. The frame asks one question, and its hash and its answer cover that question alone, so the frame now names "the first point of Open questions" (refine_frame_part). The other parts, such as Watched files, stay in the text. New test: test_the_frame_of_two_open_questions_names_the_first_one_that_it_asks. It fails on aa46a09 and passes now.
  4. Minor: _section_place builds the English list joiner in code. Real. Fixed. The words are now in refine_section_parts and refine_section_parts_separator. No open tool is a dependency (humanize and babel are not installed), and the text is one template. A command proves that the output did not change: _section_place gives the same four texts on aa46a09 and on the new head for 0, 1, 2 and 3 parts, for example See Dependencies and Watched files in the section Proposed design of the body.
  5. Minor: the module docstring of refine.py lost its wrap. Real. Fixed. The paragraphs wrap at 100 columns again. No new line is longer than 100.
  6. Earlier minor: _wait_parts is a copy of step_files.section_text. It still applied. Fixed. _wait_parts now calls section_text(section, _WAIT_PARTS), and _TEXT_TOKENS is gone. The wait-text tests (test_roadmap_refine_person_wait.py, test_roadmap_refine_recorded_wait.py) pass with the same refine.wait_refs.

Also fixed: the refine.repeated_at row of docs/ROADMAP_WORKFLOW.md and the text about the wait in docs/roadmap/refine.md. The owner rule holds: no comment repeats content of the body. The frame names a place only.

Test record

  • uv run devops ci --check --only lint,format,docs,constructs,openspec,test-settings,test-tree,startup-imports,swallowed-failures: all 9 pass.
  • uv run devops ci test tests/roadmap/refine tests/roadmap/test_owner_question.py tests/roadmap/test_roadmap_repair.py tests/roadmap/test_roadmap_dry_runs.py tests/roadmap/stores/test_comment_repeat.py tests/roadmap/test_roadmap_step_files.py: 634 passed.
  • uv run mypy src/devops_cli/roadmap/refine/refine.py src/devops_cli/lang/en/messages.py: no issues.

uv run devops ci fail-to-pass --base aa46a0942

  passed on base: tests.roadmap.refine.test_roadmap_refine_event_comment::test_no_line_of_the_section_is_in_the_comment_of_the_same_result[suspected-block]
  passed on base: tests.roadmap.refine.test_roadmap_refine_event_comment::test_no_line_of_the_section_is_in_the_comment_of_the_same_result[person]
  passed on base: tests.roadmap.refine.test_roadmap_refine_event_comment::test_no_line_of_the_section_is_in_the_comment_of_the_same_result[ready]
  passed on base: tests.roadmap.refine.test_roadmap_refine_event_comment::test_a_round_whose_next_step_changes_posts_one_event_with_no_commit_and_no_status
  failed on base: tests.roadmap.refine.test_roadmap_refine_event_comment::test_a_reply_made_while_a_round_with_no_comment_runs_ends_the_wait (AssertionError: assert ('2026-11-17T...irst reply.']) == ('2026-11-17T... the round.']))
  passed on base: tests.roadmap.refine.test_roadmap_refine_event_comment::test_a_round_whose_result_is_the_one_before_posts_no_comment_and_its_read_starts_the_wait
  passed on base: tests.roadmap.refine.test_roadmap_refine_event_comment::test_no_line_of_the_section_is_in_the_comment_of_the_same_result[split]
  failed on base: tests.roadmap.refine.test_roadmap_refine_event_comment::test_the_frame_of_two_open_questions_names_the_first_one_that_it_asks (AssertionError: assert ('**Owner que...son decides)') == ('**Owner que...son decides)'))
  passed on base: tests.roadmap.refine.test_roadmap_refine_event_comment::test_the_section_holds_the_watched_files_in_order_and_the_new_items_of_the_parts
  passed on base: tests.roadmap.refine.test_roadmap_refine_event_comment::test_an_answer_on_the_frame_of_an_older_item_resumes_the_linked_item_once
  passed on base: tests.roadmap.refine.test_roadmap_refine_event_comment::test_an_item_whose_frame_holder_closed_posts_the_frame_on_the_same_result
  passed on base: tests.roadmap.refine.test_roadmap_refine_event_comment::test_a_round_whose_section_changes_posts_the_event_again
  passed on base: tests.roadmap.refine.test_roadmap_refine_event_comment::test_no_line_of_the_section_is_in_the_comment_of_the_same_result[alternatives]
  passed on base: tests.roadmap.refine.test_roadmap_refine_event_comment::test_no_line_of_the_section_is_in_the_comment_of_the_same_result[blocked]
  passed on base: tests.roadmap.refine.test_roadmap_refine_event_comment::test_the_frame_names_the_section_in_place_of_the_question_that_the_section_holds
2 failed on base (2 failed and 13 passed in tests/roadmap/refine/test_roadmap_refine_event_comment.py; 0 errored).

@dan-petty
dan-petty marked this pull request as ready for review November 19, 2026 04:42
@dan-petty
dan-petty merged commit 1a22853 into main Nov 19, 2026
25 checks passed
@dan-petty
dan-petty deleted the fix/6196-refine-comment-only-on-change branch November 19, 2026 04:43
dan-petty-release Bot added a commit that referenced this pull request Nov 19, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.179.4](v0.179.3...v0.179.4)
(2026-11-19)


### Bug Fixes

* **roadmap:** refine posts a short event only when its result changes
([#6353](#6353))
([1a22853](1a22853))
* **roadmap:** stop consolidate run before MCP tool limit
([#6369](#6369))
([3ecd647](3ecd647))

---
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 posts a short comment only when its result changes

1 participant