os-me tests: move from decision-model Adapters::Fixed to Adapters::PresetAnswers #1478

Open
opened 2026-10-31 16:02:07 +00:00 by jared · 0 comments
Owner

Problem

decision-model#16 renamed Decision::Model::Adapters::Fixed to Decision::Model::Adapters::PresetAnswers. It also renamed the eval adapter-file type "fixed" to "preset_answers". The os-me tests still use the old names. They break when os-me next updates decision-model.

Changes in decision-model

  1. The class is now Decision::Model::Adapters::PresetAnswers.
  2. The adapter-file type is now "preset_answers".
  3. The answer Hash format is unchanged.
  4. A "type" key in an answer is no longer needed. The kind comes from the question.
  5. PresetAnswers#call now requires questions:. It builds each answer from the type of its question.
  6. Client#ask passes questions:. Direct .call callers must pass it.

Affected files

All paths are under plugins/os-me/test/.

  • moment_kind_test.rb:32
  • answer_source_test.rb:16
  • lever_label_fixtures.rb:20
  • reply_shape_test.rb:18
  • recording_adapter.rb:9
  • gem_replies.rb:29
  • wrong_cost_test.rb:19
  • memo_keyed_adapters.rb:18 (calls .call with no arguments)
  • draft_extraction_test.rb:49
  • headless_claude_test.rb:67 (asserts defined?(Decision::Model::Adapters::Fixed))
  • Any os-me eval adapter.json with "type": "fixed".

Approach

Replace Adapters::Fixed with Adapters::PresetAnswers. Pass questions: to each direct .call. Change "fixed" to "preset_answers" in adapter.json files.


Discoverer: /home/jared/dev/ruby-gems/decision-model, session d6b3dec8-0b4c-4965-a835-96e5db2d6b75, 2026-10-31. Found while doing decision-model#16, which renames the adapter.

## Problem decision-model#16 renamed `Decision::Model::Adapters::Fixed` to `Decision::Model::Adapters::PresetAnswers`. It also renamed the eval adapter-file type "fixed" to "preset_answers". The os-me tests still use the old names. They break when os-me next updates decision-model. ## Changes in decision-model 1. The class is now `Decision::Model::Adapters::PresetAnswers`. 2. The adapter-file type is now "preset_answers". 3. The answer Hash format is unchanged. 4. A "type" key in an answer is no longer needed. The kind comes from the question. 5. `PresetAnswers#call` now requires `questions:`. It builds each answer from the type of its question. 6. `Client#ask` passes `questions:`. Direct `.call` callers must pass it. ## Affected files All paths are under plugins/os-me/test/. - moment_kind_test.rb:32 - answer_source_test.rb:16 - lever_label_fixtures.rb:20 - reply_shape_test.rb:18 - recording_adapter.rb:9 - gem_replies.rb:29 - wrong_cost_test.rb:19 - memo_keyed_adapters.rb:18 (calls `.call` with no arguments) - draft_extraction_test.rb:49 - headless_claude_test.rb:67 (asserts `defined?(Decision::Model::Adapters::Fixed)`) - Any os-me eval adapter.json with `"type": "fixed"`. ## Approach Replace `Adapters::Fixed` with `Adapters::PresetAnswers`. Pass `questions:` to each direct `.call`. Change "fixed" to "preset_answers" in adapter.json files. -------- **Discoverer:** /home/jared/dev/ruby-gems/decision-model, session d6b3dec8-0b4c-4965-a835-96e5db2d6b75, 2026-10-31. Found while doing decision-model#16, which renames the adapter.
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#1478
No description provided.