Skip to content

Commit bcb411d

Browse files
smolpawsopenhands-agentenyst
authored
chore(deps): enforce seven-day third-party release-age policy (#819)
* chore(deps): enforce seven-day third-party release-age policy Co-authored-by: openhands <openhands@all-hands.dev> * fix(deps): preserve review rules and align uv support floor Co-authored-by: openhands <openhands@all-hands.dev> * fix(deps): keep first-party SDK validation versions aligned Co-authored-by: openhands <openhands@all-hands.dev> * docs(deps): simplify lockfile guidance Co-authored-by: openhands <openhands@all-hands.dev> --------- Co-authored-by: smolpaws <smolpaws@users.noreply.github.com> Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: Engel Nyst <engel.nyst@gmail.com>
1 parent 1ea389f commit bcb411d

4 files changed

Lines changed: 65 additions & 5 deletions

File tree

‎.agents/skills/custom-codereview-guide.md‎

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,27 @@ window.
117117

118118
### Dependencies and supply chain
119119

120-
Apply the general seven-day release-recency guard to the exact dependency version,
121-
regardless of the package's age or popularity. Validate installation with the
122-
package manager and runtime used by the extension. Temporary git pins and
123-
unreleased package APIs are blockers for merge unless the PR is an explicit,
124-
coordinated stack that will replace them before release.
120+
Validate installation with the package manager and runtime used by the extension.
121+
Temporary git pins and unreleased package APIs are blockers for merge unless the
122+
PR is an explicit, coordinated stack that will replace them before release.
123+
124+
For dependency additions or updates, inspect every changed third-party npm or
125+
PyPI version, including transitive lockfile changes. Require at least seven days
126+
since publication of that exact version. Use registry publication/upload metadata
127+
or the relevant artifact's `uv.lock` `upload-time`; a weekly bot schedule, an old
128+
package name, or a passing install is not age evidence.
129+
130+
For an under-seven-day artifact, leave a COMMENT naming the package, version,
131+
publication time, and source, and defer approval until it ages out or a maintainer
132+
explicitly approves a narrowly documented exception. If publication time is
133+
unavailable, ask for that evidence. Existing named first-party exemptions apply
134+
only to those packages, not their third-party dependencies or blanket approval
135+
of the lockfile. Apply this check before any dependency-bump fast path.
136+
137+
Flag removal or weakening of seven-day uv/Dependabot guards or new broad
138+
exemptions. Dependabot security updates bypass cooldown, so review them under
139+
the explicit maintainer-exception rule in `AGENTS.md`; agents cannot approve
140+
their own bypass.
125141

126142
### Design context for deep changes
127143

‎.github/dependabot.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ updates:
1010

1111
- package-ecosystem: npm
1212
directory: /
13+
cooldown:
14+
default-days: 7
1315
schedule:
1416
interval: weekly
1517
commit-message:
@@ -18,6 +20,8 @@ updates:
1820

1921
- package-ecosystem: pip
2022
directory: /
23+
cooldown:
24+
default-days: 7
2125
schedule:
2226
interval: weekly
2327
commit-message:

‎AGENTS.md‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,3 +209,36 @@ Important notes:
209209

210210
- Prefer the official OpenHands docs on skills: https://docs.openhands.dev/overview/skills
211211
- Prefer the SDK skill guide: https://docs.openhands.dev/sdk/guides/skill
212+
213+
## Dependency release-age policy
214+
215+
- Wait at least seven days after publication before adding or updating a
216+
third-party npm or PyPI version, including transitive lockfile changes.
217+
A weekly update schedule alone does not enforce this minimum age.
218+
- Keep Dependabot `cooldown.default-days: 7` for npm and Python version
219+
updates, and preserve `tool.uv.exclude-newer = "7 days"` where configured.
220+
Existing named first-party exceptions do not exempt their third-party
221+
dependencies. Do not add broad exemptions or disable the cutoff to make a
222+
resolver succeed.
223+
- Verify the exact version's publication/upload time from npm or PyPI metadata
224+
(or artifact `upload-time` in `uv.lock`), not the package's creation date.
225+
If age cannot be established, report the missing evidence rather than guess.
226+
- Security updates can bypass Dependabot cooldown. An urgent exception needs
227+
explicit maintainer approval recorded in the PR with the package, version,
228+
advisory/reason, and publication time. Agents must not grant themselves an
229+
exception. Keep overrides narrow and remove temporary exceptions afterward.
230+
- Use the committed lock for reproducible installs; review newly resolved
231+
artifacts before committing a lock update.
232+
233+
For manual npm dependency resolution, use npm >= 11.10 with
234+
`npm install --min-release-age=7` (days), or verify registry timestamps before
235+
committing the result. Older npm versions do not enforce this option. `npm ci`
236+
replays the lock and is not proof that newly locked versions meet the age rule.
237+
238+
Use uv >= 0.9.25 for this policy. Older versions cannot parse the boolean
239+
first-party exemptions and can discard the entire `[tool.uv]` table, including
240+
`required-version`. Check `uv --version` before running `uv sync`, `uv lock`,
241+
or `uv run`; this repository does not commit a lockfile to reject old parsers.
242+
The named exemptions cover the released SDK, tools, workspace, and agent-server
243+
packages used by the documented import checks; their third-party dependencies
244+
still have the seven-day cutoff.

‎pyproject.toml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,10 @@ test = [
3030
[tool.pytest.ini_options]
3131
pythonpath = ["python", "skills/github/scripts"]
3232
testpaths = ["tests"]
33+
34+
[tool.uv]
35+
required-version = ">=0.9.25"
36+
exclude-newer = "7 days"
37+
38+
# Only first-party artifacts bypass the wait, not their dependencies.
39+
exclude-newer-package = { openhands-sdk = false, openhands-tools = false, openhands-workspace = false, openhands-agent-server = false }

0 commit comments

Comments
 (0)