Repository navigation
Description
Summary
Review and close findings from baseline-versus-candidate compilation of agentic workflows in four downstream repositories. Use a freshly built github/gh-aw compiler, compare like-for-like compilation modes, and inspect diagnostics rather than relying on compiler exit status alone.
Repositories evaluated:
| Repository | Workflow count | Pinned baseline |
|---|---|---|
githubnext/gh-aw-test |
140 | v0.93.3 |
githubnext/gh-aw-wizard |
7 | v0.93.2 |
githubnext/gh-aw-workshop |
22 | v0.93.2 |
githubnext/gh-cao |
74 | v0.93.1 |
The source-built candidate at 32ecafbc061c9af57e9361942099e381102ae304 reports v0.93.5. It was produced with make build. Initial release/stale-binary results must not be confused with this candidate's results.
Findings and disposition
1. Generated checkout fetch scripts: lint fixes exist, but Bash compatibility still fails
The v0.93.4 release introduced 30 new ShellCheck findings across ten generated Fetch additional refs steps in five gh-aw-test workflows:
- SC2041: loop over a single literal item.
- SC2034: unused
oidvariable. - SC2254: unquoted case-pattern variable.
Current source already addresses these through refspec arrays, _ for the unused field, and a targeted SC2254 suppression documenting intentional glob matching (9e3db98f66, #71898). The fresh candidate produced zero findings for all ten formerly failing scripts.
However, running the existing TestGenerateFetchStepExecution tests on macOS Bash 3.2.57 fails with syntax error near unexpected token ';;'. The generated case is nested inside command substitution and uses:
case "$remote_ref" in $source_ref) found=1 ;; esacThe balanced pattern form parses under Bash 3.2 while preserving intentional glob matching:
case "$remote_ref" in ($source_ref) found=1 ;; esacRelevant code: pkg/workflow/checkout_step_generator.go, pkg/workflow/checkout_manager_test.go.
A local, uncommitted patch changes that form and adds bash -n coverage independently of optional ShellCheck availability. That patch is not yet fully validated or published. Its validation chain stopped at make fmt because the pinned Prettier dependency was absent; make build and the subsequent execution tests in that chain did not run.
2. CAO secret-output errors were false positives already addressed in current source
The released/stale candidate rejected 62 of 74 CAO workflows with CTR-017 because the shared credential resolver writes a named step output:
echo "::add-mask::$CAO_TARGET_READ_TOKEN"
echo "token=$CAO_TARGET_READ_TOKEN" >> "$GITHUB_OUTPUT"Source: .github/workflows/shared/control.md:581–594 in githubnext/gh-cao. Consumers use that output for authentication, including tools.github.github-token and actions/github-script's github-token input.
Current source models named, same-job step outputs as taint transports instead of automatically treating the producer as a disclosure sink (3fc0220da9, #71850). The freshly built candidate passes all 74 CAO workflows; all 62 prior errors disappear. Do not weaken secret-leak protection or remove legitimate credential handoffs to work around an obsolete diagnostic. Preserve detection at downstream disclosure sinks, cross-job boundaries, and unresolved transports.
3. Eight CAO safe-update warnings are a compilation-mode mismatch, not a linter defect
The source-built compiler's default dev action mode adds real Docker build steps for eight CAO workflows using tools.agentic-workflows. Consequently, docker/setup-buildx-action and docker/build-push-action appear in the generated action inventory but not in release-mode baseline locks.
A control run using the same v0.93.5 compiler with explicit release action mode and the checked-in setup-action SHA passed all 74 workflows. Its stderr was byte-for-byte identical to the pinned v0.93.1 baseline, apart from no changes at all: only the same three existing outdated-action advisories remained.
Do not add blanket trust exceptions or use --approve to silence these warnings. Normalize action mode when comparing compiler revisions.
4. Optional linter errors can be hidden by success-shaped compile results
Both baseline and candidate compilation can return exit 0 with empty JSON errors/warnings arrays while actionlint errors are printed to stderr. Examples include the unchanged created_pr_number / created_pr_url references in gh-aw-test and unchanged aw_context references in gh-aw-workshop.
This is not newly introduced by the candidate, but it undermines automated regression verification. Keep it separate from workflow regressions and improve machine-readable reporting without silently changing established CLI semantics.
5. No additional candidate lint regressions found in wizard or workshop
The fresh candidate compiles 7/7 wizard and 22/22 workshop workflows with no added normalized actionlint or ShellCheck findings. Existing concurrency warnings and workshop findings remain baseline issues, not regressions to fix in this task.
Implementation plan
- Finish the balanced
casesyntax fix in the fetch generator and retain intentional glob semantics, per-checkout credentials, shallow-fetch depth, absent-ref handling, and remote-error propagation. - Add/retain generated-script syntax checks that run even when ShellCheck is unavailable. Exercise Bash 3.2 and a modern Bash, plus ShellCheck and execution tests for literal refs, globs, missing refs, suffix collisions, PR refs, expression-derived refs, and unavailable remotes.
- Confirm existing named-output taint coverage protects downstream logs, summaries, network payloads, published comments/artifacts, job outputs, and unresolved output names/step IDs while accepting same-job authentication handoffs. Add a focused CAO-shaped regression fixture only if current coverage misses this pattern.
- Add or extend tests for optional linter diagnostic propagation. Ensure machine-readable output preserves real actionlint/ShellCheck findings and their severity/location. Define and document exit-status behavior explicitly; preserve compatibility by default or use the repository's established strict-check mechanism rather than introducing an implicit breaking change.
- Standardize the downstream comparison procedure:
make build, record source revision and binary checksum, use identical source snapshots and compiler flags, set action mode explicitly, pin the same external linter versions, and compare normalized diagnostics including stderr-only findings. - Restore missing pinned formatter dependencies, run the focused fetch and taint tests, run formatting and the final repository validation gate, and regenerate affected locks through the compiler if required. Do not hand-edit generated locks or upstream-managed workflow sources.
- Recompile all 243 downstream workflows against the final binary and their pinned baselines in equivalent release action mode; confirm zero added lint diagnostics and retain evidence for existing findings separately.
Acceptance criteria
- Generated fetch scripts parse and execute under Bash 3.2 and modern Bash, with no new ShellCheck findings.
- All 243 downstream workflows compile under equivalent compilation settings, with no new normalized linter findings.
- CAO authentication-only step-output handoffs remain accepted, while real secret disclosure still produces diagnostics.
- Automation can observe optional linter failures in structured results rather than infer cleanliness from exit 0 alone.
- Dev-mode action additions are not mislabeled as release-mode lint regressions or automatically approved.
- No workflow dispatches, unrelated downstream edits, or blanket lint/security suppressions are needed.
Evidence / reproduction
Build candidate:
make build
./gh-aw versionFocused fetch checks:
go test ./pkg/workflow -run TestGenerateFetchStep -count=1Compile equivalent disposable source snapshots with the same action mode and pinned action tag, external actionlint 1.7.12 and ShellCheck 0.11.0, and --no-check-update --actionlint --shellcheck --json. Retain stdout, stderr, emitted locks, compiler revision/checksum, and normalized added/removed diagnostics. gh-aw-test additionally uses --use-samples; CAO comparison uses --strict --schedule-seed githubnext/gh-cao --show-all.
No workflows were dispatched during the investigation.
Activity