Skip to content

feat(release): --changed ignores docs, skips npm from a private repo - #459

Merged
vreshch merged 2 commits into
masterfrom
feature/release-hardening-b
Nov 22, 2026
Merged

vreshch merged 2 commits into
masterfrom
feature/release-hardening-b

Conversation

@vreshch

@vreshch vreshch commented Nov 22, 2026

Copy link
Copy Markdown
Member

Problem

  • release --changed releases an extension when ANY file in its folder differs from its last <id>@* tag. With one extension at the repo root, every docs, CI or dev-tool merge is a release.
  • Publish uses --access public whenever the package is not "private": true. One missing flag in a private repo would put its source on public npm.

Change

  • Ignore rule (release-ignore.ts): defaults docs/**, *.md, .github/**, .repo-doctor.yml, .gitignore, .prettierrc*, .editorconfig, LICENSE. An optional .release-ignore in the extension folder adds gitignore-style patterns (# comments, !pattern re-includes, last match wins). package.json, package-lock.json, src/**, Dockerfile* at the folder root always count. The diff uses --no-renames, so a move out of src/ still counts. The changed: line names the first 5 counted files; the unchanged: line names the ignored files when only those changed. --dry-run prints the same.
  • Private-repo npm guard (release-npm.ts), --changed only: a package that is not "private": true reads gh api repos/<repo> --jq .private before its tag. Only false publishes. A private repo skips npm with one AMBER npm: line unless the package sets publishConfig.access: "public" AND top-level "agentagePublishFromPrivateRepo": true. A failed or unclear read also skips npm (default deny). Images and records still go out; the row reads released, AMBER: npm skipped; exit 0.
  • The opt-in is a top-level key because the kit's manifest schema refuses unknown keys under agentage (agentage.publishFromPrivateRepo fails readManifest).
  • v* mode unchanged: its test world answers every gh api with an empty success, so the guard would change its expectations.
  • Docs (docs/reference.md) and the --changed help text.

How verified

  • npm run verify green (1384+ tests).
  • New real-git tests: release-changed-ignore.test.ts (root layout with only workflow/docs/md, a lock bump, .release-ignore cannot ignore src/** or Dockerfile*, !README.md, more than 5 files, extensions/<name> layout, a rename from src/ to docs/, an ignored-only diff on an unrecorded tag still releases), release-changed-npm.test.ts (public, private, half and full opt-in, failed and unclear reads, "private": true makes no call), release-ignore.test.ts (matcher units).
  • Existing --changed tests: only the changed: line (now in index.js) and the new visibility call changed. v* tests untouched.

Reviewer must check

  • The opt-in key name (top level, not under agentage).
  • Whether a failed visibility read should be AMBER (as built, per the brief) or a FAIL.

https://claude.ai/code/session_01XQkodgygL4W8UcLQDwC212

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

🎉 PR Validation ✅ PASSED

Commit: 4ec23db38bf914e3470c791ed5e5c14a2a050eac
Branch: feature/release-hardening-b

Checks:

  • ✅ Release guard (no version change)
  • ✅ Dependencies installed
  • ✅ Type check passed
  • ✅ Linting passed
  • ✅ Format check passed
  • ✅ Tests + coverage passed
  • ✅ Build successful

Ready to merge! ✨


🔗 View workflow run
⏰ Generated at: 2026-11-22T09:38:00.972Z

@vreshch
vreshch marked this pull request as ready for review November 22, 2026 09:33
@vreshch
vreshch force-pushed the feature/release-hardening-b branch from 539718d to 4ec23db Compare November 22, 2026 09:37
@vreshch
vreshch merged commit a79cb30 into master Nov 22, 2026
8 checks passed
@vreshch
vreshch deleted the feature/release-hardening-b branch November 22, 2026 10:20
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