Skip to content

Bugfix/canary hardcoded package path - #4

Merged
ruleofcodedev merged 3 commits into
developfrom
bugfix/canary-hardcoded-package-path
Aug 7, 2026
Merged

Bugfix/canary hardcoded package path#4
ruleofcodedev merged 3 commits into
developfrom
bugfix/canary-hardcoded-package-path

Conversation

@ruleofcodedev

Copy link
Copy Markdown
Contributor

What this changes

Verdict impact

  • No verdict change (docs, tests, refactor, internal)
  • Changes verdicts — a detector now catches more, or fewer, real cases
  • BREAKING — a default severity, threshold, or config shape changed
    (then: state the before/after values and what a consumer must do)

Evidence

  • Proven red: it flags the violation it claims to flag
  • Proven green: it passes correct code (no false positive)
  • Regression test added under tests/
  • detectionLimits updated if what the detector cannot see has changed

Gate

  • npm run lint — 0 errors
  • npx jest — full suite green
  • npm run canary — red/green proven across stacks
  • node dist/cli.js audit — RuleOfCode still passes its own law

Notes for the reviewer

ruleofcode.dev team and others added 3 commits August 7, 2026 16:50
Bumps package.json and hooks/installer VERSION to 7.17.3 and regenerates
the tracked .husky hooks. schemaVersion stays 2. This is the first
version published to npm, as `ruleofcode`.

Ships what is already on develop:
- fix(laws): Branch Governance failed on every detached-HEAD checkout —
  the normal state in CI — so every consumer's pipeline went red on a
  law about branch naming. The branch is now read from the CI
  environment, and when nothing names one the law reports no violation
  instead of inventing one.
- fix(ci): our own gate never ran (it triggered on a branch that no
  longer exists) and would have passed vacuously on a shallow clone.
  Fixing that is what surfaced the bug above.
- docs: a pull request template.

Gate: eslint 0, 502 suites / 13854 tests (jest exit 0), canary green
(py100/ng136/node78). Self-audit: passed 35, failed 0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The tarball probe looked for the installed CLI at a hard-coded
`node_modules/@ruleofcode/core/dist/cli.js`. RoC now also ships unscoped
as `ruleofcode`, which npm installs at `node_modules/ruleofcode`, so the
probe found nothing and reported all three stacks as "the audited CLI
did not run" — the release gate calling a perfectly good package broken.

The path is now derived from the name in package.json, which handles a
scoped name (two path segments) and an unscoped one alike, and a missing
binary now fails with the path it looked for instead of a module-loader
stack trace.

Verified against the real 7.17.3 tarball: green exit 0, red exit 1,
zero-laws refused, on python, angular and node.

This script is not part of the published package; nothing shipped
changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ruleofcodedev
ruleofcodedev merged commit 667978a into develop Aug 7, 2026
1 check passed
@ruleofcodedev
ruleofcodedev deleted the bugfix/canary-hardcoded-package-path branch August 7, 2026 15:26
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