Skip to content

test: decouple dependency updates from duplicated version assertions - #115

Merged
coisa merged 2 commits into
mainfrom
codex/dependency-test-contracts
Nov 12, 2026
Merged

coisa merged 2 commits into
mainfrom
codex/dependency-test-contracts

Conversation

@coisa

@coisa coisa commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Dependabot #114 updates ECS 13.3.14 to 13.3.15 without changing the resolved rules, but the preset snapshot duplicates the installed version and source reference. That metadata-only difference fails all three PHP jobs. The Action-reference test similarly repeats every selected version, requiring a second test edit for legitimate version updates.

Compare preset rules strictly and keep Composer's lock as the installed dependency identity. Preserve rule configuration/risk, class origins, counts and the native read-only/fix/idempotence golden. For Actions, retain exactly the same ten allowed identities and require stable version labels (vN, vN.N or vN.N.N), without duplicating the chosen versions. Branch names, commit SHAs, prereleases, malformed labels and unknown providers remain rejected. Registry existence is resolved by GitHub Actions, not a hardcoded unit-test list.

Validation: reproduced #114's original failure against its real two-package dependency update; preset and golden pass on ECS 13.3.14 and 13.3.15 (2 tests/151 assertions each). A deliberately changed array_syntax expectation still fails. Disposable workflow copies prove an otherwise valid stable-version label failed the old test and passes the new one; five negative provider/ref/format probes fail correctly. The real Action-reference test passes (1 test/34 assertions). PHP syntax and diff checks pass; independent review confirmed tree b70f6cf5124ee4c743b2fa210038968ae13b3651.

No manifest, lock, workflow YAML, Action version or provider identity changes. The current commit's checks and reviews remain authoritative; earlier successful checks do not qualify a later SHA. Historical CodeQL failures for deleted JavaScript are separate from these assertions; no security setting was changed here.

Refs #114.

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Documentation
    • Clarified that the reviewed ECS preset snapshot tracks its rules, while the repository’s Composer lockfile identifies the installed version and source. Version or source changes alone do not require updating the snapshot; review rule, configuration, risk, or behavior changes before doing so.
  • Tests
    • Updated workflow checks to validate approved external Action providers and stable numeric version labels, rather than requiring exact references.

The preset fixture and test now compare ECS rules without storing package version or source-reference metadata. The documentation describes lockfile-based dependency identity. The workflow test checks external Action references against approved providers and repositories and a stable version-label format.

Changes: Resolved preset snapshot

Layer / File(s) Summary
Rules-only preset snapshot
tests/Fixtures/preset-rules.json, tests/Config/PresetTest.php, docs/resolved-preset.rst, .changelog/dependency-preset-contract.md
The fixture and test no longer record or compare ECS version and source-reference metadata. The documentation describes the Composer lock as the source of installed dependency identity and specifies when a fixture update is needed. The changelog records the preset and external Action validation contracts.

External Action reference validation

Layer / File(s) Summary
Provider and version-label checks
tests/Automation/WorkflowTest.php
The test checks that each external Action uses an allowed provider and repository and a version label with one to three numeric components. It rejects leading zeroes except for 0.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related issues

Possibly related PRs

Merge Risk: Minimal · up to 9b670

This change only adjusts test fixtures, test assertions, documentation and the changelog so compatible ECS patch updates no longer require snapshot edits. Runtime behavior is unchanged, and the tests still detect rule or behavior changes. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title names a test change that decouples dependency updates from duplicated version assertions. The changeset removes the installed ECS version and source reference from the preset snapshot test a…
Description check Passed The description explains the motivation (Dependabot #114 failing on metadata-only differences), the changes to the preset snapshot and Action-reference tests, the retained checks, and the validation p…
Full details: Title check

Explanation

The title names a test change that decouples dependency updates from duplicated version assertions. The changeset removes the installed ECS version and source reference from the preset snapshot test and fixture, and stops the Action-reference test from repeating selected versions. The title is specific and matches the main change. It uses the test: prefix and is under 70 characters.

Full details: Description check

Explanation

The description explains the motivation (Dependabot #114 failing on metadata-only differences), the changes to the preset snapshot and Action-reference tests, the retained checks, and the validation performed. It relates directly to the changeset.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the rules in rows,
Then hops past versions in the prose.
Approved Action names pass the gate,
With tidy labels, small and straight.
The snapshot keeps its rules in view,
And leaves the lock to name what’s true.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 0e631bc4-29e1-4bd1-8f0b-26841f56a069
Commits

Reviewing files that changed from the base of the PR and between 364cf80 and 9b67030.

Files selected for processing: 5

  • .changelog/dependency-preset-contract.md
  • docs/resolved-preset.rst
  • tests/Automation/WorkflowTest.php
  • tests/Config/PresetTest.php
  • tests/Fixtures/preset-rules.json
Files with no reviewable changes: 1

  • tests/Fixtures/preset-rules.json

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T16:48:48.481920Z 9b67030 New commits
🔒 Security Review ✅ Completed 2026-11-12T16:50:15.328449Z 9b67030 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Changelog

✅ Contribution check passed.

Head: 9b670309a7a5636e63fddcb14aa9c64441a4ea2f

Base: 364cf80f2ccbc9b2c221830cd5e696a99eb9215c

Contribution: 1 new valid fragment(s). Policy: ordinary.

  • dependency-preset-contract.md — fixed, patch

    Allow compatible ECS dependency updates without editing the reviewed preset snapshot solely for version or commit changes. Keep exact rule, configuration, risk, source-origin and formatting behavior checks; Composer's lock remains the source of the installed dependency identity. Validate external Actions against the approved action identities and stable version-label format instead of duplicating every selected release in tests.

@coisa coisa changed the title test: keep preset contracts independent of dependency patch identity test: decouple dependency updates from duplicated version assertions Nov 12, 2026
@coisa
coisa merged commit f830e93 into main Nov 12, 2026
24 checks passed
@coisa
coisa deleted the codex/dependency-test-contracts branch November 12, 2026 18:24
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