Skip to content

ci: read the guard's inert list from the base revision - #11

Merged
nabheet merged 1 commit into
mainfrom
ci/guard-inert-base-10
Nov 1, 2026
Merged

nabheet merged 1 commit into
mainfrom
ci/guard-inert-base-10

Conversation

@nabheet

@nabheet nabheet commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Refs nabheet/galactic-config#10.

Problem

The guard normalised package.json on both sides with the inert devDependency list read from the commit under test. A PR could add its own dependency to that list and skip the release the dependency was meant to cut — and .github/** is non-shipping, so the workflow edit never counted either.

Change

The literal stays in the file: it is the list this commit publishes under, and the next run reads it from there. This run reads the comparison base's copy instead, so an entry only takes effect once it has landed through review.

No literal on the base (guard newly added) yields [] → every devDependency change ships. Fail-closed. The extraction tolerates trailing whitespace on the literal line.

Proof

Reproduced locally against a scratch branch, running the guard's real script with the base pinned:

commit RESULT: changed
guard change alone false
inert devDependency bumped false
dependency added to devDeps and to the inert list in the same commit true

Under the old guard the last commit normalises to no diff, so it would have logged skip and released nothing.

Not fixed here

The guard code itself still runs from the commit under test, so a PR can rewrite the guard. Closing that needs the guard body loaded from the base revision, which is a restructure of all five workflows, not a one-line change.

Release impact

.github/** only, so the merge run reports RESULT: changed=false and publishes nothing.

The guard normalised `package.json` on both sides with the inert devDependency
list from the commit under test, so a PR could add a dependency to that list and
skip the release the dependency was meant to cut — `.github/**` is non-shipping,
so the workflow change never counted either.

The literal stays in the file: it is the list this commit publishes under, and
the next run reads it from the base. This run reads the base copy instead, so an
entry only takes effect after it has landed through review. A base with no
literal (guard newly added) yields [], which treats every devDependency change
as shipping — the fail-closed direction.
@nabheet
nabheet force-pushed the ci/guard-inert-base-10 branch from b22c5e6 to 4fc1a82 Compare November 1, 2026 00:52
@nabheet
nabheet marked this pull request as ready for review November 1, 2026 01:00
@nabheet
nabheet merged commit ca4eed2 into main Nov 1, 2026
6 checks passed
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.

1 participant