Skip to content

chore: min age for dependencies#1218

Draft
leonardmq wants to merge 4 commits intomainfrom
leonard/kil-513-chore-min-age-for-deps
Draft

chore: min age for dependencies#1218
leonardmq wants to merge 4 commits intomainfrom
leonard/kil-513-chore-min-age-for-deps

Conversation

@leonardmq
Copy link
Copy Markdown
Collaborator

@leonardmq leonardmq commented Apr 4, 2026

What does this PR do?

Add exclude-newer in pyproject.toml files so that uv add installs dependencies not newer than a certain age (7 days) to decrease the risk of installing attacked deps.

Also added min-release-age to do the same for npm i - the flag is relatively recent in npm, so you need npm >= 11.x. Update your npm with npm install -g npm@latest.

You also need to run uv sync.

Checklists

  • Tests have been run locally and passed
  • New tests have been added to any work in /lib

Summary by CodeRabbit

  • Chores
    • Updated dependency management configuration to exclude package versions newer than 7 days, enhancing stability across Python and Node.js environments.
    • Updated test framework configuration settings for improved test execution behavior.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 4, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0571088f-04b2-494f-9716-4f7b22fb6c8c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Configuration updates applied across package management and testing tools. Python projects receive exclude-newer = "7 days" under [tool.uv] to constrain dependency versions. npm configuration adds release-age constraint. pytest.ini syntax adjusted for asyncio loop scope configuration.

Changes

Cohort / File(s) Summary
UV Dependency Constraints
app/desktop/pyproject.toml, libs/core/pyproject.toml, libs/server/pyproject.toml, pyproject.toml
Added [tool.uv] configuration with exclude-newer = "7 days" to constrain dependency resolution to versions no newer than 7 days old.
NPM Release Age
app/web_ui/.npmrc
Added min-release-age=7 setting to enforce minimum 7-day release age for npm packages.
Pytest Asyncio Configuration
pytest.ini
Changed asyncio_default_fixture_loop_scope from quoted string "function" to unquoted token function for proper configuration parsing.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 With version pins and timespan bounds,
We tame the package update rounds!
Seven days of waiting here,
Keeps our dependencies crystal clear.
Fresh but stable, tried and tested—
Our configs now well-invested! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: min age for dependencies' is clear and directly summarizes the main change, which is adding minimum age constraints for dependencies across multiple package managers.
Description check ✅ Passed The PR description covers the main objectives and includes the required checklist with both items checked, though it omits the 'Related Issues' section from the template.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch leonard/kil-513-chore-min-age-for-deps

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 4, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedpypi/​anyio@​4.10.0 ⏵ 4.13.097 +1100100100100
Addedpypi/​certifi@​2026.2.2510010010010070
Updatedpypi/​boto3@​1.37.10 ⏵ 1.42.7899100100100100

View full report

@leonardmq leonardmq marked this pull request as draft April 4, 2026 05:14
@leonardmq
Copy link
Copy Markdown
Collaborator Author

Not ideal - it updated all the existing dependencies

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 4, 2026

📊 Coverage Report

Overall Coverage: 92%

Diff: origin/main...HEAD

No lines with coverage information in this diff.


Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements dependency age constraints by adding exclude-newer to uv configurations and min-release-age to npm settings. It also removes peer dependency flags from package-lock.json and adjusts the asyncio fixture scope in pytest.ini. Feedback indicates that the npm min-release-age value is incorrectly set to 7 seconds instead of 7 days, and the [tool.uv] settings in workspace member files are redundant as they are inherited from the root configuration.

Comment thread app/web_ui/.npmrc
Comment thread app/desktop/pyproject.toml Outdated
Comment thread libs/core/pyproject.toml Outdated
Comment thread libs/server/pyproject.toml Outdated
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