Skip to content

Converge check onto --context-dir; let request-http read headers.json#8

Open
scott-cotton wants to merge 1 commit intostagingfrom
actionbox-contextdir-check
Open

Converge check onto --context-dir; let request-http read headers.json#8
scott-cotton wants to merge 1 commit intostagingfrom
actionbox-contextdir-check

Conversation

@scott-cotton
Copy link
Copy Markdown
Member

@scott-cotton scott-cotton commented Apr 8, 2026

Summary

Action manifest changes that match signadot/signadot#6861.

check/ACTION.md

The script body is rewritten to invoke actionbox check with --context-dir ./context instead of --input/--attr. The new binary loads every file in the context directory into a single map and uses it as the expression env, with {name, expression, results_file, attrs} reserved for the action itself. The object input declaration is dropped: plans bring values into the check expression via extra_inputs declared on the step, exactly the way eval already does.

The prose explaining the directory model, reserved names, and extra_inputs wiring pattern is added to the action description so the LLM compiler sees it (and so plan authors reading the source see it too). The expression examples are updated to assume an extra_inputs: [{name: capture}] declaration with refs wiring capture to a previous step's HTTP capture.

check/schemas/attrs.json

Schema changes from array<string> (with a "^[^=]+=.+$" pattern enforcing key=value formatting) to a flat object<string, string>. Failure metadata is now expressed as natural JSON.

request-http/ACTION.md

The dead line-delimited headers loop is replaced with a single line:

[ -f ./context/headers.json ] && set -- "$@" --headers-file ./context/headers.json

The new binary decodes the JSON array of strings and merges them with any explicit --header flags. This was the only path that ever wrote the schema-typed headers param (it lands as .json because of its schemaRef), so the previous shell guard was unreachable in practice.

Companion PR

Requires the binary changes in signadot/signadot#6861. The new ACTION.md scripts call actionbox check --context-dir and actionbox request-http --headers-file, which the pre-PR binary doesn't recognize. The new sandboxes binary must be deployed before actionsync is pointed at this branch, otherwise plans with check or request-http steps will hard-fail at runtime with "unknown flag".

Migration notes

Existing compiled plans that wired check via refs: {object: ...} will fail validation after actionsync updates the check action definition (because object is no longer a declared param). The mitigation is recompilation — the compile API picks up the new shape automatically. See the companion PR for the full migration story.

Test plan

  • Verified end-to-end against a minikube deployment with actionsync pointed at this branch and a sandboxes binary built from the companion PR
  • Original headers bug reproducer (X-Custom-Auth from a plan param composed via eval, sent through request-http, asserted by check) — header reaches httpbin and check passes. This also exercises the runner-side schema-typed write path that attrs.json would use.
  • Plan-level drill-in output (output: {status_code: steps.send_request.outputs.capture.response.statusCode}) — runtime produces the integer 200

Note: a failing-check-with-attrs.json end-to-end isn't included because the schema-typed write path is already covered by the headers test (same WriteContext code path) and the check binary's failure-metadata behavior is covered by unit tests.

🤖 Generated with Claude Code

check now invokes the actionbox binary with --context-dir ./context
instead of --input/--attr. Every file in the context directory becomes a
named variable in the expression env (with name, expression, results_file
and attrs reserved for the action itself), so plan params and step
outputs flow into check expressions via extra_inputs declared on the step
without needing an intermediate eval. The object input is dropped, and
the attrs schema becomes a flat JSON object so failure metadata is
expressed naturally.

request-http drops the dead line-delimited headers loop in favor of
--headers-file ./context/headers.json, which the actionbox binary now
decodes as a JSON []string. This was the only path that ever wrote the
headers param (schema-typed array → .json), so the previous shell guard
was unreachable.

Both ACTION.md script bodies require the matching actionbox binary
changes in signadot/signadot to be deployed first.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@daniel-de-vera daniel-de-vera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

2 participants