os-sdlc: one owner for the base commit and changes since it (#1638 part A) #1639
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1639
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The survivor gate needs the ticket's base commit and the files the ticket changed since that commit. No public object owns the base commit:
Gate::UnchangedCheck::BaseCheckout#merge_baseis private.Project::Changescompares only the working tree with the index, so it misses committed ticket work.Approach
Design:
docs/system-design-format/proof/2026-11-08-os-sdlc-mutation-survivors.md, sections 2 and 3 (roles "base source" and "change source"), build slice 2. Parent: #1638.Required work:
Project::BaseBranch#merge_base. It rescuesOsGit::Error(including the detached-primary error fromname) and raisesHarnessError, asBaseCheckout#withindoes today.Gate::UnchangedCheck::BaseCheckoutasksProject::BaseBranchfor it — check: absentdef merge_baseinplugins/os-sdlc/lib/os_sdlc/gate/unchanged_check/base_checkout.rbFastGate::ChangedFilesasksProject::BaseBranch#merge_baseinstead of its own privatemerge_base, so one object owns the base commit — check: absentdef merge_baseinplugins/os-sdlc/lib/os_sdlc/fast_gate/changed_files.rbProject::Changes#since(ref). It returns a newProject::Changeswhose path lists come fromOsGit::Repository#changes(against: ref, renames: false): committed, staged, unstaged, and untracked files, without deleted files. Pass the ref through a keyword with a default (against: :index), so the existing two-argument callers do not change.code_diffandtest_diffstill compare against HEAD;sincechanges the path lists only — check: presentdef sinceinplugins/os-sdlc/lib/os_sdlc/project/changes.rbAcceptance criteria
Project::BaseBranch#merge_baseis asked, then it returns the merge-base commit of HEAD and the base branch.Project::BaseBranch#merge_baseis asked, then it raisesHarnessErrorasBaseCheckoutdoes today.Project::Changes#since(merge_base)is asked forcode_paths, then all four files are listed.test_pathsis asked, then it lists the changed test files and the existing test files mapped to the changed code files.code_pathsis asked, then that file is not listed.code_pathsis asked onsince(merge_base), then that file is not listed.unchangedgate and the fast gate, when they run, then their behavior is the same as before.Owner sketch
Origin
docs/system-design-format/proof/2026-11-08-os-sdlc-mutation-survivors.md(commitf0e172b7) for parent #1638docs/system-design-format/proof/2026-11-08-os-sdlc-mutation-survivors.md)VERDICT: CREATE
Work started on branch ticket-1639 (worktree .claude/worktrees/ticket-1639) through /os-sdlc:implement.
Resolution
Done: Project::BaseBranch#merge_base is the one public owner of the base commit (HarnessError on any git failure); Gate::UnchangedCheck::BaseCheckout and FastGate::ChangedFiles ask it. Project::Changes#since(ref) returns a Changes whose paths are committed, staged, unstaged, and untracked changes since ref, without deleted files.
Evidence: Commit
d457c181on ticket-1639 via implementation 263 (8 dispatches, all pass; suite gate green in 54.8 s). New tests: tests/project/base_branch_merge_base_test.rb, tests/project/changes_since_test.rb.Follow-ups: none; #1640 (part B) is now unblocked