A factory for producing artifacts under governance — provenance, ownership, authorization, and an append-only audit trail on every output.
Project description
open-refinery
A factory for producing artifacts under governance. Every output carries its provenance, an owner, and an audit trail; every production is authorized before it runs and logged as it happens.
Status: 0.1.0 — proof of concept. The core loop (authorize → produce → record → audit) is real and tested. Policy-based governance, richer observability, and pluggable sinks are on the roadmap.
Install
uv add open-refinery # or: pip install open-refinery
Use
from open_refinery import Factory
factory = Factory()
@factory.recipe("upper")
def upper(text: str) -> str:
return text.upper()
artifact, record = factory.produce("upper", actor="ian", text="hello")
# artifact -> "HELLO"
# record -> Record(recipe="upper", actor="ian", owner="ian",
# artifact_id=..., input_digest=..., output_digest=..., created_at=...)
Try the demo CLI:
uv run open-refinery --actor ian --text hello
Pillars
| Pillar | Where it lives |
|---|---|
| Authorization | Authorizer (AllowAll, AllowList) — checked before produce |
| Provenance | Record — recipe, actor, timestamp, input/output digests |
| Ownership | owner on every record (defaults to the actor) |
| Auditability | AuditSink (MemorySink, JsonlSink) — append-only trail |
| Logging | stdlib logging, logger name open_refinery |
| Observability | (roadmap) read-model / metrics over the audit trail |
| Governance | (roadmap) policy layer that constrains what may be produced |
Durable audit trail
from open_refinery import Factory, JsonlSink
factory = Factory(audit=JsonlSink("audit.jsonl"))
Each production appends one JSON line — a replayable record of who produced what, from which inputs, and when.
Development
uv sync --extra dev
uv run pytest
See CONTRIBUTING.md and docs/ARCHITECTURE.md.
License
MIT © Ian Johnson
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file open_refinery-0.1.0.tar.gz.
File metadata
- Download URL: open_refinery-0.1.0.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6592d157e19b71b5a0525b09f615f864014153b25340b612cf9e4c9c9528b021
|
|
| MD5 |
4dba4c741b12ac88597f69373d0b166c
|
|
| BLAKE2b-256 |
8bb4915447b34d5a32b9fc3a4003dd11d5a789b1cd276be2dd28687acede0dab
|
File details
Details for the file open_refinery-0.1.0-py3-none-any.whl.
File metadata
- Download URL: open_refinery-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e3cd0e82d5297cc26f2ae8796610576d0cbd8a34ecc2ad001ec60ea1783eba8
|
|
| MD5 |
c5e0740f5a7a9e96878484702d39fa09
|
|
| BLAKE2b-256 |
9ef2d3e3973277be5487655e683841101032044e54c49110470fa1e863cc493f
|