Deferred from the Codex review on #1027 (P2, SKILL.md L289). #1027 closed the
--target local-checkout resolution gap at the contract layer and deliberately kept the
machine-local checkout path out of the staged slice README.md; persisting the resolved
target through the extraction runtime is the remaining half and is a code change, out
of that PR's documentation scope.
Finding
watch --target <repo> resolves a synthesis target, but nothing in the extraction runtime
persists it:
extraction/watch/watch-state.js — the WatchState typedef (fields: videoId,
videoSlug, sourceUrl, title, status, phases, skipResearch, frameSelection,
artifactPaths, tempSession) has no target field, and createWatchState() writes
none.
buildContinuationPrompt() (same file) tells a resumed session to read
run-state/watch.json, source/transcript.txt, and the lane deliverables — never the
slice root README.md that carries the **Target:** line.
extraction/watch/run-resume.js reads only run-state/watch.json.
So a cross-repo watch --target <repo> interrupted before synthesis loses the resolved
target: resume must re-infer or re-ask.
Fix direction
Persist the resolved target name in WatchState when the watch starts, and surface it
in buildContinuationPrompt() so the resumed session re-runs the SKILL.md "Synthesis
target resolution" rungs against the recorded name instead of re-asking.
Portability constraint (the reason #1027 did not just write the path anywhere): the
resolved local checkout path is machine-local. run-state/watch.json is Staged: yes per
the Output contract and is already {tmp}-tokenized by serializeTempSession() /
sanitize-slice-temp-paths.js — so persist the portable name, not the absolute tree
path, or route the path through the same tokenization/sanitization seam.
Acceptance
resume on a watch started with --target <repo> recovers the target without re-asking,
and no staged artifact gains a machine-local absolute path.
Related
Deferred from the Codex review on #1027 (P2,
SKILL.mdL289). #1027 closed the--targetlocal-checkout resolution gap at the contract layer and deliberately kept themachine-local checkout path out of the staged slice
README.md; persisting the resolvedtarget through the extraction runtime is the remaining half and is a code change, out
of that PR's documentation scope.
Finding
watch --target <repo>resolves a synthesis target, but nothing in the extraction runtimepersists it:
extraction/watch/watch-state.js— theWatchStatetypedef (fields:videoId,videoSlug,sourceUrl,title,status,phases,skipResearch,frameSelection,artifactPaths,tempSession) has no target field, andcreateWatchState()writesnone.
buildContinuationPrompt()(same file) tells a resumed session to readrun-state/watch.json,source/transcript.txt, and the lane deliverables — never theslice root
README.mdthat carries the**Target:**line.extraction/watch/run-resume.jsreads onlyrun-state/watch.json.So a cross-repo
watch --target <repo>interrupted before synthesis loses the resolvedtarget:
resumemust re-infer or re-ask.Fix direction
Persist the resolved target name in
WatchStatewhen the watch starts, and surface itin
buildContinuationPrompt()so the resumed session re-runs the SKILL.md "Synthesistarget resolution" rungs against the recorded name instead of re-asking.
Portability constraint (the reason #1027 did not just write the path anywhere): the
resolved local checkout path is machine-local.
run-state/watch.jsonisStaged: yesperthe Output contract and is already
{tmp}-tokenized byserializeTempSession()/sanitize-slice-temp-paths.js— so persist the portable name, not the absolute treepath, or route the path through the same tokenization/sanitization seam.
Acceptance
resumeon a watch started with--target <repo>recovers the target without re-asking,and no staged artifact gains a machine-local absolute path.
Related
--targetlocal-checkout resolution gap).