Skip to content

Conversation

@tcheeric
Copy link
Owner

Summary

Bump project version to 1.0.0-SNAPSHOT and align docs/automation for the 1.0 track.
This prepares the repository for final 1.0 changes and release workflows.

Related issue: #

What changed?

  • Set Maven version to 1.0.0-SNAPSHOT across all modules (mvn versions:set)
  • Added CI and Release workflows; CI runs matrix (JDK 21 build, JDK 17 POM validate) and Docker IT job
  • Added release helper script (scripts/release.sh) for bump/verify/tag/publish/next-snapshot
  • Completed docs: dependency alignment plan, version uplift workflow, CI/IT stability
  • Updated getting-started and API how-to to use the BOM (no hardcoded versions)
  • Synced roadmap tasks and marked done in Project Fix client listener #5 (docs + release readiness)

BREAKING

No functional API changes in this PR. Upcoming 1.0.0 will remove deprecated APIs as already documented in MIGRATION.md.

Review focus

  • Confirm the version bump across module POMs
  • Sanity-check CI (matrix + IT job) and release workflow secrets requirements
  • Validate docs accuracy for BOM usage and release steps

Checklist

  • Scope ≤ 300 lines (or split/stack)
  • Title is verb + object (e.g., “Refactor auth middleware to async”)
  • Description links the issue and answers “why now?”
  • BREAKING flagged if needed
  • Tests/docs updated (if relevant)

erict875 added 3 commits October 11, 2025 22:29
- Clarify the process for importing the BOM in both Maven and Gradle.
- Emphasize omitting per-module versions for better dependency management.

BREAKING CHANGE: users must update their `pom.xml` and `build.gradle` files.
Impact: existing configurations may break if not updated.
Migration: follow the new steps outlined in the migration document.
- Changed specific version numbers to placeholders for better guidance.
- Clarified instructions on managing transitive dependencies with BOM.
@tcheeric tcheeric requested a review from Copilot October 11, 2025 21:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR bumps the project version to 1.0.0-SNAPSHOT and establishes comprehensive release infrastructure for the 1.0 milestone. It removes deprecated APIs scheduled for deletion, adds CI/CD workflows, and completes documentation for stable release processes.

Key Changes

  • Version bump from 0.6.5-SNAPSHOT to 1.0.0-SNAPSHOT across all modules
  • Removal of deprecated APIs (Constants.Kind facade, legacy encoder singleton, deprecated constructors)
  • Addition of CI/CD workflows with matrix builds and Docker-based integration tests
  • Complete release automation script with bump/verify/tag/publish/next-snapshot commands

Reviewed Changes

Copilot reviewed 63 out of 63 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pom.xml and module poms Version bumped to 1.0.0-SNAPSHOT
scripts/release.sh New release automation script with comprehensive workflow commands
nostr-java-base/src/main/java/nostr/base/Encoder.java Removed deprecated ENCODER_MAPPER_BLACKBIRD constant
nostr-java-api/src/main/java/nostr/config/Constants.java Removed deprecated Constants.Kind facade
nostr-java-api/src/main/java/nostr/api/NIP01.java Removed deprecated createTextNoteEvent(Identity, String) overload
.github/workflows/ci.yml New CI workflow with Java 21/17 matrix and separate Docker IT job
.github/workflows/release.yml New release workflow for automated publishing to Maven Central
docs/ Comprehensive documentation updates for BOM usage and release processes

Comment on lines +117 to +119
$no_docker && mvn_args=(-q -DnoDocker=true -P release deploy)
$skip_tests && mvn_args=(-q -DskipTests -P release deploy)
if $no_docker && $skip_tests; then mvn_args=(-q -DskipTests -DnoDocker=true -P release deploy); fi
Copy link

Copilot AI Oct 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Maven argument construction logic is duplicated and hard to maintain. Consider building the array incrementally to avoid repetition and make it easier to extend with new flags.

Suggested change
$no_docker && mvn_args=(-q -DnoDocker=true -P release deploy)
$skip_tests && mvn_args=(-q -DskipTests -P release deploy)
if $no_docker && $skip_tests; then mvn_args=(-q -DskipTests -DnoDocker=true -P release deploy); fi
$no_docker && mvn_args+=(-DnoDocker=true)
$skip_tests && mvn_args+=(-DskipTests)

Copilot uses AI. Check for mistakes.
# Look up an existing project with the desired title.
project_number=$(gh project list --owner "${repo_owner}" --format json |
jq -r --arg title "${project_title}" 'map(select(.title == $title)) | first | .number // empty')
jq -r --arg title "${project_title}" '[.. | objects | select(has("title")) | select(.title == $title)] | first? | .number // empty')
Copy link

Copilot AI Oct 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The jq expression is complex and hard to read. The recursive descent with .. followed by filtering could have performance implications on large project lists. Consider using a more direct approach like map(select(.title == $title)) | first | .number // empty if the structure is predictable.

Suggested change
jq -r --arg title "${project_title}" '[.. | objects | select(has("title")) | select(.title == $title)] | first? | .number // empty')
jq -r --arg title "${project_title}" 'map(select(.title == $title)) | first | .number // empty')

Copilot uses AI. Check for mistakes.
}
String lower = bolt11.toLowerCase(Locale.ROOT);
int sep = lower.indexOf('1');
int sep = lower.lastIndexOf('1');
Copy link

Copilot AI Oct 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using lastIndexOf instead of indexOf for finding the separator in BOLT11 invoices could be incorrect. BOLT11 format specifies a single '1' separator between HRP and data, so indexOf should be used to find the first occurrence.

Suggested change
int sep = lower.lastIndexOf('1');
int sep = lower.indexOf('1');

Copilot uses AI. Check for mistakes.
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codex address this comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Testing

  • mvn -q verify (fails: Non-resolvable import POM xyz.tcheeric:nostr-java-bom:pom:1.1.1)

View task →

// Parses BTC with no unit. Example: 1 BTC → 100,000,000,000 msat.
void parseWholeBtcNoUnit() {
long msat = Bolt11Util.parseMsat("lnbc1psome");
long msat = Bolt11Util.parseMsat("lnbc11psome");
Copy link

Copilot AI Oct 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test invoice lnbc11psome appears to have an invalid format. BOLT11 invoices should have the amount before the unit, so this should be lnbc1p1some (1 BTC) rather than lnbc11psome which suggests 11 pico-BTC.

Suggested change
long msat = Bolt11Util.parseMsat("lnbc11psome");
long msat = Bolt11Util.parseMsat("lnbc1p1some");

Copilot uses AI. Check for mistakes.
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codex address this comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Testing

  • ⚠️ mvn -q verify (fails: missing dependency xyz.tcheeric:nostr-java-bom:1.1.1 in Maven Central)

View task →

* Manages the lifecycle of {@link WebSocketClientHandler} instances keyed by relay name.
*/
public final class NostrRelayRegistry {
public class NostrRelayRegistry {
Copy link

Copilot AI Oct 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the class from final to non-final may have been unintentional and could impact the design. If this class was intentionally made final for safety reasons, removing final could allow unintended inheritance.

Suggested change
public class NostrRelayRegistry {
public final class NostrRelayRegistry {

Copilot uses AI. Check for mistakes.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

/**
* Create a Nutzap event (kind 7374).
*
* @param proofs list of Cashu proofs
* @param url the mint URL
* @param nutzappedEventTag optional event being zapped (e-tag)
* @param recipient the recipient public key (p-tag)
* @param content optional human-readable content
* @return this instance for chaining
*/
public NIP61 createNutzapEvent(
List<CashuProof> proofs,
@NonNull URL url,
EventTag nutzappedEventTag,
@NonNull PublicKey recipient,
@NonNull String content) {
GenericEvent genericEvent =
new GenericEventFactory(getSender(), Kind.NUTZAP.getValue(), content).create();
proofs.forEach(proof -> genericEvent.addTag(NIP61.createProofTag(proof)));
if (nutzappedEventTag != null) {
genericEvent.addTag(nutzappedEventTag);
}
genericEvent.addTag(NIP61.createUrlTag(url.toString()));
genericEvent.addTag(NIP01.createPubKeyTag(recipient));

P1 Badge createNutzapEvent no longer writes amount/unit tags

The refactored createNutzapEvent builder now only adds proofs, URL, and recipient tags. The previous version also attached amount and unit tags via NIP60.createAmountTag/createUnitTag, which are required for a valid NIP‑61 nutzap event. Callers of createNutzapEvent(NutZap, …) will now emit events missing these tags unless they remember to add them manually (the unit test now does so after calling the method). This silently produces malformed events in existing code that relied on the builder to produce a complete zap payload.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +21 to +29
- name: Setup Java 21 with Maven Central credentials and GPG
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: maven
server-id: central
server-username: CENTRAL_USERNAME
server-password: CENTRAL_PASSWORD

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use Maven Central secrets when configuring setup-java

The release workflow configures actions/setup-java with literal strings CENTRAL_USERNAME/CENTRAL_PASSWORD instead of the secrets that are exported later for the publish step. This causes the action to generate a settings.xml containing those literal values, so the subsequent mvn … deploy will authenticate with the wrong credentials and the release job will fail with 401. Pass ${{ secrets.CENTRAL_USERNAME }} and ${{ secrets.CENTRAL_PASSWORD }} to server-username/server-password so the credentials are written correctly.

Useful? React with 👍 / 👎.

tcheeric and others added 6 commits October 11, 2025 22:47
…-bolt11utiltest

test: fix bolt11 whole btc fixture
- Update the logic to find the HRP separator in BOLT11 invoices
  by using lastIndexOf instead of indexOf. This ensures proper
  parsing of invoices with multiple '1' characters.

- Adjust test case to reflect the change in expected input format.
- Ensure that the uuid from the identifier tag is appended only if it is not null.
- This prevents potential null pointer exceptions and improves stability.
- Added functionality to check for existing tasks before creating new ones.
- Implemented assignment of tasks to the current GitHub user if available.
- Improved logging for task creation and updates to enhance user feedback.
@tcheeric tcheeric merged commit de0f48a into develop Oct 11, 2025
1 check passed
@tcheeric tcheeric deleted the chore/bump-version-1.0.0-SNAPSHOT branch October 11, 2025 22:27
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