Skip to content

[#3311] Added a 7-day Composer 'cooldown' policy with Drupal core exempt. - #3343

Merged
AlexSkrypnyk merged 7 commits into
mainfrom
feature/3311-composer-cooldown
Nov 17, 2026
Merged

AlexSkrypnyk merged 7 commits into
mainfrom
feature/3311-composer-cooldown

Conversation

@AlexSkrypnyk

Copy link
Copy Markdown
Member

Closes #3311

Summary

The template composer.json now sets config.policy.cooldown with a period of 7 days, so composer update and composer require skip any tagged release published in the last week. drupal/core and drupal/core-* are listed under ignore, so a Drupal core security release resolves on the day it ships.

Until now, a manual composer update or composer require would pull a release that was minutes old, and so would the transitive updates in a Renovate PR, because Renovate's 14-day minimumReleaseAge only ages the direct dependencies it bumps. That's exactly the window in which compromised releases tend to get caught and pulled. Composer 2.11 added the cooldown, and it reads published-time from both Packagist and packages.drupal.org, so it covers contrib modules too.

Routine Renovate PRs aren't affected, because their 14-day delay is longer than the cooldown. 2 paths can now hit it, and the docs cover both with --no-cooldown. The first is a core release whose drupal/core-recommended pins a dependency younger than 7 days, such as a fresh Symfony patch. The second is a Renovate security PR for a fix released in the last 7 days. composer install from a lock file doesn't change.

Before / After

BEFORE                                     AFTER
──────                                     ─────
composer update / require                  composer update / require
        │                                          │
        ▼                                          ▼
┌──────────────────────────┐               ┌──────────────────────────────┐
│ any release, any age     │               │ release < 7 days old?        │
│ (incl. transitive deps   │               └──────┬───────────────┬───────┘
│  in Renovate lock runs)  │                   no │           yes │
└──────────────────────────┘                      ▼               ▼
                                           ┌────────────┐  ┌──────────────────┐
                                           │ resolvable │  │ drupal/core or   │
                                           └────────────┘  │ drupal/core-* ?  │
                                                           └───┬─────────┬────┘
                                                           yes │      no │
                                                               ▼         ▼
                                                        ┌──────────┐ ┌───────────────┐
                                                        │resolvable│ │ withheld      │
                                                        └──────────┘ │ (bypass with  │
                                                                     │ --no-cooldown)│
                                                                     └───────────────┘

Changes

Template config

  • composer.json: added config.policy.cooldown with period: "7 days" and ignore entries for drupal/core and drupal/core-*. The drupal/core-* pattern was picked over drupal/core*, so contrib projects whose names start with core_ still get the cooldown.

Documentation

  • development/composer.mdx: a new "Release cooldown" section under "Update dependencies". It covers what the cooldown holds back, which versions it leaves alone (branch versions such as dev-main, installs from a lock), the core exemption and its drupal/core-recommended pin caveat, and the --no-cooldown command. It also notes that a full update inside the window can move an indirect dependency back to an older release, and how to change or turn off the period. The policy bullet in the config reference links to it.
  • development/dependency-updates.mdx: the "Drupal core" and "Security fixes" sections explain when Renovate's composer.lock update hits the cooldown and how to finish the PR locally with --with-dependencies --no-cooldown.
  • development/security/dependency-audit.mdx: the Composer version note says the cooldown section needs Composer 2.11.

Fixtures

  • The installer handler_process snapshots were regenerated for the baseline and the 3 scenarios that rewrite composer.json (hosting_acquia, hosting_project_name___acquia, starter_drupal_cms_profile).

How it was checked

A scratch project with this policy, drupal/core-recommended, drupal/coffee and symfony/console resolved cleanly against Packagist and packages.drupal.org with Composer 2.11, and 3 versions were withheld. With COMPOSER_POLICY_COOLDOWN_PERIOD="30 days", core resolved to 11.4.11 (27 days old), which confirms the ignore entries apply. It didn't reach 11.4.12, because that release pins Symfony versions that were still inside the window. The drupal/core-recommended caveat in the docs comes from that run.

@AlexSkrypnyk AlexSkrypnyk added the A4 Board worker 4 label Nov 16, 2026
@github-project-automation github-project-automation Bot moved this to BACKLOG in Vortex 1.x Nov 16, 2026
@AlexSkrypnyk AlexSkrypnyk added this to the 1.43.0 milestone Nov 16, 2026
@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 4 billable files and costs up to $1.00.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 42 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available. Your 88 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 2750e94 and 66d7a9e.

Files ignored due to path filters: 4

  • .vortex/installer/tests/Fixtures/handler_process/_baseline/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/starter_drupal_cms_profile/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
Files selected for processing: 4

  • .vortex/docs/content/development/composer.mdx
  • .vortex/docs/content/development/dependency-updates.mdx
  • .vortex/docs/content/development/security/dependency-audit.mdx
  • composer.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions

Copy link
Copy Markdown

📖 Documentation preview for this pull request has been deployed to Netlify:

https://6afb8806d3814a02bc5bf181--vortex-docs.netlify.app

This preview is rebuilt on every commit and is not the production documentation site.

@github-actions

This comment has been minimized.

@AlexSkrypnyk

This comment has been minimized.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

Copy link
Copy Markdown

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (233/233)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk

This comment has been minimized.

1 similar comment
@AlexSkrypnyk

Copy link
Copy Markdown
Member Author

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (233/233)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@codecov

codecov Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.66%. Comparing base (2750e94) to head (66d7a9e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3343   +/-   ##
=======================================
  Coverage   92.66%   92.66%           
=======================================
  Files         115      115           
  Lines        5110     5110           
  Branches       49       49           
=======================================
  Hits         4735     4735           
  Misses        375      375           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AlexSkrypnyk AlexSkrypnyk added the Needs review Pull request needs a review from assigned developers label Nov 16, 2026
@AlexSkrypnyk
AlexSkrypnyk merged commit cf9be03 into main Nov 17, 2026
51 checks passed
@AlexSkrypnyk
AlexSkrypnyk deleted the feature/3311-composer-cooldown branch November 17, 2026 00:52
@github-project-automation github-project-automation Bot moved this from BACKLOG to Release queue in Vortex 1.x Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A4 Board worker 4 Needs review Pull request needs a review from assigned developers

Projects

Status: Release queue

Development

Successfully merging this pull request may close these issues.

Add cooldown config to composer.json

1 participant