Skip to content

test(bash-lint): cover 'Stage repo execution context' generator#1095

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
bash-hygiene/repo-exec-context-coverage-8d23774cf89a83dd
Draft

test(bash-lint): cover 'Stage repo execution context' generator#1095
github-actions[bot] wants to merge 1 commit into
mainfrom
bash-hygiene/repo-exec-context-coverage-8d23774cf89a83dd

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What the lint found

Proactive coverage audit found that RepoContextContributor::prepare_step_typed() in src/compile/extensions/exec_context/repo.rs emits a bash step with display name Stage repo execution context (aw-context/repo/*), but no fixture in the lint harness activated this contributor. The step was therefore never passed through shellcheck.

Three other opt-in exec-context contributors (ci-push, schedule, pr-checks) are similarly unreached and will be addressed in subsequent runs.

How it was fixed

  • tests/fixtures/execution-context-agent.md — added execution-context: { repo: { enabled: true } } to the front matter. The RepoContextContributor is purely config-driven (no trigger requirement, default OFF), so this single flag is sufficient to activate it. Updated the fixture description and body to document the third contributor.
  • tests/bash_lint_tests.rs — added "Stage repo execution context (aw-context/repo/*)" to REQUIRED_STEP_DISPLAY_NAMES with a source comment pointing at repo.rs. Future regressions (e.g. a display-name rename or the contributor being gated out) will now surface as a test failure rather than silent uncoverage.

The repo contributor's bash body is:

set -euo pipefail
node '/tmp/ado-aw-scripts/ado-script/exec-context-repo.js'

shellcheck passes cleanly — set -euo pipefail is the correct idiomatic header and there are no variable-quoting or silent-failure issues.

Verification

ENFORCE_BASH_LINT=1 cargo test --test bash_lint_tests -- --nocapture
# test compiled_bash_bodies_pass_shellcheck ... ok
# test every_listed_fixture_exists ... ok

cargo test
# All tests passed

cargo clippy --all-targets
# No warnings

Warning

Firewall blocked 3 domains

The following domains were blocked by the firewall during workflow execution:

  • releaseassets.githubusercontent.com
  • spsprodeus21.vssps.visualstudio.com
  • spsprodweu4.vssps.visualstudio.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "releaseassets.githubusercontent.com"
    - "spsprodeus21.vssps.visualstudio.com"
    - "spsprodweu4.vssps.visualstudio.com"

See Network Configuration for more information.

Generated by Bash Step Hygiene Auditor · 925 AIC · ⌖ 19 AIC · ⊞ 35.8K ·

Add execution-context.repo.enabled: true to execution-context-agent.md
so the RepoContextContributor's bash step is exercised by the lint.
Track 'Stage repo execution context (aw-context/repo/*)' in
REQUIRED_STEP_DISPLAY_NAMES so any future regression is caught.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot mentioned this pull request Jun 19, 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.

0 participants