os-sdlc reads category names from the shared os-backlog gem #1108

Open
opened 2026-10-18 16:36:47 +00:00 by jared · 0 comments
Owner

Problem

OsSdlc::Tracker::Ticket::CATEGORY_PREFIX and any local category list in os-sdlc copy the category names that Backlog::IssueCreate::CategoryLabels::NAMES owns.
Two lists drift apart.
This ticket is split from #1105 because that run is bound to the os-backlog target.

Reproduce

n/a: design ticket; the gap is the missing shared gem.

Approach

Move Backlog::IssueCreate::CategoryLabels into the shared os-backlog gem (ADR-0279). The gem does not exist yet; creating or extending it is in scope.
Replace OsSdlc::Tracker::Ticket::CATEGORY_PREFIX and any local category list in os-sdlc with reads of CategoryLabels::NAMES.
Add a test at the os-sdlc Ticket seam that discriminates on gem use: a local copy of the names must fail it.

Required work:

  1. Remove the os-sdlc prefix constant — check: absent CATEGORY_PREFIX in plugins/os-sdlc/lib/**/*.rb

Acceptance criteria

  1. Given os-sdlc code that needs the category names, when it reads them, then it reads CategoryLabels::NAMES from the shared gem.
  2. Given a local copy of the category names in os-sdlc, when the Ticket seam test runs, then it fails.

Owner sketch

module OsSdlc
  module Tracker
    class Ticket
      def categories
      end
    end
  end
end

Starting point

Blocked by #1105.

diff --git a/plugins/os-sdlc/tests/tracker/ticket_test.rb b/plugins/os-sdlc/tests/tracker/ticket_test.rb
index 816e3c7e..0169f913 100644
--- a/plugins/os-sdlc/tests/tracker/ticket_test.rb
+++ b/plugins/os-sdlc/tests/tracker/ticket_test.rb
@@ -13,5 +13,11 @@ module OsSdlc
     def test_a_ticket_without_a_category_label_has_no_categories
       assert_empty Tracker::Ticket.new(body: "b", labels: %w[P1]).categories
     end
+
+    def test_categories_are_limited_to_the_shared_category_names
+      ticket = Tracker::Ticket.new(body: "b", labels: %w[category/structure category/bogus])
+
+      assert_equal %w[structure], ticket.categories
+    end
   end
 end

Origin

  • Trigger: implementation 65 of #1105 escalated because acceptance criterion 4 is os-sdlc work outside the os-backlog target
  • Improvised this session: none
  • Chain: AC4 unreachable in the os-backlog run ← ticket #1105 spans two targets ← DESIGN (ADR-0279; the shared gem does not exist yet)
  • Root candidate: none
  • Where: plugins/os-sdlc/lib/os_sdlc/tracker/ticket.rb
  • Session: 26783407-6911-48d5-a818-55fbfbc70108
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/26783407-6911-48d5-a818-55fbfbc70108.jsonl
## Problem `OsSdlc::Tracker::Ticket::CATEGORY_PREFIX` and any local category list in os-sdlc copy the category names that `Backlog::IssueCreate::CategoryLabels::NAMES` owns. Two lists drift apart. This ticket is split from #1105 because that run is bound to the os-backlog target. ## Reproduce n/a: design ticket; the gap is the missing shared gem. ## Approach Move `Backlog::IssueCreate::CategoryLabels` into the shared os-backlog gem (ADR-0279). The gem does not exist yet; creating or extending it is in scope. Replace `OsSdlc::Tracker::Ticket::CATEGORY_PREFIX` and any local category list in os-sdlc with reads of `CategoryLabels::NAMES`. Add a test at the os-sdlc `Ticket` seam that discriminates on gem use: a local copy of the names must fail it. Required work: 1. Remove the os-sdlc prefix constant — check: absent `CATEGORY_PREFIX` in `plugins/os-sdlc/lib/**/*.rb` ## Acceptance criteria 1. Given os-sdlc code that needs the category names, when it reads them, then it reads `CategoryLabels::NAMES` from the shared gem. 2. Given a local copy of the category names in os-sdlc, when the Ticket seam test runs, then it fails. ## Owner sketch ```ruby module OsSdlc module Tracker class Ticket def categories end end end end ``` ## Starting point Blocked by #1105. ```diff diff --git a/plugins/os-sdlc/tests/tracker/ticket_test.rb b/plugins/os-sdlc/tests/tracker/ticket_test.rb index 816e3c7e..0169f913 100644 --- a/plugins/os-sdlc/tests/tracker/ticket_test.rb +++ b/plugins/os-sdlc/tests/tracker/ticket_test.rb @@ -13,5 +13,11 @@ module OsSdlc def test_a_ticket_without_a_category_label_has_no_categories assert_empty Tracker::Ticket.new(body: "b", labels: %w[P1]).categories end + + def test_categories_are_limited_to_the_shared_category_names + ticket = Tracker::Ticket.new(body: "b", labels: %w[category/structure category/bogus]) + + assert_equal %w[structure], ticket.categories + end end end ``` ## Origin - Trigger: implementation 65 of #1105 escalated because acceptance criterion 4 is os-sdlc work outside the os-backlog target - Improvised this session: none - Chain: AC4 unreachable in the os-backlog run ← ticket #1105 spans two targets ← DESIGN (ADR-0279; the shared gem does not exist yet) - Root candidate: none - Where: plugins/os-sdlc/lib/os_sdlc/tracker/ticket.rb - Session: 26783407-6911-48d5-a818-55fbfbc70108 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/26783407-6911-48d5-a818-55fbfbc70108.jsonl
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#1108
No description provided.