Relevance step must not return needs_ruling when an Accepted ADR resolves the conflict #1006

Closed
opened 2026-10-14 18:40:32 +00:00 by jared · 4 comments
Owner

Problem

The takedown relevance step returns needs_ruling even when an Accepted amending ADR resolves the conflict. The step then stops the run and adds the waiting label. A ruling request must mean a real heuristic violation. Here the judge had already resolved the conflict.

Observed

Runs docs/takedown/1003-20261014-120014 and docs/takedown/1003-20261014-120213 both stopped at relevance with "needs ruling 0283". In run 2 the judge said that Accepted ADR-0290 resolves the conflict. The verdict stayed needs_ruling and the step added waiting.

plugins/os-sdlc/eval/ticket-takedown/lib/takedown/model/relevance.rb:19
return "needs_ruling" if conflicts.any?

plugins/os-sdlc/eval/ticket-takedown/lib/takedown/command/relevance_step.rb:58
@tracker.add_label(run.ticket, WAITING) if relevance.verdict == "needs_ruling"

Reproduce

n/a: the failure shows in the two #1003 run records named above.

Approach

Required work: none beyond the acceptance criteria.

Acceptance criteria

  1. Given a judge output that names a conflict and says an Accepted amending ADR resolves it, when the relevance step runs, then the verdict is not needs_ruling and the step adds no waiting label.
  2. Given a judge output that names a conflict with no resolving Accepted ADR, when the relevance step runs, then the verdict is needs_ruling.
  3. The verdict follows the judge's machine-readable output, not the presence of a conflict entry.

Owner sketch

class Takedown::Model::Relevance
  def verdict
  end
end

Blocking edges

Blocks #1005. The next tracer can touch ADR-0283 or ADR-0291, and this defect can stop it.

Origin

  • Trigger: bin/takedown-run on #1003, runs 1003-20261014-120014 and 1003-20261014-120213
  • Improvised this session: none
  • Chain: relevance stops with needs_ruling ← Relevance#verdict returns needs_ruling whenever conflicts.any? ← DESIGN: ADR-0283 and ADR-0291 amend each other; verdict ignores the judge's resolved flag
  • Root candidate: this ticket
  • Where: plugins/os-sdlc/eval/ticket-takedown/lib/takedown/model/relevance.rb; plugins/os-sdlc/eval/ticket-takedown/lib/takedown/command/relevance_step.rb
  • Session: e1ebbb4b-5618-4e4f-99a2-c655bee9c95f
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-prism-architect/e1ebbb4b-5618-4e4f-99a2-c655bee9c95f.jsonl

Ticket-skeptic verdict was DROP (depth-1 rule). Jared overrode it on 2026-10-14 and ordered the ticket filed as blocking #1005.

VERDICT: CREATE — owner override of the skeptic DROP on 2026-10-14.

## Problem The takedown relevance step returns `needs_ruling` even when an Accepted amending ADR resolves the conflict. The step then stops the run and adds the `waiting` label. A ruling request must mean a real heuristic violation. Here the judge had already resolved the conflict. ## Observed Runs `docs/takedown/1003-20261014-120014` and `docs/takedown/1003-20261014-120213` both stopped at relevance with "needs ruling 0283". In run 2 the judge said that Accepted ADR-0290 resolves the conflict. The verdict stayed `needs_ruling` and the step added `waiting`. ``` plugins/os-sdlc/eval/ticket-takedown/lib/takedown/model/relevance.rb:19 return "needs_ruling" if conflicts.any? plugins/os-sdlc/eval/ticket-takedown/lib/takedown/command/relevance_step.rb:58 @tracker.add_label(run.ticket, WAITING) if relevance.verdict == "needs_ruling" ``` ## Reproduce n/a: the failure shows in the two #1003 run records named above. ## Approach Required work: none beyond the acceptance criteria. ## Acceptance criteria 1. Given a judge output that names a conflict and says an Accepted amending ADR resolves it, when the relevance step runs, then the verdict is not `needs_ruling` and the step adds no `waiting` label. 2. Given a judge output that names a conflict with no resolving Accepted ADR, when the relevance step runs, then the verdict is `needs_ruling`. 3. The verdict follows the judge's machine-readable output, not the presence of a conflict entry. ## Owner sketch ```ruby class Takedown::Model::Relevance def verdict end end ``` ## Blocking edges Blocks #1005. The next tracer can touch ADR-0283 or ADR-0291, and this defect can stop it. ## Origin - Trigger: `bin/takedown-run` on #1003, runs `1003-20261014-120014` and `1003-20261014-120213` - Improvised this session: none - Chain: relevance stops with `needs_ruling` ← `Relevance#verdict` returns `needs_ruling` whenever `conflicts.any?` ← `DESIGN`: ADR-0283 and ADR-0291 amend each other; verdict ignores the judge's resolved flag - Root candidate: this ticket - Where: plugins/os-sdlc/eval/ticket-takedown/lib/takedown/model/relevance.rb; plugins/os-sdlc/eval/ticket-takedown/lib/takedown/command/relevance_step.rb - Session: e1ebbb4b-5618-4e4f-99a2-c655bee9c95f - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-prism-architect/e1ebbb4b-5618-4e4f-99a2-c655bee9c95f.jsonl Ticket-skeptic verdict was DROP (depth-1 rule). Jared overrode it on 2026-10-14 and ordered the ticket filed as blocking #1005. VERDICT: CREATE — owner override of the skeptic DROP on 2026-10-14.
Author
Owner

Blocks #1005. Ticket-skeptic gave DROP (depth-1); Jared overrode it on 2026-10-14.

Blocks #1005. Ticket-skeptic gave DROP (depth-1); Jared overrode it on 2026-10-14.
Author
Owner

Takedown relevance: needs a ruling

Harm: A takedown run whose judge names an ADR conflict that an Accepted amending ADR already resolves stops at relevance with needs_ruling and gets the waiting label, so a ticket that needs no ruling blocks the run.
Protects: The ruling gate that Accepted ADR-0289 sets: Jared's ruling is requested only for a real heuristic violation, and the waiting label means a real blocker.
Harm path: bin/takedown-run on a live ticket runs the relevance step (run_builder.rb:34, plan.relevance? is true in live mode), which calls Relevance#verdict (relevance.rb:19) and adds waiting when the verdict is needs_ruling (relevance_step.rb:58). (live: true)

Evidence:

  • plugins/os-sdlc/eval/ticket-takedown/lib/takedown/model/relevance.rb:19: verdict returns needs_ruling whenever adr_conflicts is non-empty, with no check of any resolved state.
  • plugins/os-sdlc/eval/ticket-takedown/lib/takedown/command/relevance_step.rb:58: post adds the waiting label when relevance.verdict is needs_ruling.
  • plugins/os-sdlc/eval/ticket-takedown/lib/takedown/command/run_builder.rb:34: relevance step is built unless plan.relevance? is false, so the step is wired into the current live run.
  • plugins/os-sdlc/eval/ticket-takedown/lib/takedown/model/run_plan.rb:28: relevance? is !ruling?, so live runs reach the step.
  • plugins/os-sdlc/eval/ticket-takedown/harness/schemas/relevance.json:17: The judge schema has only adr_conflicts entries ({adr, reason}) for conflicts; a grep for resolv in this file finds no resolved field.
  • docs/adr/0289-a-takedown-relevance-step-runs-before-research-and-can-see-adrs-amends-adr-0288-and-adr-0281.md:22: Accepted ADR-0289 decision 4 says non-empty adr_conflicts gives needs_ruling, which is the rule the code implements.

Conflicting ADRs:

  • ADR-0289: The ticket makes the verdict depend on a judge resolved state and not on conflict presence, which reverses ADR-0289 decision 4 (non-empty adr_conflicts -> needs_ruling) and the decision 5 effect of waiting on needs_ruling.

The ticket is waiting for Jared's ruling on the ADRs above.

Takedown relevance: needs a ruling Harm: A takedown run whose judge names an ADR conflict that an Accepted amending ADR already resolves stops at relevance with `needs_ruling` and gets the `waiting` label, so a ticket that needs no ruling blocks the run. Protects: The ruling gate that Accepted ADR-0289 sets: Jared's ruling is requested only for a real heuristic violation, and the `waiting` label means a real blocker. Harm path: `bin/takedown-run` on a live ticket runs the relevance step (run_builder.rb:34, `plan.relevance?` is true in live mode), which calls `Relevance#verdict` (relevance.rb:19) and adds `waiting` when the verdict is `needs_ruling` (relevance_step.rb:58). (live: true) Evidence: - plugins/os-sdlc/eval/ticket-takedown/lib/takedown/model/relevance.rb:19: verdict returns needs_ruling whenever adr_conflicts is non-empty, with no check of any resolved state. - plugins/os-sdlc/eval/ticket-takedown/lib/takedown/command/relevance_step.rb:58: post adds the waiting label when relevance.verdict is needs_ruling. - plugins/os-sdlc/eval/ticket-takedown/lib/takedown/command/run_builder.rb:34: relevance step is built unless plan.relevance? is false, so the step is wired into the current live run. - plugins/os-sdlc/eval/ticket-takedown/lib/takedown/model/run_plan.rb:28: relevance? is !ruling?, so live runs reach the step. - plugins/os-sdlc/eval/ticket-takedown/harness/schemas/relevance.json:17: The judge schema has only adr_conflicts entries ({adr, reason}) for conflicts; a grep for resolv in this file finds no resolved field. - docs/adr/0289-a-takedown-relevance-step-runs-before-research-and-can-see-adrs-amends-adr-0288-and-adr-0281.md:22: Accepted ADR-0289 decision 4 says non-empty adr_conflicts gives needs_ruling, which is the rule the code implements. Conflicting ADRs: - ADR-0289: The ticket makes the verdict depend on a judge resolved state and not on conflict presence, which reverses ADR-0289 decision 4 (non-empty adr_conflicts -> needs_ruling) and the decision 5 effect of waiting on needs_ruling. The ticket is waiting for Jared's ruling on the ADRs above.
Author
Owner

Work started 2026-10-14 on branch prism-architect. Jared ruled on the ADR-0289 conflict: ADR-0292 (Accepted, commit 8ecfc46e) amends ADR-0289 decisions 3-5. The takedown run stopped at relevance because this gate cannot judge its own fix, so #1006 is built on the freeform test-first path. The waiting blocker is resolved.

Work started 2026-10-14 on branch prism-architect. Jared ruled on the ADR-0289 conflict: ADR-0292 (Accepted, commit 8ecfc46e) amends ADR-0289 decisions 3-5. The takedown run stopped at relevance because this gate cannot judge its own fix, so #1006 is built on the freeform test-first path. The `waiting` blocker is resolved.
Author
Owner

Resolution

Done: Relevance verdict now counts only unresolved ADR conflicts. Each adr_conflicts entry has a required resolved_by; code accepts it only when docs/adr has that ADR, status Accepted, with a higher number than the conflicting ADR (new Takedown::AdrRecords adapter). waiting is added only for unresolved conflicts; the comment and refusal list only unresolved ADRs. Built test-first on the freeform path per Jared's 2026-10-14 ruling (ADR-0292, amends ADR-0289).

Evidence: Commit a753dfac on prism-architect (ADR-0292 in 8ecfc46e). rake test in plugins/os-sdlc/eval/ticket-takedown: 558 runs, 1042 assertions, 0 failures, 0 errors. New tests: RelevanceTest#test_a_conflict_resolved_by_a_later_accepted_adr_does_not_need_a_ruling, RelevanceTest#test_a_resolved_conflict_falls_through_to_the_harm_path_and_stays_out_of_the_refusal, RunCliTest#test_a_conflict_resolved_by_a_later_accepted_adr_passes_without_the_waiting_label.

Follow-ups: Dropped: RelevanceStep parameter threading (run, relevance) and relevance.rb:27 line length. Both rubocop offenses exist before this ticket (git blame 12d2f052); #1006 did not cause them.

## Resolution **Done:** Relevance verdict now counts only unresolved ADR conflicts. Each adr_conflicts entry has a required resolved_by; code accepts it only when docs/adr has that ADR, status Accepted, with a higher number than the conflicting ADR (new Takedown::AdrRecords adapter). waiting is added only for unresolved conflicts; the comment and refusal list only unresolved ADRs. Built test-first on the freeform path per Jared's 2026-10-14 ruling (ADR-0292, amends ADR-0289). **Evidence:** Commit a753dfac on prism-architect (ADR-0292 in 8ecfc46e). rake test in plugins/os-sdlc/eval/ticket-takedown: 558 runs, 1042 assertions, 0 failures, 0 errors. New tests: RelevanceTest#test_a_conflict_resolved_by_a_later_accepted_adr_does_not_need_a_ruling, RelevanceTest#test_a_resolved_conflict_falls_through_to_the_harm_path_and_stays_out_of_the_refusal, RunCliTest#test_a_conflict_resolved_by_a_later_accepted_adr_passes_without_the_waiting_label. **Follow-ups:** Dropped: RelevanceStep parameter threading (run, relevance) and relevance.rb:27 line length. Both rubocop offenses exist before this ticket (git blame 12d2f052); #1006 did not cause them.
jared closed this issue 2026-10-14 19:00:37 +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#1006
No description provided.