Skip to content

feat(B-0805 sub-target 1): audit-dep-currency.ts — dep-pin inventory tool#5217

Merged
AceHack merged 1 commit into
mainfrom
otto-cli/b0805-sub1-audit-dep-currency-tool-2026-05-26
May 26, 2026
Merged

feat(B-0805 sub-target 1): audit-dep-currency.ts — dep-pin inventory tool#5217
AceHack merged 1 commit into
mainfrom
otto-cli/b0805-sub1-audit-dep-currency-tool-2026-05-26

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 26, 2026

Summary

Ships B-0805 sub-target 1tools/audit/audit-dep-currency.ts. Scans + reports all dep pins across the repo. Empirical: 81 pins on current main (29 helm charts + 35 ArgoCD targetRevisions + nix inputs + image tags + mise runtimes).

What it does NOW

  • Walks full-ai-cluster/flake.nix for <name>.url = "..." nix inputs
  • Walks full-ai-cluster/k8s/applications/**/*.yaml for ArgoCD targetRevision + chart
  • Walks full-ai-cluster/**/*.{yaml,yml,nix} for image: <repo>:<tag> patterns
  • Walks .mise.toml [tools] section for runtime pins
  • Output: human-readable markdown table (default) OR --json (machine-readable)

What it does NOT do yet (B-0805 sub-targets 2+)

  • WebSearch / upstream-API "current latest" comparison
  • Weekly cadence GitHub Actions wiring
  • PR-opening on drift detection

These ship as sibling B-NNNN rows when implementation begins.

Composes with

  • B-0805 capstone (this is sub-target 1 of 3+)
  • .claude/rules/dep-pin-search-first-authority.md (the discipline this tool operationalizes at scale)

Test plan

  • Typecheck clean
  • Empirical run on current main: 81 pins surfaced
  • Bounded regex alternation lengths (regex-safety per guidance)
  • spawnSync with explicit args[] (no shell injection risk)

🤖 Generated with Claude Code

…n inventory tool

B-0805 sub-target 1 ships. Scans + reports all dep pins across:
- full-ai-cluster/flake.nix nix inputs (nixpkgs.url, nix-darwin.url, etc.)
- full-ai-cluster/k8s/applications/ ArgoCD apps (targetRevision + chart)
- Container image tags in NixOS modules + K8s manifests (image: <repo>:<tag>)
- .mise.toml runtime versions

Empirical run on current main: 81 pins surfaced (29 helm charts, 35
ArgoCD targetRevisions, plus nix inputs / image tags / mise runtimes).

What this DOES: inventory ONLY. Lists everywhere version pins live so
operator can compare against upstream-latest.

What this does NOT do yet (file as sibling B-NNNN rows when ready):
- WebSearch / upstream-API "current latest" comparison
- Weekly cadence GitHub Actions wiring
- PR-opening on drift detection

Usage:
  bun tools/audit/audit-dep-currency.ts          # human-readable table
  bun tools/audit/audit-dep-currency.ts --json   # machine-readable JSON

Exit codes: 0 = inventory completed; 1 = invocation error.

Composes with B-0805 capstone (this is sub-target 1 of 3+) + the
dep-pin-search-first-authority rule landed earlier today (#5126):
the inventory output IS the substrate that lets the discipline operate
at scale (operator scans the list quarterly + WebSearches each pin).

Implementation notes:
- Bounded regex alternation/quantifier lengths per regex-safety
  guidance (prevents quadratic blowup on adversarial inputs)
- spawnSync with explicit args[] array (NOT shell-evaluated string)
  for git rev-parse — execFile-equivalent safe form
- ESM-style imports (top-of-file), not dynamic require, for clean
  scope + tooling compatibility

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 26, 2026 16:34
@AceHack AceHack enabled auto-merge (squash) May 26, 2026 16:34
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@AceHack AceHack merged commit 75f7edd into main May 26, 2026
32 of 33 checks passed
@AceHack AceHack deleted the otto-cli/b0805-sub1-audit-dep-currency-tool-2026-05-26 branch May 26, 2026 16:38
@AceHack AceHack review requested due to automatic review settings May 26, 2026 16:57
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