Trace the os-backlog comment journey in plugins/os-backlog and build its site #1395

Closed
opened 2026-10-26 14:18:23 +00:00 by jared · 3 comments
Owner

Problem

The system-model tracer (#1327, ADR-0300) has no journey view for the most used CLI call.
os-backlog comment N --body X ran 460 times in 30 days.
A trace of it gives a second easy-to-read journey outside os-me, with few objects.
Ticket 1394 traces handoff complete in plugins/os first and proves the tracer works outside os-me.
This ticket is blocked by #1394.

Observed

The expected chain is:

CLI#comment -> IssueCommands#comment -> CliTrackerRequirement.tracker -> CLIOptions#comment_body -> Issues#comment -> <backend>#comment

The end-to-end test is plugins/os-backlog/tests/comment_cli_test.rb.
The tests likely use the File backend, not Forgejo.
The implementer records which backend the journey shows.

Reproduce

n/a: this is a feature ticket. The chain above is the expectation to verify.

Approach

Use the same shim as #1394, from the ADR-0300 owner sketch:

module UseCase
  def use_case(_name) = yield
end
Minitest::Test.include(UseCase)

Required work:

  1. Add the UseCase shim — check: present def use_case(_name) = yield in plugins/os-backlog/tests/test_helper.rb
  2. Wrap the comment path — check: present use_case("os-backlog comment") in plugins/os-backlog/tests/comment_cli_test.rb
  3. Commit the generated journey view — check: present dynamic view os_backlog_comment in plugins/os-backlog/design/generated/journeys/*.c4

Orchestrator work: run plugins/os-sdlc/bin/system-model build plugins/os-backlog, then likec4 validate. Show Jared the view with system-model serve plugins/os-backlog.

Acceptance criteria

  1. Given the plugins/os-backlog suite, when it runs without the tracer, then it passes.
  2. Given plugins/os-sdlc/bin/system-model build plugins/os-backlog, when it finishes, then the generated os_backlog_comment journey holds the messages of the chain above and likec4 validate accepts the model.
  3. Given system-model serve plugins/os-backlog, when Jared opens the os_backlog_comment view, then he sees the numbered messages.

Owner sketch

module UseCase
  def use_case(_name) = yield
end

Non-goals

os-me journeys stay in #1392.
Tracing calls into core Ruby is out of scope.

Origin

  • Trigger: a plan for the second journey after #1394 in this session.
  • Improvised this session: none.
  • Chain: feature ← #1327 (tracer), ADR-0300; os-me journeys stay in #1392
  • Root candidate: none found; searched journey, trace, tracer, use_case, system-model, os-backlog comment, site
  • Where: plugins/os-backlog/tests/comment_cli_test.rb
  • Session: 0bd25a72-f8ca-4331-a047-9cefdb9b0e3b
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-fast-batch-15/0bd25a72-f8ca-4331-a047-9cefdb9b0e3b.jsonl
## Problem The system-model tracer (#1327, ADR-0300) has no journey view for the most used CLI call. `os-backlog comment N --body X` ran 460 times in 30 days. A trace of it gives a second easy-to-read journey outside os-me, with few objects. Ticket 1394 traces `handoff complete` in `plugins/os` first and proves the tracer works outside os-me. This ticket is blocked by #1394. ## Observed The expected chain is: ``` CLI#comment -> IssueCommands#comment -> CliTrackerRequirement.tracker -> CLIOptions#comment_body -> Issues#comment -> <backend>#comment ``` The end-to-end test is `plugins/os-backlog/tests/comment_cli_test.rb`. The tests likely use the File backend, not Forgejo. The implementer records which backend the journey shows. ## Reproduce n/a: this is a feature ticket. The chain above is the expectation to verify. ## Approach Use the same shim as #1394, from the ADR-0300 owner sketch: ```ruby module UseCase def use_case(_name) = yield end Minitest::Test.include(UseCase) ``` Required work: 1. Add the UseCase shim — check: present `def use_case(_name) = yield` in `plugins/os-backlog/tests/test_helper.rb` 2. Wrap the comment path — check: present `use_case("os-backlog comment")` in `plugins/os-backlog/tests/comment_cli_test.rb` 3. Commit the generated journey view — check: present `dynamic view os_backlog_comment` in `plugins/os-backlog/design/generated/journeys/*.c4` Orchestrator work: run `plugins/os-sdlc/bin/system-model build plugins/os-backlog`, then `likec4 validate`. Show Jared the view with `system-model serve plugins/os-backlog`. ## Acceptance criteria 1. Given the plugins/os-backlog suite, when it runs without the tracer, then it passes. 2. Given `plugins/os-sdlc/bin/system-model build plugins/os-backlog`, when it finishes, then the generated `os_backlog_comment` journey holds the messages of the chain above and `likec4 validate` accepts the model. 3. Given `system-model serve plugins/os-backlog`, when Jared opens the os_backlog_comment view, then he sees the numbered messages. ## Owner sketch ```ruby module UseCase def use_case(_name) = yield end ``` ## Non-goals os-me journeys stay in #1392. Tracing calls into core Ruby is out of scope. ## Origin - Trigger: a plan for the second journey after #1394 in this session. - Improvised this session: none. - Chain: feature ← #1327 (tracer), ADR-0300; os-me journeys stay in #1392 - Root candidate: none found; searched journey, trace, tracer, use_case, system-model, os-backlog comment, site - Where: plugins/os-backlog/tests/comment_cli_test.rb - Session: 0bd25a72-f8ca-4331-a047-9cefdb9b0e3b - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-fast-batch-15/0bd25a72-f8ca-4331-a047-9cefdb9b0e3b.jsonl
Author
Owner

Unblocked: #1111 closed (main 5ced3a86). The behavior-verifier brief now carries test_changes.

Unblocked: #1111 closed (main 5ced3a86). The behavior-verifier brief now carries test_changes.
Author
Owner

Work started on branch ticket-1395 (session 47f54f99). #1111 and #1394 are closed. Hand-built outside the implement pipeline: the whole diff is test paths plus generated design files, and the behavior-verifier errors on a test-path-only diff (#1428, seen on #1392 run 192).

Work started on branch ticket-1395 (session 47f54f99). #1111 and #1394 are closed. Hand-built outside the implement pipeline: the whole diff is test paths plus generated design files, and the behavior-verifier errors on a test-path-only diff (#1428, seen on #1392 run 192).
Author
Owner

Resolution

Done: comment_cli_test wraps the end-to-end comment path in use_case("os-backlog comment"); UseCase shim added to plugins/os-backlog/tests/test_helper.rb; plugins/os-backlog/design scaffolded (likec4.config.json, spec.c4, views/index.c4) and system-model build writes generated/journeys/os_backlog_comment.c4 holding CLI -> IssueCommands -> CliTrackerRequirement.tracker -> CliOptions.comment_body -> Issues.comment -> FileBackend.comment; backend shown is File (FileTrackerSandbox). likec4 validate passes inside the build. Tracer now binds the target's Gemfile and preloads bundler/setup before the recorder when the target has a Gemfile, so os-backlog's locked json activates first. To view: system-model serve plugins/os-backlog, view os_backlog_comment.

Evidence: Hand-built outside the implement pipeline because the whole diff is test paths plus generated files and the behavior-verifier errors on such a diff (#1428). Feature commit 3f7765c3, merged to main 2e31c37a. os-backlog suite 327 runs 0 failures; os-sdlc suite 2784 runs 0 failures; rubocop clean on the os-sdlc files; os-me (5 journeys) and os (handoff_complete) rebuilt as regression checks; contract-auditor GAP on the first placement resolved by moving the binding into Tracer#environment.

Follow-ups: Filed: #1434 (Tracer records zero journeys silently when the trace subprocess fails; bit twice this session). Skeptic DROP, noted here: a Zeitwerk eager-load guard (test_helper already eager-loads at suite load); a shared source for the UseCase shim (ADR-0300 prescribes the local copy). Criterion 3 (Jared opens the view in serve) is his to check.

## Resolution **Done:** comment_cli_test wraps the end-to-end comment path in use_case("os-backlog comment"); UseCase shim added to plugins/os-backlog/tests/test_helper.rb; plugins/os-backlog/design scaffolded (likec4.config.json, spec.c4, views/index.c4) and system-model build writes generated/journeys/os_backlog_comment.c4 holding CLI -> IssueCommands -> CliTrackerRequirement.tracker -> CliOptions.comment_body -> Issues.comment -> FileBackend.comment; backend shown is File (FileTrackerSandbox). likec4 validate passes inside the build. Tracer now binds the target's Gemfile and preloads bundler/setup before the recorder when the target has a Gemfile, so os-backlog's locked json activates first. To view: system-model serve plugins/os-backlog, view os_backlog_comment. **Evidence:** Hand-built outside the implement pipeline because the whole diff is test paths plus generated files and the behavior-verifier errors on such a diff (#1428). Feature commit 3f7765c3, merged to main 2e31c37a. os-backlog suite 327 runs 0 failures; os-sdlc suite 2784 runs 0 failures; rubocop clean on the os-sdlc files; os-me (5 journeys) and os (handoff_complete) rebuilt as regression checks; contract-auditor GAP on the first placement resolved by moving the binding into Tracer#environment. **Follow-ups:** Filed: #1434 (Tracer records zero journeys silently when the trace subprocess fails; bit twice this session). Skeptic DROP, noted here: a Zeitwerk eager-load guard (test_helper already eager-loads at suite load); a shared source for the UseCase shim (ADR-0300 prescribes the local copy). Criterion 3 (Jared opens the view in serve) is his to check.
jared closed this issue 2026-10-27 18:05:20 +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#1395
No description provided.