Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .ai-context/WORKFLOWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ run a duplicate push workflow for feature branches. Its concurrency group uses
the pull-request number, or the Git ref for default-branch runs, so superseded
commits cancel without affecting unrelated pull requests.

Every `base-bash-libs` checkout in that workflow uses one immutable GA revision.
The workflow contract test guards against an RC or mixed dependency pin
returning across the platform and source-checkout jobs.

Common commands:

```bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
repository: basefoundry/base-bash-libs
ref: c134fb8a3397e2cfee1d90845cec44f56dacae7b
ref: b4243765726c133499feeabdc50154f99c0fec12
path: .dependencies/base-bash-libs

- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
repository: basefoundry/base-bash-libs
ref: c134fb8a3397e2cfee1d90845cec44f56dacae7b
ref: b4243765726c133499feeabdc50154f99c0fec12
path: .dependencies/base-bash-libs

- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
Expand Down Expand Up @@ -279,7 +279,7 @@ jobs:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
repository: basefoundry/base-bash-libs
ref: c134fb8a3397e2cfee1d90845cec44f56dacae7b
ref: b4243765726c133499feeabdc50154f99c0fec12
path: .dependencies/base-bash-libs

- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
Expand Down
12 changes: 12 additions & 0 deletions tests/test_github_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
ISSUE_BRANCH_POLICY_TEMPLATE = REPO_ROOT / "templates" / "issue-branch-policy.yml"
IMPLEMENTATION_ISSUE_TEMPLATE = REPO_ROOT / ".github" / "ISSUE_TEMPLATE" / "implementation.yml"
FULL_COMMIT_SHA_ACTION_REF = re.compile(r"^[^@]+@[0-9a-f]{40}$")
BASE_BASH_LIBS_GA_COMMIT = "b4243765726c133499feeabdc50154f99c0fec12"


def workflow_files() -> list[Path]:
Expand Down Expand Up @@ -151,6 +152,17 @@ def test_tests_workflow_runs_once_per_pr_commit_and_on_main() -> None:
}


def test_tests_workflow_pins_all_base_bash_libs_checkouts_to_ga_revision() -> None:
refs = [
step.get("with", {}).get("ref")
for _, _, step in workflow_steps(TESTS_WORKFLOW)
if step.get("with", {}).get("repository") == "basefoundry/base-bash-libs"
]

assert refs
assert refs == [BASE_BASH_LIBS_GA_COMMIT] * len(refs)


def test_issue_branch_policy_workflow_is_trusted_and_template_backed() -> None:
workflow = load_workflow(ISSUE_BRANCH_POLICY_WORKFLOW)
triggers = workflow.get("on") or workflow.get(True)
Expand Down
Loading