wip(929): stage 3 — migrate http/mcp/* off yaml_legacy + introduce yaml_residue marker
Three MCP files touched:
- status_tools.rs (story-status JSON dump): every field with a CRDT
equivalent now reads from WorkItem (name, agent, blocked, qa_mode,
retry_count, depends_on, claimed_by, claimed_at) or MergeJob.error
(merge_failure detail). One field — review_hold — has no CRDT register
yet (sub-story 932) and is wrapped in `yaml_residue(parse_front_matter(...))`
so the gap is visible at every code-search.
- qa_tools.rs:
• tool_approve_qa wraps the legacy `clear_front_matter_field("review_hold")`
write in `yaml_residue(...)` pending sub-story 932.
• tool_reject_qa now reads the agent name from the CRDT WorkItem instead
of parsing front matter on disk.
- story_tools/epic.rs: the entire epic feature (item_type, epic link)
has no CRDT analog — sub-story 933. Every parse_front_matter call here
is wrapped in `yaml_residue(...)`.
Also: new identity wrapper `db::yaml_legacy::yaml_residue<T>(v: T) -> T`
that marks a yaml_legacy callsite blocked on a CRDT-register gap. Pure
identity at runtime; the distinctive name makes the residue grep-findable
(`grep -rn yaml_residue`). Sub-stories 932 and 933 enumerate the gaps.
Filed:
- 932: Add CRDT register for review_hold
- 933: Add CRDT registers for the epic mechanism
All 2854 tests pass; fmt + clippy clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,23 @@ use serde::Deserialize;
|
||||
use std::fs;
|
||||
use std::path::Path;
|
||||
|
||||
/// Identity wrapper that flags a yaml_legacy callsite blocked on adding a
|
||||
/// CRDT register (story 929 residue). Every wrap is a grep-findable marker —
|
||||
/// `grep -rn yaml_residue` enumerates every remaining gap — so it stays
|
||||
/// visible in every code review.
|
||||
///
|
||||
/// When the CRDT register lands and the caller is migrated, delete the wrap.
|
||||
/// Once every wrap is gone, delete this function and `db::yaml_legacy`
|
||||
/// entirely (929 stage 10).
|
||||
///
|
||||
/// Filed sub-stories enumerate each gap:
|
||||
/// - 932: `review_hold` flag (write-side in qa_tools, read-side in
|
||||
/// auto_assign).
|
||||
/// - 933: epic mechanism — `item_type` and `epic` link fields.
|
||||
pub fn yaml_residue<T>(v: T) -> T {
|
||||
v
|
||||
}
|
||||
|
||||
/// Front-matter fields used by the legacy `parse_front_matter` API. Mirrors
|
||||
/// the original `io::story_metadata::FrontMatter`.
|
||||
#[derive(Debug, Default, Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user