Skip to content

feat: add the dependency-graph primitives package - #6

Merged
Mearman merged 4 commits into
mainfrom
feat/graph-dag
Oct 10, 2026
Merged

Mearman merged 4 commits into
mainfrom
feat/graph-dag

Conversation

@Mearman

@Mearman Mearman commented Oct 10, 2026

Copy link
Copy Markdown
Member

Adds @exadev/process-graph-dag, the dependency-graph primitives the domain layer and ci-adapters will both build on. It takes a node set and a needs accessor, builds an immutable graph once, and exposes plain functions over it: topological layers, ancestors, descendants, cycles, transitive reduction and the critical path for a caller-supplied weight.

Generalised from ci-adapters' dependencyLevels and ancestorsOf and from Graphle's reachability. Unlike the former, an unknown needs target and a cycle are returned as data instead of being absorbed or recursing forever, and nothing is recursive.

The branch also adds the shared Stryker configuration this package uses, and pins vitest to 4.x: Stryker's vitest runner kills no mutants against vitest 5 (almost no tests run per mutant) and works on 4.1.

Cycle and tie-break semantics are in the package README. Before marking ready I ran the repo's lint, typecheck, test, test:smoke, test:coverage, deps:lint, knip, build:tsc and the package's attw and publint from a clean clone with a frozen lockfile.

Stryker's vitest runner reports no killed mutants against vitest 5: every mutant survives with
almost no tests run per mutant. The 4.x line kills them as expected, so it is the one the
mutation testing in this workspace can use.
Each package's stryker.config.ts calls packageStrykerConfig, so thresholds and plugin wiring live
in one place. Plugins are listed explicitly because Stryker's default discovery cannot see
siblings under pnpm's isolated node_modules.
@exadev/process-graph-dag builds an immutable graph once from a node set and a needs accessor and
analyses it with plain functions: topological layers, ancestors, descendants, cycles, transitive
reduction and the critical path. Unknown references and cycles are returned as data, cyclic
input to an operation that needs acyclicity throws an error carrying the cycles, and every
traversal is iterative so depth cannot overflow the call stack.
Knip resolves the plugins through the Stryker config itself, so the ignore entries only
produced configuration hints.
@Mearman
Mearman marked this pull request as ready for review October 10, 2026 08:47
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-10T08:50:45.162056Z 243ac9e Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Mearman
Mearman merged commit 251a561 into main Oct 10, 2026
12 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant