story-kit: done 171_story_persist_test_results_to_story_files

This commit is contained in:
Dave
2026-02-25 09:52:27 +00:00
parent 073ec03afe
commit f5889f66ae

View File

@@ -0,0 +1,34 @@
---
name: "Persist test results to story files"
---
# Story 171: Persist test results to story files
## User Story
As a project owner, I want test results written to the story markdown file when record_tests is called, so that there's a durable paper trail that survives server restarts.
## Acceptance Criteria
- [ ] record_tests appends or updates a Test Results section in the story markdown file
- [ ] Test results section shows test name, status (pass/fail), and details for each recorded test
- [ ] Results persist across server restarts by being read back from the file on load
- [ ] ensure_acceptance reads from the persisted file data, not just in-memory state
- [ ] When a coder agent starts on a story, snapshot the current overall test coverage (from cargo llvm-cov) and write it as front matter (e.g. `coverage_baseline: 42.3%`) so coverage delta can be computed later
## Out of Scope
- TBD
## Test Results
<!-- story-kit-test-results: {"unit":[{"name":"test_write_persists","status":"pass","details":null}],"integration":[{"name":"test_roundtrip","status":"pass","details":null}]} -->
### Unit Tests (1 passed, 0 failed)
- ✅ test_write_persists
### Integration Tests (1 passed, 0 failed)
- ✅ test_roundtrip