os-backlog issue-show <number>: print issue title+body JSON; os-sdlc fetches ticket bodies through it #420

Closed
opened 2026-08-16 21:53:00 +00:00 by jared · 3 comments
Owner

Origin

Discovered by an AI session in an external project (tally-api, forgejo:jared/tally-api) while running /os-sdlc:implement; filed cross-project per the Discoverer convention. Routing decision (via os-backlog CLI, not a tea patch) was made explicitly by Jared in-session on 2026-08-16.

Context

os-sdlc intake fails at ticket body fetch:

  • os-sdlc Runner::TeaTracker#raw_capture (plugins/os-sdlc/lib/os_sdlc/runner/tea_tracker.rb:53) runs tea issues <n> --repo <slug> --output yaml.
  • tea 0.13.0's single-issue view silently IGNORES --output yaml and prints a rendered markdown detail view; YAML.safe_load then raises ("found character that cannot start any token"), surfacing as os-sdlc: ticket body fetch failed.
  • The same tea version DOES honor -o json for the single-issue view (verified: returns id/index/title/labels/body JSON).
  • IssueSource::Forgejo already uses -o json and works.

Scope

  1. os-backlog: new subcommand issue-show <number> — resolves the cwd repo's configured tracker (forgejo/github/repo:), fetches the issue, prints JSON {"number":..,"title":..,"body":..,"state":..,"labels":[..names..]} to stdout. Forgejo via tea issues <n> --repo <slug> -o json (NOT yaml); GitHub via gh issue view <n> --json title,body,state,labels; repo: trackers read the in-repo issue file. Exit non-zero with a one-line stderr message on missing issue / no tracker.
  2. os-sdlc: Runner::TeaTracker#fetch_body (and its BodyFetch) shells out to os-backlog issue-show <n> (run from project root) and extracts body; keep HarnessError wrapping and messages. Remove the direct tea ... --output yaml call.

Acceptance criteria

  • os-backlog issue-show <n> in a forgejo-routed repo prints the JSON object with a non-empty body; unknown number exits non-zero
  • issue-show never uses --output yaml
  • os-sdlc BodyFetch parses issue-show JSON and returns the body string; tea markdown-detail-view regression covered by a test (non-JSON/markdown payload → HarnessError, not a YAML crash)
  • os-sdlc-runner intake <n> succeeds against a forgejo tracker under tea 0.13.0
  • existing os-backlog + os-sdlc suites green

Evidence

tea 0.13.0 (Version: 0.13.0 golang: 1.26.1); repro: tea issues 1 --repo jared/tally-api --output yaml → markdown; same with -o json → valid JSON.

## Origin Discovered by an AI session in an external project (tally-api, forgejo:jared/tally-api) while running /os-sdlc:implement; filed cross-project per the Discoverer convention. Routing decision (via os-backlog CLI, not a tea patch) was made explicitly by Jared in-session on 2026-08-16. ## Context os-sdlc intake fails at ticket body fetch: - os-sdlc Runner::TeaTracker#raw_capture (plugins/os-sdlc/lib/os_sdlc/runner/tea_tracker.rb:53) runs `tea issues <n> --repo <slug> --output yaml`. - tea 0.13.0's single-issue view silently IGNORES `--output yaml` and prints a rendered markdown detail view; YAML.safe_load then raises ("found character that cannot start any token"), surfacing as `os-sdlc: ticket body fetch failed`. - The same tea version DOES honor `-o json` for the single-issue view (verified: returns id/index/title/labels/body JSON). - IssueSource::Forgejo already uses `-o json` and works. ## Scope 1. os-backlog: new subcommand `issue-show <number>` — resolves the cwd repo's configured tracker (forgejo/github/repo:), fetches the issue, prints JSON `{"number":..,"title":..,"body":..,"state":..,"labels":[..names..]}` to stdout. Forgejo via `tea issues <n> --repo <slug> -o json` (NOT yaml); GitHub via `gh issue view <n> --json title,body,state,labels`; repo: trackers read the in-repo issue file. Exit non-zero with a one-line stderr message on missing issue / no tracker. 2. os-sdlc: Runner::TeaTracker#fetch_body (and its BodyFetch) shells out to `os-backlog issue-show <n>` (run from project root) and extracts `body`; keep HarnessError wrapping and messages. Remove the direct `tea ... --output yaml` call. ## Acceptance criteria - [ ] `os-backlog issue-show <n>` in a forgejo-routed repo prints the JSON object with a non-empty body; unknown number exits non-zero - [ ] `issue-show` never uses `--output yaml` - [ ] os-sdlc BodyFetch parses issue-show JSON and returns the body string; tea markdown-detail-view regression covered by a test (non-JSON/markdown payload → HarnessError, not a YAML crash) - [ ] `os-sdlc-runner intake <n>` succeeds against a forgejo tracker under tea 0.13.0 - [ ] existing os-backlog + os-sdlc suites green ## Evidence tea 0.13.0 (`Version: 0.13.0 golang: 1.26.1`); repro: `tea issues 1 --repo jared/tally-api --output yaml` → markdown; same with `-o json` → valid JSON.
Author
Owner

Work started on branch sdlc/420 (direct TDD implementation, not via the os-sdlc pipeline — the pipeline's intake is itself blocked by this bug).

Work started on branch sdlc/420 (direct TDD implementation, not via the os-sdlc pipeline — the pipeline's intake is itself blocked by this bug).
Author
Owner

Work starting via /os-sdlc:implement on branch worktree-sdlc+420.

Work starting via /os-sdlc:implement on branch worktree-sdlc+420.
Author
Owner

Resolution

Done: Added os-backlog issue-show subcommand (forgejo via tea -o json, github via gh, repo: via issue file) and rewired os-sdlc Runner::TeaTracker::BodyFetch to shell out to it from the project root; removed the tea --output yaml call and the slug gate on body fetch.

Evidence: Commit c2b23aa on branch worktree-sdlc+420. os-backlog suite 203 runs / 497 assertions, os-sdlc suite 954 runs / 2342 assertions, all 0 failures. Live check under tea 0.13.0: os-sdlc-runner intake 420 --target os-backlog succeeded and emitted the code-probe dispatch with a non-empty fetched body.

Follow-ups: 1) TeaTracker#resolve_slug still swallows TargetSelectionError into a nil slug for the label/comment paths in multi-target repos, misreporting 'no tracker configured'. 2) A failed intake leaves an in-flight tickets row in .sdlc/pipeline.db that blocks re-intake. 3) Consider consolidating Issues#fetch and IssueShow into one canonical single-issue fetch path. 4) os-backlog has no rake test task; tests only run via a manual require glob.

## Resolution **Done:** Added os-backlog issue-show <number> subcommand (forgejo via tea -o json, github via gh, repo: via issue file) and rewired os-sdlc Runner::TeaTracker::BodyFetch to shell out to it from the project root; removed the tea --output yaml call and the slug gate on body fetch. **Evidence:** Commit c2b23aa on branch worktree-sdlc+420. os-backlog suite 203 runs / 497 assertions, os-sdlc suite 954 runs / 2342 assertions, all 0 failures. Live check under tea 0.13.0: os-sdlc-runner intake 420 --target os-backlog succeeded and emitted the code-probe dispatch with a non-empty fetched body. **Follow-ups:** 1) TeaTracker#resolve_slug still swallows TargetSelectionError into a nil slug for the label/comment paths in multi-target repos, misreporting 'no tracker configured'. 2) A failed intake leaves an in-flight tickets row in .sdlc/pipeline.db that blocks re-intake. 3) Consider consolidating Issues#fetch and IssueShow into one canonical single-issue fetch path. 4) os-backlog has no rake test task; tests only run via a manual require glob.
jared closed this issue 2026-08-16 22:19:44 +00:00
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#420
No description provided.