Test Handoff::Document from strings, keep one CLI test per path #1406
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#1406
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?
VERDICT: CREATE
Problem
After #1401,
Handoff::Documentparses text only.plugins/os/tests/handoff/complete_test.rbstill checks byte preservation and the error paths through the disk withHandoffScenario. These tests are disk-bound and duplicate I/O setup. A blind judge noted this on 2026-10-26.Reproduce
n/a: test restructure with no behavior change.
Approach
Move the pure-text cases to
Handoff::Documentunit tests built from strings: byte preservation of the rest of the text, already-completed error, missingcompleted_atline error. Keep one end-to-end CLI test per path (success, already completed, missing line, missing file).Required work:
Handoff::Document.newinplugins/os/tests/handoff/**/*_test.rbAcceptance criteria
completed_at:line, whenDocument#completeruns, then only the frontmatter line changes.completed_atalready set, whencompleteruns, then it raisesHandoff::Errornaming the path.completed_atline, whenDocument.newruns, then it raisesHandoff::Errornaming the path.handoff completeruns on each of the four paths, then one end-to-end test per path still passes.Owner sketch
Non-goals
No production code change.
Origin
80a39130)Work started on branch ticket-1406 through /os-sdlc:implement (map poodr-ticket-implementation). The ticket is test-only, so the run should escalate on unexpected_pass and reroute per the implement skill.
Resolution
Done: Added plugins/os/tests/handoff/document_test.rb: three Handoff::Document tests built from strings (only the frontmatter completed_at line changes, with CRLF and in-body completed_at; already set raises naming the path; missing line raises on new naming the path). complete_test.rb keeps one CLI test per path (success, already completed, missing line, missing file); the success test no longer carries the CRLF/in-body detail.
Evidence: Commit
ac8eb444. Implementation 181 rerouted to poodr-guard-implementation; mutation check proved the already-set test catches 'if completed_at && false'; the run then failed at test-reviewer on a map defect (#1416), so the orchestrator hand-finished: os suite 50 runs 179 assertions green, rubocop clean on both files, one design audit with two should-fix notes answered in the commit message.Follow-ups: #1416 (guard-map test-reviewer settles error; captured with ticket-skeptic VERDICT: CREATE).