Skip to content

Read run state directly, delegate mutations, accept DL-007 (+DL-012) - #37

Closed
jimutt wants to merge 3 commits into
feat/dld-goal-ext-packagefrom
feat/dld-goal-ext-state
Closed

Read run state directly, delegate mutations, accept DL-007 (+DL-012)#37
jimutt wants to merge 3 commits into
feat/dld-goal-ext-packagefrom
feat/dld-goal-ext-state

Conversation

@jimutt

@jimutt jimutt commented Aug 25, 2026

Copy link
Copy Markdown
Owner

What

The extension reads run state directly and delegates every mutation to the skill scripts. Reads are a pure JSON parse; writes go through one bash argv path, so there is exactly one implementation of every transition. Unknown run/item statuses and wrong schemaVersion are rejected at the read boundary; stderr is surfaced verbatim so blocked operator questions survive the process boundary.

The review caught that the first draft passed flag-only fields positionally to three scripts and that verify-item.sh was not actually called. DL-012 amends DL-007 with the corrected script list.

Also includes: unknown-argument errors across all goal scripts now print the script's usage from its header comment, via a shared helper in common.sh.

Stacks on #36.

jimutt and others added 2 commits August 21, 2026 16:23
…12 amends: correct the script list)

reads are a direct JSON parse; writes go through one bash argv path into
the skill scripts, so there is exactly one implementation of every
transition. Unknown run/item statuses and wrong schemaVersion are
rejected at the read boundary; stderr is surfaced verbatim so blocked
operator questions survive the process boundary.

Review caught that the first draft passed flag-only fields positionally
to three scripts and that verify-item.sh was not actually called. The
amended list in DL-012 (verify-hashes, next-item added; verify-item
dropped) is what the module delegates to, and the new tests cover the
flag-argv shape so this doesn't regress.

DL-012 exists because the review finding arrived after acceptance, and
PRACTICES.md forbids body edits on accepted records — amends exists
precisely for this.

Co-Authored-By: Claude Opus 5 <noreply@pi.dev>
Generated-By: pi 0.84.2
Until now an unknown argument printed only its own token, so a positional
call to a flag-only script gave you Unknown option: probe with no shape to
correct it. The extension will shell into these scripts, which makes
unhelpful failure output agent-visible rather than merely user-annoying.

Every flag-rejecting branch now falls through to a shared usage() that
prints the caller script's header comment. The helper lives in common.sh
with the same behavior for all goal scripts; the only bespoke change is
create-run.sh defaulting to usage rather than an inline string. The sed
range now stops at the first non-comment line so short-header scripts do
not leak literal code into usage output.

Byte-identical shadow copies refreshed.

Co-Authored-By: Claude Opus 5 <noreply@pi.dev>
Generated-By: pi 0.84.2
Co-Authored-By: Claude Opus 5 <noreply@pi.dev>
Generated-By: pi 0.84.2
@jimutt

jimutt commented Aug 25, 2026

Copy link
Copy Markdown
Owner Author

Superseded by feat/pi-harness-extension — all commits from this branch are merged there. See #41 for the findings log on top.

@jimutt jimutt closed this Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant