Skip to content

feat: add the dependency-management check, and hash-lock this project's CI tools - #122

Merged
lefticus merged 1 commit into
type-checkingfrom
dependency-management
Nov 6, 2026
Merged

lefticus merged 1 commit into
type-checkingfrom
dependency-management

Conversation

@lefticus

@lefticus lefticus commented Nov 6, 2026

Copy link
Copy Markdown
Member

Closes #24. Phase 3 of #107. Stacked on #121.

A new DependencyManagement rule says how an ecosystem's dependencies are declared and where they are locked.

Ecosystem Passes when
C/C++ CPM, FetchContent, vcpkg, Conan or Meson wraps manage the dependencies
Python declared dependencies are locked by a committed uv.lock, poetry.lock, pdm.lock, Pipfile.lock or pylock.toml, or by hash-pinned requirements
Rust a binary crate commits Cargo.lock (a library need not)
Go go.sum is committed when go.mod requires modules

The check passes with a note when no dependencies are declared. It warns when dependencies are not locked, or when third-party code is committed (third_party/, vendor/, git submodules, …). go mod vendor output does not count as committed third-party code.

Decision from #107: this repository locks its development tools rather than exempting libraries.

  • .github/requirements/<job>.in names each job's tools.
  • pip-compile --generate-hashes pins <job>.txt, including every dependency's hash.
  • CI installs the tools with --require-hashes.
  • Dependabot updates both files. The README's Dependency Policy says how to recompile a lock by hand.

Every lock installs in a fresh venv with --require-hashes, and pip-audit over all of them finds no known vulnerabilities.

🤖 Generated with Claude Code

…'s CI tools

A new DependencyManagement rule says how an ecosystem's dependencies are
declared and where they are locked. C/C++ looks for CPM, FetchContent,
vcpkg, Conan or Meson wraps; Python wants declared dependencies locked by a
committed lockfile or hash-pinned requirements; Rust wants a binary crate
to commit Cargo.lock; Go wants go.sum when go.mod requires modules. Every
ecosystem warns when third-party code is committed (third_party/, vendor/,
git submodules, ...), except go mod vendor's output. Context.tracked_files
caches git's list of files, so a check can ask what is committed.

This project's CI tools are now locked: .github/requirements/<job>.in
names them, pip-compile --generate-hashes pins <job>.txt with every
dependency's hash, and CI installs them with --require-hashes.

Closes #24

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

codecov Bot commented Nov 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.51%. Comparing base (ef7863d) to head (6ab2e28).

Additional details and impacted files
@@                Coverage Diff                @@
##           type-checking     #122      +/-   ##
=================================================
+ Coverage          98.45%   98.51%   +0.06%     
=================================================
  Files                 56       58       +2     
  Lines               2199     2297      +98     
  Branches             221      231      +10     
=================================================
+ Hits                2165     2263      +98     
  Misses                28       28              
  Partials               6        6              

☔ 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.

@lefticus
lefticus added this pull request to stack #123 November 6, 2026 06:00
@lefticus
lefticus merged commit 7f93afa into main Nov 6, 2026
18 checks passed
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.

Add dependency-management check: dependencies come from a package manager

1 participant