os-me: EvalAdapter.build takes env: from the entry script, not an ENV default #1295

Closed
opened 2026-10-23 22:06:09 +00:00 by jared · 2 comments
Owner

Problem

OsMe::EvalAdapter.build(name, model:, env: ENV) (plugins/os-me/lib/os_me/eval_adapter.rb:8) reads ENV through a keyword default in library code. Lens tactics P2 lists "reading ENV inside library code" as a NOT, and heuristic A6 wants the entry script to pass outside facts in. The two callers, plugins/os-me/eval/reply_shape/run.rb:82 and plugins/os-me/eval/row_labels/run.rb:35, are entry scripts that omit env:. The #1291 contract-auditor raised this as a LENS line; the lens challenge found a code defect, not a heuristic gap.

Approach

Make env: a required keyword of EvalAdapter.build. Both entry scripts pass env: ENV. Tests already pass env:.

Required work:

  1. EvalAdapter.build takes env: with no default — check: absent env: ENV in plugins/os-me/lib/os_me/eval_adapter.rb
  2. Both eval entry scripts pass env: ENV — check: present env: ENV in plugins/os-me/eval/*/run.rb

Acceptance criteria

  1. Given no env: keyword, when EvalAdapter.build('headless', model: nil) is called, then it raises ArgumentError naming env.
  2. Given env: {}, when EvalAdapter.build('headless', model: nil, env: {}) is called, then it returns the headless adapter.

Owner sketch

module OsMe
  class EvalAdapter
    def self.build(name, model:, env:); end
  end
end

Scope and blocking

In scope: plugins/os-me/lib/os_me/eval_adapter.rb, the two eval run.rb scripts, tests under plugins/os-me/test. Blocked by: none.

Origin

  • Trigger: #1291 contract-auditor LENS line on A6; lens challenge verdict code defect found (2026-10-23)
  • Improvised this session: none
  • Chain: ENV read in library ← keyword default env: ENV from the #1291 Owner sketch. Stop at CODE (plugins/os-me/lib/os_me/eval_adapter.rb:8).
  • Root candidate: none found
  • Where: plugins/os-me/lib/os_me/eval_adapter.rb
  • Session: 4f3f95ea-3c6f-4d23-a0ea-e349d6ab02a5
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/4f3f95ea-3c6f-4d23-a0ea-e349d6ab02a5.jsonl

VERDICT: CREATE

## Problem `OsMe::EvalAdapter.build(name, model:, env: ENV)` (`plugins/os-me/lib/os_me/eval_adapter.rb:8`) reads `ENV` through a keyword default in library code. Lens tactics P2 lists "reading ENV inside library code" as a NOT, and heuristic A6 wants the entry script to pass outside facts in. The two callers, `plugins/os-me/eval/reply_shape/run.rb:82` and `plugins/os-me/eval/row_labels/run.rb:35`, are entry scripts that omit `env:`. The #1291 contract-auditor raised this as a LENS line; the lens challenge found a code defect, not a heuristic gap. ## Approach Make `env:` a required keyword of `EvalAdapter.build`. Both entry scripts pass `env: ENV`. Tests already pass `env:`. Required work: 1. `EvalAdapter.build` takes `env:` with no default — check: absent `env: ENV` in `plugins/os-me/lib/os_me/eval_adapter.rb` 2. Both eval entry scripts pass `env: ENV` — check: present `env: ENV` in `plugins/os-me/eval/*/run.rb` ## Acceptance criteria 1. Given no `env:` keyword, when `EvalAdapter.build('headless', model: nil)` is called, then it raises `ArgumentError` naming `env`. 2. Given `env: {}`, when `EvalAdapter.build('headless', model: nil, env: {})` is called, then it returns the headless adapter. ## Owner sketch ```ruby module OsMe class EvalAdapter def self.build(name, model:, env:); end end end ``` ## Scope and blocking In scope: `plugins/os-me/lib/os_me/eval_adapter.rb`, the two eval `run.rb` scripts, tests under `plugins/os-me/test`. Blocked by: none. ## Origin - Trigger: #1291 contract-auditor LENS line on A6; lens challenge verdict code defect found (2026-10-23) - Improvised this session: none - Chain: ENV read in library ← keyword default `env: ENV` from the #1291 Owner sketch. Stop at CODE (`plugins/os-me/lib/os_me/eval_adapter.rb:8`). - Root candidate: none found - Where: plugins/os-me/lib/os_me/eval_adapter.rb - Session: 4f3f95ea-3c6f-4d23-a0ea-e349d6ab02a5 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/4f3f95ea-3c6f-4d23-a0ea-e349d6ab02a5.jsonl VERDICT: CREATE
Author
Owner

Work started on branch ticket-1295 through /os-sdlc:implement (poodr-ticket-implementation).

Work started on branch ticket-1295 through /os-sdlc:implement (poodr-ticket-implementation).
Author
Owner

Resolution

Done: EvalAdapter.build requires env: and reads no ENV; reply_shape and row_labels run.rb pass env: ENV.

Evidence: Commit 4cb8b705 (pipeline implementation 157, all gates pass, os-me suite green), History row bd7abb01; merged from branch ticket-1295.

Follow-ups: none

## Resolution **Done:** EvalAdapter.build requires env: and reads no ENV; reply_shape and row_labels run.rb pass env: ENV. **Evidence:** Commit 4cb8b705 (pipeline implementation 157, all gates pass, os-me suite green), History row bd7abb01; merged from branch ticket-1295. **Follow-ups:** none
jared closed this issue 2026-10-24 13:40:48 +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#1295
No description provided.