Skip to content

Post releases to /dev/null - #128

Merged
shadetheory merged 8 commits into
masterfrom
devnull-release-post
Oct 24, 2026
Merged

shadetheory merged 8 commits into
masterfrom
devnull-release-post

Conversation

@shadetheory

@shadetheory shadetheory commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Posts each published release to /dev/null, signed with a signing-only key, and checks the package before it does.

Richer release post. .github/scripts/devnull-post.py builds the post at release time from the GitHub API with the workflow's read-only token:

  • <repo> <tag>: <one-line pitch>
  • Patch notes: release body bullets, or the merged PRs and direct commits since the previous release (dependency bumps dropped)
  • Tests: check results for the release commit, plus Pest/PHPUnit totals and coverage when the job log has them
  • Acceptance criteria from issues the merged PRs closed, with their checked state
  • Review findings, one line per review, by reviewer handle
  • Commits pushed to a PR after its first review
  • Local pipeline: quality-runners commit statuses and Werkflow check runs on the release commit and the merged PRs
  • composer require line and the release link

Sections with no data are left out. Plain text, no em dashes, hashtags or @-mentions, capped at 4000 characters, lowest-priority sections trimmed first. The release body goes in through env vars, never interpolated into shell.

Checks.

  • lean-package.yml runs lean-package-validator v6.3.2 (validate --validate-git-archive, keeping README and LICENSE) on pull requests and before the post. .gitattributes now matches what it expects, and git archive still ships composer.json and every src/ file.
  • release-checks.yml runs before the post: version-aligner check (git tag vs latest CHANGELOG.md entry vs application version; skipped when the repo has no CHANGELOG.md) and composer-peel status (read-only; peel is never run). Both are installed in CI only, not added to composer.json.

Job permissions are read-only. The posting job only gets the SSH key.

@shadetheory shadetheory added the risk:high Needs a human review before merge label Oct 24, 2026
Comment thread .github/workflows/devnull.yml Outdated
commit:
runs-on: ubuntu-latest
steps:
- uses: dev-null-sh/dev-null.sh/.github/actions/commit@production

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Using @production on an external composite action pins to a mutable ref. Pin to a commit SHA (or at minimum a tagged release) for supply-chain safety, especially when the action receives an SSH key.

@lexi-chief-of-staff lexi-chief-of-staff Bot 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.

Blocking: none.

  • The workflow itself is minimal and correctly scoped (empty permissions, release trigger only).
  • External action reference at an unpinned mutable tag is the only substantive concern; address that before shipping if the key grant is sensitive.
  • PR body claims a .gitattributes change that is absent from the diff—either remove the claim or add the file.
  • No other correctness, security, or integration issues visible in the provided diff.

@shadetheory

Copy link
Copy Markdown
Owner Author

Quality Gate: error

All quality checks passed.

Quality Check Results

All tools passed without violations.

php-version: '8.3'
coverage: none
tools: none
- name: Validate .gitattributes and the dist archive

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Downloading phar via curl with no checksum or signature verification is a supply-chain risk. Pin to a known-good hash or use a verified source.

Comment thread .gitattributes
.editorconfig export-ignore
.gitattributes export-ignore
.github/ export-ignore
.gitignore export-ignore

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

UPGRADING.md is no longer export-ignored (was present before). If the intent is a lean Composer dist, restore the ignore or confirm it should ship.

@lexi-chief-of-staff lexi-chief-of-staff Bot 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.

Blocking: supply-chain exposure in lean-package workflow and export-ignore regression.

  • .github/workflows/lean-package.yml:22 downloads lean-package-validator.phar over plain curl with zero integrity check. Add --checksum or switch to a verified release mechanism.
  • .gitattributes dropped UPGRADING.md from export-ignore (line 13 in diff). Restore the rule unless the file is intentionally shipped in the Composer artifact.
  • The devnull-post.py script is large and new; consider splitting the GraphQL/REST helpers into a small library or adding unit tests before it becomes the only release artifact generator.
  • No linked issues or prior discussion of the /dev/null posting policy; confirm this is the intended destination for release announcements.

@shadetheory

Copy link
Copy Markdown
Owner Author

Quality Gate: error

All quality checks passed.

Quality Check Results

All tools passed without violations.

@shadetheory

Copy link
Copy Markdown
Owner Author

Quality Gate: error

All quality checks passed.

Quality Check Results

All tools passed without violations.

Comment thread .gitattributes
/.phpactor.json export-ignore
/.claude export-ignore
.claude/ export-ignore
.claude/agents/ export-ignore

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

.claude/ already covers agents/ and CLAUDE.md; the two extra lines are redundant and will be ignored by git.

if not qr and not wf:
continue
bits = []
gate = qr.pop("quality-runners/gate", None)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Using function attribute main.dropped for state across trim iterations is fragile; a local dict would be clearer and avoid mutating the function object.

@lexi-chief-of-staff lexi-chief-of-staff Bot 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.

Blocking: none. Two minor observations called out inline.

  • .gitattributes now has duplicate .claude/ rules.
  • devnull-post.py mutates the function object to carry dropped-count state; a plain dict would be simpler.

The rest of the change (release-to-/dev/null flow, lean-package validator, version-aligner checks) is self-contained and matches the stated intent. Ready to land.

- uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
coverage: none

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

release-checks.sh uses jq (lines 23, 29, 35) but the workflow only installs composer tools. Add jq to setup-php tools or apt-get.

@lexi-chief-of-staff lexi-chief-of-staff Bot 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.

Ship it.

  • release-checks.yml missing jq (commented inline)
  • lean-package.yml hardcodes LPV v6.3.2; consider pinning in a reusable way
  • devnull-post.py correctly avoids shell interpolation and trims sections under 4000 chars
  • release-checks.sh properly skips CHANGELOG-less repos and treats missing app version as non-blocking for libraries
  • .gitattributes change aligns with lean-package-validator expectations

No blocking correctness or safety issues.

@shadetheory

Copy link
Copy Markdown
Owner Author

Quality Gate: error

All quality checks passed.

Quality Check Results

All tools passed without violations.

@lexi-chief-of-staff lexi-chief-of-staff Bot 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.

Ship it.

  • Matches the stated intent exactly: lean-package validation, release-time checks (version-aligner + composer-peel), and the 4000-char plain-text post builder all land where described.
  • .gitattributes delta is the validator's expected output; archive still includes composer.json + src/.
  • devnull-post.py correctly avoids interpolation, drops noise sections, and trims lowest-priority content first.
  • Workflows use read-only tokens and the SSH key only on the final post step; no prod surface changes.

No blocking correctness or safety issues remain.

@shadetheory

Copy link
Copy Markdown
Owner Author

Quality Gate: success

All quality checks passed.

Quality Check Results

All tools passed without violations.

- uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
coverage: none

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

curl of lean-package-validator.phar has no integrity check (no sha256, gpg, or --checksum). With risk:high and external binary execution in CI, add verification before php $RUNNER_TEMP/lpv.phar.

- name: Install version-aligner and composer-peel (CI only, not added to composer.json)
run: |
export COMPOSER_HOME="$RUNNER_TEMP/composer"
composer global require --no-interaction --no-progress stolt/version-aligner:^1.3 stolt/composer-peel:^4.2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

RELEASE_TAG pulled from github.event.release.tag_name inside a reusable workflow_call. Confirm the release event context is propagated from the caller (devnull.yml); otherwise falls back to empty and version-aligner skips the tag match.

@lexi-chief-of-staff lexi-chief-of-staff Bot 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.

Blocking: none. Two concrete issues called out inline.

  • External binary fetch in lean-package.yml lacks integrity verification.
  • RELEASE_TAG context propagation in the reusable release-checks workflow needs explicit confirmation.

Everything else (devnull-post.py structure, release-checks.sh logic, .gitattributes export rules, permission scoping) is sound and matches the stated intent. Ready to merge once the two points are addressed or acknowledged.

@shadetheory

Copy link
Copy Markdown
Owner Author

Quality Gate: success

All quality checks passed.

Quality Check Results

All tools passed without violations.

1 similar comment
@shadetheory

Copy link
Copy Markdown
Owner Author

Quality Gate: success

All quality checks passed.

Quality Check Results

All tools passed without violations.

php-version: '8.3'
coverage: none
tools: none
- name: Validate .gitattributes and the dist archive

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Downloading phar without checksum or signature verification. LPV_VERSION is pinned but the binary itself is not validated before execution. Add sha256sum check or switch to a verified installation method.

@lexi-chief-of-staff lexi-chief-of-staff Bot 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.

Blocking: insecure phar download in lean-package.yml.

  • .github/workflows/lean-package.yml:22 downloads lean-package-validator.phar over curl with no checksum verification before php execution. Pinning the version string is insufficient; add sha256 validation or use a trusted source.
  • No other correctness or safety issues found in the release posting pipeline or checks. The devnull-post.py logic, release-checks, and gitattributes updates are sound.

Fix the download step then re-request review.

@shadetheory
shadetheory merged commit 983f750 into master Oct 24, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:high Needs a human review before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant