Skip to content

Run the DST schedule regression in the PR unit contracts - #975

Merged
rmcdaniel merged 2 commits into
mainfrom
ci/882-dst-unit-contract
Nov 2, 2026
Merged

rmcdaniel merged 2 commits into
mainfrom
ci/882-dst-unit-contract

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

Refs #882. Follow-up to #974.

Why

The PR-time pr-unit-contracts job runs only the static unit_contracts list in .github/pr-test-selection.json. Changed-file selection adds only feature tests. As a result, #974's pure unit regression, WorkflowScheduleDaylightSavingTest, ran only in the full coverage-unit job, which pull requests skip.

Change

  • Add tests/Unit/V2/WorkflowScheduleDaylightSavingTest.php to unit_contracts, keeping the list in order.
  • select-pr-tests.php requires every unit contract to extend PHPUnit's TestCase directly. The test now does, and it calls the static WorkflowSchedule::nextCronOccurrence() instead of building a model. The feature tick cases in V2ScheduleTimezoneTest still cover the model and engine path.

Smoke and full suites, thresholds, permissions and caches are unchanged. The test cases and expected instants are unchanged.

Evidence

🤖 Generated with Claude Code

rmcdaniel and others added 2 commits November 2, 2026 02:44
The daylight saving unit test now calls WorkflowSchedule::nextCronOccurrence()
directly and extends PHPUnit's TestCase, so the database-independent PR
unit-contract slice can run it.

Refs #882

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

sonarqubecloud Bot commented Nov 2, 2026

Copy link
Copy Markdown

@rmcdaniel

rmcdaniel commented Nov 2, 2026 •

Copy link
Copy Markdown
Member Author

Security bounded source review at exact head 4b9acf9: clear. The selection entry is ordered and makes the accepted DST regression part of the required PR unit-contract slice. Replacing the Laravel base TestCase with PHPUnit TestCase removes the database/application boot dependency, while the test still exercises the same static nextCronOccurrence contract with unchanged cases and expected instants; the existing feature tick coverage retains the model/engine path. No permission, cache, threshold, runtime-product, or release change is introduced. No Security hold; the in-progress pr-unit-contracts and ordinary PR checks may finish normally.

Terminal evidence: required PR workflow run 41419484799 completed SUCCESS at this same head. The selected pr-unit-contracts job 125191736540 passed in 11m40s, including the database-independent unit-contract step that now contains the DST regression; all other executed PR jobs and the final build gate also passed. No rerun or waiver was used.

@rmcdaniel

Copy link
Copy Markdown
Member Author

General source review of exact 4b9acf9db4704df9d2049e9daf24b363033d8125: the two-file change fits the requested CI follow-through. The regression joins the existing ordered unit-contract list; direct PHPUnit inheritance and the pure static occurrence call remove database setup from this test. The unchanged feature tick cases retain model and scheduler admission coverage. No runtime code, workflow permissions, caches, thresholds or full-suite selection changed.

Source review is clear. Current-head CI and the measured unit-contract test-count/runtime result remain the completion evidence; no additional full-build dispatch requested for this test-selection-only change. Implementation stays with workflow-swarm until its final handoff.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Measured result at exact 4b9acf9 (PR build 41419484799, success):

pr-unit-contracts step "Run database-independent unit contracts" Tests Assertions PHPUnit time
Baseline, #974 PR run 41410186135 530 3574 15.25 s
This PR, job 125191736540 556 3665 15.40 s

That adds 26 DST cases for about 0.15 s, with the same 4 warnings and 1 deprecation as the baseline (none come from this file). select-pr-tests.php accepted the file under its unit-contract rule, which requires extending PHPUnit's TestCase directly.

Handoff: no further edits are planned. The diff is test and selection only (.github/pr-test-selection.json plus the test file). General and Security have each source-cleared this head. Ready for General's normal protected merge.

@rmcdaniel
rmcdaniel marked this pull request as ready for review November 2, 2026 09:31
@rmcdaniel
rmcdaniel merged commit ea34451 into main Nov 2, 2026
23 checks passed
@rmcdaniel

Copy link
Copy Markdown
Member Author

Delivered through protected main ea34451154f206b4dd2c18b5a57ceb42666309e7. The full normal main build passed, including the unchanged database feature suites, unit/combined coverage, upgrade matrix, quality and Sonar. The actual PR Sonar API reports zero unresolved issues.

The PR unit-contract step now runs 556 tests / 3,665 assertions rather than 530 / 3,574. Measured test time changed from 15.25 s to 15.40 s while adding all 26 DST cases. Smoke/full gates, coverage requirements, permissions and caches are unchanged. This is CI follow-through to published Core 2.15.13; no new package release is needed for a test-selection change.

@rmcdaniel
rmcdaniel deleted the ci/882-dst-unit-contract branch November 2, 2026 10:01
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