Skip to content

Add NCC-13 software package release profile - #2

Merged
imattau merged 2 commits into
mainfrom
feat/ncc-13
Sep 27, 2026
Merged

imattau merged 2 commits into
mainfrom
feat/ncc-13

Conversation

@imattau

@imattau imattau commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implements Stage 11 of NCC-PLAN.md: NCC-13 (Software Package Release Profile). NCC-13 defines no new event — it profiles the existing NIP-51 Release Artifact Set (kind 30063) with package-manager metadata, so this adds an ncc13 module rather than redefining anything NIP-51/94/34 already own.
  • New module modules/std/ncc13/0.1.0.nsm: the ReleaseArtifactSet event (kind 30063: d, a, version, version_scheme, channel, source, commit, repeatable requires/optional/conflicts, e, operator_for) and a minimal ArtefactMetadata event for NIP-94's kind 1063 carrying only NCC-13's own os/arch/format selectors.
  • Twenty-two pure functions covering: extraction with the §8.4/§9.1 opaque/stable defaults, the two-column requires/optional/conflicts builder/readers, the ncc:13:publish operator_for claim (mirroring NCC-10's shape), a SemVer-§11 precedence comparator (prerelease-before-release, prerelease identifier comparison, build metadata ignored), single-constraint satisfaction (=/>/>=/</<=, relational operators scoped to semver only per §8.2/§8.3), and os/arch artefact matching with the any wildcard.
  • Conformance: valid/invalid .ns fixtures, a pinned wire vector, a conformance/MATRIX.md row, and a worked examples/ncc13-release-monitor.ns bot (publish → upgrade-eligibility judgment → artefact selection), all exercised by new CLI tests plus a runtime unit test covering SemVer precedence and constraint satisfaction.
  • Bumps the nostr-community-conventions pin from adad778 to 186c3ad (upstream added ncc-13; purely additive) across every existing ncc0X/ncc1X module and vector reference, and updates NCC-PLAN.md/ROADMAP.md/spec/README.md/spec/nostr.md accordingly.

Test plan

  • cargo build --workspace — clean
  • cargo test --workspace — all tests pass (249 passed, 1 ignored)
  • cargo fmt --check — clean
  • cargo clippy --workspace -- -D warnings — clean
  • Manually ran every path documented in examples/ncc13-release-monitor.ns's header comment (nscript run with each event) and confirmed the printed output

🤖 Generated with Claude Code

https://claude.ai/code/session_01D95PWA2fdNfg7nUvUHBeMi


Generated by Claude Code

Implement Stage 11 of the NCC integration plan: package-manager
semantics over an existing NIP-51 Release Artifact Set (kind 30063)
rather than a new event, per NCC-13's own design principle. Adds the
ncc13 module (version/version_scheme/channel extraction with the
opaque/stable defaults, two-column requires/optional/conflicts,
source/commit provenance, the ncc:13:publish operator_for claim, a
SemVer-precedence comparator, single-constraint satisfaction, and
os/arch artefact matching), a minimal ArtefactMetadata declaration for
NIP-94's kind 1063 carrying only NCC-13's own selectors, conformance
fixtures and wire vector, a worked release-monitor example, and the
spec/matrix/plan documentation.

Bumps the NCC repository pin from adad778 to 186c3ad (upstream added
ncc-13; purely additive, no earlier convention's text changed) across
every existing ncc0X/ncc1X module and vector reference.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D95PWA2fdNfg7nUvUHBeMi
CI's clippy (1.98) flags `&[value.clone()]` where `std::slice::from_ref`
avoids the clone; the local toolchain here (1.94) predates that lint.
Use std::slice::from_ref for the two single-element call sites the
NCC-13 test added instead of cloning.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D95PWA2fdNfg7nUvUHBeMi

imattau commented Sep 27, 2026

Copy link
Copy Markdown
Owner Author

CI's clippy check failed on 2cf6338: cloned_ref_to_slice_refs (&[value.clone()] where std::slice::from_ref(&value) avoids the clone) at two call sites in the new ncc13_release_functions_extract_compare_and_match test. This is a lint CI's clippy (1.98) enforces that the local toolchain here (1.94) doesn't yet have, so it wasn't caught before the first push. Fixed in 5a96258 — both call sites now use std::slice::from_ref, verified locally with cargo clippy --tests and the full test suite.


Generated by Claude Code

@imattau
imattau merged commit 4ef5147 into main Sep 27, 2026
2 checks passed
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.

2 participants