Skip to content

fix(ci): root-cause pre-existing CI infra failures (npm lockfile, RSR duplicate Python, A2ML identity) - #18

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/ci-infra-cleanup
May 14, 2026
Merged

fix(ci): root-cause pre-existing CI infra failures (npm lockfile, RSR duplicate Python, A2ML identity)#18
hyperpolymath merged 1 commit into
mainfrom
fix/ci-infra-cleanup

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Three independent pre-existing failures across opsm's CI — none of them caused by any recent change, all observable on `main` today. Surfacing them as a single infra-cleanup PR so the security PR (#17) and any future Dependabot bump can land green.

1. RSR Anti-Pattern Check — duplicate Python in `rsr-antipattern.yml`

The workflow had ~75 lines of duplicated dead Python code (a second `BUILTIN_GLOBS = [...]` block, another exemption parser, another `bad = sorted(...)` loop) sitting outside any heredoc, between the first `PYEOF` and the next `- name: Check for Go` step. The shell tried to execute those lines as commands and the step died with exit 127 (`command not found`). Deleted the duplicate — the first heredoc already does the full TypeScript check.

2. NPM/Bun Blocker + RSR "Check for npm lockfiles" — `package-lock.json` violation

Both checks detect `package-lock.json` at the repo root and fail per the org-wide no-npm-lockfiles policy. The actual ReScript build runs through Deno's `npm:rescript` compat shim (see `deno.json`'s build task) which doesn't need a lockfile. Removed `package-lock.json`.

3. Dogfood Gate / Validate A2ML manifests — missing identity fields

25 `.a2ml` files were missing the required identity field (`agent-id`, `name`, or `project`). Injected `project = "odds-and-sods-package-manager"` (or `"opsm-ui"` for files under `opsm-ui/`) into each file's header. The validator regex-matches on the identity-field line so the placement-after-comments form works across all the in-repo a2ml dialects (TOML-style, s-expression-style, Rust-like-object).

Remaining (out of scope, separate PRs needed)

🤖 Generated with Claude Code

1. RSR Anti-Pattern Check — `rsr-antipattern.yml` had ~75 lines of
   duplicated dead Python code (a second `BUILTIN_GLOBS = […]` block,
   another exemption parser, another `bad = sorted(…)` loop) sitting
   outside any heredoc between the first `PYEOF` and the next step.
   The shell tried to execute those lines as commands and the step
   died with exit 127 (`command not found`). Deleted the duplicate;
   the first heredoc already does the full TypeScript check.

2. NPM/Bun Blocker + RSR "Check for npm lockfiles" — both detect
   `package-lock.json` at the repo root and fail per the org's
   no-npm-lockfiles policy. The actual ReScript build runs through
   Deno's `npm:rescript` compat shim (see `deno.json`'s build
   task) which doesn't need a lockfile. Removed `package-lock.json`.

3. Dogfood Gate / Validate A2ML manifests — 25 `.a2ml` files were
   missing the required identity field (`agent-id`, `name`, or
   `project`). Injected `project = "odds-and-sods-package-manager"`
   (or `"opsm-ui"` for files under `opsm-ui/`) into each file's
   header. The validator regex-matches on the identity-field line so
   the placement-after-comments form works across all the in-repo
   a2ml dialects (TOML-style, s-expression-style, Rust-like-object).

Hypatia / fleet-scan failures both depend on hyperpolymath/hypatia#237
(the broken-binary fix) landing — not addressable from this repo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath
hyperpolymath enabled auto-merge (squash) May 14, 2026 09:49
@hyperpolymath
hyperpolymath merged commit 548e425 into main May 14, 2026
19 of 23 checks passed
@hyperpolymath
hyperpolymath deleted the fix/ci-infra-cleanup branch May 14, 2026 20:55
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