BOHICA-LABS / BOHICA-LABS/vsdd-factory

process-gap(state-manager+story-writer): duplicate sprint-state.yaml at two paths — .factory/sprint-state.yaml vs .factory/stories/sprint-state.yaml drift independently under POL-002 sync

Open
#404 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2
Forks
1
Avg merge
6h 43m
Merged PRs (30d)
29

Description

## Summary

The vsdd-factory plugin's default file layout permits `sprint-state.yaml` to exist at two paths simultaneously:
- `.factory/sprint-state.yaml` (wave-scope aggregate)
- `.factory/stories/sprint-state.yaml` (per-story fine-grained)

POL-002 (STORY-INDEX row sync) requires state-manager to update sprint-state after every story bump, but the policy doesn't disambiguate which file. In practice the two files diverge — spec_version, totals, per-story vp_traces — because different bursts touch different copies.

## Concrete evidence (switchboard-blue)

Wave-5 through Wave-6 the two files have repeatedly gotten out of sync on:
- Top-level totals (`stories_total`, `stories_ready`)
- spec_version pin
- Per-story `bc_traces` / `vp_traces` (partially fixed by #376's proposed vp_traces owner but doesn't cover the two-file case)

Each divergence surfaces only when a fresh-context adversary L3 opens both.

## Proposed remediation

**Choose one:**
- **Option A (recommended):** Deprecate one path. Make the plugin fail-hard when both exist. Documented location: `.factory/sprint-state.yaml` (wave-scope) as canonical; per-story rollup lives in STORY-INDEX.md, not a second yaml.
- **Option B:** If both files serve distinct purposes, split their frontmatter schemas so no field appears in both — no way to drift because no shared field.

**POL-002 policy update:** name the canonical file explicitly. state-manager prompt gains: \"never write to a sprint-state.yaml at a non-canonical path; if found, alert and stop.\"

## Cross-references

- #376 — vp_traces field ownership (adjacent, but this is about which FILE is canonical)
- #361 — BC EC narrowing propagation (adjacent sync-discipline family)

## Severity

MEDIUM. Structural defect that enables the entire class of #376-style desyncs. One-time layout fix eliminates a recurring source of L3 findings.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.