-
Notifications
You must be signed in to change notification settings - Fork 316
Description
Summary
Custom safe-output jobs compile with fixed dependency behavior. There is no first-class, source-level way to declare needs: (or equivalent) so a custom job runs after generated jobs such as safe_outputs.
Analysis
Legitimate patterns need custom steps to run only after sanitized outputs exist—for example consuming safe_outputs artifacts or performing a final packaging step. Without ordering in the source model, authors patch needs: into compiled lockfiles or add extra workflows as workarounds. Those approaches break on recompile and are easy to get wrong.
Custom job races or runs before safe_outputs; author adds needs: in .lock.yml; next compile removes it.
Implementation plan
- Support
needs:on custom safe-output jobs in the source format, with validation against known generated job ids (includingsafe_outputs). - If raw
needs:is undesirable, add a supported alias such asafter: safe_outputsthat the compiler lowers to concreteneeds:. - Document valid dependency targets; fail the compile with a clear error when a target is unknown or would create a cycle.
Expected outcome
Custom safe-output jobs can be ordered relative to generated jobs in a way that survives compile, without lockfile surgery.