test(workflows): pin executed run body #1330
No reviewers
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!1330
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rigger/1274-executed-run-body"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs #1274.
This test-only change pins the premise used by the #1261 assets-present behavioral driver: the body passed to bash is the same program Forgejo executes.
The check is at the execution boundary in tests/fixtures/assets_present_fixture.py. The YAML run scalar is extracted, then the exact scalar passed to subprocess.run(["bash", "-c", body]) is rejected if it contains a Forgejo workflow expression. The failure explains that Forgejo expands the expression before bash while this fixture executes the extracted body literally, so the programs would diverge. This does not grep the raw workflow text as a substitute for the executed body.
The mutation control inserts one workflow expression into that exact body and expects the execution-boundary guard to reject it. If the guard is removed or accepts the mutant, the control reports the failure; the four existing assets-present scenarios remain the behavioral controls.
Scope: tests/fixtures/assets_present_fixture.py only. No production workflow or release code changed.
Local verification:
No-Changelog: test-only execution-premise guard; no runtime behavior change.
APPROVED at exact head
760864a5fc.The guard is at the execution boundary: it checks the exact YAML run scalar passed to bash, not raw workflow source. The mutation inserts a workflow expression into that exact body and is rejected with the Forgejo-expansion versus literal-fixture divergence reason; removing or bypassing the guard makes the mutation detectable as a failure. The four existing asset-result scenarios and PATCH request control remain intact. The mutation and fixture checks pass, root-invoked full Bats passes 174/174, and Forgejo CI is terminal 26/26 green.