Skip to content

fix: merge latest dev updates into main - #7

Merged
node9ai merged 20 commits into
mainfrom
dev
Apr 7, 2026
Merged

fix: merge latest dev updates into main#7
node9ai merged 20 commits into
mainfrom
dev

Conversation

@node9ai

@node9ai node9ai commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Auto-generated PR

Merge latest dev changes into main to trigger a release.

⚠️ Important: When you click Squash and Merge, ensure the commit message starts with:

  • fix: to publish a Patch release (0.0.X)
  • feat: to publish a Minor release (0.X.0)
    If it starts with chore:, no PyPI package will be published!

node9ai and others added 20 commits April 4, 2026 13:18
…dError

Offline mode now activates when no daemon is running and no API key is
set — calls succeed with an audit log entry instead of raising
DaemonNotFoundError. Update the e2e test to assert the new behavior.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Resolve README.md merge conflict
- NODE9_SKIP=1 now emits a warning and writes an audit entry (no silent bypass)
- configure() is now thread-safe via threading.Lock
- DLP scan covers all string args, not just params named filename/content
- _dispatch() renamed to dispatch() — public API should not have underscore
  (_dispatch kept as deprecated alias with DeprecationWarning)
- workspace validated at __init__ time with clear error if path doesn't exist
- @internal docstring clarifies it logs to stdout, not to audit trail
- README: shell=True examples now include sanitization warning
- README: _dispatch references updated to dispatch()
- DLP now checks every string arg as a path candidate, not just params
  named filename/path — fixes silent bypass on dest/target/output params
- tool() annotation uses Union[str, Callable] instead of str | Callable
  — fixes TypeError on Python 3.9
- Docstring examples: shell=False + shlex.split(), write_code uses safe_path
- dispatch referenced consistently (not _dispatch) in all docstrings
- Node9Agent.new_session() added for server deployments with multiple users
- __all__ documents build_tools_anthropic/openai/dispatch/new_session
…ning, 13 new tests

- safe_path(filename, *, workspace=...) — workspace is now keyword-only to prevent
  silent positional arg swaps; all call sites updated
- NODE9_SKIP=1 now warns at import time (not just per-call) so it's harder to
  accidentally leave enabled in production
- new_session() docstring explicitly documents the one-instance-per-request requirement
- 13 new tests: dispatch() unknown tool (returns string, never raises), new_session()
  UUID validity and concurrent calls, _build_tools() unannotated/int/bool/float params
  and *args/**kwargs exclusion, safe_path symlink traversal rejection, configure()
  called twice (second wins) and empty args don't overwrite

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nv var tests

- Path safety now checks ALL path-like args in @tool methods, not just the first;
  a method with src+dest params now validates both (removed the break)
- dispatch() docstring clarifies the lookup is strictly registry-based (@tool marker)
- README run_shell example gets explicit warning that shlex.split still allows
  arbitrary executables — callers must allowlist commands in production
- NODE9_SKIP env var table entry strengthened: "Never set in production"
- Git hooks now use the active virtualenv Python instead of hardcoded python3
- New tests: traversal in second path arg is caught, configure() wins over env var,
  env var sets baseline before configure() is called

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@node9ai

node9ai commented Apr 7, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Claude Code Review

Code Review: Node9 Python SDK PR

What's in This Diff

The diff shows only a version bump from 1.0.12.0.0 in pyproject.toml. No implementation, test, or documentation changes are visible.


Issues

1. Missing Context — Cannot Meaningfully Review

A version bump to 2.0.0 (a semver major version) signals a breaking change, but there is no accompanying code, test, or documentation diff to review. This PR as submitted is incomplete for review purposes.

Specific concerns given the nature of this library:

  • What breaking changes justify a major version bump?
  • Was the @protect decorator signature changed? If so, agents integrating with LangChain/CrewAI will silently break on upgrade if the API changed without clear migration docs.
  • Were any daemon HTTP communication changes made? Endpoint contract changes between the SDK and daemon are a common source of silent failures and should be explicitly documented.

2. Security Library Versioning Requires a Changelog

For a security-focused library, a major version bump with no visible changelog or migration guide is a red flag. Consumers of this library need to know:

  • Was a vulnerability patched?
  • Was the approval flow behavior changed?
  • Are there new required configuration fields?

Without this, users may defer upgrading or upgrade blindly — both are bad outcomes for a security tool.

3. Version-Only PRs Are High Risk to Merge Without Review Gates

Merging a 2.0.0 tag without at least:

  • A passing CI badge / test suite confirmation in the PR
  • A CHANGELOG.md or release notes entry
  • Confirmation the daemon protocol version compatibility is documented

...creates an undocumented release artifact. If the PyPI publish pipeline is triggered on merge or tag, this ships immediately.


What Should Be in This PR Before Approval

Item Status
Code changes justifying major bump ❌ Not visible
CHANGELOG / release notes ❌ Not visible
Test coverage for changed behavior ❌ Not visible
Daemon protocol compatibility note ❌ Not visible
Migration guide for LangChain/CrewAI integrators ❌ Not visible

Recommendation

Do not approve. Request the author either:

  1. Include the full changeset in this PR so it can be properly reviewed, or
  2. Clarify if this is intentionally a version-only bump (e.g., a manual hotfix tag) and provide justification in the PR description.

If this is the complete change — a standalone version bump with no code changes — that is itself a bug: the version should only increment when behavior changes, and 2.0.0 should never be a no-op bump for a published security library.


Automated review by Claude Sonnet

@node9ai
node9ai merged commit 713b621 into main Apr 7, 2026
10 checks passed
@node9ai
node9ai deleted the dev branch April 7, 2026 19:20
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