Trim History rows past a blank line in StatusTableTrimmer #1520
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#1520
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 History table in
docs/implementation-status/os-sdlc.mdholds 371 rows, but the leaf states a 15-row cap enforced by the trim hook. A blank line inside the table (line 115) ends the table region forStatusTableTrimmer, so the hook counts only the 14 rows above it and never trims.Observed
Document#continues_table?returns false for a blank line, sobody_endstops at the first blank line after the separator. The 357 rows after the blank line lie outside the table region and pass through untouched. The 14 rows above the blank line are under the cap, so the file is byte-identical after the hook.The hook itself is wired:
.claude/settings.jsonline 9 runsbin/trim-status-table.rbon PostToolUseEdit|Write. The other leaves trim to 15 when run through the same class. os-adr, os-aidd-lint, os-backlog, os, os-me, and os-sdlc-system-model hold 16, 16, 28, 19, 18, and 35 rows, because the hook has not run on them since the rows were added (edits by Bash and merges do not fire it).Reproduce
Approach
Extend the table region in
StatusTableTrimmer::Documentthrough blank lines up to the next heading or the end of file, so a stray blank line inside the table does not hide rows.Required work:
Document#continues_table?ortrailing_indexpass over blank lines that precede a further table row — check: presentblankinlib/status_table_trimmer.rbOrchestrator work: run the hook once on
docs/implementation-status/os-sdlc.mdafter the fix and commit the trimmed leaf; old rows stay in git history.Rejected: delete line 115 by hand only — the defect returns when any later edit adds a blank line in the table.
Acceptance criteria
Owner sketch
Origin
docs/implementation-status/os-sdlc.md:115ends the table region ←lib/status_table_trimmer.rb:88-93continues_table?treats a blank line as the table end (DESIGN: ADR-0073)lib/status_table_trimmer.rbStatusTableTrimmer::Document#continues_table?Work started on branch
ticket-1520. Deviation: /os-sdlc:implement cannot open this ticket because .sdlc/project.yaml has no target that covers the repo-root lib/ and tests/ (implementation-open refuses without --target). Implemented test-first outside the Runner; verification is suite + lint + one design audit.Resolution
Done: StatusTableTrimmer continues a History table through blank lines that precede another table row; a blank line before a heading or prose still ends it. Orchestrator work done: os-sdlc leaf trimmed to 15 rows.
Evidence: main
4ec17364. Three new tests in tests/trim_status_table_test.rb (red before, 11 runs 0 failures after). Design audit: no must-fix; both should-fix items (stale comment, repeated blank/row checks) fixed. Built outside the Runner: no target covers repo-root lib/.Follow-ups: #1530 add an os-sdlc target for the repo-root lib/ and tests/.