collaborator measures type through merge, keep roleless Flay groups, and report untried shapes #1219

Open
opened 2026-10-20 18:23:24 +00:00 by jared · 0 comments
Owner

Problem

Three collaborator-pass measures gave counts in run 3 that did not follow the code. name_collision types a value only when the Hash literal is the argument or one hop from the entry, so 9 Hash takers behind run.merge(...) and a helper method were untyped and a partial rename read as success. copied_entry drops a Flay group when any member has no ledger role (shared_role saw [nil, "query"]), so the count rose from 16 to 29 when wave 2 gave roles to new files, and it reports groups that match only in syntax (option tables with different literals). stop-check compares the last two runs only, so a shape no ticket touched reads below_fraction and stops; it cannot tell "untried" from "plateaued".

Observed

plugins/os-sdlc/bin/collaborator-pass --target os-sdlc measure --out <dir> --sources params,inward,flay,reek,effects
name_collision run: Hash takers 5; RunDirectory takers 13; untyped 9
copied_entry 16 -> 29 between runs 20261020T014004Z and 20261020T020325Z with one code commit (#1193)

Reproduce

cd plugins/os-sdlc && bundle exec ruby -Itests tests/collaborator_pass/name_collisions_test.rb

Approach

Required work:

  1. Argument typing follows local.merge(...) and a one-hop helper that returns a Hash literal — check: present merge in plugins/os-sdlc/lib/os_sdlc/collaborator_pass/parameter_types/**/*.rb
  2. copied_entry keeps a Flay group when members have no role and drops SIMILAR groups whose members differ only in literals — check: absent shared_role in plugins/os-sdlc/lib/os_sdlc/collaborator_pass/copied_entries.rb
  3. stop-check reports untried for a shape no ruled recipe touched since the baseline run — check: present untried in plugins/os-sdlc/lib/os_sdlc/collaborator_pass/stop_check.rb

Acceptance criteria

  1. Given a Hash built in a local and passed after merge, when the measure types the taker, then the taker is typed Hash.
  2. Given a Flay group whose members have no ledger role, when copied_entry classifies, then the group is reported.
  3. Given two option tables with the same keys and different literals, when copied_entry classifies, then no finding is reported.
  4. Given a shape with no ruled recipe since the baseline, when stop-check runs, then its reason is untried and it is not stopped.

Owner sketch

class OsSdlc::CollaboratorPass::ParameterTypes::Argument
  def type
end
class OsSdlc::CollaboratorPass::CopiedEntries
  def findings
end
class OsSdlc::CollaboratorPass::StopCheck
  def reason(shape)
end

Origin

  • Trigger: run 3 retrospective smell analyses of name_collision, copied_entry, and the stop-check reading
  • Improvised this session: none
  • Chain: counts moved without code ← measures depend on literal adjacency, ledger roles, and two-run windows ← DESIGN (collaborator_pass measures as built in #1083)
  • Root candidate: none found; searched name_collision, untyped, copied_entry, shared_role, Flay, stop-check, below_fraction, delta-check, untried (#1118 is the typing base this extends)

VERDICT: CREATE

  • Where: plugins/os-sdlc/lib/os_sdlc/collaborator_pass/
  • Session: 86f833b9-4ecf-435e-b24d-0644ff554982
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/86f833b9-4ecf-435e-b24d-0644ff554982.jsonl
## Problem Three collaborator-pass measures gave counts in run 3 that did not follow the code. name_collision types a value only when the Hash literal is the argument or one hop from the entry, so 9 Hash takers behind `run.merge(...)` and a helper method were untyped and a partial rename read as success. copied_entry drops a Flay group when any member has no ledger role (`shared_role` saw `[nil, "query"]`), so the count rose from 16 to 29 when wave 2 gave roles to new files, and it reports groups that match only in syntax (option tables with different literals). stop-check compares the last two runs only, so a shape no ticket touched reads `below_fraction` and stops; it cannot tell "untried" from "plateaued". ## Observed ``` plugins/os-sdlc/bin/collaborator-pass --target os-sdlc measure --out <dir> --sources params,inward,flay,reek,effects ``` ``` name_collision run: Hash takers 5; RunDirectory takers 13; untyped 9 copied_entry 16 -> 29 between runs 20261020T014004Z and 20261020T020325Z with one code commit (#1193) ``` ## Reproduce ``` cd plugins/os-sdlc && bundle exec ruby -Itests tests/collaborator_pass/name_collisions_test.rb ``` ## Approach Required work: 1. Argument typing follows `local.merge(...)` and a one-hop helper that returns a Hash literal — check: present `merge` in `plugins/os-sdlc/lib/os_sdlc/collaborator_pass/parameter_types/**/*.rb` 2. copied_entry keeps a Flay group when members have no role and drops SIMILAR groups whose members differ only in literals — check: absent `shared_role` in `plugins/os-sdlc/lib/os_sdlc/collaborator_pass/copied_entries.rb` 3. stop-check reports `untried` for a shape no ruled recipe touched since the baseline run — check: present `untried` in `plugins/os-sdlc/lib/os_sdlc/collaborator_pass/stop_check.rb` ## Acceptance criteria 1. Given a Hash built in a local and passed after `merge`, when the measure types the taker, then the taker is typed Hash. 2. Given a Flay group whose members have no ledger role, when copied_entry classifies, then the group is reported. 3. Given two option tables with the same keys and different literals, when copied_entry classifies, then no finding is reported. 4. Given a shape with no ruled recipe since the baseline, when stop-check runs, then its reason is `untried` and it is not stopped. ## Owner sketch ```ruby class OsSdlc::CollaboratorPass::ParameterTypes::Argument def type end class OsSdlc::CollaboratorPass::CopiedEntries def findings end class OsSdlc::CollaboratorPass::StopCheck def reason(shape) end ``` ## Origin - Trigger: run 3 retrospective smell analyses of name_collision, copied_entry, and the stop-check reading - Improvised this session: none - Chain: counts moved without code ← measures depend on literal adjacency, ledger roles, and two-run windows ← DESIGN (collaborator_pass measures as built in #1083) - Root candidate: none found; searched name_collision, untyped, copied_entry, shared_role, Flay, stop-check, below_fraction, delta-check, untried (#1118 is the typing base this extends) VERDICT: CREATE - Where: plugins/os-sdlc/lib/os_sdlc/collaborator_pass/ - Session: 86f833b9-4ecf-435e-b24d-0644ff554982 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/86f833b9-4ecf-435e-b24d-0644ff554982.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#1219
No description provided.