Skip to content

NTM: Hotfix - #6971

Merged
serinko merged 3 commits into
developfrom
hotfix/ntm
Jul 30, 2026
Merged

NTM: Hotfix#6971
serinko merged 3 commits into
developfrom
hotfix/ntm

Conversation

@serinko

@serinko serinko commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Make test robust, not hardcoded


This change is Reviewable

Summary by CodeRabbit

  • Bug Fixes
    • Improved network tunnel verification for configured service ports and ranges.
    • Verification now gracefully handles missing port mappings and skips checks when no mappings are available.
    • Ensured port configuration remains accessible throughout the setup process.
  • Chores
    • Made port-mapping detection in the build process more tolerant to variations in the setup script formatting.

@serinko serinko added this to the Independent Release milestone Jul 22, 2026
@serinko
serinko requested a review from merve64 July 22, 2026 13:38
@serinko serinko self-assigned this Jul 22, 2026
@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nym-explorer-v2 Ready Ready Preview Jul 30, 2026 10:44am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs-nextra Ignored Ignored Preview Jul 30, 2026 10:44am
nym-node-status Ignored Ignored Preview Jul 30, 2026 10:44am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 807d7a3b-9544-4507-a5b7-b414fcc85a95

📥 Commits

Reviewing files that changed from the base of the PR and between 49f8e7d and 96cd475.

📒 Files selected for processing (1)
  • nym-gateway-probe/build.rs

📝 Walkthrough

Walkthrough

The network tunnel manager now exposes PORT_MAPPINGS globally and derives sampled TCP port-rule verification from it. The gateway probe recognizes mapping declarations with varying declare flags.

Changes

Network tunnel port verification

Layer / File(s) Summary
Mapping-driven port rule verification
scripts/nym-node-setup/network-tunnel-manager.sh
PORT_MAPPINGS is globally declared; test_port_range_rules derives sampled TCP ACCEPT-rule checks from curated service mappings and skips unavailable or empty configurations before exiting with its computed status.
Flexible mapping declaration detection
nym-gateway-probe/build.rs
generate_exit_policy_ports detects PORT_MAPPINGS declarations with varying declare flag combinations while preserving existing parsing behavior; the file also gains a trailing newline.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: benedettadavico

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is generic and doesn't describe the actual change to port mapping and test logic. Use a specific title such as "Make NTM port mapping global and harden port-range tests".
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hotfix/ntm

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/nym-node-setup/network-tunnel-manager.sh`:
- Around line 852-854: Update the PORT_MAPPINGS declaration parser in
nym-gateway-probe/build.rs to recognize the global associative-array form used
by declare -gA, while remaining compatible with declare -A. Make flag matching
order-agnostic so equivalent declare options are accepted and mappings continue
to be parsed during probe builds.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 479b183c-a1b6-41a0-80f1-07c099437577

📥 Commits

Reviewing files that changed from the base of the PR and between e534e24 and 4465aec.

📒 Files selected for processing (1)
  • scripts/nym-node-setup/network-tunnel-manager.sh

Comment thread scripts/nym-node-setup/network-tunnel-manager.sh

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@nym-gateway-probe/build.rs`:
- Around line 50-55: Update the PORT_MAPPINGS declaration detection condition
near the existing starts_with/contains check to enforce an exact variable-name
boundary, so names such as OTHER_PORT_MAPPINGS cannot match. Parse or validate
the declaration tokens while preserving support for the existing declare flag
combinations, and ensure EXIT_POLICY_PORTS is generated from the canonical
PORT_MAPPINGS block.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9056b0be-9368-4ae8-b7aa-e60fd716cc4a

📥 Commits

Reviewing files that changed from the base of the PR and between 4465aec and 49f8e7d.

📒 Files selected for processing (1)
  • nym-gateway-probe/build.rs

Comment thread nym-gateway-probe/build.rs Outdated
@serinko
serinko merged commit 7f56bd8 into develop Jul 30, 2026
11 of 12 checks passed
@serinko
serinko deleted the hotfix/ntm branch July 30, 2026 14:12
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.

3 participants