Implementation answers recent_visits and green_runs_as_of; drop dataset chains #1180

Closed
opened 2026-10-19 22:35:00 +00:00 by jared · 2 comments
Owner

Problem

Two Implementation helpers build dataset chains on @implementation themselves: dispatches_dataset.by_agent_type(...).recently_created(2).all and step_results_dataset.at_or_before(...).latest_created.first_green&.minitest_runs in implementation/progress_witness.rb, and dispatches_dataset.newest_few(...).eager(:agent).all in implementation/state_dump.rb. Implementation owns its dispatch queries. Ruling S77 adds the answers to it.

Reproduce

n/a: structure-wave reach-through answer, nothing to reproduce

Approach

Required work:

  1. In plugins/os-sdlc/lib/os_sdlc/implementation.rb, add recent_visits(agent_type), which returns dispatches_dataset.by_agent_type(agent_type).recently_created(2).all. — check: present def recent_visits in plugins/os-sdlc/lib/os_sdlc/implementation.rb
  2. In the same file, add green_runs_as_of(time), which returns step_results_dataset.at_or_before(time).latest_created.first_green&.minitest_runs. — check: present def green_runs_as_of in plugins/os-sdlc/lib/os_sdlc/implementation.rb
  3. In plugins/os-sdlc/lib/os_sdlc/implementation/progress_witness.rb, call @implementation.recent_visits(from_node) (line 24) and @implementation.green_runs_as_of(visit.created_at) (line 28). — check: absent _dataset in plugins/os-sdlc/lib/os_sdlc/implementation/progress_witness.rb
  4. In plugins/os-sdlc/lib/os_sdlc/implementation/state_dump.rb:25, replace the dispatches_dataset.newest_few(...).eager(:agent).all chain with a call to an Implementation answer recent_dispatches(limit), defined in implementation.rb, that returns the newest few dispatches with :agent eager loaded. — check: absent _dataset in plugins/os-sdlc/lib/os_sdlc/implementation/state_dump.rb

Acceptance criteria

  1. Given the suite, when run after the change, then it passes with no new failures. The change keeps behavior; the existing suite is the proof.
  2. Given an implementation with dispatches and green step results, when recent_visits and green_runs_as_of are called, then they return what the old chains returned.
  3. Given progress_witness.rb and state_dump.rb, when searched for _dataset, then none remains.

Owner sketch

class OsSdlc::Implementation
  def recent_visits(agent_type)
  def green_runs_as_of(time)
  def recent_dispatches(limit)
end

Non-goals

Ruling S77 names recent_visits and green_runs_as_of. Required work item 4 adds recent_dispatches because the chain at state_dump.rb:25 takes a limit and eager loads :agent, and neither named answer covers it. Add no test.

Origin

  • Trigger: os-sdlc CRC run 3, structure-ruling wave step 3 (reach-throughs)
  • Improvised this session: none
  • Chain: dataset chains in 2 Implementation helpers ← Implementation does not answer its own dispatch and step-result queries ← DESIGN (docs/crc/os-sdlc/wave0/structure-rulings.tsv S77)
  • Root candidate: none found; searched recent_visits, green_runs_as_of, progress_witness, state_dump, dataset
  • Where: plugins/os-sdlc/lib/os_sdlc/implementation/progress_witness.rb
  • Ledger: docs/crc/os-sdlc/ledger.tsv
  • Rulings: docs/crc/os-sdlc/wave0/structure-rulings.tsv
  • Session: 2e167079-f404-4139-9cfa-6c0c937ce9f0
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-os-sdlc-run-3/2e167079-f404-4139-9cfa-6c0c937ce9f0.jsonl

VERDICT: CREATE

## Problem Two Implementation helpers build dataset chains on `@implementation` themselves: `dispatches_dataset.by_agent_type(...).recently_created(2).all` and `step_results_dataset.at_or_before(...).latest_created.first_green&.minitest_runs` in `implementation/progress_witness.rb`, and `dispatches_dataset.newest_few(...).eager(:agent).all` in `implementation/state_dump.rb`. `Implementation` owns its dispatch queries. Ruling S77 adds the answers to it. ## Reproduce n/a: structure-wave reach-through answer, nothing to reproduce ## Approach Required work: 1. In `plugins/os-sdlc/lib/os_sdlc/implementation.rb`, add `recent_visits(agent_type)`, which returns `dispatches_dataset.by_agent_type(agent_type).recently_created(2).all`. — check: present `def recent_visits` in `plugins/os-sdlc/lib/os_sdlc/implementation.rb` 2. In the same file, add `green_runs_as_of(time)`, which returns `step_results_dataset.at_or_before(time).latest_created.first_green&.minitest_runs`. — check: present `def green_runs_as_of` in `plugins/os-sdlc/lib/os_sdlc/implementation.rb` 3. In `plugins/os-sdlc/lib/os_sdlc/implementation/progress_witness.rb`, call `@implementation.recent_visits(from_node)` (line 24) and `@implementation.green_runs_as_of(visit.created_at)` (line 28). — check: absent `_dataset` in `plugins/os-sdlc/lib/os_sdlc/implementation/progress_witness.rb` 4. In `plugins/os-sdlc/lib/os_sdlc/implementation/state_dump.rb:25`, replace the `dispatches_dataset.newest_few(...).eager(:agent).all` chain with a call to an `Implementation` answer `recent_dispatches(limit)`, defined in `implementation.rb`, that returns the newest few dispatches with `:agent` eager loaded. — check: absent `_dataset` in `plugins/os-sdlc/lib/os_sdlc/implementation/state_dump.rb` ## Acceptance criteria 1. Given the suite, when run after the change, then it passes with no new failures. The change keeps behavior; the existing suite is the proof. 2. Given an implementation with dispatches and green step results, when `recent_visits` and `green_runs_as_of` are called, then they return what the old chains returned. 3. Given `progress_witness.rb` and `state_dump.rb`, when searched for `_dataset`, then none remains. ## Owner sketch ```ruby class OsSdlc::Implementation def recent_visits(agent_type) def green_runs_as_of(time) def recent_dispatches(limit) end ``` ## Non-goals Ruling S77 names `recent_visits` and `green_runs_as_of`. Required work item 4 adds `recent_dispatches` because the chain at `state_dump.rb:25` takes a limit and eager loads `:agent`, and neither named answer covers it. Add no test. ## Origin - Trigger: os-sdlc CRC run 3, structure-ruling wave step 3 (reach-throughs) - Improvised this session: none - Chain: dataset chains in 2 Implementation helpers ← Implementation does not answer its own dispatch and step-result queries ← DESIGN (docs/crc/os-sdlc/wave0/structure-rulings.tsv S77) - Root candidate: none found; searched recent_visits, green_runs_as_of, progress_witness, state_dump, dataset - Where: plugins/os-sdlc/lib/os_sdlc/implementation/progress_witness.rb - Ledger: docs/crc/os-sdlc/ledger.tsv - Rulings: docs/crc/os-sdlc/wave0/structure-rulings.tsv - Session: 2e167079-f404-4139-9cfa-6c0c937ce9f0 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-os-sdlc-run-3/2e167079-f404-4139-9cfa-6c0c937ce9f0.jsonl VERDICT: CREATE
Author
Owner

Work started on branch crc-os-sdlc-run-3 (structure-change map).

Work started on branch crc-os-sdlc-run-3 (structure-change map).
Author
Owner

Resolution

Done: S77 applied: Implementation#recent_visits, #green_runs_as_of and #recent_dispatches(limit) added; ProgressWitness and StateDump call them and name no dataset.

Evidence: 3f87a3b7 (Runner commit, gate green, suite ~60 s). Implementation 92, dispatch 774.

Follow-ups: none

## Resolution **Done:** S77 applied: Implementation#recent_visits, #green_runs_as_of and #recent_dispatches(limit) added; ProgressWitness and StateDump call them and name no dataset. **Evidence:** 3f87a3b7 (Runner commit, gate green, suite ~60 s). Implementation 92, dispatch 774. **Follow-ups:** none
jared closed this issue 2026-10-19 22:52:08 +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#1180
No description provided.