MCP: Staleness, re-rolls and Promotion (#198) #212
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
needs-info
needs-triage
question
ready-for-agent
ready-for-human
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crowmaki/ai-studio!212
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-198-mcp-staleness"
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?
Closes #198. Part of #157.
A harness can now keep coverage current and promote it. Each tool wraps an existing
ApiImplcommand, so edits land in the undo log with their usual labels.Tools
read_take_staleness: a Take's Stale reasons (kind, key, label,accepted,counts) and each of its inputs, as rendered (recorded) and as a re-roll would send it now (current).accept_stale_reasons: accepts one reason bykey, or every current one whenkeyis absent. Undoable ("Accept Prompt", "Accept all Stale reasons"). Returns the staleness after.reroll_take: a new Take with a new seed, from thecurrent(default) ororiginalinputs. WithsameSeed, it keeps the Take's seed and uses the current inputs, which also brings back a purged Take.sameSeedwithoriginalinputs is refused, because the app has no such re-roll.rebuild_take: rebuilds a waiting Take's job from the current inputs and keeps its name and seed.read_stale_reroll_plan/reroll_stale_takes: the stale re-roll for a scope, either{kind: "scene", sceneId}or{kind: "referenceSet", referenceSetId}. It can queue drafts or Single-pass finals (singlePassFinal).promote_takes: promotes one or many drafts. If any one of them can't be promoted, none is.refineSeedis accepted only for a single Take.The server instructions now cover staleness, re-rolls and Promotion.
StaleRerollScopeDtoderivesJsonSchema, so the tools reuse it as their scope argument.Tests
src-tauri/tests/mcp_staleness.rscovers each acceptance criterion:queuedskip after it, and circles that stay unchanged.finalwith their refine seed afterwait_for_jobs. Also a single Take with arefineSeed, and a batch that is refused as a whole.renderable_shot,rendered_takeandtakesmoved intotests/common/mcp.rs, andmcp_takes.rsuses them too.Not tested: a Shot that the stale re-roll skips as
blocked. The core plans it, and the plan comes back unchanged.