Problem
The new AI-first command has useful source-level CLI tests, but release-risk proof is incomplete:
- built CLI coverage checks
ai --help, not a complete built ai or ai preflight workflow
- GitHub Action tests mostly assert that shell fragments exist in
action.yml
- string-presence assertions can pass even if mode guards, argument ordering, environment forwarding, output handling, or exit propagation are broken
This is a follow-up to the broader child-repository acceptance work in #655.
Acceptance criteria
Built CLI
- Run the packed/built CLI for
ai --format json against an isolated git repository.
- Cover Codex default profile and at least one alternate profile.
- Cover
ai preflight --task using the built artifact.
- Cover
--cwd, --output, --base, --head, task filters, and invalid input.
- Cover
--with-checks passing, failing, skipped, and safety-blocked states.
- Prove the bundle is written before documented non-zero
--fail-on or verification exits.
- Confirm no workspace-only imports or protocol dependencies are required.
GitHub Action
- Execute the Action argument-building shell path with a fake CLI that records argv, environment, stdout/stderr, and exit status.
- Prove
mode: ai forwards profile, refs, cwd, output, format, fail-on, and with-checks correctly.
- Prove
with-checks is not forwarded to unsupported modes.
- Prove agent mode does not receive fail-on.
- Prove CLI failure propagates to the Action's final status while the summary/comment path remains best effort as designed.
- Avoid tests whose only proof is
actionYaml.toContain(...) for runtime behavior.
Dependency
OSS-first note
Use a small deterministic shell harness or an existing local GitHub Action runner if already available. Do not add a heavy custom runner when a maintained OSS tool fits.
Validation
pnpm run lint
pnpm typecheck
- focused built CLI and Action tests
pnpm test
pnpm build
pnpm --filter @submuxhq/codedecay pack --dry-run
Problem
The new AI-first command has useful source-level CLI tests, but release-risk proof is incomplete:
ai --help, not a complete builtaiorai preflightworkflowaction.ymlThis is a follow-up to the broader child-repository acceptance work in #655.
Acceptance criteria
Built CLI
ai --format jsonagainst an isolated git repository.ai preflight --taskusing the built artifact.--cwd,--output,--base,--head, task filters, and invalid input.--with-checkspassing, failing, skipped, and safety-blocked states.--fail-onor verification exits.GitHub Action
mode: aiforwards profile, refs, cwd, output, format, fail-on, and with-checks correctly.with-checksis not forwarded to unsupported modes.actionYaml.toContain(...)for runtime behavior.Dependency
codedecay aiand Actionmode: aiimplementation.OSS-first note
Use a small deterministic shell harness or an existing local GitHub Action runner if already available. Do not add a heavy custom runner when a maintained OSS tool fits.
Validation
pnpm run lintpnpm typecheckpnpm testpnpm buildpnpm --filter @submuxhq/codedecay pack --dry-run