Skip to content

fix(roadmap): finish the refine wait and frame fixes of #6353 #6378

Done

Description

@dan-petty

Problem

#6353 (for #6196) merged on 2026-11-19 at 04:43 UTC while its second fix round still ran. The independent review of its head left these open points, and the merged code still has them:

  • Blocking: openspec/specs/roadmap-refine/waits/spec.md (about lines 20 and 101) says that a wait ends on a commit or an issue change at or after refine's last comment (refine.commented_at). The code starts the wait at the later of refine's last comment and refine.repeated_at. The spec and the code disagree.
  • refine.repeated_at holds the time at which the round applies its result (datetime.now(UTC) in _refine_marks), not the time at which it read the comments, which is before the model calls. A reply that a person posts while the round runs is then older than the start of the wait, and it does not end the wait.
  • The refine frame asks only the first open question (owner_question_of uses details[0], and its hash covers only that question), but its text names the whole section ("See Open questions in the section Proposed design of the body."). With two or more open questions, the answer covers one.
  • _section_place builds the English list joiner (", " and " and ") in code; the rest of the sentence is in MESSAGES.roadmap.refine_section_place.
  • The module docstring of refine.py lost its wrap (lines over 100 characters).
  • Found by the stopped fix round: when the deferred section of an item changes, the repeat guard of the store does not post the new event if no comment came between the two events.

Expected

  • The waits spec states the start of the wait that the code uses, or the code uses the start that the spec states.
  • A round records the time at which it read the comments, and a reply posted during the round ends the wait (test first).
  • The frame, its hash and the answer cover every open question of the section, or the text names only the first (test first).
  • A changed deferred section posts its event, also with no comment between (test first).
  • The joiner is in MESSAGES, and the docstring is reflowed.

Source: #6353

Alternatives check of 2026-11-22: none.
Tool: none found.
Reason: Searches for spec/code drift tooling and for line-length linting returned only generic language and web documentation, no maintained tool that fixes the refine wait start, owner frame, joiner or store guard of this repository's own module.

Lacks:

  • Wait start shared by code and waits spec
  • Comment-read timestamp recorded before model calls
  • Owner frame covering every open question
  • Deferred-section event posted with no comment between

Proposed design

Problem statement

The merged refine code suppresses the event comment when only the deferred section changes. The repeat guard compares the text of the comment, and a second change gives the same text. The module docstring of src/devops_cli/roadmap/refine/refine.py also has lines longer than 100 characters. This change posts the event when the deferred items differ, keeps the comment free of section content, and wraps the long docstring lines.

Acceptance criteria

Requirement: Event of a changed deferred section

The comment step of refine SHALL post the event comment when the deferred items of the round differ from the recorded RefineRecordKey.DEFERRED, also when its text equals the comment of the round before.

Scenario: A second deferred change with no comment between

Requirement: Module docstring line limit of refine

Each line of the module docstring of src/devops_cli/roadmap/refine/refine.py MUST have at most 100 characters.

Scenario: The module docstring of refine

  • WHEN A test imports devops_cli.roadmap.refine.refine and splits its doc into lines.
  • THEN The test asserts that each line has at most 100 characters.

Existing Tool Considered

The alternatives check of 2026-11-22 in the issue body gives verdict none and Tool: none found. It found no open, maintained tool for the repeat guard of the deferred section or for the module docstring of this repository's refine module. The check in the issue body names what the tool lacks. The change edits the existing refine module and keeps the comment repeat guard. The written cost is about 1,000 tokens to build, about 300 tokens to keep and fix, and less than 30 minutes of elapsed time.

Key questions

  • Which points of fix(roadmap): finish the refine wait and frame fixes of #6353 #6378 remain on the default branch after fix(roadmap): refine posts a short event only when its result changes #6353?: Two points remain: the repeat guard suppresses the event of a changed deferred section, and some lines of the module docstring of src/devops_cli/roadmap/refine/refine.py are longer than 100 characters. The waits spec states the later start of the wait. The comments spec asks only the first open question of the frame. [sources: openspec/specs/roadmap-refine/waits/spec.md, openspec/specs/roadmap-refine/comments/spec.md, src/devops_cli/roadmap/refine/refine.py]
  • How does a changed deferred section post its event comment without a content line in the comment?: Key the repeat decision on the deferred items of the round, not on the visible text. The round posts the event when the deferred items differ from RefineRecordKey.DEFERRED. The event text stays free of section content. (best practice) [sources: openspec/specs/roadmap-refine/comments/spec.md, src/devops_cli/roadmap/refine/refine.py, tests/roadmap/refine/test_roadmap_refine_deferred.py, tests/roadmap/refine/test_roadmap_refine_event_comment.py]
    • Chosen: Compare the deferred items in the repeat decision. The event text stays the same, the comments spec holds, and the two tests of the event comment keep their assertions.
    • Rejected: Name the deferred issue numbers in the event text. The comments spec holds no content line of the section, and tests/roadmap/refine/test_roadmap_refine_deferred.py asserts that no issue number appears in the event.
    • Rejected: Bypass the repeat guard for each event. It posts a duplicate event for an unchanged round and weakens the guard for every event.
  • Does the owner frame cover every open question of the section?: No. The merged comments spec asks only the first open question, and the frame names the first point of Open questions. A frame that covers every question contradicts the spec and breaks test_the_frame_of_two_open_questions_names_the_first_one_that_it_asks. (best practice) [sources: openspec/specs/roadmap-refine/comments/spec.md, tests/roadmap/refine/test_roadmap_refine_event_comment.py:323, src/devops_cli/roadmap/refine/refine.py]
    • Chosen: Keep the first-question frame. It matches the merged comments spec and the existing test.
    • Rejected: Cover every open question. It contradicts the merged spec and breaks the existing test.
  • Does the start of the wait that the code uses match the waits spec?: The waits spec and the module docstring state that the wait starts at the later of refine's last comment and refine.repeated_at, and that the round records the time at which it read the comments. [sources: openspec/specs/roadmap-refine/waits/spec.md, src/devops_cli/roadmap/refine/refine.py]
  • How should the module docstring of refine meet the 100-character limit?: Wrap each long line of the module docstring of src/devops_cli/roadmap/refine/refine.py at 100 characters. Keep each sentence and its content. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py]
    • Chosen: Wrap the long lines. It keeps the documented behavior and needs no new text.
    • Rejected: Delete the long lines. It removes documented behavior of the module.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    on Nov 19, 2026
  4. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

  5. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.

    Searches (3)

    Searches run:

    • python linter check docstring and code line length limit 100 characters ruff, results: 5
    • tool to detect drift between specification documents and source code, results: 5
    • OpenSpec spec-driven development tool keep spec and implementation in sync, results: 5

    Sources:

  6. added
    status/ready
    and removed
    status/new
    on Nov 22, 2026
  7. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  8. dan-petty commented on Nov 25, 2026

    @dan-petty
    OwnerAuthor

    Returning #6378 to New per Rule 2 (AGENTS.md): most of the listed findings already shipped in #6353 (1a228531c) and #7144, while the refine design's owner_question_of requirement conflicts with the current OpenSpec contract and tests.

    Verified against origin/main (4046839ec)

    1. Already fixed in #6353 (1a228531c):

      • openspec/specs/roadmap-refine/waits/spec.md lines 20 and 113 already specify the later of refine's last comment on the item and refine.repeated_at.
      • refine.py already captures read_at = datetime.now(UTC) before reading comments and model calls (refine.py:3621) and writes r.read_at.isoformat() into RefineRecordKey.REPEATED_AT (refine.py:4401, 4450), tested by tests/roadmap/refine/test_roadmap_refine_event_comment.py:222 (test_a_reply_made_while_a_round_with_no_comment_runs_ends_the_wait). (Unwritten-round read_at is also addressed in fix(roadmap): a reply made while a refine round posts its comment is lost #6371 / PR fix(roadmap): record read_at on written refine rounds #7144.)
      • _frame_place (refine.py:2040) and MESSAGES.roadmap.refine_frame_part already narrow the frame text to "the first point of Open questions", tested by tests/roadmap/refine/test_roadmap_refine_event_comment.py:323 (test_the_frame_of_two_open_questions_names_the_first_one_that_it_asks).
      • _section_place (refine.py:2024-2037) already reads refine_section_parts and refine_section_parts_separator from src/devops_cli/lang/en/messages.py:3009-3010.
    2. Refine requirement conflicts with merged OpenSpec:

      • #6378's refine design requires owner_question_of to put every open question into the frame text and hash, which contradicts openspec/specs/roadmap-refine/comments/spec.md:27 ("It asks only the first open question, so it SHALL name the first point of Open questions") and breaks test_the_frame_of_two_open_questions_names_the_first_one_that_it_asks.
    3. Remaining real work to keep on a narrowed re-refine:

      • Deferred section repeat guard: When a second round files another deferred part (refine.py:3788, 4447), step_comment emits the same See Moved to new items... string without issue numbers, so comment_repeat.recent_repeat (src/devops_cli/roadmap/stores/comment_repeat.py) still refuses it when no other comment came in between.
      • Docstring wrap: Three lines of refine.py.__doc__ exceed 100 characters: line 1 (102 chars), line 89 (101 chars), and line 90 (110 chars).
  9. removed
    status/ready
    on Nov 25, 2026
  10. 6 remaining items

  11. added
    status/new
    on Nov 25, 2026
  12. added
    status/ready
    and removed
    status/new
    on Nov 25, 2026
  13. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  14. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 25, 2026
  15. removed
    status/in-review
    owner/agent
    on Nov 25, 2026
  16. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-25 17:40 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