genropy-kajenn 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- genropy_kajenn-0.1.0/.github/workflows/publish.yml +37 -0
- genropy_kajenn-0.1.0/.github/workflows/tests.yml +35 -0
- genropy_kajenn-0.1.0/.gitignore +58 -0
- genropy_kajenn-0.1.0/.readthedocs.yaml +19 -0
- genropy_kajenn-0.1.0/CLAUDE.md +107 -0
- genropy_kajenn-0.1.0/LICENSE +201 -0
- genropy_kajenn-0.1.0/NOTICE +9 -0
- genropy_kajenn-0.1.0/PKG-INFO +159 -0
- genropy_kajenn-0.1.0/README.md +115 -0
- genropy_kajenn-0.1.0/benchmarks/README.md +189 -0
- genropy_kajenn-0.1.0/benchmarks/__init__.py +1 -0
- genropy_kajenn-0.1.0/benchmarks/analysis/__init__.py +1 -0
- genropy_kajenn-0.1.0/benchmarks/analysis/cycle_report.py +158 -0
- genropy_kajenn-0.1.0/benchmarks/analysis/structural_diff.py +560 -0
- genropy_kajenn-0.1.0/benchmarks/capacity_bench.py +163 -0
- genropy_kajenn-0.1.0/benchmarks/capacity_bench_record.py +167 -0
- genropy_kajenn-0.1.0/benchmarks/capacity_bench_sticky.py +228 -0
- genropy_kajenn-0.1.0/benchmarks/capture_loadrecord.py +88 -0
- genropy_kajenn-0.1.0/benchmarks/capture_proxy.py +114 -0
- genropy_kajenn-0.1.0/benchmarks/catalogue/README.md +75 -0
- genropy_kajenn-0.1.0/benchmarks/catalogue/campaigns.json +328 -0
- genropy_kajenn-0.1.0/benchmarks/catalogue/imports/20260909-eightcore-manifest.json +361 -0
- genropy_kajenn-0.1.0/benchmarks/catalogue/imports/20260909-eightcore-receipt.json +25 -0
- genropy_kajenn-0.1.0/benchmarks/compare/README.md +1453 -0
- genropy_kajenn-0.1.0/benchmarks/compare/bridge_coverage_check.py +352 -0
- genropy_kajenn-0.1.0/benchmarks/compare/bridge_recipe.py +17 -0
- genropy_kajenn-0.1.0/benchmarks/compare/drive_login.py +33 -0
- genropy_kajenn-0.1.0/benchmarks/compare/genropy_parity_check.py +18 -0
- genropy_kajenn-0.1.0/benchmarks/compare/gunicorn_recorders.conf.py +35 -0
- genropy_kajenn-0.1.0/benchmarks/compare/http_recorder.py +16 -0
- genropy_kajenn-0.1.0/benchmarks/compare/http_recorder_check.py +246 -0
- genropy_kajenn-0.1.0/benchmarks/compare/recording_engine_factory.py +12 -0
- genropy_kajenn-0.1.0/benchmarks/compare/recording_worker.py +12 -0
- genropy_kajenn-0.1.0/benchmarks/compare/register_recorder.py +16 -0
- genropy_kajenn-0.1.0/benchmarks/compare/register_recorder_check.py +379 -0
- genropy_kajenn-0.1.0/benchmarks/compare/register_recorder_mixin.py +12 -0
- genropy_kajenn-0.1.0/benchmarks/compare/replica.py +18 -0
- genropy_kajenn-0.1.0/benchmarks/compare/replica_check.py +358 -0
- genropy_kajenn-0.1.0/benchmarks/compare/run_archive.py +16 -0
- genropy_kajenn-0.1.0/benchmarks/compare/run_archive_check.py +167 -0
- genropy_kajenn-0.1.0/benchmarks/compare/serve_bridge.py +15 -0
- genropy_kajenn-0.1.0/benchmarks/compare/serve_legacy.py +164 -0
- genropy_kajenn-0.1.0/benchmarks/compare/structural_diff.py +15 -0
- genropy_kajenn-0.1.0/benchmarks/compare/structural_diff_check.py +411 -0
- genropy_kajenn-0.1.0/benchmarks/compare/twin_proxy.py +1110 -0
- genropy_kajenn-0.1.0/benchmarks/compare/twin_proxy_check.py +296 -0
- genropy_kajenn-0.1.0/benchmarks/cust_pkeys.txt +200 -0
- genropy_kajenn-0.1.0/benchmarks/docker/.env.example +5 -0
- genropy_kajenn-0.1.0/benchmarks/docker/.gitignore +5 -0
- genropy_kajenn-0.1.0/benchmarks/docker/README.md +98 -0
- genropy_kajenn-0.1.0/benchmarks/docker/compose.yaml +75 -0
- genropy_kajenn-0.1.0/benchmarks/docker/entrypoints/bridge.sh +12 -0
- genropy_kajenn-0.1.0/benchmarks/docker/entrypoints/legacy.sh +12 -0
- genropy_kajenn-0.1.0/benchmarks/docker/gnr/environment.xml +27 -0
- genropy_kajenn-0.1.0/benchmarks/docker/gnr/instanceconfig/default.xml +4 -0
- genropy_kajenn-0.1.0/benchmarks/docker/gnr/siteconfig/default.xml +11 -0
- genropy_kajenn-0.1.0/benchmarks/docker/images/bench.Dockerfile +6 -0
- genropy_kajenn-0.1.0/benchmarks/docker/images/stack.Dockerfile +24 -0
- genropy_kajenn-0.1.0/benchmarks/docker/projects/lab_bench/instances/bridge_lab/instanceconfig.xml +14 -0
- genropy_kajenn-0.1.0/benchmarks/docker/projects/lab_bench/instances/bridge_lab/root.py +9 -0
- genropy_kajenn-0.1.0/benchmarks/docker/projects/lab_bench/instances/bridge_lab/site/.gitkeep +0 -0
- genropy_kajenn-0.1.0/benchmarks/docker/projects/lab_bench/instances/legacy_lab/instanceconfig.xml +14 -0
- genropy_kajenn-0.1.0/benchmarks/docker/projects/lab_bench/instances/legacy_lab/root.py +9 -0
- genropy_kajenn-0.1.0/benchmarks/docker/projects/lab_bench/instances/legacy_lab/site/.gitkeep +0 -0
- genropy_kajenn-0.1.0/benchmarks/docker/scripts/dump_db.sh +11 -0
- genropy_kajenn-0.1.0/benchmarks/docs/data-storage.md +72 -0
- genropy_kajenn-0.1.0/benchmarks/docs/hetzner-base.md +48 -0
- genropy_kajenn-0.1.0/benchmarks/docs/historical-import-20260909.md +53 -0
- genropy_kajenn-0.1.0/benchmarks/docs/measurement-guide.md +121 -0
- genropy_kajenn-0.1.0/benchmarks/docs/reorganization-status.md +61 -0
- genropy_kajenn-0.1.0/benchmarks/docs/retired-tools.md +24 -0
- genropy_kajenn-0.1.0/benchmarks/docs/scenario-code-sources.json +152 -0
- genropy_kajenn-0.1.0/benchmarks/docs/sourcerer-backup-inventory.md +25 -0
- genropy_kajenn-0.1.0/benchmarks/docs/tool-map.md +39 -0
- genropy_kajenn-0.1.0/benchmarks/execution/__init__.py +1 -0
- genropy_kajenn-0.1.0/benchmarks/execution/bridge_recipe.py +178 -0
- genropy_kajenn-0.1.0/benchmarks/execution/checks/test_lab_lifecycle.sh +386 -0
- genropy_kajenn-0.1.0/benchmarks/execution/genropy_parity.py +178 -0
- genropy_kajenn-0.1.0/benchmarks/execution/http_client.py +49 -0
- genropy_kajenn-0.1.0/benchmarks/execution/lab_lifecycle.sh +356 -0
- genropy_kajenn-0.1.0/benchmarks/execution/load_engine.py +318 -0
- genropy_kajenn-0.1.0/benchmarks/execution/make_plans.py +61 -0
- genropy_kajenn-0.1.0/benchmarks/execution/serve_bridge.py +229 -0
- genropy_kajenn-0.1.0/benchmarks/floor_bench.py +144 -0
- genropy_kajenn-0.1.0/benchmarks/measurement/__init__.py +1 -0
- genropy_kajenn-0.1.0/benchmarks/measurement/bridge_eyes.py +233 -0
- genropy_kajenn-0.1.0/benchmarks/measurement/checks/__init__.py +1 -0
- genropy_kajenn-0.1.0/benchmarks/measurement/checks/container_probe_check.py +246 -0
- genropy_kajenn-0.1.0/benchmarks/measurement/checks/page_class_cache_check.py +198 -0
- genropy_kajenn-0.1.0/benchmarks/measurement/checks/stop_guard_check.py +284 -0
- genropy_kajenn-0.1.0/benchmarks/measurement/container_probe.py +314 -0
- genropy_kajenn-0.1.0/benchmarks/measurement/page_class_cache.py +281 -0
- genropy_kajenn-0.1.0/benchmarks/measurement/stop_guard.py +386 -0
- genropy_kajenn-0.1.0/benchmarks/ping_ramp.py +121 -0
- genropy_kajenn-0.1.0/benchmarks/portal/README.md +163 -0
- genropy_kajenn-0.1.0/benchmarks/portal/__init__.py +1 -0
- genropy_kajenn-0.1.0/benchmarks/portal/backup/Dockerfile +3 -0
- genropy_kajenn-0.1.0/benchmarks/portal/backup/README.md +60 -0
- genropy_kajenn-0.1.0/benchmarks/portal/backup/compose.backup.yaml +15 -0
- genropy_kajenn-0.1.0/benchmarks/portal/backup/genro-benchmark-backup.service +10 -0
- genropy_kajenn-0.1.0/benchmarks/portal/backup/genro-benchmark-backup.timer +11 -0
- genropy_kajenn-0.1.0/benchmarks/portal/backup/pgbackrest.conf.example +22 -0
- genropy_kajenn-0.1.0/benchmarks/portal/backup/run-backup.sh +8 -0
- genropy_kajenn-0.1.0/benchmarks/portal/build_internals.py +29 -0
- genropy_kajenn-0.1.0/benchmarks/portal/docker/Dockerfile +12 -0
- genropy_kajenn-0.1.0/benchmarks/portal/docker/compose.yaml +45 -0
- genropy_kajenn-0.1.0/benchmarks/portal/docker/deploy.sh +21 -0
- genropy_kajenn-0.1.0/benchmarks/portal/docker/nginx.conf +22 -0
- genropy_kajenn-0.1.0/benchmarks/portal/documentation.py +44 -0
- genropy_kajenn-0.1.0/benchmarks/portal/server.py +111 -0
- genropy_kajenn-0.1.0/benchmarks/portal/store.py +100 -0
- genropy_kajenn-0.1.0/benchmarks/recording/__init__.py +1 -0
- genropy_kajenn-0.1.0/benchmarks/recording/http_recorder.py +243 -0
- genropy_kajenn-0.1.0/benchmarks/recording/recording_engine_factory.py +75 -0
- genropy_kajenn-0.1.0/benchmarks/recording/recording_worker.py +37 -0
- genropy_kajenn-0.1.0/benchmarks/recording/register_recorder.py +362 -0
- genropy_kajenn-0.1.0/benchmarks/recording/register_recorder_mixin.py +153 -0
- genropy_kajenn-0.1.0/benchmarks/recording/run_archive.py +172 -0
- genropy_kajenn-0.1.0/benchmarks/replay/__init__.py +1 -0
- genropy_kajenn-0.1.0/benchmarks/replay/genropy_session.py +132 -0
- genropy_kajenn-0.1.0/benchmarks/replay/replica.py +673 -0
- genropy_kajenn-0.1.0/benchmarks/replay_a1.py +277 -0
- genropy_kajenn-0.1.0/benchmarks/scaling_probe.py +144 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/__init__.py +1 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/README.md +150 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/__init__.py +1 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/admission_guard.py +212 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/certify_dynamic_cap.py +140 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/checks.py +958 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/cycle_probe.py +1123 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/cycle_recipe.py +118 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/dynamic_recipe.py +94 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/make_cycle_trace.py +325 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/overrides/override_bridge_8c.yaml +33 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/overrides/override_bridge_dynamic.yaml +28 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/overrides/override_legacy_g12.yaml +20 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/overrides/override_legacy_g16.yaml +20 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/overrides/override_legacy_g8.yaml +25 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/plans.spec.json +44 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/run_cycle.sh +189 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/run_profiles.sh +252 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/run_smoke.sh +35 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/tests/test_cycle_runner.sh +164 -0
- genropy_kajenn-0.1.0/benchmarks/scenarios/eight_core_cycle/tests/test_profiles.sh +245 -0
- genropy_kajenn-0.1.0/benchmarks/session_capture.jsonl +177 -0
- genropy_kajenn-0.1.0/benchmarks/single_record_bench.py +139 -0
- genropy_kajenn-0.1.0/benchmarks/test_users.zip +0 -0
- genropy_kajenn-0.1.0/benchmarks/usernames.txt +32 -0
- genropy_kajenn-0.1.0/benchmarks/usernames_all.txt +332 -0
- genropy_kajenn-0.1.0/docs/Makefile +14 -0
- genropy_kajenn-0.1.0/docs/api.rst +69 -0
- genropy_kajenn-0.1.0/docs/cli-reference.rst +91 -0
- genropy_kajenn-0.1.0/docs/composition.rst +129 -0
- genropy_kajenn-0.1.0/docs/conf.py +43 -0
- genropy_kajenn-0.1.0/docs/configuration.rst +159 -0
- genropy_kajenn-0.1.0/docs/faq.rst +79 -0
- genropy_kajenn-0.1.0/docs/genropy-kajenn-for-dummies.html +1196 -0
- genropy_kajenn-0.1.0/docs/getting-started.rst +131 -0
- genropy_kajenn-0.1.0/docs/index.rst +53 -0
- genropy_kajenn-0.1.0/docs/internal/architecture.rst +232 -0
- genropy_kajenn-0.1.0/docs/internal/datachanges.md +85 -0
- genropy_kajenn-0.1.0/docs/internal/dbevents.md +81 -0
- genropy_kajenn-0.1.0/docs/internal/legacy_daemon_role.md +224 -0
- genropy_kajenn-0.1.0/docs/internal/performance_analysis.md +526 -0
- genropy_kajenn-0.1.0/docs/internal/pool-internals.rst +45 -0
- genropy_kajenn-0.1.0/docs/internal/step1_spawner_design.md +182 -0
- genropy_kajenn-0.1.0/docs/single-vs-multi.rst +14 -0
- genropy_kajenn-0.1.0/docs/status.rst +120 -0
- genropy_kajenn-0.1.0/docs/the-pool.rst +111 -0
- genropy_kajenn-0.1.0/docs/troubleshooting.rst +76 -0
- genropy_kajenn-0.1.0/docs/verification/core-0.46.3-live-acceptance.md +87 -0
- genropy_kajenn-0.1.0/docs/verification/issue72-live-browser.md +91 -0
- genropy_kajenn-0.1.0/examples/multiworker_config.py +87 -0
- genropy_kajenn-0.1.0/hooks/commit-msg +8 -0
- genropy_kajenn-0.1.0/hooks/pre-commit +40 -0
- genropy_kajenn-0.1.0/hooks/pre-push +13 -0
- genropy_kajenn-0.1.0/pyproject.toml +112 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/__init__.py +20 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/proxy/__init__.py +17 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/proxy/genropy_proxy.py +97 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/proxy/py.typed +0 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/py.typed +0 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/siteregister/__init__.py +20 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/siteregister/exceptions.py +36 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/siteregister/global_store_adapter.py +354 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/siteregister/handler.py +28 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/siteregister/processes.py +12 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/siteregister/service.py +28 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/siteregister/siteregister.py +38 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/siteregister/siteregister_client.py +1509 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/spa/__init__.py +16 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/spa/cli.py +131 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/spa/config.py +168 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/spa/delivery_desk.py +327 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/spa/genropy_register.py +250 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/spa/genropy_spa_application.py +118 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/spa/genropy_spa_commander.py +184 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/spa/genropy_worker.py +966 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/spa/legacy_bag.py +233 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/spa/py.typed +0 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/spa/site_engine_factory.py +119 -0
- genropy_kajenn-0.1.0/src/genropy_kajenn/spa/subscription_index.py +131 -0
- genropy_kajenn-0.1.0/tests/__init__.py +0 -0
- genropy_kajenn-0.1.0/tests/conftest.py +92 -0
- genropy_kajenn-0.1.0/tests/lane.py +255 -0
- genropy_kajenn-0.1.0/tests/test_benchmark_bridge.py +85 -0
- genropy_kajenn-0.1.0/tests/test_benchmark_cycle_recipe.py +45 -0
- genropy_kajenn-0.1.0/tests/test_benchmark_documentation.py +18 -0
- genropy_kajenn-0.1.0/tests/test_benchmark_load_engine.py +50 -0
- genropy_kajenn-0.1.0/tests/test_benchmark_plans.py +46 -0
- genropy_kajenn-0.1.0/tests/test_benchmark_portal.py +51 -0
- genropy_kajenn-0.1.0/tests/test_benchmark_replay.py +102 -0
- genropy_kajenn-0.1.0/tests/test_benchmark_report.py +46 -0
- genropy_kajenn-0.1.0/tests/test_carried_store_views.py +67 -0
- genropy_kajenn-0.1.0/tests/test_cli_multiworker_e2e.py +163 -0
- genropy_kajenn-0.1.0/tests/test_data_plane.py +172 -0
- genropy_kajenn-0.1.0/tests/test_dbevents.py +161 -0
- genropy_kajenn-0.1.0/tests/test_delivery_desk.py +419 -0
- genropy_kajenn-0.1.0/tests/test_desk_projection.py +99 -0
- genropy_kajenn-0.1.0/tests/test_genropy_proxy.py +164 -0
- genropy_kajenn-0.1.0/tests/test_genropy_spa_application.py +355 -0
- genropy_kajenn-0.1.0/tests/test_genropy_worker_units.py +452 -0
- genropy_kajenn-0.1.0/tests/test_global_store.py +438 -0
- genropy_kajenn-0.1.0/tests/test_legacy_e2e.py +371 -0
- genropy_kajenn-0.1.0/tests/test_page_store_row.py +314 -0
- genropy_kajenn-0.1.0/tests/test_register_client_units.py +704 -0
- genropy_kajenn-0.1.0/tests/test_request_exchange.py +207 -0
- genropy_kajenn-0.1.0/tests/test_site_engine_factory.py +132 -0
- genropy_kajenn-0.1.0/tests/test_slot_deposit.py +100 -0
- genropy_kajenn-0.1.0/tests/test_subscribed_tables_broadcast.py +105 -0
- genropy_kajenn-0.1.0/tests/test_subscription_index.py +162 -0
- genropy_kajenn-0.1.0/tests/test_verb_refusal.py +81 -0
- genropy_kajenn-0.1.0/tests/test_wsgi_seam_contract.py +112 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
id-token: write # Required for PyPI trusted publishing
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
environment:
|
|
15
|
+
name: release
|
|
16
|
+
url: https://pypi.org/p/genropy-kajenn
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.11"
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: |
|
|
28
|
+
python -m pip install --upgrade pip
|
|
29
|
+
pip install build
|
|
30
|
+
|
|
31
|
+
- name: Build package
|
|
32
|
+
run: python -m build
|
|
33
|
+
|
|
34
|
+
- name: Publish to PyPI
|
|
35
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
36
|
+
with:
|
|
37
|
+
skip-existing: true
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
"on":
|
|
4
|
+
push:
|
|
5
|
+
branches: ['main', 'develop']
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: ['main', 'develop']
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
name: pytest + ruff (Linux/glibc)
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
timeout-minutes: 15
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Set up Python
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: '3.11'
|
|
22
|
+
|
|
23
|
+
- name: Install project with dev extras
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install --upgrade pip
|
|
26
|
+
# genropy is imported at runtime and is not a declared dependency:
|
|
27
|
+
# the bridge hosts a site the operator already has. The tests need it.
|
|
28
|
+
pip install genropy
|
|
29
|
+
pip install ".[dev]"
|
|
30
|
+
|
|
31
|
+
- name: Ruff
|
|
32
|
+
run: ruff check src/ tests/
|
|
33
|
+
|
|
34
|
+
- name: Tests
|
|
35
|
+
run: pytest tests/
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.pyo
|
|
5
|
+
*.pyd
|
|
6
|
+
*.so
|
|
7
|
+
*.egg
|
|
8
|
+
*.egg-info/
|
|
9
|
+
dist/
|
|
10
|
+
build/
|
|
11
|
+
.eggs/
|
|
12
|
+
|
|
13
|
+
# Virtual environments
|
|
14
|
+
.venv/
|
|
15
|
+
venv/
|
|
16
|
+
env/
|
|
17
|
+
.env/
|
|
18
|
+
|
|
19
|
+
# Testing & coverage
|
|
20
|
+
.coverage
|
|
21
|
+
coverage.xml
|
|
22
|
+
htmlcov/
|
|
23
|
+
.pytest_cache/
|
|
24
|
+
.tox/
|
|
25
|
+
|
|
26
|
+
# Type checking
|
|
27
|
+
.mypy_cache/
|
|
28
|
+
.ruff_cache/
|
|
29
|
+
|
|
30
|
+
# Editors
|
|
31
|
+
.vscode/
|
|
32
|
+
.idea/
|
|
33
|
+
.claude/
|
|
34
|
+
*.swp
|
|
35
|
+
*.swo
|
|
36
|
+
.DS_Store
|
|
37
|
+
specs/.DS_Store
|
|
38
|
+
|
|
39
|
+
# Documentation builds
|
|
40
|
+
docs/_build/
|
|
41
|
+
design_documentation/_build/
|
|
42
|
+
|
|
43
|
+
# Temporary files
|
|
44
|
+
temp/
|
|
45
|
+
|
|
46
|
+
# Database files (test artifacts)
|
|
47
|
+
*.db
|
|
48
|
+
|
|
49
|
+
# Sphinx generated
|
|
50
|
+
design_documentation/conf.py
|
|
51
|
+
design_documentation/serve.sh
|
|
52
|
+
|
|
53
|
+
# Package metadata
|
|
54
|
+
src/*.egg-info/
|
|
55
|
+
|
|
56
|
+
# Secondary git worktrees (convention: never committed from here)
|
|
57
|
+
worktrees/
|
|
58
|
+
archive/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Read the Docs configuration file for genropy-kajenn
|
|
2
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html
|
|
3
|
+
|
|
4
|
+
version: 2
|
|
5
|
+
|
|
6
|
+
build:
|
|
7
|
+
os: ubuntu-24.04
|
|
8
|
+
tools:
|
|
9
|
+
python: "3.12"
|
|
10
|
+
|
|
11
|
+
sphinx:
|
|
12
|
+
configuration: docs/conf.py
|
|
13
|
+
|
|
14
|
+
python:
|
|
15
|
+
install:
|
|
16
|
+
- method: pip
|
|
17
|
+
path: .
|
|
18
|
+
extra_requirements:
|
|
19
|
+
- docs
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Claude Code Instructions - genropy-kajenn
|
|
2
|
+
|
|
3
|
+
**Parent Document**: This project follows all policies from the central [kajenn-meta CLAUDE.md](https://github.com/kajenn-org/kajenn-meta/blob/main/CLAUDE.md)
|
|
4
|
+
|
|
5
|
+
Read the parent document first for: language policy (English only), git commit authorship
|
|
6
|
+
rules (no Claude co-author), development status lifecycle, standardization requirements,
|
|
7
|
+
coding style, mypy policy (advisory, never blocking), and all general policies.
|
|
8
|
+
|
|
9
|
+
## Project-Specific Context
|
|
10
|
+
|
|
11
|
+
### Current Status
|
|
12
|
+
- **Development Status**: Alpha (`Development Status :: 3 - Alpha`)
|
|
13
|
+
- **Version**: 0.1.0
|
|
14
|
+
- **Python**: >= 3.11
|
|
15
|
+
- **Build**: hatchling, src/ layout, `py.typed`
|
|
16
|
+
- **Has Implementation Code**: Yes
|
|
17
|
+
|
|
18
|
+
### Project Purpose
|
|
19
|
+
|
|
20
|
+
**genropy-kajenn** is the daemon-less bridge that serves genropy legacy (synchronous)
|
|
21
|
+
sites on top of [kajenn](https://github.com/kajenn-org/kajenn) and the SPA pool of
|
|
22
|
+
[kajenn-orchestra](https://github.com/kajenn-org/kajenn-orchestra). It is born from
|
|
23
|
+
genropy-asgi `29008fa`, without history, the way kajenn was born from genro-asgi.
|
|
24
|
+
|
|
25
|
+
- **Naming**: package `genropy-kajenn` (PyPI, hyphen) · import `genropy_kajenn` (underscore).
|
|
26
|
+
- Depends on `kajenn` and `kajenn-orchestra` as libraries, through their **public API
|
|
27
|
+
only**: `AsgiServer`, `AsgiConfigBuilder`, `OpenApiApplication`, `FrameStream`,
|
|
28
|
+
`Response`, `BaseApplication`, `ConfigurationHandler` from `kajenn`; `SpaApplication`,
|
|
29
|
+
`SpaCommander`, `SpaWorker`, `RegisterRegistry`, `PageRow`, `GUEST_PREFIX`,
|
|
30
|
+
`WsgiSeam`, `FreezeHandler`, `GroupHandler`, `WorkerHandler`, `GroupPolicy`,
|
|
31
|
+
`CommanderEnvelopeHandler`, `CommanderCallFailed`, `RequestSlot`,
|
|
32
|
+
`ConfigurationProfilesApplication`, `SpaConsoleMcpApplication` from
|
|
33
|
+
`kajenn_orchestra`. It does NOT reach into internals.
|
|
34
|
+
- genropy itself is a **runtime** requirement (the worker runs a `GnrWsgiSite`) and is not
|
|
35
|
+
declared in `dependencies`: it is installed and configured outside this package. Four
|
|
36
|
+
modules do import `gnr.*` at the top of the file — `spa/genropy_register.py`,
|
|
37
|
+
`spa/legacy_bag.py`, `siteregister/global_store_adapter.py`,
|
|
38
|
+
`siteregister/siteregister_client.py` — so importing them without genropy raises.
|
|
39
|
+
|
|
40
|
+
### Architecture (rebased on the new core, 2026-08 — `bridge-rebase-new-core`)
|
|
41
|
+
|
|
42
|
+
- **Front** (`GenropySpaApplication` on the core's `SpaApplicationNew`): ROOT mount (`""`),
|
|
43
|
+
serves `/metrics` natively and forwards site paths to the pool. The pool is born at
|
|
44
|
+
startup from OUR recipe (`spa/config.py`): `orchestration().commander(...)` + ONE
|
|
45
|
+
`group(worker_class=GenropyWorker, ...)` — genro-asgi 0.36 put the pool under the
|
|
46
|
+
application's `orchestration` node, so the path is
|
|
47
|
+
`applications.site.orchestration.commander`. The debug door mounts the core console on
|
|
48
|
+
`_console` when `KAJENN_CONSOLE` is set (mounting IS the gate).
|
|
49
|
+
- **Commander** (`GenropySpaCommander` on the core's `SpaCommander`, `spa/genropy_spa_commander.py`,
|
|
50
|
+
#8 / genropy/genro-asgi#59): the vertex with the site's desk. `DeliveryDesk` (`spa/delivery_desk.py`,
|
|
51
|
+
with `SubscriptionIndex`) is the `delivery` branch of the commander's dispatcher —
|
|
52
|
+
`/commander/delivery/{subscribe_table,exchange,deposit,on_datachange}`; `GenropyCommanderEnvelopeHandler`
|
|
53
|
+
is the envelope layer whose `on_new_page` hands the announced `table_subscriptions` to
|
|
54
|
+
`record_page_table_subscriptions`; `on_worker_presented` and `broadcast_subscribed_tables` push the
|
|
55
|
+
source filter down as the order `/commander/delivery/subscribed_tables`; the drop verbs reach the desk.
|
|
56
|
+
`GenropySpaApplication.commander_class` names it.
|
|
57
|
+
- **Worker** (`GenropyWorker` on the core's `SpaWorker`): a child process hosting the
|
|
58
|
+
`GnrWsgiSite`; registers user/connection/page items, runs the site in a thread. Carries the
|
|
59
|
+
site's data-plane verbs (`setStoreSubscription`, `subscribeTable`, `notifyDbEvents`,
|
|
60
|
+
`set_datachange`, `reset_datachanges`, `drop_datachanges`, `collect_page`), the request slot
|
|
61
|
+
with the deposits (`GenropyRequestSlot`), the `delivery` orders (`DeliveryOrders`) and the
|
|
62
|
+
`subscribed_tables` filter. `GenropyRegistry` / `GenropyPageRow` (`spa/genropy_register.py`)
|
|
63
|
+
are its registry and its page row: legacy Bag stores, the row queue, the three subscription
|
|
64
|
+
sets, the `user_view`.
|
|
65
|
+
- **Register client** (`GenropyRegisterClient`, `siteregister/`): the in-process fake of
|
|
66
|
+
the `gnr.web.daemon` client — the surface the site calls. Reads are worker-local;
|
|
67
|
+
cross-worker delivery rides the end-of-request exchange with the commander's desk.
|
|
68
|
+
The daemon override engages ONLY with `GNR_DAEMON_PROVIDER=genropy-kajenn` (genropy #1070).
|
|
69
|
+
- **Proxy** (`GenropyProxyOpenApiApplication`, `proxy/`): a separate, smaller thing — the
|
|
70
|
+
legacy db behind an OpenAPI application; unrelated to the SPA pool.
|
|
71
|
+
|
|
72
|
+
### Cemented decisions — DO NOT reopen
|
|
73
|
+
|
|
74
|
+
- **One identity** (owner, 2026-08-22): the routing cookie is `spa_connection_id` and
|
|
75
|
+
carries the connection id the SITE itself creates (24h, `HttpOnly; SameSite=Lax`).
|
|
76
|
+
The front mints nothing; it writes the cookie only when the reply names a different id.
|
|
77
|
+
Dead ancestors: `gnr_cid`, `sticky_cid`, the genropy session-cookie decoder.
|
|
78
|
+
- **Site-facing semantics imitate pre_refactoring in full** (owner, 2026-08-19). The one
|
|
79
|
+
licensed divergence is the worker->commander dialogue. The bridge changes BASE, not
|
|
80
|
+
semantics.
|
|
81
|
+
- **No worker-count selector** (Phase 2, 2026-08-21): the pool always runs and sizes
|
|
82
|
+
itself (`worker_max_number`); `workers=`, `--workers`, `KAJENN_WORKERS` are dead.
|
|
83
|
+
- **Population maps live on the commander** (`user_map`, `connection_user_map`,
|
|
84
|
+
`page_connection_map`); the bridge's register reads are worker-local — the site-wide
|
|
85
|
+
read is core work, tracked as S1 in `temp/problemi_kajenn_dal_ponte_2026-08-22.md`.
|
|
86
|
+
- **`drop_page` keeps `cascade=` on the bridge** and composes the no-climb drop from the
|
|
87
|
+
registry pieces (D7, 2026-08-20); the core keeps the `*_register` names, the bridge
|
|
88
|
+
exposes `user_items`/`connection_items`/`page_items` as translating properties (§7a).
|
|
89
|
+
|
|
90
|
+
### Project-Specific Guidelines
|
|
91
|
+
|
|
92
|
+
- Tests use the **public API only** — never wire internal registry state by hand; build state
|
|
93
|
+
by making lifecycle events happen (via `apply_lifecycle`).
|
|
94
|
+
- Docstrings declare what is PROVISIONAL and what is FIXED.
|
|
95
|
+
- Verify live state (git/tests/PyPI) before asserting — never trust cache.
|
|
96
|
+
|
|
97
|
+
### Related Documentation
|
|
98
|
+
|
|
99
|
+
- The data plane (datachanges, table subscriptions, dbevents): `docs/internal/datachanges.md`
|
|
100
|
+
and `docs/internal/dbevents.md`.
|
|
101
|
+
- The pool and its internals: `docs/the-pool.rst`, `docs/internal/pool-internals.rst`.
|
|
102
|
+
- What is built today: `docs/status.rst`.
|
|
103
|
+
- The migration that created this repository: `kajenn-meta/MIGRATION_PLAN.md`, Phase 9.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
**All general policies are inherited from the parent document: [kajenn-meta CLAUDE.md](https://github.com/kajenn-org/kajenn-meta/blob/main/CLAUDE.md)**
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2025 Softwell S.r.l.
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: genropy-kajenn
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Daemon-less commander/worker model serving genropy legacy sites on top of kajenn and kajenn-orchestra
|
|
5
|
+
Project-URL: Homepage, https://github.com/genropy/genropy-kajenn
|
|
6
|
+
Project-URL: Repository, https://github.com/genropy/genropy-kajenn
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/genropy/genropy-kajenn/issues
|
|
8
|
+
Author-email: Genropy Team <info@softwell.it>
|
|
9
|
+
License: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
License-File: NOTICE
|
|
12
|
+
Keywords: asgi,commander,genropy,reverse-proxy,sticky,worker
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Framework :: AsyncIO
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Requires-Dist: kajenn-orchestra>=0.1.0
|
|
24
|
+
Requires-Dist: kajenn>=0.1.0
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: black>=23.0; extra == 'dev'
|
|
27
|
+
Requires-Dist: httpx>=0.27; extra == 'dev'
|
|
28
|
+
Requires-Dist: mypy>=1.0; extra == 'dev'
|
|
29
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
32
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
33
|
+
Provides-Extra: docs
|
|
34
|
+
Requires-Dist: sphinx-rtd-theme>=2.0; extra == 'docs'
|
|
35
|
+
Requires-Dist: sphinx>=7.0; extra == 'docs'
|
|
36
|
+
Provides-Extra: portal
|
|
37
|
+
Requires-Dist: psycopg[binary]<4,>=3.2; extra == 'portal'
|
|
38
|
+
Provides-Extra: test
|
|
39
|
+
Requires-Dist: httpx>=0.27; extra == 'test'
|
|
40
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'test'
|
|
41
|
+
Requires-Dist: pytest-cov>=4.0; extra == 'test'
|
|
42
|
+
Requires-Dist: pytest>=7.0; extra == 'test'
|
|
43
|
+
Description-Content-Type: text/markdown
|
|
44
|
+
|
|
45
|
+
# genropy-kajenn
|
|
46
|
+
|
|
47
|
+
Serve legacy (synchronous) **genropy** sites on an ASGI server — no register
|
|
48
|
+
daemon. genropy-kajenn is the genropy-specific bridge on top of
|
|
49
|
+
[kajenn](https://github.com/kajenn-org/kajenn) and
|
|
50
|
+
[kajenn-orchestra](https://github.com/kajenn-org/kajenn-orchestra): kajenn is the
|
|
51
|
+
ASGI server, kajenn-orchestra the commander/worker orchestration, and this
|
|
52
|
+
package hosts an unmodified `GnrWsgiSite` on top of them, spreading its users
|
|
53
|
+
over a supervised pool of worker processes, each user pinned to one of them.
|
|
54
|
+
|
|
55
|
+
- **GitHub**: https://github.com/genropy/genropy-kajenn
|
|
56
|
+
- **Version**: 0.1.0 · **Status**: Alpha
|
|
57
|
+
- **Package**: `genropy-kajenn` (PyPI) · **import**: `genropy_kajenn`
|
|
58
|
+
- **Python**: >= 3.11 · **License**: Apache-2.0
|
|
59
|
+
|
|
60
|
+
## What it replaces
|
|
61
|
+
|
|
62
|
+
- **`gnrwsgiserve`** (werkzeug/WSGI) → **`gnrkajenn`** (uvicorn/ASGI). Same
|
|
63
|
+
site, same options, unmodified code.
|
|
64
|
+
- **The register daemon** (Pyro4, then `genro-nodaemon`) → an **in-process**
|
|
65
|
+
register. There is no daemon to start or connect to.
|
|
66
|
+
|
|
67
|
+
## Installation
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pip install genropy-kajenn
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Latest development version, straight from GitHub:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pip install git+https://github.com/genropy/genropy-kajenn.git
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`kajenn` and `kajenn-orchestra` are installed automatically. **genropy** must be present at runtime
|
|
80
|
+
(the worker runs a `GnrWsgiSite`) and configured as usual (`~/.gnr/environment.xml`
|
|
81
|
+
plus an existing site). genropy is not a declared dependency of this package.
|
|
82
|
+
|
|
83
|
+
## Usage
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
gnrkajenn mysite -p 8080
|
|
87
|
+
# site on http://127.0.0.1:8080/index
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
`mysite` is the genropy instance name — the same you pass to `gnrwsgiserve` — or
|
|
91
|
+
a path to a site directory. That is the whole launch: there is no worker count
|
|
92
|
+
to declare and no single/pool selector. The pool always runs, starts with one
|
|
93
|
+
worker and adds another when the ones it has have no room for a newcomer.
|
|
94
|
+
|
|
95
|
+
On macOS export `PGGSSENCMODE=disable`: the workers are born by `fork` and libpq
|
|
96
|
+
negotiating Kerberos inside a forked child crashes it.
|
|
97
|
+
|
|
98
|
+
Watch the site-wide counters, no authentication needed:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
curl -s http://127.0.0.1:8080/metrics
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## How it works
|
|
105
|
+
|
|
106
|
+
A genropy site is synchronous WSGI. genropy-kajenn converts each ASGI request to a
|
|
107
|
+
PEP 3333 environ and runs the site on a thread pool, so the event loop is never
|
|
108
|
+
blocked. The site's register — connections, pages, sessions, datachanges,
|
|
109
|
+
stores — is served **in-process**, not by a daemon: the package declares the
|
|
110
|
+
`gnr.web:daemon` entry point, and genropy resolves its daemon namespace to it
|
|
111
|
+
only when `GNR_DAEMON_PROVIDER` names the provider, which the CLI does for its
|
|
112
|
+
own process. The choice is per process, so the classic stack and this one can
|
|
113
|
+
share one virtualenv.
|
|
114
|
+
|
|
115
|
+
- **Every user lives in one worker**, with all his pages. Routing is by identity:
|
|
116
|
+
the `spa_connection_id` cookie carries the connection id the site itself minted
|
|
117
|
+
while serving, and the commander knows whose it is.
|
|
118
|
+
- **Workers are born by fork** out of a template process that builds the
|
|
119
|
+
`GnrWsgiSite` once for all of them, so starting one more costs a fork and not a
|
|
120
|
+
cold start.
|
|
121
|
+
- **The pool sizes itself** on measured occupancy — the number of processes is a
|
|
122
|
+
reading, never a setting. `KAJENN_WORKER_MAX_USERS` caps how many users one
|
|
123
|
+
worker may hold.
|
|
124
|
+
- **A quiet user is frozen** to disk and his worker gets the memory back; his
|
|
125
|
+
next request wakes him. A restart parks everybody the same way, so nobody is
|
|
126
|
+
logged out by it.
|
|
127
|
+
- **Changes travel addressed**: what one page writes, or a table event, reaches
|
|
128
|
+
the pages that subscribed it, wherever they sit. The desk that files them and
|
|
129
|
+
the table index live in this package, on the bridge's commander
|
|
130
|
+
(genropy/genro-asgi#59). The legacy `globalStore()` is one master on the commander with no
|
|
131
|
+
replicas — a worker reads it with a call and writes it through an
|
|
132
|
+
all-or-nothing grant.
|
|
133
|
+
|
|
134
|
+
See [`docs/`](docs/) for the pool, configuration, CLI reference, FAQ,
|
|
135
|
+
troubleshooting — and [`docs/status.rst`](docs/status.rst) for what is built
|
|
136
|
+
today.
|
|
137
|
+
|
|
138
|
+
## Documentation
|
|
139
|
+
|
|
140
|
+
The documentation is built with Sphinx:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
pip install -e .[docs]
|
|
144
|
+
cd docs && make html
|
|
145
|
+
# open docs/_build/html/index.html
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Development
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
pip install -e .[dev]
|
|
152
|
+
pytest tests/
|
|
153
|
+
ruff check src/
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## License
|
|
157
|
+
|
|
158
|
+
Apache License 2.0 — Copyright 2025 Softwell S.r.l. See [LICENSE](LICENSE) and
|
|
159
|
+
[NOTICE](NOTICE).
|