Move Db::AlreadyConnected and Db::NotConnected to their own files #1260

Closed
opened 2026-10-23 17:06:50 +00:00 by jared · 1 comment
Owner

Problem

Db::AlreadyConnected and Db::NotConnected are nested in db.rb:10-11. Structure ruling S48 moves the error to its own file so that the path spells the constant (lens A15) and the concept file holds one class.

Reproduce

n/a: structure-only move; no defect to reproduce.

Approach

Move the class body unchanged. Update each holder to the new constant. The existing suite, green, is the proof; add no test.

Required work:

  1. Define Db::AlreadyConnected in its own file — check: present class AlreadyConnected < StandardError in plugins/os-sdlc/lib/os_sdlc/db/already_connected.rb
  2. Define Db::NotConnected in its own file — check: present class NotConnected < StandardError in plugins/os-sdlc/lib/os_sdlc/db/not_connected.rb

Rejected: keep the nested class — the ruling is recorded and the error lineage design (S31) puts each error in its own file.

Acceptance criteria

  1. Given a connected database, when connect! runs again, then it raises Db::AlreadyConnected as before.
  2. Given no connection, when the database is read, then it raises Db::NotConnected as before.

Origin

  • Trigger: CRC run 4, phase 1b step 4 (errors), bin/detector error-lineage --target os-sdlc
  • Improvised this session: none
  • Chain: nested error class ← run 3 ruled S48 but wave 2 kept the concept file ← DESIGN (docs/crc/os-sdlc/wave0/structure-rulings.tsv S48)
  • Root candidate: none found; searched AlreadyConnected, NotConnected, Db error
  • Where: plugins/os-sdlc/lib/os_sdlc/db.rb
  • Ledger: docs/crc/os-sdlc/ledger.tsv
  • Rulings: docs/crc/os-sdlc/wave0/structure-rulings.tsv
  • Session: c1bedec6-7e01-45ab-b9db-22d63652c19f
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-os-sdlc-run-4/c1bedec6-7e01-45ab-b9db-22d63652c19f.jsonl

VERDICT: CREATE

## Problem `Db::AlreadyConnected` and `Db::NotConnected` are nested in `db.rb:10-11`. Structure ruling S48 moves the error to its own file so that the path spells the constant (lens A15) and the concept file holds one class. ## Reproduce n/a: structure-only move; no defect to reproduce. ## Approach Move the class body unchanged. Update each holder to the new constant. The existing suite, green, is the proof; add no test. Required work: 1. Define `Db::AlreadyConnected` in its own file — check: present `class AlreadyConnected < StandardError` in `plugins/os-sdlc/lib/os_sdlc/db/already_connected.rb` 2. Define `Db::NotConnected` in its own file — check: present `class NotConnected < StandardError` in `plugins/os-sdlc/lib/os_sdlc/db/not_connected.rb` Rejected: keep the nested class — the ruling is recorded and the error lineage design (S31) puts each error in its own file. ## Acceptance criteria 1. Given a connected database, when connect! runs again, then it raises Db::AlreadyConnected as before. 2. Given no connection, when the database is read, then it raises Db::NotConnected as before. ## Origin - Trigger: CRC run 4, phase 1b step 4 (errors), `bin/detector error-lineage --target os-sdlc` - Improvised this session: none - Chain: nested error class ← run 3 ruled S48 but wave 2 kept the concept file ← DESIGN (docs/crc/os-sdlc/wave0/structure-rulings.tsv S48) - Root candidate: none found; searched AlreadyConnected, NotConnected, Db error - Where: plugins/os-sdlc/lib/os_sdlc/db.rb - Ledger: docs/crc/os-sdlc/ledger.tsv - Rulings: docs/crc/os-sdlc/wave0/structure-rulings.tsv - Session: c1bedec6-7e01-45ab-b9db-22d63652c19f - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-os-sdlc-run-4/c1bedec6-7e01-45ab-b9db-22d63652c19f.jsonl VERDICT: CREATE
Author
Owner

Resolution

Done: Moved Db::AlreadyConnected and Db::NotConnected to their own files (S48, fast-batch-13).

Evidence: 3d563589; suite 2458 runs, 0 failures, 0 errors (82 s); eager load silent; fast-gate PASS, rubocop 0 new offenses; merged to main 6cb38456

Follow-ups: none

## Resolution **Done:** Moved Db::AlreadyConnected and Db::NotConnected to their own files (S48, fast-batch-13). **Evidence:** 3d563589; suite 2458 runs, 0 failures, 0 errors (82 s); eager load silent; fast-gate PASS, rubocop 0 new offenses; merged to main 6cb38456 **Follow-ups:** none
jared closed this issue 2026-10-23 17:20:07 +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#1260
No description provided.