Repository navigation
Improve production packaging defaults - #84
Conversation
|
Warning Review limit reached
Next review available in: 19 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe repository centralizes .NET build and package settings, selects SDK 10.0.302, adds NuGet lock files, updates project metadata, adds an MIT license, and updates website package metadata. ChangesRepository standardization
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
🧪 Integration Test Results (net10.0)ℹ️ Execution Details
Automated integration testing with Redis containers using TUnit |
🧪 Integration Test Results (net8.0)ℹ️ Execution Details
Automated integration testing with Redis containers using TUnit |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f64318592c
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
| <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance> | ||
| <PackageTags>redis;valkey;keydb;resp;cache;caching;client;dotnet</PackageTags> | ||
| <PackageReadmeFile>README.md</PackageReadmeFile> |
There was a problem hiding this comment.
Fix repository-relative links in the packaged README
When any of these packages is viewed on NuGet.org, the newly selected README still contains repository-relative links such as docs/API_DESIGN.md, docs/COMMAND_COVERAGE.md, benchmarks/, and LICENSE (README.md lines 19, 202–205, and 227). Those links resolve relative to the NuGet package page rather than the GitHub repository and lead users to missing pages. Use absolute repository URLs or a dedicated package README before declaring this file as PackageReadmeFile.
Useful? React with 👍 / 👎.
Redis Container Benchmark Results (net10.0)BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat) Runtime=.NET 8.0 IterationCount=3 WarmupCount=1
View raw benchmark output |
Redis Container Benchmark Results (net8.0)BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat) Runtime=.NET 8.0 IterationCount=3 WarmupCount=1
View raw benchmark output |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (1)
Directory.Build.props (1)
15-25: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider deriving project roles from paths instead of hardcoded name lists.
Lines 17 and 21 encode project names as literal strings. A new package project or test project silently gets the wrong defaults until someone updates this file. Path-based conditions or a per-project opt-in property remove that coupling.
♻️ Path-based alternative
<PropertyGroup> - <IsRespirePackageProject>false</IsRespirePackageProject> - <IsRespirePackageProject Condition="'$(MSBuildProjectName)' == 'Respire' Or ...">true</IsRespirePackageProject> + <!-- Every project under src/ ships as a package. --> + <IsRespirePackageProject>false</IsRespirePackageProject> + <IsRespirePackageProject Condition="$(MSBuildProjectDirectory.Contains('$(RepositoryRoot)src'))">true</IsRespirePackageProject> <IsPackable>$(IsRespirePackageProject)</IsPackable> </PropertyGroup> - <PropertyGroup Condition="'$(MSBuildProjectName)' == 'Respire.Tests' Or ..."> + <PropertyGroup Condition="$(MSBuildProjectName.EndsWith('Tests'))"> <IsTestProject>true</IsTestProject> <TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport> </PropertyGroup>🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Directory.Build.props` around lines 15 - 25, Replace the hardcoded MSBuild project-name lists in the IsRespirePackageProject and IsTestProject conditions with path-based project-role detection or per-project opt-in properties. Ensure newly added package and test projects receive the correct IsPackable and TestingPlatformDotnetTestSupport defaults without requiring Directory.Build.props list updates.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Directory.Build.props`:
- Line 4: Remove the conflicting target framework declaration by keeping a
single framework configuration between Directory.Build.props and
allocation_test.csproj; update the TargetFrameworks setting in
Directory.Build.props or the TargetFramework setting in the allocation_test
project so allocation_test does not unintentionally multi-target.
In `@Respire.Pipeline/packages.lock.json`:
- Around line 490-542: Regenerate Respire.Pipeline’s packages.lock.json using
dotnet restore --force-evaluate so all CentralTransitive entries, especially
Microsoft.Extensions.ObjectPool and the Microsoft.Extensions.* packages, resolve
consistently with the 10.0.10 lower bound and Directory.Packages.props. Commit
the regenerated lock file without manually editing individual dependency
entries.
In `@tests/Respire.Extensions.Caching.Tests/packages.lock.json`:
- Around line 305-314: Regenerate all affected lock files with full restore
re-evaluation using dotnet restore --force-evaluate so every CentralTransitive
resolved version satisfies its requested central version. Update
tests/Respire.Extensions.Caching.Tests/packages.lock.json,
benchmarks/Respire.Benchmarks/packages.lock.json,
benchmarks/Respire.ComparisonBenchmarks/packages.lock.json,
tests/Respire.Pipeline.Tests/packages.lock.json,
tools/Respire.StressTests/packages.lock.json, and
tests/Respire.IntegrationTests/packages.lock.json at the specified ranges, then
commit the generated changes; only retain a lower version if backed by a direct
PackageReference with documented justification.
In `@tests/Respire.Pipeline.Tests/packages.lock.json`:
- Around line 612-617: Add an explicit PackageReference for
Microsoft.Extensions.ObjectPool to the pipeline project files, using the
centrally managed 10.0.10 version. Ensure the projects containing the
ModularPipelines dependency directly reference the package so transitive
resolution no longer selects the 9.0.0-rc.2.24474.3 assembly.
In `@website/package.json`:
- Line 16: Update the documentation workflow’s Node.js setup around the
packageManager setting so npm@11.13.0 is explicitly installed or invoked before
the existing npm ci step. Preserve the current npm ci behavior while ensuring it
uses the pinned npm version.
---
Nitpick comments:
In `@Directory.Build.props`:
- Around line 15-25: Replace the hardcoded MSBuild project-name lists in the
IsRespirePackageProject and IsTestProject conditions with path-based
project-role detection or per-project opt-in properties. Ensure newly added
package and test projects receive the correct IsPackable and
TestingPlatformDotnetTestSupport defaults without requiring
Directory.Build.props list updates.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 156511e1-823e-4580-907b-523f35ce062e
⛔ Files ignored due to path filters (1)
website/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (35)
Directory.Build.propsDirectory.Packages.propsLICENSEREADME.mdRespire.Pipeline/Respire.Pipeline.csprojRespire.Pipeline/packages.lock.jsonallocation_test/allocation_test.csprojallocation_test/packages.lock.jsonbenchmarks/Respire.Benchmarks/Respire.Benchmarks.csprojbenchmarks/Respire.Benchmarks/packages.lock.jsonbenchmarks/Respire.ComparisonBenchmarks/Respire.ComparisonBenchmarks.csprojbenchmarks/Respire.ComparisonBenchmarks/packages.lock.jsonglobal.jsonsamples/Respire.Samples.Basic/packages.lock.jsonsrc/Respire.Extensions.Caching.Hybrid/Respire.Extensions.Caching.Hybrid.csprojsrc/Respire.Extensions.Caching.Hybrid/packages.lock.jsonsrc/Respire.Extensions.Caching/Respire.Extensions.Caching.csprojsrc/Respire.Extensions.Caching/packages.lock.jsonsrc/Respire.Extensions.DependencyInjection/Respire.Extensions.DependencyInjection.csprojsrc/Respire.Extensions.DependencyInjection/packages.lock.jsonsrc/Respire/Respire.csprojsrc/Respire/packages.lock.jsontests/Respire.Extensions.Caching.Hybrid.Tests/Respire.Extensions.Caching.Hybrid.Tests.csprojtests/Respire.Extensions.Caching.Hybrid.Tests/packages.lock.jsontests/Respire.Extensions.Caching.Tests/Respire.Extensions.Caching.Tests.csprojtests/Respire.Extensions.Caching.Tests/packages.lock.jsontests/Respire.IntegrationTests/Respire.IntegrationTests.csprojtests/Respire.IntegrationTests/packages.lock.jsontests/Respire.Pipeline.Tests/Respire.Pipeline.Tests.csprojtests/Respire.Pipeline.Tests/packages.lock.jsontests/Respire.Tests/Respire.Tests.csprojtests/Respire.Tests/packages.lock.jsontools/Respire.StressTests/Respire.StressTests.csprojtools/Respire.StressTests/packages.lock.jsonwebsite/package.json
💤 Files with no reviewable changes (10)
- Respire.Pipeline/Respire.Pipeline.csproj
- allocation_test/allocation_test.csproj
- tests/Respire.Tests/Respire.Tests.csproj
- tests/Respire.Pipeline.Tests/Respire.Pipeline.Tests.csproj
- benchmarks/Respire.ComparisonBenchmarks/Respire.ComparisonBenchmarks.csproj
- benchmarks/Respire.Benchmarks/Respire.Benchmarks.csproj
- tests/Respire.Extensions.Caching.Tests/Respire.Extensions.Caching.Tests.csproj
- tests/Respire.Extensions.Caching.Hybrid.Tests/Respire.Extensions.Caching.Hybrid.Tests.csproj
- tests/Respire.IntegrationTests/Respire.IntegrationTests.csproj
- tools/Respire.StressTests/Respire.StressTests.csproj
| </PropertyGroup> | ||
| <PropertyGroup> | ||
| <RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot> | ||
| <TargetFrameworks>net8.0;net10.0</TargetFrameworks> |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# List all project files and show their target framework declarations.
fd -e csproj . | while IFS= read -r p; do
echo "=== $p"
rg -n '<TargetFrameworks?>' "$p" || echo " (no override - inherits net8.0;net10.0)"
doneRepository: thomhurst/Respire
Length of output: 1789
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- Directory.Build.props ---'
cat -n Directory.Build.props
printf '%s\n' '--- allocation_test/allocation_test.csproj ---'
cat -n allocation_test/allocation_test.csproj
printf '%s\n' '--- framework-related project declarations ---'
rg -n -C 2 '<TargetFrameworks?>|IsCrossTargetingBuild|TargetFramework' --glob '*.csproj' --glob '*.props' --glob '*.targets' .
printf '%s\n' '--- available MSBuild tooling ---'
command -v dotnet || true
command -v msbuild || trueRepository: thomhurst/Respire
Length of output: 12801
🌐 Web query:
MSBuild SDK TargetFramework TargetFrameworks both set IsCrossTargetingBuild precedence
💡 Result:
In MSBuild projects, when both TargetFramework and TargetFrameworks are defined, TargetFrameworks takes precedence [1]. If TargetFrameworks is present, the.NET SDK ignores the TargetFramework property [1]. The IsCrossTargetingBuild property is an internal MSBuild property used by the.NET SDK to determine whether a project should perform a multi-targeting (cross-targeting) build [2]. It is set to true automatically when TargetFrameworks is defined and non-empty, and the build is not currently executing an inner build for a specific framework [2]. Specifically, the logic used by the SDK evaluates as follows: - If TargetFrameworks is set and non-empty, and TargetFramework is not set, IsCrossTargetingBuild is set to true [2]. - When IsCrossTargetingBuild is true, the SDK dispatches individual "inner" builds for each framework listed in TargetFrameworks [3][2]. During these inner builds, the project is re-evaluated with a single TargetFramework property set to the current framework being built [4][5]. It is considered a configuration error to define both properties, and modern.NET SDK versions include a build check (BC0107) to warn developers when both are specified simultaneously to prevent ambiguity [6].
Citations:
- 1: https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props
- 2: https://github.com/microsoft/msbuild/blob/395454dcc00c6edfa53952a5198c2ea0df06f061/src/Tasks/Microsoft.Managed.targets
- 3: https://learn.microsoft.com/en-us/visualstudio/msbuild/net-sdk-multitargeting?view=vs-2022
- 4: Microsoft.Build.Evaluation.Project doesnt work correctly when TargetFrameworks (extra s) property is defined dotnet/msbuild#9582
- 5: Allow inner builds to tell if they are being built from a cross-targeting build dotnet/msbuild#1897
- 6: [IMPROVEMENT] Warn about TargetFramework and TargetFrameworks both being set dotnet/sdk#49998
Remove the conflicting framework declaration
allocation_test/allocation_test.csproj declares TargetFramework as net10.0, while Directory.Build.props sets TargetFrameworks to net8.0;net10.0. Remove one declaration to prevent unintended multi-targeting.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@Directory.Build.props` at line 4, Remove the conflicting target framework
declaration by keeping a single framework configuration between
Directory.Build.props and allocation_test.csproj; update the TargetFrameworks
setting in Directory.Build.props or the TargetFramework setting in the
allocation_test project so allocation_test does not unintentionally
multi-target.
| "Microsoft.Extensions.DependencyInjection": { | ||
| "type": "CentralTransitive", | ||
| "requested": "[10.0.10, )", | ||
| "resolved": "10.0.6", | ||
| "contentHash": "poUvwtf92bEs8uBH3aRRs/ZgiAw+Z485EU7TtVPBt//MmD0uMPERe7+v3Ur7lpD8XgIEDL9sDoTBcW1LMG97CQ==", | ||
| "dependencies": { | ||
| "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.6" | ||
| } | ||
| }, | ||
| "Microsoft.Extensions.DependencyInjection.Abstractions": { | ||
| "type": "CentralTransitive", | ||
| "requested": "[10.0.10, )", | ||
| "resolved": "10.0.6", | ||
| "contentHash": "w+dX4SIr1X9yegX2yX2dU1XtP4JAUVNdvOG/Evn+H+ndn96YzfIPX52FALXChrRNWFR9l77FQyg1mB7WQo6iOA==" | ||
| }, | ||
| "Microsoft.Extensions.Hosting.Abstractions": { | ||
| "type": "CentralTransitive", | ||
| "requested": "[10.0.10, )", | ||
| "resolved": "10.0.6", | ||
| "contentHash": "x3C8tgsX+xWvV5u76LFm24/U7sSnCRjuudBkbFsMV/DIqCA85te7YGg6dpa7lBToDhi4Lry9E7Arpy0laUw5AQ==", | ||
| "dependencies": { | ||
| "Microsoft.Extensions.Configuration.Abstractions": "10.0.6", | ||
| "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.6", | ||
| "Microsoft.Extensions.Diagnostics.Abstractions": "10.0.6", | ||
| "Microsoft.Extensions.FileProviders.Abstractions": "10.0.6", | ||
| "Microsoft.Extensions.Logging.Abstractions": "10.0.6" | ||
| } | ||
| }, | ||
| "Microsoft.Extensions.Logging.Abstractions": { | ||
| "type": "CentralTransitive", | ||
| "requested": "[10.0.10, )", | ||
| "resolved": "10.0.6", | ||
| "contentHash": "1YgBO3wAy0dlpQyVTKWBSPND/t0yZHsvd3shGpbeEwH8JSb2hnFI2pNFrOOUi/stsp+T/dqwqmRIGh47ibo9bw==", | ||
| "dependencies": { | ||
| "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.6" | ||
| } | ||
| }, | ||
| "Microsoft.Extensions.ObjectPool": { | ||
| "type": "CentralTransitive", | ||
| "requested": "[10.0.10, )", | ||
| "resolved": "9.0.0-rc.2.24474.3", | ||
| "contentHash": "laI1OGPudszr2Ii+38bZlvqkrNLC/gaQyo1g6qKfZD9ewWPfkEFOluqTuw8bUbXoe/Gmp9DPVynRzfaKg5gE9g==" | ||
| }, | ||
| "Microsoft.Extensions.Options": { | ||
| "type": "CentralTransitive", | ||
| "requested": "[10.0.10, )", | ||
| "resolved": "10.0.6", | ||
| "contentHash": "v5RTWm+3Gdub21ADJeRG5bunOOxutFNBZk6qGH6Az4L5nyRZoLe3Kse7jfAyUcdEoiKp72XpNw/wGR+9wP+MtQ==", | ||
| "dependencies": { | ||
| "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.6", | ||
| "Microsoft.Extensions.Primitives": "10.0.6" | ||
| } | ||
| } |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🔴 Critical | ⚡ Quick win
The CentralTransitive entries resolve below the requested lower bound.
Every CentralTransitive entry in this block declares "requested": "[10.0.10, )" but records "resolved": "10.0.6". Microsoft.Extensions.ObjectPool at lines 527-532 records "resolved": "9.0.0-rc.2.24474.3", which is a prerelease. Directory.Packages.props pins these packages at 10.0.10, and every other lock file in this PR records 10.0.10.
A resolved version below the requested lower bound is not a valid restore result. The lock file looks stale relative to the current central package versions. Directory.Build.props sets RestoreLockedMode to true on CI, so a stale lock file breaks the CI restore or pins versions that contradict central package management.
Regenerate this lock file with dotnet restore --force-evaluate and commit the result.
#!/bin/bash
# List every lock entry whose resolved version is lower than the requested lower bound.
fd 'packages.lock.json' --exec python3 -c '
import json,sys
p=sys.argv[1]
d=json.load(open(p))
for tfm,pkgs in d.get("dependencies",{}).items():
for name,info in pkgs.items():
req=info.get("requested"); res=info.get("resolved")
if req and res:
low=req.strip("[]() ").split(",")[0]
if low and res!=low:
print(f"{p} {tfm} {name} requested={req} resolved={res}")
' {}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@Respire.Pipeline/packages.lock.json` around lines 490 - 542, Regenerate
Respire.Pipeline’s packages.lock.json using dotnet restore --force-evaluate so
all CentralTransitive entries, especially Microsoft.Extensions.ObjectPool and
the Microsoft.Extensions.* packages, resolve consistently with the 10.0.10 lower
bound and Directory.Packages.props. Commit the regenerated lock file without
manually editing individual dependency entries.
| "Microsoft.Extensions.ObjectPool": { | ||
| "type": "CentralTransitive", | ||
| "requested": "[10.0.10, )", | ||
| "resolved": "9.0.0-rc.2.24474.3", | ||
| "contentHash": "laI1OGPudszr2Ii+38bZlvqkrNLC/gaQyo1g6qKfZD9ewWPfkEFOluqTuw8bUbXoe/Gmp9DPVynRzfaKg5gE9g==" | ||
| }, |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
A prerelease assembly is locked into the build.
Microsoft.Extensions.ObjectPool resolves to 9.0.0-rc.2.24474.3. This is a release candidate, and it is more than one major version below the requested [10.0.10, ). The source is the transitive chain ModularPipelines → vertical-spectreconsolelogger 0.10.1-dev.20241201.35 (lines 552-562), which is itself a -dev build.
Add an explicit PackageReference to Microsoft.Extensions.ObjectPool in the pipeline projects. A direct reference lifts the resolution to the central 10.0.10 version and removes the release-candidate assembly from the graph.
🔒️ Proposed fix in the pipeline project files
<ItemGroup>
<!-- Lift the RC ObjectPool pulled in transitively by vertical-spectreconsolelogger. -->
<PackageReference Include="Microsoft.Extensions.ObjectPool" />
</ItemGroup>🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/Respire.Pipeline.Tests/packages.lock.json` around lines 612 - 617, Add
an explicit PackageReference for Microsoft.Extensions.ObjectPool to the pipeline
project files, using the centrally managed 10.0.10 version. Ensure the projects
containing the ModularPipelines dependency directly reference the package so
transitive resolution no longer selects the 9.0.0-rc.2.24474.3 assembly.
| "bugs": { | ||
| "url": "https://github.com/thomhurst/Respire/issues" | ||
| }, | ||
| "packageManager": "npm@11.13.0", |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
# Expect an explicit npm 11.13.0 setup or a failing devEngines check before npm ci.
rg -n -C 5 \
'"packageManager"|"devEngines"|npm@11\.13\.0|npm (install|ci)|node-version' \
website/package.json .github/workflows website/package-lock.jsonRepository: thomhurst/Respire
Length of output: 1749
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- relevant tracked files ---'
git ls-files \
'website/package.json' \
'website/package-lock.json' \
'.github/workflows/*' \
'.npmrc' \
'website/.npmrc' \
'package.json' \
'package-lock.json'
printf '%s\n' '--- website/package.json ---'
cat -n website/package.json
printf '%s\n' '--- workflow files and npm-related lines ---'
while IFS= read -r f; do
printf '\n--- %s ---\n' "$f"
rg -n -C 4 'npm|corepack|node-version|setup-node|devEngines|packageManager' "$f" || true
done < <(git ls-files '.github/workflows/*')
printf '%s\n' '--- package metadata/config references ---'
rg -n -C 3 \
'"packageManager"|"devEngines"|npm@11\.13\.0|corepack|npm-version|npm_version|npm ci|npm install' \
--glob '!website/package-lock.json' \
--glob '!*node_modules*' \
. || true
printf '%s\n' '--- lockfile header and npm metadata ---'
head -n 25 website/package-lock.json
rg -n -C 2 '"lockfileVersion"|"name"|"version"' website/package-lock.json | head -n 30
printf '%s\n' '--- read-only verifier ---'
python3 - <<'PY'
import json
from pathlib import Path
pkg = json.loads(Path("website/package.json").read_text())
lock = json.loads(Path("website/package-lock.json").read_text())
print("packageManager:", pkg.get("packageManager"))
print("devEngines:", pkg.get("devEngines"))
print("lockfileVersion:", lock.get("lockfileVersion"))
print("lockfile packageManager:", lock.get("packages", {}).get("", {}).get("packageManager"))
PYRepository: thomhurst/Respire
Length of output: 2241
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- documentation workflow ---'
cat -n .github/workflows/docs.yml
printf '%s\n' '--- npm-related references in tracked files ---'
rg -n -C 3 \
'npm|corepack|node-version|setup-node|devEngines|packageManager|npm-version|npm_version' \
$(git ls-files) || true
printf '%s\n' '--- package and lockfile metadata ---'
python3 - <<'PY'
import json
from pathlib import Path
for name in ("website/package.json", "website/package-lock.json"):
data = json.loads(Path(name).read_text())
print(name)
print(" packageManager:", data.get("packageManager"))
print(" devEngines:", data.get("devEngines"))
print(" engines:", data.get("engines"))
print(" lockfileVersion:", data.get("lockfileVersion"))
print(" root package metadata:", data.get("packages", {}).get("", {}))
PYRepository: thomhurst/Respire
Length of output: 50374
🌐 Web query:
Official npm documentation for package.json packageManager field and devEngines packageManager enforcement, including behavior when npm is invoked directly
💡 Result:
The packageManager field and the devEngines property are distinct mechanisms used in package.json to manage environment and tooling requirements. packageManager Field The top-level packageManager field is primarily utilized by Corepack, a tool bundled with Node.js [1][2]. It specifies the exact package manager and version (e.g., "pnpm@11.7.0") intended for a project [1][2]. When Corepack is enabled, it reads this field to automatically pin and execute the correct version of the specified package manager [1]. It is not used directly by the npm CLI for enforcement [3]. devEngines Property The devEngines property is a specification for defining runtime and tooling requirements for developers working on a project [4]. Unlike the engines field—which is checked when installing dependencies for consumption—devEngines is intended to guide maintainers and developers interacting with the source code [5][6]. Key details include: - Supported Keys: Includes packageManager, runtime, cpu, os, and libc [7][5]. - Structure: Each key can be an object or an array of objects containing name, version (optional), and onFail (optional) [7][4]. - Enforcement: When using npm, commands such as install, ci, and run inspect the devEngines property before execution [5][6]. If the current environment does not match the specified requirements, npm will trigger the configured onFail behavior [7][6]. - onFail Behavior: Valid options are warn, error, or ignore [7][4]. By default, if onFail is undefined, it defaults to error [7][5]. npm does not currently implement the download option due to security concerns; if specified, npm will treat it as a failure and error [8]. - npm Behavior: When npm is invoked directly, it assumes it is the packageManager and that the runtime is node [7][5]. If devEngines is configured with a packageManager.name other than npm, or if requirements are not met, the npm CLI will throw an error (unless onFail is set to warn or ignore) [7][6]. In summary, devEngines acts as a built-in enforcement mechanism within the npm CLI for maintainers to ensure all contributors use the same tooling, while the top-level packageManager field remains the canonical signal for Corepack to resolve the specific binary version [5][6][2]. [7][5][1]
Citations:
- 1: https://deepwiki.com/nodejs/corepack/2.3-configuration-and-resolution
- 2: https://aitoolsguidebook.com/en/articles/ai-wrong-package-manager/
- 3:
"packageManager"field doesn’t support npm nodejs/node#51888 - 4: https://github.com/openjs-foundation/package-metadata-interoperability-collab-space/blob/main/devengines-field-proposal.md
- 5: https://docs.npmjs.com/cli/v10/configuring-npm/package-json/
- 6: feat: devEngines npm/cli#7766
- 7: https://docs.npmjs.com/cli/v12/configuring-npm/package-json/
- 8: [BUG] npm doesn't download version specified in the devEngines field npm/cli#8004
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- documentation workflow ---'
sed -n '24,45p' .github/workflows/docs.yml
printf '%s\n' '--- npm setup and invocation in workflows ---'
rg -n -C 3 \
'npm|corepack|node-version|setup-node|devEngines|packageManager|npm-version|npm_version' \
.github/workflows
printf '%s\n' '--- package metadata verifier ---'
python3 - <<'PY'
import json
from pathlib import Path
package = json.loads(Path("website/package.json").read_text())
lockfile = json.loads(Path("website/package-lock.json").read_text())
print("website/package.json.packageManager =", package.get("packageManager"))
print("website/package.json.devEngines =", package.get("devEngines"))
print("website/package.json.engines =", package.get("engines"))
print("website/package-lock.json.lockfileVersion =", lockfile.get("lockfileVersion"))
print("website/package-lock.json.root.packageManager =",
lockfile.get("packages", {}).get("", {}).get("packageManager"))
PYRepository: thomhurst/Respire
Length of output: 2333
Pin npm in the documentation workflow. The workflow runs npm ci after setting up Node.js 24, but packageManager does not enforce the npm binary for direct invocations. Install or invoke npm@11.13.0 before npm ci.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@website/package.json` at line 16, Update the documentation workflow’s Node.js
setup around the packageManager setting so npm@11.13.0 is explicitly installed
or invoked before the existing npm ci step. Preserve the current npm ci behavior
while ensuring it uses the pinned npm version.
cfb3c6d to
ed64317
Compare
🧪 Integration Test Results (net10.0)ℹ️ Execution Details
Automated integration testing with Redis containers using TUnit |
🧪 Integration Test Results (net8.0)ℹ️ Execution Details
Automated integration testing with Redis containers using TUnit |
Redis Container Benchmark Results (net8.0)BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat) Runtime=.NET 8.0 IterationCount=3 WarmupCount=1
View raw benchmark output |
Redis Container Benchmark Results (net10.0)BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat) Runtime=.NET 8.0 IterationCount=3 WarmupCount=1
View raw benchmark output |
Summary
Directory.Build.propsImpact
Shipping packages now include consistent NuGet metadata, README content, XML docs, symbol packages, and repository source information. Non-shipping projects inherit shared defaults without being packable. Generated .NET
packages.lock.jsonfiles are not included.Validation
dotnet restore Respire.slnxdotnet build Respire.slnx -c Release --no-restoredotnet build allocation_test\allocation_test.csproj -c Release --no-restore.snupkgoutputdotnet run --project tests\Respire.Tests\Respire.Tests.csproj -c Release -f net8.0 --no-build -- --results-directory TestResults --report-trx --report-trx-filename Respire.Tests-net8.0.trx --coverage --coverage-output coverage.cobertura.xml --coverage-output-format coberturadotnet run --project tests\Respire.Tests\Respire.Tests.csproj -c Release -f net10.0 --no-build -- --results-directory TestResults --report-trx --report-trx-filename Respire.Tests-net10.0.trx --coverage --coverage-output coverage.cobertura.xml --coverage-output-format coberturareportgenerator -reports:"TestResults/**/coverage.cobertura.xml" -targetdir:"CoverageReport" -reporttypes:"Html;JsonSummary;MarkdownSummaryGithub;Cobertura"dotnet list Respire.slnx package --vulnerable --include-transitivenpm cinpm run buildNotes
npm auditstill reports Docusaurus transitive advisories in the current latest3.10.2dependency tree, with no safe automatic fix available fromnpm audit fix --package-lock-only.