Skip to content

fix(roadmap): never cut the plan title, count its summary once - #3272

Merged
dan-petty merged 5 commits into
mainfrom
fix/3249-title-limit-followup
Nov 2, 2026
Merged

dan-petty merged 5 commits into
mainfrom
fix/3249-title-limit-followup

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Follow-up of the review of #3267. staging_title no longer cuts: a summary that does not fit (a number of 7 digits or more) stops that item with an error instead of ending the title with .... The schema counts one thing, the one-line text of the title, so spare whitespace costs no retry, and every refusal names the count and the limit. The prompt says that a handle or a link costs characters. The spec states the 6-digit condition and replaces the cut-at-a-word scenario.

Refs #3249

Change: openspec/changes/archive/2026-11-02-3249-title-limit-followup/


Generated by Claude Code

The title is never cut: a summary that does not fit stops the item with an error, the
schema counts the one-line text of the title, and the prompt says so.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW
@dan-petty
dan-petty marked this pull request as ready for review November 2, 2026 19:56
@dan-petty
dan-petty merged commit 0e0e017 into main Nov 2, 2026
20 checks passed
@dan-petty
dan-petty deleted the fix/3249-title-limit-followup branch November 2, 2026 19:56
dan-petty pushed a commit that referenced this pull request Nov 2, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.48.2](v0.48.1...v0.48.2)
(2026-11-02)


### Bug Fixes

* **roadmap:** never cut the plan title, count its summary once
([#3272](#3272))
([0e0e017](0e0e017))
* **roadmap:** tell the agent the step runs a bang command
([#3275](#3275))
([a88f9c8](a88f9c8))

---
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>

Copy link
Copy Markdown
Owner Author

Adversarial review of #3272 (round 2).

Verdict: FIX. 0 blocker, 0 major, 6 minor. The fix works for the case it names. I found no input that crashes a run or breaks the length rule. The gaps are tests that mutants survive, one rule the new measure does not cover, and an owner that does not own the deferral.

Head a615fde4, base f082d5c3. Clone and scripts: scratchpad/adv3272. Notes: scratchpad/notes/advreview-pr3272-r2.md.

  1. minor: the tests do not hold the prompt rule, the 7-digit message or the empty summary (6 mutants survive).
    Reproduction: for each mutant I changed one line in a scratch copy and ran test_roadmap_stage_title.py, test_roadmap_stage_plan.py and test_roadmap_stage_prompt_rules.py. Each run gave 194 passed, 4 skipped.

    • M15: drop so write no handle or link in the summary from roadmap_stage_change.md. The test only looks for the words handle and link in the bullet.
    • M16: replace the whole new sentence with handle link. The test still passes.
    • M11 and M12: change stage_title_long to say limit is wrong, or to drop {length}. No test reads the text. The tests only match characters after the colon. The PR says every refusal names the count and the limit, and this refusal is not held.
    • M13: drop A handle or a link gets a code span in the title. from stage_summary_long.
    • M17: remove min_length=1 from summary. No test sends an empty summary.
      Mutants that failed a test as they should: >= or raw len() in the validator, >= or +1 in staging_title, no safe_text in staging_title, failed_items=[], no maxLength, maxLength+1, no count or no limit in stage_summary_long, and dropping the prompt sentence.
      Fix: assert {length} and {limit} in the stage_title_long text (pytest.raises(match=...) with both numbers). Assert the instruction in the prompt, for example "write no handle or link" or "as the title shows it". Add a test for an empty summary.
  2. minor: the lower bound still counts the raw text, so the schema does not count "one thing".
    Reproduction: in adv3272/ws.py, make_stage_proposal(summary=" "), "\n" and "\t \xa0" are all accepted. staging_title(12, ...) gives 'docs(openspec): plan #12 ' and title_problems returns []. The same happens on base. Fuzz of 300k strings (adv3272/fuzz2.py) found 25342 accepted blank summaries. The plan PR opens with no summary text (the title ends with the issue number). The PR rewrote the upper bound to use safe_text, but min_length=1 is still raw.
    Fix: in _summary_fits_the_title, also refuse shown == "" with a message. Or state in the proposal why the lower bound is out of scope.

  3. minor: the UTF-16 deferral names an owner that does not own it.
    Reproduction: adv3272/u16.py gives summary = U+1F600 * 47. make_stage_proposal accepts it. The staging title has 60 code points and passes title_problems. The same text has 107 UTF-16 units. node -e 'new RegExp("^.{1,60}$").test("plan #999999 "+"\u{1F600}".repeat(47))' prints false. .github/workflows/pr-title.yml uses subjectPattern: ^.{1,60}$. So the job opens a plan PR that Semantic PR title refuses. The proposal sends this to feat(roadmap): the jobs build pull request text with pull_form #3215. The text of feat(roadmap): the jobs build pull request text with pull_form #3215 and the plan in docs(openspec): plan #3200 Refuse placeholder and cut plan text #3260 do not mention UTF-16 or code units. So nothing owns it.
    The same input is accepted on base. The PR does not make it worse. But the PR now claims one measure, and this is a case where the measure differs from CI.
    Fix: either measure len(text.encode("utf-16-le")) // 2 in the validator and in staging_title, or file an issue for the difference and name that issue in the proposal.

  4. minor: the PR body breaks the form that the repository enforces.
    Reproduction: adv3272/body.py passes the PR body to pull_form.body_problems. Result: ['The body has no line Closes #.']. AGENTS.md rule 1 asks for one issue and Closes #<issue>. fix(roadmap): staging_title cuts the plan title with ... and title_problems refuses it #3249 is closed by fix(roadmap): make the plan summary fit its title #3267, so Refs #3249 leaves this PR with no issue of its own.
    Fix: file an issue for the follow-up with devops roadmap intake, and use Closes #<new>. Or say in the PR body why this change has none.

  5. minor: merge hazard with the plan of docs(openspec): plan #3200 Refuse placeholder and cut plan text #3260 (and feat(roadmap): the jobs build pull request text with pull_form #3215), at the plan level and not in the files.

  6. minor (unverified for repeats): the 7-digit stop comes after the model call.
    staging_title runs in _settle, after the reply and check_proposal. For an item of 7 digits the job asks the model, then stops that item. The item is not changed, so I expect the next round to ask again. I did not run a second round. This needs one million issues, so it is only a note. A check on the number before _ask would save the call.

Checks on the points in the brief:

  • (1) Callers: staging_title has one caller in src, _settle (stage.py:793). Its paths are _gated and _verified, then _planner.plan, then _plan_each (catches RoadmapStageError, records one StageFailure, goes on) and plan_item, then stage_eval_run.run_case (catches it, ends the case as refused). The dry run, the devops roadmap commands and MCP do not call it. One 7-digit item cannot crash a round or an eval run.
  • (2) Schema: StageProposal.model_json_schema() is identical before and after (diff of both JSON dumps). summary keeps "maxLength": 47, "minLength": 1. chat_structured takes the schema from model_json_schema() for the system prompt and for every provider, so no provider sees a change. A validator error goes back to the model as before.
  • (3) Measure: fuzz of 300k strings (NBSP, ZWSP, BOM, \r, \x85, \x1c, combining marks, ZWJ, astral, handles, links, ...) gave 0 titles over 60 code points, 0 title_problems for length, 0 raises for numbers 1 and 999999, 0 replies refused that would have fit. Only the UTF-16 case of finding 3 differs.
  • (6) The ... ending: a summary that fits and ends with ... is accepted by the schema, as on base. It never raised and was never cut. The title ends with ... and title_problems refuses it, with the same output on base and on the PR. The job does not call title_problems. For the 7-digit case, base gave plan #1000000 ... and the PR now stops the item, so the PR is better and no worse. Deferring to docs(openspec): plan #3200 Refuse placeholder and cut plan text #3260 is safe as long as docs(openspec): plan #3200 Refuse placeholder and cut plan text #3260 is corrected (finding 5).
  • Tests and gates: the 12 new tests that can fail do fail on base for the stated reason (DID NOT RAISE, regex mismatch, '48 characters in the title...' missing from the retry message, 'handle' missing from the bullet). test_a_summary_over_the_limit_twice_stops_that_item... passes on base, so it is a regression test and not fail-to-pass. ruff check, ruff format --check and mypy on the changed files pass. openspec validate --specs --strict: 168 passed. tests/lang, tests/invariants and tests/roadmap: 9 failures, all kubectl not installed (the same 9 as in round 1). CI on the PR is green, including Semantic PR title and Fail-to-Pass Check.

Attacks tried that did not break it:

  • The 8 findings of round 1: M1 to M8 (limit, count and retry text) are fixed and killed by tests. The ... summary and UTF-16 are validly deferred or have a named owner (see finding 3 for UTF-16).
  • staging_title for numbers 7, 2656, 999999 and 1000000 with fitting and over-long summaries; exactly 60 characters; >= and +1 mutants of the limit.
  • json_schema_extra maxLength against pydantic: present in the schema, before and after identical, read by stage_summary_limit().
  • Whitespace: trailing newline, leading spaces, runs of spaces and tabs, NBSP, \r\n, \x85, \x1c: all collapse and are not over-counted.
  • Handle, link and comment opener in a 47-character summary: refused with both counts.
  • Hostile fuzz of 300k atoms, numbers 1 and 999999 (fuzz2.py).
  • plan_item and the eval runner with a refused reply and with a 7-digit number.
  • Spec text length (492), openspec validate --strict, archive folder name and tasks ticked, ASD-STE100 reading of the new messages, git grep of staging_title, stage_summary_limit, _ELLIPSIS, ISSUE_NUMBER_DIGITS and of docs that name the 47-character rule (none stale).

Not verified:


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants