crc os-adr wave 4: nest StatusResult, PostgresRecordAssertions to RecordCreationAssertions, split cli_test.rb by command #933

Closed
opened 2026-10-04 17:04:28 +00:00 by jared · 2 comments
Owner

Problem

The wave 2 re-run after extraction #930 found three placement and naming defects in the os-adr test support and the CLI test (Q18, Q19, Q20 in docs/crc/os-adr/categories.md).

Reproduce

n/a: structure-only refactor, no behavior change

Approach

Required work:

  1. plugins/os-adr/tests/support/command_invocations.rb: the top-level Struct StatusResult nests as CommandInvocations::StatusResult in its own file under plugins/os-adr/tests/support/ (ruling R22).
  2. plugins/os-adr/tests/support/postgres_record_assertions.rb: rename to plugins/os-adr/tests/support/record_creation_assertions.rb, constant PostgresRecordAssertions -> RecordCreationAssertions (ruling R23).
  3. plugins/os-adr/tests/cli_test.rb: split into plugins/os-adr/tests/command/repository/initialization_test.rb and plugins/os-adr/tests/command/record/creation_test.rb; test bodies move unchanged; plugins/os-adr/invariants.md and the os-sdlc rubocop exclude list follow the new paths (ruling R24).

Rejected: keep cli_test.rb whole under a new name (R24 option B).

Acceptance criteria

  1. Every named item applied, or logged in docs/crc/os-adr/deviations.md, or reported blocked.
  2. ruby plugins/os-adr/tests/all.rb: 0 failures with 51 runs.
  3. ruby -e 'require "./plugins/os-adr/lib/adr"; Adr.loader.eager_load': silent.
  4. Inward lint: none.

Non-goals

No behavior change.
No new tests.
No assertion changed.
No deletion of code that has callers.

Origin

  • Session: a20defa9-036a-415a-9dde-2ed833c727cb
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-refactor-docs/a20defa9-036a-415a-9dde-2ed833c727cb.jsonl
  • Where: crc-refactor run on plugins/os-adr, worktree crc-os-adr-2026-10-04, ledger docs/crc/os-adr/ledger.tsv
## Problem The wave 2 re-run after extraction #930 found three placement and naming defects in the os-adr test support and the CLI test (Q18, Q19, Q20 in docs/crc/os-adr/categories.md). ## Reproduce n/a: structure-only refactor, no behavior change ## Approach Required work: 1. plugins/os-adr/tests/support/command_invocations.rb: the top-level Struct StatusResult nests as CommandInvocations::StatusResult in its own file under plugins/os-adr/tests/support/ (ruling R22). 2. plugins/os-adr/tests/support/postgres_record_assertions.rb: rename to plugins/os-adr/tests/support/record_creation_assertions.rb, constant PostgresRecordAssertions -> RecordCreationAssertions (ruling R23). 3. plugins/os-adr/tests/cli_test.rb: split into plugins/os-adr/tests/command/repository/initialization_test.rb and plugins/os-adr/tests/command/record/creation_test.rb; test bodies move unchanged; plugins/os-adr/invariants.md and the os-sdlc rubocop exclude list follow the new paths (ruling R24). Rejected: keep cli_test.rb whole under a new name (R24 option B). ## Acceptance criteria 1. Every named item applied, or logged in docs/crc/os-adr/deviations.md, or reported blocked. 2. ruby plugins/os-adr/tests/all.rb: 0 failures with 51 runs. 3. ruby -e 'require "./plugins/os-adr/lib/adr"; Adr.loader.eager_load': silent. 4. Inward lint: none. ## Non-goals No behavior change. No new tests. No assertion changed. No deletion of code that has callers. ## Origin - Session: a20defa9-036a-415a-9dde-2ed833c727cb - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-refactor-docs/a20defa9-036a-415a-9dde-2ed833c727cb.jsonl - Where: crc-refactor run on plugins/os-adr, worktree crc-os-adr-2026-10-04, ledger docs/crc/os-adr/ledger.tsv
Author
Owner

1e3b0a22; rows applied 3/3; rows deviated 0; rows blocked 0

1e3b0a22; rows applied 3/3; rows deviated 0; rows blocked 0
Author
Owner

Resolution

Done: StatusResult nested as CommandInvocations::StatusResult; PostgresRecordAssertions renamed RecordCreationAssertions; tests/cli_test.rb split into command/repository/initialization_test.rb and command/record/creation_test.rb

Evidence: 1e3b0a22 on branch crc-os-adr-2026-10-04 (not merged; user review pending); suite: 51 runs, 168 assertions, 0 failures, 0 errors, 0 skips; eager load silent; inward lint: none (os-adr has none)

Follow-ups: none for this ticket; run-level follow-ups filed as #934 and #935; dropped items listed in docs/crc/os-adr/HANDOFF.md Review

## Resolution **Done:** StatusResult nested as CommandInvocations::StatusResult; PostgresRecordAssertions renamed RecordCreationAssertions; tests/cli_test.rb split into command/repository/initialization_test.rb and command/record/creation_test.rb **Evidence:** 1e3b0a22 on branch crc-os-adr-2026-10-04 (not merged; user review pending); suite: 51 runs, 168 assertions, 0 failures, 0 errors, 0 skips; eager load silent; inward lint: none (os-adr has none) **Follow-ups:** none for this ticket; run-level follow-ups filed as #934 and #935; dropped items listed in docs/crc/os-adr/HANDOFF.md Review
jared closed this issue 2026-10-04 17:15:09 +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#933
No description provided.