Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

cfxdb

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cfxdb - npm Package Compare versions

Comparing version
25.12.1
to
25.12.2
+8
.audit/oberstet_rel-25-12-2.md
- [ ] I did **not** use any AI-assistance tools to help create this pull request.
- [x] I **did** use AI-assistance tools to *help* create this pull request.
- [x] I have read, understood and followed the project's AI_POLICY.md when creating code, documentation etc. for this pull request.
Submitted by: @oberstet
Date: 2025-12-15
Related issue(s): #112
Branch: oberstet:rel-25-12-2
#!/usr/bin/env python3
# Copyright (c) typedef int GmbH, Germany, 2025. All rights reserved.
#
# Smoke tests for cfxdb package verification.
# Used by CI to verify wheels and sdists actually work after building.
"""
Smoke tests for cfxdb package.
This script verifies that a cfxdb installation is functional by testing:
1. Import cfxdb and check version
2. Import zlmdb (dependency) and verify vendored flatbuffers
3. Import autobahn (dependency) and check version
4. Import cfxdb database schemas and verify they load
5. Verify .fbs schema files are bundled
6. Verify .bfbs binary schema files are bundled
ALL TESTS ARE REQUIRED. Both wheel installs and sdist installs MUST
provide identical functionality.
"""
import sys
from pathlib import Path
def test_import_cfxdb():
"""Test 1: Import cfxdb and check version."""
print("Test 1: Importing cfxdb and checking version...")
try:
import cfxdb
print(f" cfxdb version: {cfxdb.__version__}")
print(" PASS")
return True
except Exception as e:
print(f" FAIL: Could not import cfxdb: {e}")
return False
def test_import_zlmdb():
"""Test 2: Import zlmdb (dependency) and verify vendored flatbuffers."""
print("Test 2: Importing zlmdb and verifying vendored flatbuffers...")
try:
import zlmdb
print(f" zlmdb version: {zlmdb.__version__}")
# Verify cfxdb uses zlmdb's vendored flatbuffers
from zlmdb import flatbuffers
print(f" zlmdb.flatbuffers: available")
print(" PASS")
return True
except Exception as e:
print(f" FAIL: Could not import zlmdb: {e}")
return False
def test_import_autobahn():
"""Test 3: Import autobahn (dependency) and check version."""
print("Test 3: Importing autobahn and checking version...")
try:
import autobahn
print(f" autobahn version: {autobahn.__version__}")
print(" PASS")
return True
except Exception as e:
print(f" FAIL: Could not import autobahn: {e}")
return False
def test_import_schemas():
"""Test 4: Import cfxdb database schemas and verify they load."""
print("Test 4: Importing cfxdb database schemas...")
try:
# Import main schema modules
from cfxdb import globalschema, mrealmschema
print(" globalschema: imported")
print(" mrealmschema: imported")
# Import specific schema modules
from cfxdb.realmstore import RealmStore
from cfxdb.user import User
from cfxdb.mrealm import ManagementRealm
print(" RealmStore, User, ManagementRealm: imported")
print(" PASS")
return True
except Exception as e:
print(f" FAIL: Could not import schemas: {e}")
return False
def test_fbs_files():
"""Test 5: Verify .fbs schema files are bundled."""
print("Test 5: Verifying .fbs schema files are bundled...")
try:
import cfxdb
cfxdb_path = Path(cfxdb.__file__).parent
# Expected .fbs files
expected_fbs = [
"arealm.fbs",
"common.fbs",
"cookiestore.fbs",
"log.fbs",
"meta.fbs",
"mrealm.fbs",
"realmstore.fbs",
"reflection.fbs",
"user.fbs",
"xbr.fbs",
"xbrmm.fbs",
"xbrnetwork.fbs",
]
found = []
missing = []
for fbs in expected_fbs:
fbs_path = cfxdb_path / fbs
if fbs_path.exists():
found.append(fbs)
else:
missing.append(fbs)
print(f" Found {len(found)}/{len(expected_fbs)} .fbs files")
if missing:
print(f" Missing: {', '.join(missing)}")
print(" FAIL")
return False
print(" PASS")
return True
except Exception as e:
print(f" FAIL: Error checking .fbs files: {e}")
return False
def test_bfbs_files():
"""Test 6: Verify .bfbs binary schema files are bundled."""
print("Test 6: Verifying .bfbs binary schema files are bundled...")
try:
import cfxdb
cfxdb_path = Path(cfxdb.__file__).parent
gen_path = cfxdb_path / "gen"
# Expected .bfbs files (in gen/ directory)
expected_bfbs = [
"arealm.bfbs",
"common.bfbs",
"cookiestore.bfbs",
"log.bfbs",
"meta.bfbs",
"mrealm.bfbs",
"realmstore.bfbs",
"reflection.bfbs",
"user.bfbs",
"xbr.bfbs",
"xbrmm.bfbs",
"xbrnetwork.bfbs",
]
found = []
missing = []
for bfbs in expected_bfbs:
bfbs_path = gen_path / bfbs
if bfbs_path.exists():
found.append(bfbs)
else:
missing.append(bfbs)
print(f" Found {len(found)}/{len(expected_bfbs)} .bfbs files in gen/")
if missing:
print(f" Missing: {', '.join(missing)}")
print(" FAIL")
return False
print(" PASS")
return True
except Exception as e:
print(f" FAIL: Error checking .bfbs files: {e}")
return False
def main():
"""Run all smoke tests."""
print("=" * 72)
print(" SMOKE TESTS - Verifying cfxdb installation")
print("=" * 72)
print()
print(f"Python: {sys.version}")
print()
tests = [
("Test 1", test_import_cfxdb),
("Test 2", test_import_zlmdb),
("Test 3", test_import_autobahn),
("Test 4", test_import_schemas),
("Test 5", test_fbs_files),
("Test 6", test_bfbs_files),
]
failures = 0
passed = 0
for name, test in tests:
result = test()
if result is True:
passed += 1
else:
failures += 1
print()
total = len(tests)
print("=" * 72)
if failures == 0:
print(f"ALL SMOKE TESTS PASSED ({passed}/{total})")
print("=" * 72)
return 0
else:
print(f"SMOKE TESTS FAILED ({passed} passed, {failures} failed)")
print("=" * 72)
return 1
if __name__ == "__main__":
sys.exit(main())
+24
-0

@@ -16,2 +16,26 @@ Changelog

25.12.2 (2025-12-15)
--------------------
**New**
* Added ``generate-release-notes`` justfile recipe for documentation integration
* Added ``docs-integrate-github-release`` justfile recipe with chain-of-custody files
* Added ``.github/workflows/README.md`` documenting CI/CD architecture
* Added ``release-post-comment.yml`` workflow for GitHub Discussions notifications
**Fix**
* Fixed autoapi duplicate object warnings by adding suppress_warnings in conf.py (#82)
* Consolidated ``download-github-release`` recipe to use ``/tmp/release-artifacts/<tag>`` path
* Fixed release workflow to properly upload wheels (corrected check-release-fileset parameters)
* Fixed OpenSSL checksum format handling in download-github-release recipe
* Aligned download-github-release recipe with autobahn-python/zlmdb for consistency
**Other**
* Updated dependencies: autobahn[all]>=25.12.2, zlmdb>=25.12.2
* Removed tox from dev dependencies (no longer used)
* Added documentation for WHY both zlmdb and autobahn dependencies are needed (#112)
25.12.1 (2025-12-10)

@@ -18,0 +42,0 @@ --------------------

@@ -203,1 +203,11 @@ # docs/conf.py

pygments_dark_style = "monokai"
# -- Suppress Warnings -------------------------------------------------------
# Suppress duplicate object warnings when using both autoapi and autodoc
# directives for the same classes. The manual .. autoclass:: directives in
# the domain-specific docs (management-realm/, router-database/, etc.) are
# intentionally duplicating autoapi-generated docs for better organization.
suppress_warnings = [
"autodoc.duplicate_object",
"autosectionlabel.*",
]

@@ -8,2 +8,9 @@ Release Notes

25.12.2
-------
* `GitHub Release <https://github.com/crossbario/cfxdb/releases/tag/v25.12.2>`__
* `PyPI Package <https://pypi.org/project/cfxdb/25.12.2/>`__
* `Documentation <https://cfxdb.readthedocs.io/en/v25.12.2/>`__
25.12.1

@@ -10,0 +17,0 @@ -------

+4
-6
Metadata-Version: 2.4
Name: cfxdb
Version: 25.12.1
Version: 25.12.2
Summary: Crossbar.io Database - Core database access classes for Crossbar.io

@@ -10,3 +10,3 @@ Project-URL: Homepage, https://github.com/crossbario/cfxdb

Author-email: typedef int GmbH <contact@typedefint.eu>
License: MIT
License-Expression: MIT
License-File: LICENSE

@@ -39,3 +39,3 @@ Keywords: crossbar,database,ethereum,lmdb,wamp,web3,xbr

Requires-Dist: argon2-cffi>=25.1.0
Requires-Dist: autobahn[all]>=25.12.1
Requires-Dist: autobahn[all]>=25.12.2
Requires-Dist: eth-abi>=5.1.0

@@ -45,3 +45,3 @@ Requires-Dist: eth-account>=0.13.0

Requires-Dist: web3>=7.6.0
Requires-Dist: zlmdb>=25.12.1
Requires-Dist: zlmdb>=25.12.2
Provides-Extra: dev

@@ -63,4 +63,2 @@ Requires-Dist: build>=1.0.0; extra == 'dev'

Requires-Dist: sphinxcontrib-spelling>=7.0.0; extra == 'dev'
Requires-Dist: tox-gh-actions>=2.2.0; extra == 'dev'
Requires-Dist: tox>=2.9.1; extra == 'dev'
Requires-Dist: twine>=3.3.0; extra == 'dev'

@@ -67,0 +65,0 @@ Requires-Dist: watchdog>=0.8.3; extra == 'dev'

+16
-10

@@ -7,7 +7,7 @@ [build-system]

name = "cfxdb"
version = "25.12.1"
version = "25.12.2"
description = "Crossbar.io Database - Core database access classes for Crossbar.io"
readme = "README.md"
requires-python = ">=3.11"
license = {text = "MIT"}
license = "MIT"
authors = [

@@ -44,7 +44,15 @@ {name = "typedef int GmbH", email = "contact@typedefint.eu"}

dependencies = [
# WAMP ecosystem packages
"autobahn[all]>=25.12.1",
"zlmdb>=25.12.1",
# WAMP ecosystem packages:
# - zlmdb: Core dependency for LMDB-based object-relational database layer.
# cfxdb defines database schemas and table classes that extend zlmdb's
# MapOidFlatBuffers, MapUuidFlatBuffers, etc. base classes.
# - autobahn: Required for WAMP protocol types used in database schemas
# (e.g., autobahn.wamp.types.TransportDetails in realmstore tables,
# autobahn.wamp.serializer.JsonObjectSerializer in exporter, and
# autobahn.util for ID generation and activation codes in tests).
# The [all] extra ensures FlatBuffers serialization support is available.
"zlmdb>=25.12.2",
"autobahn[all]>=25.12.2",
# Ethereum/Web3 stack
# Ethereum/Web3 stack (for XBR market maker and network schemas)
"eth-abi>=5.1.0",

@@ -55,4 +63,4 @@ "eth-account>=0.13.0",

# Additional dependencies
"parsimonious>=0.10.0",
"argon2-cffi>=25.1.0",
"parsimonious>=0.10.0", # PEG parser for schema definitions
"argon2-cffi>=25.1.0", # Password hashing for user authentication
]

@@ -72,4 +80,2 @@

"coverage>=5.0.0",
"tox>=2.9.1",
"tox-gh-actions>=2.2.0",
"py-multihash>=2.0.1", # For IPFS hash generation in tests

@@ -76,0 +82,0 @@

@@ -8,2 +8,2 @@ ##############################################################################

__version__ = "25.12.1"
__version__ = "25.12.2"

Sorry, the diff of this file is not supported yet