From bd922904cb2adc31f6e913bc7ff37d64435caa2d Mon Sep 17 00:00:00 2001 From: Midia Kiasat Date: Sun, 1 Mar 2026 15:14:37 +0100 Subject: [PATCH 1/3] ci: add python test CI + protocol schema gates (remove fake node scaffold) --- .github/workflows/auctoriseal-ci.yml | 40 +++++++++++++++++++++------- auctoriseal/__init__.py | 1 + auctoriseal/api/__init__.py | 1 + auctoriseal/api/server.py | 1 + auctoriseal/authority/__init__.py | 1 + auctoriseal/authority/delegation.py | 1 + auctoriseal/authority/freeze.py | 1 + auctoriseal/authority/modes.py | 1 + auctoriseal/authority/policy.py | 1 + auctoriseal/cli/__init__.py | 1 + auctoriseal/cli/inspect_ledger.py | 1 + auctoriseal/ledger/__init__.py | 1 + auctoriseal/ledger/integrity.py | 1 + auctoriseal/ledger/reader.py | 1 + auctoriseal/ledger/retention.py | 1 + auctoriseal/ledger/writer.py | 1 + auctoriseal/seals/__init__.py | 1 + auctoriseal/seals/issuer.py | 1 + auctoriseal/seals/revoker.py | 1 + auctoriseal/seals/validator.py | 1 + pyproject.toml | 12 +++++++++ 21 files changed, 62 insertions(+), 9 deletions(-) create mode 100644 auctoriseal/__init__.py create mode 100644 auctoriseal/api/__init__.py create mode 100644 auctoriseal/api/server.py create mode 100644 auctoriseal/authority/__init__.py create mode 100644 auctoriseal/authority/delegation.py create mode 100644 auctoriseal/authority/freeze.py create mode 100644 auctoriseal/authority/modes.py create mode 100644 auctoriseal/authority/policy.py create mode 100644 auctoriseal/cli/__init__.py create mode 100644 auctoriseal/cli/inspect_ledger.py create mode 100644 auctoriseal/ledger/__init__.py create mode 100644 auctoriseal/ledger/integrity.py create mode 100644 auctoriseal/ledger/reader.py create mode 100644 auctoriseal/ledger/retention.py create mode 100644 auctoriseal/ledger/writer.py create mode 100644 auctoriseal/seals/__init__.py create mode 100644 auctoriseal/seals/issuer.py create mode 100644 auctoriseal/seals/revoker.py create mode 100644 auctoriseal/seals/validator.py create mode 100644 pyproject.toml diff --git a/.github/workflows/auctoriseal-ci.yml b/.github/workflows/auctoriseal-ci.yml index c842cce..e7270ae 100644 --- a/.github/workflows/auctoriseal-ci.yml +++ b/.github/workflows/auctoriseal-ci.yml @@ -6,20 +6,42 @@ on: branches: [ main ] jobs: - build_test: + test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + + - uses: actions/setup-python@v5 with: - node-version: 20 - - name: Build + python-version: "3.11" + + - name: Protocol gates + shell: bash + run: | + set -euo pipefail + test -f protocol/protocol.md + test -f protocol/seal.schema.json + test -f protocol/authority.schema.json + test -f protocol/revocation.schema.json + python - <<'PY' +import json, pathlib, sys +req = ["protocol/seal.schema.json","protocol/authority.schema.json","protocol/revocation.schema.json","protocol/envelope.schema.json","protocol/error.schema.json"] +for p in req: + fp = pathlib.Path(p) + if not fp.exists(): raise SystemExit(f"E_MISSING_{p}") + json.loads(fp.read_text(encoding="utf-8")) +print("OK: schemas parse") +PY + + - name: Install test deps + shell: bash run: | set -euo pipefail - node -v - npm -v || true - npm run build - - name: Test + python -m pip install --upgrade pip + python -m pip install pytest + + - name: Pytest + shell: bash run: | set -euo pipefail - npm run test + python -m pytest diff --git a/auctoriseal/__init__.py b/auctoriseal/__init__.py new file mode 100644 index 0000000..2a62cf7 --- /dev/null +++ b/auctoriseal/__init__.py @@ -0,0 +1 @@ +# AUCTORISEAL namespace shim for CI import stability. diff --git a/auctoriseal/api/__init__.py b/auctoriseal/api/__init__.py new file mode 100644 index 0000000..9ebc633 --- /dev/null +++ b/auctoriseal/api/__init__.py @@ -0,0 +1 @@ +# namespace package diff --git a/auctoriseal/api/server.py b/auctoriseal/api/server.py new file mode 100644 index 0000000..631a0c0 --- /dev/null +++ b/auctoriseal/api/server.py @@ -0,0 +1 @@ +from ...api.server import * # noqa: F401,F403 diff --git a/auctoriseal/authority/__init__.py b/auctoriseal/authority/__init__.py new file mode 100644 index 0000000..9ebc633 --- /dev/null +++ b/auctoriseal/authority/__init__.py @@ -0,0 +1 @@ +# namespace package diff --git a/auctoriseal/authority/delegation.py b/auctoriseal/authority/delegation.py new file mode 100644 index 0000000..bcfd8d4 --- /dev/null +++ b/auctoriseal/authority/delegation.py @@ -0,0 +1 @@ +from ...authority.delegation import * # noqa: F401,F403 diff --git a/auctoriseal/authority/freeze.py b/auctoriseal/authority/freeze.py new file mode 100644 index 0000000..ac37592 --- /dev/null +++ b/auctoriseal/authority/freeze.py @@ -0,0 +1 @@ +from ...authority.freeze import * # noqa: F401,F403 diff --git a/auctoriseal/authority/modes.py b/auctoriseal/authority/modes.py new file mode 100644 index 0000000..9627254 --- /dev/null +++ b/auctoriseal/authority/modes.py @@ -0,0 +1 @@ +from ...authority.modes import * # noqa: F401,F403 diff --git a/auctoriseal/authority/policy.py b/auctoriseal/authority/policy.py new file mode 100644 index 0000000..cc937a0 --- /dev/null +++ b/auctoriseal/authority/policy.py @@ -0,0 +1 @@ +from ...authority.policy import * # noqa: F401,F403 diff --git a/auctoriseal/cli/__init__.py b/auctoriseal/cli/__init__.py new file mode 100644 index 0000000..9ebc633 --- /dev/null +++ b/auctoriseal/cli/__init__.py @@ -0,0 +1 @@ +# namespace package diff --git a/auctoriseal/cli/inspect_ledger.py b/auctoriseal/cli/inspect_ledger.py new file mode 100644 index 0000000..8bac204 --- /dev/null +++ b/auctoriseal/cli/inspect_ledger.py @@ -0,0 +1 @@ +from ...cli.inspect_ledger import * # noqa: F401,F403 diff --git a/auctoriseal/ledger/__init__.py b/auctoriseal/ledger/__init__.py new file mode 100644 index 0000000..9ebc633 --- /dev/null +++ b/auctoriseal/ledger/__init__.py @@ -0,0 +1 @@ +# namespace package diff --git a/auctoriseal/ledger/integrity.py b/auctoriseal/ledger/integrity.py new file mode 100644 index 0000000..b58c407 --- /dev/null +++ b/auctoriseal/ledger/integrity.py @@ -0,0 +1 @@ +from ...ledger.integrity import * # noqa: F401,F403 diff --git a/auctoriseal/ledger/reader.py b/auctoriseal/ledger/reader.py new file mode 100644 index 0000000..b8f70a5 --- /dev/null +++ b/auctoriseal/ledger/reader.py @@ -0,0 +1 @@ +from ...ledger.reader import * # noqa: F401,F403 diff --git a/auctoriseal/ledger/retention.py b/auctoriseal/ledger/retention.py new file mode 100644 index 0000000..5f9a92d --- /dev/null +++ b/auctoriseal/ledger/retention.py @@ -0,0 +1 @@ +from ...ledger.retention import * # noqa: F401,F403 diff --git a/auctoriseal/ledger/writer.py b/auctoriseal/ledger/writer.py new file mode 100644 index 0000000..ddb407b --- /dev/null +++ b/auctoriseal/ledger/writer.py @@ -0,0 +1 @@ +from ...ledger.writer import * # noqa: F401,F403 diff --git a/auctoriseal/seals/__init__.py b/auctoriseal/seals/__init__.py new file mode 100644 index 0000000..9ebc633 --- /dev/null +++ b/auctoriseal/seals/__init__.py @@ -0,0 +1 @@ +# namespace package diff --git a/auctoriseal/seals/issuer.py b/auctoriseal/seals/issuer.py new file mode 100644 index 0000000..cfe2754 --- /dev/null +++ b/auctoriseal/seals/issuer.py @@ -0,0 +1 @@ +from ...seals.issuer import * # noqa: F401,F403 diff --git a/auctoriseal/seals/revoker.py b/auctoriseal/seals/revoker.py new file mode 100644 index 0000000..dc9785c --- /dev/null +++ b/auctoriseal/seals/revoker.py @@ -0,0 +1 @@ +from ...seals.revoker import * # noqa: F401,F403 diff --git a/auctoriseal/seals/validator.py b/auctoriseal/seals/validator.py new file mode 100644 index 0000000..3583bb5 --- /dev/null +++ b/auctoriseal/seals/validator.py @@ -0,0 +1 @@ +from ...seals.validator import * # noqa: F401,F403 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..68a3a35 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,12 @@ +[project] +name = "auctoriseal" +version = "0.1.0" +requires-python = ">=3.11" +dependencies = [] + +[tool.pytest.ini_options] +addopts = "-q" +testpaths = ["tests"] + +[tool.ruff] +line-length = 100 From 0703a66ae8386670f20d3560b7c00ec5856e8ad9 Mon Sep 17 00:00:00 2001 From: Midia Kiasat Date: Sun, 1 Mar 2026 15:36:03 +0100 Subject: [PATCH 2/3] ci: add workflow_dispatch (force workflow indexing) --- .github/workflows/auctoriseal-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/auctoriseal-ci.yml b/.github/workflows/auctoriseal-ci.yml index e7270ae..f8ff981 100644 --- a/.github/workflows/auctoriseal-ci.yml +++ b/.github/workflows/auctoriseal-ci.yml @@ -1,6 +1,7 @@ name: auctoriseal-ci on: + workflow_dispatch: pull_request: push: branches: [ main ] From 70d787bc34efd249cc6477056e8bd92bca590a89 Mon Sep 17 00:00:00 2001 From: Midia Kiasat Date: Sun, 1 Mar 2026 15:49:23 +0100 Subject: [PATCH 3/3] ci: canonicalize workflow (dispatch + permissions + python3) --- .github/workflows/auctoriseal-ci.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/auctoriseal-ci.yml b/.github/workflows/auctoriseal-ci.yml index f8ff981..881a53a 100644 --- a/.github/workflows/auctoriseal-ci.yml +++ b/.github/workflows/auctoriseal-ci.yml @@ -6,6 +6,9 @@ on: push: branches: [ main ] +permissions: + contents: read + jobs: test: runs-on: ubuntu-latest @@ -24,12 +27,19 @@ jobs: test -f protocol/seal.schema.json test -f protocol/authority.schema.json test -f protocol/revocation.schema.json - python - <<'PY' -import json, pathlib, sys -req = ["protocol/seal.schema.json","protocol/authority.schema.json","protocol/revocation.schema.json","protocol/envelope.schema.json","protocol/error.schema.json"] + python3 - <<'PY' +import json, pathlib +req = [ + "protocol/seal.schema.json", + "protocol/authority.schema.json", + "protocol/revocation.schema.json", + "protocol/envelope.schema.json", + "protocol/error.schema.json", +] for p in req: fp = pathlib.Path(p) - if not fp.exists(): raise SystemExit(f"E_MISSING_{p}") + if not fp.exists(): + raise SystemExit(f"E_MISSING_{p}") json.loads(fp.read_text(encoding="utf-8")) print("OK: schemas parse") PY @@ -38,11 +48,11 @@ PY shell: bash run: | set -euo pipefail - python -m pip install --upgrade pip - python -m pip install pytest + python3 -m pip install --upgrade pip + python3 -m pip install pytest - name: Pytest shell: bash run: | set -euo pipefail - python -m pytest + python3 -m pytest -q