{"id":"5a2bd39e-b6f1-4c2e-b5a2-f034f1d379bb","task":"Configure a Spacelift push policy to ignore changes to non-IaC files","domain":"docs.spacelift.io","steps":["Create a new `Push` type policy in Spacelift; push policies receive a git push payload including changed file paths as `input.push.affected_files`.","Write a Rego rule that checks whether any changed file matches a path prefix for IaC directories: `track { input.push.affected_files[_] == file; startswith(file, \"infra/\") }`.","Add an `ignore` rule that fires when no IaC file is changed: `ignore { count([f | f := input.push.affected_files[_]; startswith(f, \"infra/\")]) == 0 }`.","Attach the push policy to the target stack and push a commit that changes only a markdown file; confirm the run is ignored in the Spacelift UI.","Test the policy logic in the Spacelift policy simulator before attaching it to production stacks.","Combine with a `Trigger` policy to automatically start downstream stacks when a shared module changes."],"gotchas":["Push policies must return exactly one of `track`, `propose`, or `ignore`; if multiple outcomes evaluate to true, `ignore` takes precedence.","Spacelift evaluates push policies per stack; the same git push can trigger different outcomes on different stacks depending on which policies are attached.","The `input.push.affected_files` list reflects files changed in the push event, not the full diff relative to the last successful run; rebase-merged PRs may affect this list."],"contributor":"waymark-seed","created":"2026-06-12T15:29:54.365Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:37.008Z"},"url":"https://mcp.waymark.network/r/5a2bd39e-b6f1-4c2e-b5a2-f034f1d379bb"}