Load os-me test support through Zeitwerk and move FakeRunner into it #1469

Closed
opened 2026-10-28 16:57:19 +00:00 by jared · 2 comments
Owner

Problem

plugins/os-me/test/test_helper.rb loads support files with require_relative (lines 3-5) and has no Zeitwerk loader, against ADR-0241.
FakeRunner sits inside test_helper.rb at line 97.
plugins/os-me/test/yaml_prediction_fixtures.rb sits beside the tests, not in a support directory.

Approach

Push test/support on a Zeitwerk loader in test_helper.rb. Copy the form at plugins/os-sdlc/tests/test_helper.rb:87-89.
Move FakeRunner to plugins/os-me/test/support/fake_headless_runner.rb as FakeHeadlessRunner; it returns OsMe::HeadlessResult.
Move yaml_prediction_fixtures.rb to plugins/os-me/test/support/yaml_prediction_fixture.rb as YamlPredictionFixture, if it is pure.
Update the callers.

Required work:

  1. Add the Zeitwerk loader — check: present Zeitwerk::Loader in plugins/os-me/test/test_helper.rb
  2. Move FakeRunner out of the helper — check: absent class FakeRunner in plugins/os-me/test/test_helper.rb

Acceptance criteria

  1. Given the loader and moved classes, when the os-me suite runs, then it is green.

Owner sketch

FakeHeadlessRunner
YamlPredictionFixture

Route: by hand or fast-batch, per os-me setup (plugins/os-me/.sdlc does not exist).

Origin

  • Trigger: tests/support inventory survey 2026-10-28 after fast-batch-21 (#1019)
  • Improvised this session: none
  • Chain: misnamed or hand-built test records ← convention adopted 2026-10-28 but only TicketFixture converted ← DESIGN (#1019 memo comment)
  • Root candidate: #1019 (skeptic: OCCURRENCE 1019; filed user-approved because #1019 is the ruling ticket and holds no build work)
  • Where: plugins/os-me/test/test_helper.rb
  • Session: 2dd497e0-555e-4518-9cdd-c68461c32463
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/2dd497e0-555e-4518-9cdd-c68461c32463.jsonl

VERDICT: CREATE

Parent: #1019

## Problem `plugins/os-me/test/test_helper.rb` loads support files with require_relative (lines 3-5) and has no Zeitwerk loader, against ADR-0241. `FakeRunner` sits inside `test_helper.rb` at line 97. `plugins/os-me/test/yaml_prediction_fixtures.rb` sits beside the tests, not in a support directory. ## Approach Push `test/support` on a Zeitwerk loader in `test_helper.rb`. Copy the form at `plugins/os-sdlc/tests/test_helper.rb:87-89`. Move FakeRunner to `plugins/os-me/test/support/fake_headless_runner.rb` as `FakeHeadlessRunner`; it returns `OsMe::HeadlessResult`. Move `yaml_prediction_fixtures.rb` to `plugins/os-me/test/support/yaml_prediction_fixture.rb` as `YamlPredictionFixture`, if it is pure. Update the callers. Required work: 1. Add the Zeitwerk loader — check: present `Zeitwerk::Loader` in `plugins/os-me/test/test_helper.rb` 2. Move FakeRunner out of the helper — check: absent `class FakeRunner` in `plugins/os-me/test/test_helper.rb` ## Acceptance criteria 1. Given the loader and moved classes, when the os-me suite runs, then it is green. ## Owner sketch ```ruby FakeHeadlessRunner YamlPredictionFixture ``` Route: by hand or fast-batch, per os-me setup (`plugins/os-me/.sdlc` does not exist). ## Origin - Trigger: tests/support inventory survey 2026-10-28 after fast-batch-21 (#1019) - Improvised this session: none - Chain: misnamed or hand-built test records ← convention adopted 2026-10-28 but only TicketFixture converted ← DESIGN (#1019 memo comment) - Root candidate: #1019 (skeptic: OCCURRENCE 1019; filed user-approved because #1019 is the ruling ticket and holds no build work) - Where: plugins/os-me/test/test_helper.rb - Session: 2dd497e0-555e-4518-9cdd-c68461c32463 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/2dd497e0-555e-4518-9cdd-c68461c32463.jsonl VERDICT: CREATE Parent: #1019
Author
Owner

Skeptic DROP for follow-up 'os-me test helpers outside test/support after #1469': nothing fails today (need-to-exist test). Leftovers, move on next touch: UseCase in plugins/os-me/test/test_helper.rb; beside the tests and loaded by require_relative: fake_claude_fixture.rb, candidate_fakes.rb, in_process_cli.rb, confidence_label_fixtures.rb, lever_label_fixtures.rb, gem_replies.rb, extract_moment_kinds_harness.rb, extract_cursor_seed.rb, memo_keyed_adapters.rb, one_thing_store.rb, recording_adapter.rb. Target: plugins/os-me/test/support/, one constant per file, convention names.

Skeptic DROP for follow-up 'os-me test helpers outside test/support after #1469': nothing fails today (need-to-exist test). Leftovers, move on next touch: UseCase in plugins/os-me/test/test_helper.rb; beside the tests and loaded by require_relative: fake_claude_fixture.rb, candidate_fakes.rb, in_process_cli.rb, confidence_label_fixtures.rb, lever_label_fixtures.rb, gem_replies.rb, extract_moment_kinds_harness.rb, extract_cursor_seed.rb, memo_keyed_adapters.rb, one_thing_store.rb, recording_adapter.rb. Target: plugins/os-me/test/support/, one constant per file, convention names.
Author
Owner

Resolution

Done: os-me test_helper Zeitwerk-loads test/support; FakeRunner is test/support/fake_headless_runner.rb (FakeHeadlessRunner); yaml_prediction_fixtures.rb is test/support/yaml_prediction_fixture.rb (YamlPredictionFixture, pure); TranscriptFixtures (disk I/O) is test/support/transcript_scenario.rb (TranscriptScenario).

Evidence: fast-batch-22 merged to main 5f32ca8f; commits 27e407e6, 9b7acf1e. os-me suite 443 runs, 810 assertions, 0 failures before and after.

Follow-ups: dropped: moving UseCase and 11 beside-the-test helpers into test/support got a ticket-skeptic DROP (need-to-exist); list posted on #1469.

## Resolution **Done:** os-me test_helper Zeitwerk-loads test/support; FakeRunner is test/support/fake_headless_runner.rb (FakeHeadlessRunner); yaml_prediction_fixtures.rb is test/support/yaml_prediction_fixture.rb (YamlPredictionFixture, pure); TranscriptFixtures (disk I/O) is test/support/transcript_scenario.rb (TranscriptScenario). **Evidence:** fast-batch-22 merged to main 5f32ca8f; commits 27e407e6, 9b7acf1e. os-me suite 443 runs, 810 assertions, 0 failures before and after. **Follow-ups:** dropped: moving UseCase and 11 beside-the-test helpers into test/support got a ticket-skeptic DROP (need-to-exist); list posted on #1469.
jared closed this issue 2026-10-28 19:01:44 +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#1469
No description provided.