Skip to main content

Config-driven gate and state machine evaluator for MetaSPN entity pipelines

Project description

metaspn-gates

metaspn-gates is a config-driven gate + state-machine evaluator for MetaSPN entity pipelines.

Current implementation (v0.1 seed)

  • Deterministic gate evaluation from config
  • Hard requirements and soft thresholds
  • Per-gate per-entity cooldown checks
  • Transition attempt snapshots
  • Transition application + task emissions
  • Config parsing and validation from mapping
  • metaspn-schemas integration hooks (currently used for typed emission shaping)
  • Optional metaspn-schemas emission shaping (Task + EmissionEnvelope)

Public API

  • evaluate_gates(config, entity_state, features, now)
  • apply_decisions(entity_state, decisions, caused_by=None)
  • parse_state_machine_config(payload)
  • load_state_machine_config(path)

Notes

  • load_state_machine_config can use metaspn_schemas parsing/validation hooks when exposed by that package version.
  • If metaspn_schemas is unavailable, it falls back to JSON parsing only.
  • Current dependency target: metaspn-schemas==0.1.0.
  • apply_decisions(..., use_schema_envelopes=True) attaches schema-shaped payloads when entity_state.entity_id is present.

Release

  • GitHub Actions workflow: /Users/leoguinan/MetaSPN/metaspn-gates/.github/workflows/publish.yml
  • Publish trigger: GitHub Release published (or manual workflow_dispatch)
  • Publishing method: PyPI Trusted Publishing via pypa/gh-action-pypi-publish

One-time setup

  1. In PyPI, create project metaspn-gates and configure Trusted Publisher for this GitHub repo/workflow.
  2. In GitHub, create environment pypi (optional protection rules supported).

Release flow

  1. Bump /Users/leoguinan/MetaSPN/metaspn-gates/pyproject.toml version.
  2. Tag and push a release commit.
  3. Publish a GitHub Release for that tag.
  4. publish.yml builds and uploads to PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metaspn_gates-0.1.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metaspn_gates-0.1.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file metaspn_gates-0.1.0.tar.gz.

File metadata

  • Download URL: metaspn_gates-0.1.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for metaspn_gates-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d56d144d83837300ea0939f1ca6e31bbcd0571bb9af5c1e5852fd675d661a57a
MD5 f4fbc20716dc855f332a56fa66b578ba
BLAKE2b-256 03941f120715d0f6cd402259a53f5c775bdcbd3b13e68e2c06d370f7958f8c35

See more details on using hashes here.

Provenance

The following attestation bundles were made for metaspn_gates-0.1.0.tar.gz:

Publisher: publish.yml on MetaSPN/metaspn-gates

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file metaspn_gates-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: metaspn_gates-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for metaspn_gates-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb308f0ce3cbd044fe6f80bfcbacd1fb4a434eb94e98750962d92d1945156bd4
MD5 781550f729ea50801bb27baca26f04d3
BLAKE2b-256 92777db60e176e93aceb50522dcaa1dc0c8fb0accaa6f9b48e2231124d2ebce9

See more details on using hashes here.

Provenance

The following attestation bundles were made for metaspn_gates-0.1.0-py3-none-any.whl:

Publisher: publish.yml on MetaSPN/metaspn-gates

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page