Skip to content

fix(structure-test): stop pinning the swoole patch version - #118

Merged
abnegate merged 2 commits into
mainfrom
fix/swoole-structure-test
Oct 15, 2026
Merged

abnegate merged 2 commits into
mainfrom
fix/swoole-structure-test

Conversation

@abnegate

Copy link
Copy Markdown
Member

Summary

  • tests.yaml asserted the exact Swoole patch release, but the dependency updater only rewrites PHP_SWOOLE_VERSION in the Dockerfile, so every automated Swoole bump (chore: update dependencies #112, chore: update dependencies #114, chore: update dependencies #117) failed structure_test.
  • The assertion now requires Swoole to load and report a stable 6.x.y release (.*swoole version 6\.[0-9]+\.[0-9]+ .*).
  • Added StructureTest: no structure-test config may hold a version the updater rewrites, and the Swoole expectation must accept same-major patch/minor bumps while rejecting a new major or a -dev build. Both tests fail on main.

Why not teach the updater to rewrite tests.yaml

The Dependency domain treats the Dockerfile as the single source of truth: Updater refuses any other target and Plan carries one file's content. Rewriting tests.yaml too would add a second target, a YAML-shaped rewrite and a non-atomic two-file write just to keep a duplicate pin in sync. The exact version is already guaranteed by building from PHP_SWOOLE_COMMIT, and Selector never crosses a major, so a major-version assertion holds across every automated bump.

Test plan

  • composer verify (lint, PHPStan, 158 tests, parity)
  • StructureTest fails against main's tests.yaml
  • structure_test CI passes against the built image

🤖 Generated with Claude Code

The weekly updater bumps PHP_SWOOLE_VERSION in the Dockerfile, but
tests.yaml asserted the exact patch release, so every Swoole bump
(#112, #114, #117) failed structure_test until someone edited the
assertion by hand.

The Dependency domain treats the Dockerfile as the single source of
truth: Updater refuses any other target, and Plan carries one file's
content. Teaching it to also rewrite tests.yaml would mean a second
target, a YAML-shaped rewrite and a non-atomic two-file write, all to
keep a duplicate of a pin in sync. The exact version is already
guaranteed by building from PHP_SWOOLE_COMMIT, so the duplicate adds
nothing.

The assertion now requires Swoole to load and report a stable 6.x.y
release. Selector never crosses a major version, so every automated bump
passes, while a major bump, a dev build or a missing extension still
fails and needs a deliberate edit.

StructureTest guards both halves: no structure-test config may hold a
version the updater rewrites, and the Swoole expectation must accept
same-major patch and minor bumps and reject a new major or a dev build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hansi-codes

hansi-codes Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The changed expectation accepts same-major stable updates while rejecting other majors and dev builds, with unit coverage for those cases.

The Swoole structure test now matches any stable 6.x.y release rather than pinning a patch version. A new unit test checks the structure-test configurations against dependency pins and verifies the Swoole expectation's major-version and prerelease boundaries.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 2
File Change
tests.yaml Replaced the exact Swoole patch expectation with a stable 6.x.y pattern.
.github/scripts/tests/Unit/Dependency/StructureTest.php Added regression checks for dependency version pins and Swoole pattern boundaries.

Merged main (9fd686d); no changes to this PR's code since a864758 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@hansi-codes hansi-codes 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.

🟢 Tier S · Looks good to merge. Summary

@abnegate
abnegate merged commit 12aca48 into main Oct 15, 2026
12 checks passed
@abnegate
abnegate deleted the fix/swoole-structure-test branch October 15, 2026 04:10
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