Skip to content

fix(shims): add per-package LICENSE files and enforce shim license sync#370

Merged
rhuanbarreto merged 3 commits into
mainfrom
claude/friendly-dirac-31aa28
May 28, 2026
Merged

fix(shims): add per-package LICENSE files and enforce shim license sync#370
rhuanbarreto merged 3 commits into
mainfrom
claude/friendly-dirac-31aa28

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

Distribution shims were missing per-package license files, which broke license discoverability across registries. The trigger was pkg.go.dev showing "no license" for the Go shim: it is published as a subdirectory module (github.com/archgate/cli/shims/go), and a subdir module's zip only contains files under that subtree — so the repo-root LICENSE.md is never included. Registries detect license info from files inside the package, not the repo root. On top of that, the synced shim READMEs (kept byte-identical to root by ARCH-013/shim-readme-sync) carry the root's relative [Apache-2.0](LICENSE.md) badge/link, which only resolves when a LICENSE.md sits beside the README in each shim dir — so that link was broken in every published README.

What changed

  • Per-package licenses: added Apache-2.0 LICENSE.md (byte-identical to root) to all five shim dirs — go, maven, nuget/Archgate.Tool, pypi, rubygem. RubyGem also bundles it via spec.files.
  • Go synopsis: added a package main doc comment to the Go shim so pkg.go.dev renders a synopsis.
  • Discoverability metadata: PyPI Documentation + Changelog URLs; RubyGem documentation_uri, changelog_uri, rubygems_mfa_required.
  • Enforcement (new): ARCH-013/shim-license-sync rule (parallel to shim-readme-sync) fails archgate check on any drift from the root LICENSE.md; .simple-release.js bump() now propagates the root LICENSE.md to every shim at release time.
  • Governance: ARCH-013 updated to document the LICENSE sync requirement as active, enforced behavior.

NuGet (license expression + packed README) and Maven (pom <licenses>) already exposed license metadata via their manifests; npm auto-publishes the root README/LICENSE. No hardcoded version strings were introduced (per ARCH-013).

Reviewer notes

  • The Go shim module (v0.40.0) is already registered on pkg.go.dev; once this merges and ships, the license will be detected from shims/go/LICENSE.md.
  • The shim-license-sync path list and the .simple-release.js block intentionally mirror the existing README sync; the LICENSE block's path order matches the sibling README block in the same file (order is behavior-irrelevant).

Test plan

  • bun run validate passes (lint --deny-warnings, typecheck, format, 1231 tests, archgate check 31/31 incl. new rule, knip, build)
  • go build ./... / go vet ./... clean in shims/go
  • Negative test: introduced drift in a shim LICENSE.mdshim-license-sync failed with the correct cp fix → restored
  • After release: confirm pkg.go.dev shows Apache-2.0 for github.com/archgate/cli/shims/go

Each shim is published from its own subtree, and registries detect
license info from files inside the package — not the repository root.
Most acute for the Go shim: a subdirectory module's zip excludes the
repo-root LICENSE, so pkg.go.dev reported "no license". The synced shim
READMEs also carry the root's relative `[Apache-2.0](LICENSE.md)` link,
which only resolves with a sibling LICENSE.md in each package.

- Add Apache-2.0 LICENSE.md to all five shim dirs (go, maven, nuget,
  pypi, rubygem), byte-identical to the root; bundle it in the gem via
  spec.files
- Add a package doc comment to the Go shim (pkg.go.dev synopsis)
- Enrich discoverability metadata: PyPI Documentation/Changelog URLs;
  RubyGem documentation_uri/changelog_uri/rubygems_mfa_required
- Enforce parity: new ARCH-013/shim-license-sync rule (parallel to
  shim-readme-sync) and .simple-release.js propagation of root
  LICENSE.md to every shim at release
- Update ARCH-013 to document the LICENSE sync requirement

Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
@github-actions

github-actions Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Code Coverage

Metric Value
Lines 90.0% (6550 / 7278)
Threshold 90% minimum — met
Platforms Linux + Windows

Full HTML report available in workflow artifacts.

Per-directory breakdown
Directory Coverage Lines
src/commands/ 88.1% 2069 / 2348
src/engine/ 93.1% 1207 / 1297
src/formats/ 100.0% 141 / 141
src/helpers/ 89.7% 3133 / 3492

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 28, 2026

Copy link
Copy Markdown

Deploying archgate-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: 87e3f6d
Status: ✅  Deploy successful!
Preview URL: https://4657e586.archgate-cli.pages.dev
Branch Preview URL: https://claude-friendly-dirac-31aa28.archgate-cli.pages.dev

View logs

Make the registry description consistent across all shims so search and
listing pages show the same product tagline everywhere.

- Maven: replace the shim-internal description with the product tagline
  (Maven Central uses <description> as the primary search/display text)
  and add an <issueManagement> block linking to GitHub issues
- NuGet + RubyGem: normalize the description to the canonical em-dash to
  match the npm/PyPI tagline byte-for-byte

Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
@rhuanbarreto rhuanbarreto merged commit 15bdb47 into main May 28, 2026
22 of 23 checks passed
@rhuanbarreto rhuanbarreto deleted the claude/friendly-dirac-31aa28 branch May 28, 2026 22:26
@archgatebot archgatebot Bot mentioned this pull request May 28, 2026
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