Repository navigation
Add a composite service-operator example spanning the NCC cluster - #3
Merged
Merged
Conversation
Every existing NCC example exercises one convention in isolation. examples/service-operator-bot.ns composes the whole service cluster this codebase has landed instead — NCC-02, 05, 06, 07, 09, 10, 11 and 13 — the way a real operator would actually use them together: advertise capabilities and endpoints, delegate scoped operator authority instead of a signing key, cut a signed software release, judge operator-claimed status against the grant that is supposed to authorise it, and decide whether a peer's endpoints are worth depending on. Building it surfaced a real cross-module defect: NCC-13's module declared operator_for_tag/operator_project/operator_application, colliding with NCC-10's identically-named exports (E4003) the moment both modules are imported in the same program. Renamed NCC-13's three functions to release_operator_for/release_operator_project/ release_operator_application, since nothing else depends on the names NCC-13 shipped with days ago. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D95PWA2fdNfg7nUvUHBeMi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
examples/service-operator-bot.nsinstead composes the whole service cluster this codebase has landed — NCC-02, 05, 06, 07, 09, 10, 11 and 13 — the way a real operator would actually use them together: advertise capabilities and endpoints, delegate scoped operator authority instead of a signing key, cut a signed software release, judge operator-claimed status against the grant that is supposed to authorise it, and decide whether a peer's endpoints are worth depending on.E4003(ambiguous export) — NCC-13's module declaredoperator_for_tag/operator_project/operator_application, identical names to NCC-10's own exports. Renamed NCC-13's three functions torelease_operator_for/release_operator_project/release_operator_application(nothing else depends on the names NCC-13 shipped with days ago), and updatedspec/nostr.md/NCC-PLAN.mdaccordingly.the_service_operator_bot_composes_the_full_ncc_service_cluster) exercising every path documented in the example's header comment.README.md.Test plan
cargo build --workspace— cleancargo test --workspace— all tests pass (249 + 69 CLI tests, 1 ignored)cargo fmt --check— cleancargo clippy --workspace --tests -- -D warnings— cleanexamples/service-operator-bot.ns's header comment (nscript check+nscript runwith each event) and confirmed the printed output🤖 Generated with Claude Code
https://claude.ai/code/session_01D95PWA2fdNfg7nUvUHBeMi
Generated by Claude Code