Repository navigation
fix: address #535 and #544 review - #548
Conversation
- Say plainly that the skill's allowlist removes Claude Code's prompt before uploads, and offer a restricted set that keeps ctx pack and workloads create on prompt. - Pack into a temporary directory outside the working tree and delete it at cleanup. - Name POST /v1/runs in the flow doc and diagram. - Pin the demo's SH_CONTROL_PLANE_URL and SH_HARNESS_URL so a real deployment's exported URLs never receive the demo token or upload. - --delete removes only a marked demo state directory; --skip-build fails fast when the Context Service image is missing. - deploy/k8s/setup.sh honours KIND_CLUSTER (default moca). Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Jeremy Cohn <Jeremy.Cohn@ibm.com>
ingpaolodettori-dev
left a comment
There was a problem hiding this comment.
Follow-up to our #535/#544 reviews. I checked all six items against the code at 5474f2f and they're addressed:
- Permissions: SKILL.md and the README now say plainly that the full allow-list removes the prompt before
ctx pack/workloads create. The newsettings.restricted.example.jsonkeeps both of those on prompt (it allows only spawn/subagents/get/workloads get/delete). - Local copy: the packed file goes in a
mktemp -ddir and is removed at cleanup. POST /v1/runsis now used in the flow doc and the SVG, matchingleaf-turn.ts.- run.sh and setup.sh pin
SH_CONTROL_PLANE_URL/SH_HARNESS_URLto the demo. That's the right fix, because mocactl ranks env over config (config.ts:192-194). --deleteuses the marker guard, and--skip-buildfails fast throughcrictl inspecti.deploy/k8s/setup.shnow readsKIND_CLUSTERfrom env (defaultmoca), andKIND_CONTEXTis derived from it, so the demo's post-source override still works.
One suggestion: the new mktemp -d/rm -r steps aren't in either allow-list, so "Nothing prompts" isn't accurate any more. One nit on the marker refusal message. CI is green, and the single commit is signed off.
| `~/.claude/settings.json`: | ||
|
|
||
| - [`settings.example.json`](settings.example.json): every delegation command, including the upload. | ||
| Nothing prompts. |
There was a problem hiding this comment.
suggestion — "Nothing prompts" is no longer true after this PR. Step 1 now runs mktemp -d and step 6 runs rm -r TMP_DIR, and neither settings.example.json nor settings.restricted.example.json allows them. So with either set, Claude Code still prompts (or falls back to the classifier, which is what #530 is about) on every delegation. The same goes for "Delegation needs only these commands" (L137). Suggest adding "Bash(mktemp -d)" to both example files and to the JSON block below. Leave rm -r off the allow-list, since a wildcard rm -r * rule is much broader than this skill needs. Then say here that the cleanup rm -r TMP_DIR is the one command that still asks.
| rm -rf "$STATE_DIR" | ||
| # Only a directory this script made: a mis-set MOCA_DEMO_STATE must never be removed. | ||
| if [ -e "$STATE_DIR" ]; then | ||
| [ -f "$STATE_DIR/$STATE_MARKER" ] || die "refusing to delete $STATE_DIR: it has no $STATE_MARKER marker" |
There was a problem hiding this comment.
nit — anyone who ran the #544 demo before this change has a state dir with no marker, so their first --delete after upgrading deletes the cluster (L74) and then dies here. The refusal itself is right. The message could also say what to do, e.g. …marker; if it is the demo's, remove it yourself (rm -rf $STATE_DIR), so it doesn't read like the cluster delete failed.
rossoctl#548 review) Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Jeremy Cohn <Jeremy.Cohn@ibm.com>
ingpaolodettori-dev
left a comment
There was a problem hiding this comment.
Follow-up at bc2a769: both items from the 5474f2f review are addressed. Bash(mktemp -d) is now allowed in both example settings files and the SKILL.md block, the doc states that the cleanup rm -r TMP_DIR still asks, and the --delete refusal message now explains the cluster was deleted and how to remove a pre-marker state dir by hand. No new issues.
Follow-up to #535 (moca-delegate-task rebuilt on mocactl) and #544 (Kind demo for the skill), from Paolo's review.
SKILL.mdand the README now say plainly that the allowlist removes Claude Code's prompt beforectx packandworkloads create, the two steps that upload local files, and offersettings.restricted.example.json, which keeps those two on prompt.mktemp -ddirectory outside the working tree and deletes it at cleanup.POST /v1/runs.setup.shandrun.shpinSH_CONTROL_PLANE_URLandSH_HARNESS_URLto the demo, so a real deployment's exported URLs never receive the demo token or upload.--deleteremoves only a state directory carrying the demo's marker, and--skip-buildfails fast if the Context Service image isn't on the cluster.deploy/k8s/setup.shhonoursKIND_CLUSTER(defaultmoca), with a comment that the demo depends on it.🤖 Generated with Claude Code