Skip to content

fix(roadmap): a rejected plan leaves its evidence on the issue - #3713

Merged
dan-petty merged 4 commits into
mainfrom
fix/3503-a-rejected-plan-leaves-its-evidence
Nov 6, 2026
Merged

dan-petty merged 4 commits into
mainfrom
fix/3503-a-rejected-plan-leaves-its-evidence

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

A person who closes a plan pull request with no merge leaves the reason on that pull request only. Refine then sets the issue Ready again, and the stage job can plan the same false premise again. The stage job now copies the reason to the issue. It deletes the staged branch when only the session wrote to it. It holds the item until its text, or a file that the reason names, changes. The devops roadmap return 401 does not reproduce: five returns on 2026-11-05 (#1359, #1335, #1330, #3062, #2371) went through. The cause of the 401 is not found.

Closes #3503

Change: openspec/changes/archive/2026-11-06-3503-a-rejected-plan-leaves-its-evidence/

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

Copy link
Copy Markdown
Owner Author

Test results and review notes for #3503.

Fail-to-pass (uv run devops ci fail-to-pass --base origin/main): the tests of the branch fail on the base. Three modules error at collection (test_roadmap_explain, test_roadmap_refine, test_roadmap_stage_rejected), and 7 tests fail (test_roadmap_dry_runs, test_roadmap_stage_command, test_roadmap_stage_prompt_rules x4, test_roadmap_stage_reconcile). 154 other tests in the same files pass on the base.

Full uv run devops ci on the code before the last rebase: lint, format, mypy, bandit, docs, openspec, k8s, test tree, constructs and the other checks pass. Two results are outside this change:

Narrow tests after the last rebase: 1913 passed in tests/roadmap (stage, refine, explain, dry run, rejected). ruff, mypy on the changed sources, devops ci docs and devops openspec check pass.

Review findings, by number

  • Merge conflict with main: rebased. Main's seed_comment stays, the pull_request keyword is gone, the P0/P1 text of select_stageable stays.
  • Edit before the first look: _stage_one records stage.text_hash, and ClosedPlan.rejection uses it. A record with no such key takes the hash at the time of the read. Tests: test_an_edit_made_before_the_first_look_of_the_job_ends_the_hold, test_a_record_with_no_hash_of_the_planned_text_holds_from_the_text_of_the_first_look.
  • --item leaves the item New: the run keeps the Status of an item that it stages again, and the selection no more holds the item on the branch that the same run deletes. Test: test_a_run_that_names_the_item_stages_a_new_plan_and_the_item_stays_ready (branch gone and branch pushed).
  • Delete of the branch: git push --force-with-lease=refs/heads/<branch>:<sha>. A commit pushed after the plan keeps the branch, and the comment and the record are still written. Test: test_a_commit_pushed_after_the_plan_keeps_the_branch_and_the_rest_is_still_written.
  • Duplicate marker logic and second _STOP_THE_RUN: one tuple CONST_ROADMAP_STAGE_COMMENT_MARKERS, one reader stage_comment_text in refine.py, one _STOP_THE_RUN in stage.py. A test shows that rejected credentials stop the run at the read.
  • Stale sentences: docs/roadmap/stage.md and the requirement "The stage reply has no return path" (a MODIFIED delta) no longer say that the job never returns an item to New.
  • Long sentences in the new documents, the prompt and the comment text are split. The comment on the issue no longer says "returns this item to New", because a run that stages the item again keeps its Status.
  • Cost numbers in the proposal are corrected. The Feasibility section quotes the five returns of 2026-11-05 and says that the 401 does not reproduce and that its cause is not found.

Not done, on purpose: the optional check for a second comment after a failed record write (finding 5). The race is rare and the design file states it. A marker check would add code for it.

Size: 30 files, about 1,800 lines. It is one item: the comment, the hold and the branch rule share one record and one test file.

@dan-petty
dan-petty marked this pull request as ready for review November 6, 2026 01:41
The stage job reads the plan pull request of each staged item. A pull request that a person closed with no merge is a rejected plan: the job copies the last long comment of a person to the issue, returns the item to New, deletes the staged branch when only the session identity wrote to it, and records the rejection. The stage selection leaves the item out until its text or a file that the reason names changes. Refine reads the reason as stage_return, and the plan request holds it as rejected_plan.
…cted plan

Record the hash of the planned text as stage.text_hash, so an edit made before the first look ends the hold. Delete the rejected branch under a lease on the judged commit. Keep the Status of an item that the same run stages again. Share one marker list and one comment reader, and keep one stop list. Word the documents, the spec and the cost of the proposal again.
@dan-petty
dan-petty force-pushed the fix/3503-a-rejected-plan-leaves-its-evidence branch from 9c188d0 to 3e7551a Compare November 6, 2026 02:21
@dan-petty
dan-petty merged commit 60eb89e into main Nov 6, 2026
23 checks passed
@dan-petty
dan-petty deleted the fix/3503-a-rejected-plan-leaves-its-evidence branch November 6, 2026 02:56
dan-petty pushed a commit that referenced this pull request Nov 6, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.64.1](v0.64.0...v0.64.1)
(2026-11-06)


### Bug Fixes

* **roadmap:** a rejected plan leaves its evidence on the issue
([#3713](#3713))
([60eb89e](60eb89e))

---
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 rejected plan leaves its evidence on the issue

1 participant