Lens proposal: group the values set at open into one value for Implementation.open #905

Open
opened 2026-10-02 15:09:46 +00:00 by jared · 0 comments
Owner

Problem

The #897 refactor changed Implementation.open to open(work_order, position:, **columns). The factory no longer names the values set at open. A caller can pass session_id:, ticket:, map_name:, position: or target: in columns and silently override the value that the factory sets. The "{}" default for project_config now exists only in the DB schema.

LENS line from the #897 run (dispatch 34, refactorer):
LENS: P1 broken at plugins/os-sdlc/lib/os_sdlc/command/implementation/open.rb:47 - BREAKS: correction 3 (map_digest into Implementation.open) is not applied, so Open writes the digest in a second UPDATE; JUSTIFIED: yes, a fifth keyword trips the parameter-list cop, and grouping the values frozen at open needs test call-site edits outside refactorer scope (principle 5); PROPOSAL: NONE, record it as a follow-up to group ticket_body, project_config and map_digest in one value passed to Implementation.open.

Challenge verdict (opus, HEAD e43b1864): heuristic holds. The second UPDATE is gone (open.rb:48). The cop reason is out of date, because **columns avoids the cop. The open interface is the new reason for the same grouping.

Observed

# plugins/os-sdlc/lib/os_sdlc/model/implementation.rb:53-56
def self.open(work_order, position:, **columns)
  abandon_unfinished!(work_order.session_id)
  create(session_id: work_order.session_id, ticket: work_order.ticket, map_name: work_order.map_path,
         position: NodeName.parse(position).to_s, target: work_order.target, **columns)
end

44 call sites exist. 6 pass more than position:.

Reproduce

n/a: design defect; no failing behavior.

Approach

Candidate: one value object for the values set at open (ticket_body, project_config, map_digest), passed to Implementation.open as one keyword. Rejected: explicit keywords plus a # rubocop:disable (the cop is right that the list is long).

Origin

  • Trigger: /os-sdlc:implement 897, implementation 6, LENS line from dispatch 34; lens challenge after implementation_complete.
  • Improvised this session: none.
  • Chain: open interface on Implementation.open ← the refactorer used **columns to avoid the parameter-list cop without test edits (d93e4600) ← refactorer scope forbids test call-site edits (DESIGN: refactorer agent principle 5).
  • Root candidate: none.
  • Where: plugins/os-sdlc/lib/os_sdlc/model/implementation.rb
  • Session: 8e234876-f10b-45d6-8783-ad61b3747f10
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/8e234876-f10b-45d6-8783-ad61b3747f10.jsonl

VERDICT: CREATE — the #897 refactor left a real open interface on Implementation.open; the lens challenge upheld it; the implement skill requires a Lens proposal ticket for each JUSTIFIED: yes line.

## Problem The #897 refactor changed `Implementation.open` to `open(work_order, position:, **columns)`. The factory no longer names the values set at open. A caller can pass `session_id:`, `ticket:`, `map_name:`, `position:` or `target:` in `columns` and silently override the value that the factory sets. The `"{}"` default for `project_config` now exists only in the DB schema. LENS line from the #897 run (dispatch 34, refactorer): `LENS: P1 broken at plugins/os-sdlc/lib/os_sdlc/command/implementation/open.rb:47 - BREAKS: correction 3 (map_digest into Implementation.open) is not applied, so Open writes the digest in a second UPDATE; JUSTIFIED: yes, a fifth keyword trips the parameter-list cop, and grouping the values frozen at open needs test call-site edits outside refactorer scope (principle 5); PROPOSAL: NONE, record it as a follow-up to group ticket_body, project_config and map_digest in one value passed to Implementation.open.` Challenge verdict (opus, HEAD e43b1864): heuristic holds. The second UPDATE is gone (open.rb:48). The cop reason is out of date, because `**columns` avoids the cop. The open interface is the new reason for the same grouping. ## Observed ```ruby # plugins/os-sdlc/lib/os_sdlc/model/implementation.rb:53-56 def self.open(work_order, position:, **columns) abandon_unfinished!(work_order.session_id) create(session_id: work_order.session_id, ticket: work_order.ticket, map_name: work_order.map_path, position: NodeName.parse(position).to_s, target: work_order.target, **columns) end ``` 44 call sites exist. 6 pass more than `position:`. ## Reproduce n/a: design defect; no failing behavior. ## Approach Candidate: one value object for the values set at open (`ticket_body`, `project_config`, `map_digest`), passed to `Implementation.open` as one keyword. Rejected: explicit keywords plus a `# rubocop:disable` (the cop is right that the list is long). ## Origin - Trigger: `/os-sdlc:implement 897`, implementation 6, LENS line from dispatch 34; lens challenge after `implementation_complete`. - Improvised this session: none. - Chain: open interface on `Implementation.open` ← the refactorer used `**columns` to avoid the parameter-list cop without test edits (`d93e4600`) ← refactorer scope forbids test call-site edits (DESIGN: refactorer agent principle 5). - Root candidate: none. - Where: `plugins/os-sdlc/lib/os_sdlc/model/implementation.rb` - Session: 8e234876-f10b-45d6-8783-ad61b3747f10 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/8e234876-f10b-45d6-8783-ad61b3747f10.jsonl VERDICT: CREATE — the #897 refactor left a real open interface on Implementation.open; the lens challenge upheld it; the implement skill requires a Lens proposal ticket for each JUSTIFIED: yes line.
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#905
No description provided.