issue-create ends the Origin section at an inline heading mark and refuses a valid body #965

Open
opened 2026-10-07 15:38:30 +00:00 by jared · 3 comments
Owner

Problem

issue-create ends the Origin section at the first ## text, even in the middle of a line. A valid body that names a heading inside the Origin block is refused. The error names the wrong cause: it says the required lines are missing, but they are present.

Observed

plugins/os-backlog/lib/backlog/issue_create.rb:78:

body.to_s[/## Origin(.*?)(?=## |\z)/m, 1].to_s

A body whose Origin block had the line - Chain: ... makes \## Approach` "optional at capture"` and then Session:, Transcript: and Where: lines was refused:

os-backlog: issue-create: the ## Origin block is missing required line(s): Session:, Transcript:, Where:

The same body was accepted after that one line was reworded (it became #960).

Reproduce

os-backlog issue-create --title "probe origin parse" --label project/cc-os --label filed-by/agent --body "## Problem
x
## Origin
- Chain: see \`## Approach\`
- Where: x
- Session: x
- Transcript: x"

Acceptance criteria

  1. Given an Origin block that holds ## in the middle of a line, when issue-create checks it, then it finds the Session:, Transcript: and Where: lines that follow.
  2. Given a body with a heading line after the Origin block, when issue-create checks it, then the Origin section ends at that heading line.

Origin

  • Trigger: /os-backlog:capture of #960 in this session
  • Improvised this session: reworded the Origin line to avoid inline heading marks
  • Chain: valid body refused ← section ends at inline heading marks ← DESIGN: the end pattern is not anchored to line start (issue_create.rb:78)
  • Root candidate: this ticket
  • Where: plugins/os-backlog/lib/backlog/issue_create.rb
  • Session: 1e202fec-cce9-40fd-aeb9-24a9faa69d96
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-prism-architect/1e202fec-cce9-40fd-aeb9-24a9faa69d96.jsonl

VERDICT: CREATE — observed while filing #960; the error names the wrong cause; the end pattern is the root.

## Problem `issue-create` ends the Origin section at the first `## ` text, even in the middle of a line. A valid body that names a heading inside the Origin block is refused. The error names the wrong cause: it says the required lines are missing, but they are present. ## Observed `plugins/os-backlog/lib/backlog/issue_create.rb:78`: ```ruby body.to_s[/## Origin(.*?)(?=## |\z)/m, 1].to_s ``` A body whose Origin block had the line `- Chain: ... makes \`## Approach\` "optional at capture"` and then Session:, Transcript: and Where: lines was refused: ``` os-backlog: issue-create: the ## Origin block is missing required line(s): Session:, Transcript:, Where: ``` The same body was accepted after that one line was reworded (it became #960). ## Reproduce ``` os-backlog issue-create --title "probe origin parse" --label project/cc-os --label filed-by/agent --body "## Problem x ## Origin - Chain: see \`## Approach\` - Where: x - Session: x - Transcript: x" ``` ## Acceptance criteria 1. Given an Origin block that holds `## ` in the middle of a line, when `issue-create` checks it, then it finds the Session:, Transcript: and Where: lines that follow. 2. Given a body with a heading line after the Origin block, when `issue-create` checks it, then the Origin section ends at that heading line. ## Origin - Trigger: `/os-backlog:capture` of #960 in this session - Improvised this session: reworded the Origin line to avoid inline heading marks - Chain: valid body refused ← section ends at inline heading marks ← `DESIGN`: the end pattern is not anchored to line start (`issue_create.rb:78`) - Root candidate: this ticket - Where: plugins/os-backlog/lib/backlog/issue_create.rb - Session: 1e202fec-cce9-40fd-aeb9-24a9faa69d96 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-prism-architect/1e202fec-cce9-40fd-aeb9-24a9faa69d96.jsonl VERDICT: CREATE — observed while filing #960; the error names the wrong cause; the end pattern is the root.
Author
Owner

A second form of the same defect, seen while filing this ticket: the start pattern is not anchored either. The parser starts the Origin section at the first ## Origin text anywhere, including inside a code block in Observed or Reproduce. This body had to be filed short and then edited for that reason.

Acceptance criterion to add: Given a body that quotes the Origin heading inside a code block before the real Origin heading, when issue-create checks it, then it reads the real Origin section.

A second form of the same defect, seen while filing this ticket: the start pattern is not anchored either. The parser starts the Origin section at the first `## Origin` text anywhere, including inside a code block in Observed or Reproduce. This body had to be filed short and then edited for that reason. Acceptance criterion to add: Given a body that quotes the Origin heading inside a code block before the real Origin heading, when issue-create checks it, then it reads the real Origin section.
Author
Owner

Occurrence: issue-create Origin check ends the block at inline ## text
Seen: plugins/os-backlog/lib/backlog/issue_create.rb:78 (pattern not anchored to line start)
Run: Session 22b441ac-a301-4637-8de9-a9e0f0970fae, filing #1153
Adds: a Trigger line naming HANDOFF.md ## Review inside a code span gave 'the ## Origin block is missing required line(s): Session:, Transcript:, Where:' with all three present; rewording the Trigger line cleared it.

Occurrence: issue-create Origin check ends the block at inline `## ` text Seen: plugins/os-backlog/lib/backlog/issue_create.rb:78 (pattern not anchored to line start) Run: Session 22b441ac-a301-4637-8de9-a9e0f0970fae, filing #1153 Adds: a Trigger line naming HANDOFF.md `## Review` inside a code span gave 'the ## Origin block is missing required line(s): Session:, Transcript:, Where:' with all three present; rewording the Trigger line cleared it.
Author
Owner

Occurrence: os-backlog issue-create cuts the Origin block at any '## ' inside a line
Seen: plugins/os-backlog/lib/backlog/issue_create.rb:89 (origin_section lookahead not line-anchored)
Run: Session 4f3f95ea-3c6f-4d23-a0ea-e349d6ab02a5, 2026-10-23, while filing #1289
Adds: a Chain line quoting a markdown heading (Prediction heading in backticks) caused a refusal for missing Session:, Transcript:, Where:; the author reworded the line to work around it.

Occurrence: os-backlog issue-create cuts the Origin block at any '## ' inside a line Seen: plugins/os-backlog/lib/backlog/issue_create.rb:89 (origin_section lookahead not line-anchored) Run: Session 4f3f95ea-3c6f-4d23-a0ea-e349d6ab02a5, 2026-10-23, while filing #1289 Adds: a Chain line quoting a markdown heading (Prediction heading in backticks) caused a refusal for missing Session:, Transcript:, Where:; the author reworded the line to work around it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#965
No description provided.