Skip to content

feat(image-freshness): add decision engine and repo CI - #184

Closed
derrix060 wants to merge 1 commit into
mainfrom
ang-3523-decide
Closed

derrix060 wants to merge 1 commit into
mainfrom
ang-3523-decide

Conversation

@derrix060

Copy link
Copy Markdown
Contributor

I noticed this repo has no CI of its own, nothing lints the reusable workflows or tests the code living inside them.

The fix is image-freshness/decide.py, the pure decision function for the scheduled freshness check, plus a make test target (actionlint and unit tests) that a new CI workflow runs as is. Five workflows with existing actionlint findings are exempted by name, and that list can only shrink.

The adapters and reusable workflow that call this function, and fixing those five workflows, are left for later PRs.

adds image-freshness/decide.py, the pure decision function for
the scheduled image freshness check (ANG-3523). it takes a facts
json doc (repo visibility, HEAD, registry image, running digests,
xray scan, last rebuild dispatch, previous run state) and returns
ok / fail / rebuild with the rule number and reason.

rules are evaluated in order, first match wins, and anything
unknown or malformed fails closed instead of mapping to ok. stdlib
only, no I/O beyond reading the facts file and printing, so every
rule is unit tested (45 tests in image-freshness/tests). the
adapters that actually gather the facts come later.

adds a Makefile with `make test` (actionlint over .github/workflows
plus the unit tests), so local hooks and CI can't drift, they both
call this one target. new .github/workflows/ci.yaml runs it on push
to main and on PRs, actions SHA-pinned, read-only token, no
persisted credentials.

ports the actionlint harness (tests/lint_workflows.sh,
tests/actionlint-legacy.txt, tools/actionlint go tool module) from
the closed ang-2720-deploy-gate-watchdog branch. legacy workflows
that already had findings stay exempted by name, and that list can
only shrink from here.

also adds a dependabot gomod entry for /tools/actionlint so the
actionlint pin gets updated same as the actions already are, and a
one-liner in the README: run make test before pushing, CI runs the
same target.

Claude-Session: https://claude.ai/code/session_01FKzBJ35DrcARUiQCh9iTKM
Copilot AI lite review requested due to automatic review settings September 23, 2026 12:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@linear

linear Bot commented Sep 23, 2026

Copy link
Copy Markdown

ANG-3523

@derrix060
derrix060 marked this pull request as draft September 23, 2026 12:32
@derrix060 derrix060 closed this Sep 25, 2026
@derrix060
derrix060 deleted the ang-3523-decide branch September 25, 2026 13:13
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.

2 participants