os-sdlc: persist the commit an implementation started from so diffs survive an enabled commit step #556

Open
opened 2026-09-11 15:00:43 +00:00 by jared · 0 comments
Owner

Context

The implementations table (lib/os_sdlc/runner/db.rb:249-262) has no column for the commit HEAD pointed at when the implementation opened.
All runner diffs (the gate diff-test, test_changes, and the new code_changes from the companion ticket) use working tree vs HEAD.
That base is complete only while the ADR-0171 commit step stays off.
If the commit step is enabled, committed increments vanish from every diff, and the verifier judges a partial change.
The user rejected the name base_ref as unclear.
Candidate names are start_commit and opened_at_commit — the SHA of HEAD when the implementation row was created.
A schema migration is required; the schema is currently at version 22.

Tasks

  • Decide the column name (proposal: start_commit); stamp it at implementation open.
  • Implementation#code_changes and Implementation#test_changes diff from start_commit when present, HEAD otherwise.
  • Add the schema migration and tests.

Acceptance criteria

  • The implementations table persists the commit SHA at open.
  • code_changes and test_changes diff against that commit when present, and fall back to HEAD when absent.
  • Schema version is bumped past 22 with a passing migration test.

Origin

  • Trigger: design review of behavior-verifier evidence sourcing, 2026-09-11 — diff base only holds while the commit step (ADR-0171) is off
  • Improvised this session: none
  • Chain: enabling ADR-0171's commit step would drop committed increments from every runner diff ← no start-commit column exists on implementations ← DESIGN gap, ADR-0171 shipped opt-in/off without this follow-up
  • Root candidate: this ticket
  • Where: lib/os_sdlc/runner/db.rb
  • Session: 6d4567e1-5bdc-481a-9221-cfd012b7cc39
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/6d4567e1-5bdc-481a-9221-cfd012b7cc39.jsonl
## Context The `implementations` table (`lib/os_sdlc/runner/db.rb:249-262`) has no column for the commit HEAD pointed at when the implementation opened. All runner diffs (the gate diff-test, `test_changes`, and the new `code_changes` from the companion ticket) use working tree vs HEAD. That base is complete only while the ADR-0171 commit step stays off. If the commit step is enabled, committed increments vanish from every diff, and the verifier judges a partial change. The user rejected the name `base_ref` as unclear. Candidate names are `start_commit` and `opened_at_commit` — the SHA of HEAD when the implementation row was created. A schema migration is required; the schema is currently at version 22. ## Tasks - [ ] Decide the column name (proposal: `start_commit`); stamp it at implementation open. - [ ] `Implementation#code_changes` and `Implementation#test_changes` diff from `start_commit` when present, HEAD otherwise. - [ ] Add the schema migration and tests. ## Acceptance criteria - The implementations table persists the commit SHA at open. - code_changes and test_changes diff against that commit when present, and fall back to HEAD when absent. - Schema version is bumped past 22 with a passing migration test. ## Origin - Trigger: design review of behavior-verifier evidence sourcing, 2026-09-11 — diff base only holds while the commit step (ADR-0171) is off - Improvised this session: none - Chain: enabling ADR-0171's commit step would drop committed increments from every runner diff ← no start-commit column exists on `implementations` ← DESIGN gap, ADR-0171 shipped opt-in/off without this follow-up - Root candidate: this ticket - Where: lib/os_sdlc/runner/db.rb - Session: 6d4567e1-5bdc-481a-9221-cfd012b7cc39 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/6d4567e1-5bdc-481a-9221-cfd012b7cc39.jsonl
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#556
No description provided.