Audit gate for tuned candidates: stress boundaries, hard constraints, walk-forward validation, and append-only trails.
Project description
Omega-Lock
Audit tuned candidates before they ship: walk-forward validation, declarative hard constraints, feasible-best selection, and an append-only JSON trail.
Current local package version: 0.2.5.
Registry status is not asserted here. In this environment, PyPI/GitHub release
verification is ENVIRONMENT_BLOCKED; do not treat a local version string as
proof that the same version is published.
Badge and download analytics boundaries
Static badges in this README identify local metadata surfaces such as package version and license. They do not prove release readiness, correctness, trustworthiness, adoption, or package quality.
Downloads or stars may indicate visibility, not correctness, trustworthiness, or release readiness. Stars/downloads must not be used as audit evidence or release approval. No PyPI or GitHub download analytics are asserted here.
What omega-lock audits
Omega-Lock is an audit-first framework for tuned calibration candidates. It sits after candidate generation and asks whether a candidate survives declared gates:
- Walk-forward gate (KC-4): walk-forward re-evaluation on test target data, using Pearson and trade-ratio checks.
- Declarative hard constraints: constraints are evaluated and recorded on
every candidate;
constraint_policy="prefer_feasible"makes selection prefer candidates that satisfy all declared constraints. - Feasible-best vs absolute-best: audit reports expose
best_feasibleandbest_any, so reviewers can see when the highest-fitness candidate violated a hard constraint. - Append-only audit trail: every evaluated candidate is appended as an
AuditedRunwith phase, role, round, andcall_indexcontext. - Optional tamper evidence: audit reports can include an opt-in SHA-256 hash
chain via
report.to_json(with_hash_chain=True)and can verify it withAuditReport.verify_hash_chain(...).
What it does not do
- It does not grade answers or require gold labels unless your own target fitness function requires them.
- It does not prove root cause, guarantee correctness, or replace domain validation.
- It does not provide a runtime production wrapper, dashboard, or web app.
- It does not currently ship an installed console CLI. In particular,
Omega-Lock emits JSON artifacts; it does not currently ship a console
omega-lock diffcommand. - It does not assert PyPI publication status for
0.2.5; verify registries separately before treating a version as published.
Why feasible-best matters
The absolute-best candidate can be the wrong candidate to ship if it violates a
hard constraint. best_any answers "what scored highest?" while
best_feasible answers "what scored highest while satisfying the declared
constraints?" In audit and CI contexts, the second answer is often the one that
can actually move forward.
Use constraint_policy="prefer_feasible" for normal audit runs. Use
constraint_policy="hard_fail" when a run with no feasible candidate should
fail immediately. The backward-compatible default, record, records constraint
violations but does not gate grid_best selection.
Run the deterministic demos (no API, no network)
The 60-second demo video is preserved because it shows the actual local demo flow:
https://github.com/user-attachments/assets/1012965d-0a01-41b5-96f5-93f87ad751e7
It is a paced replay of checked-in examples/phantom_demo.py output:
12-axis sensitivity, top-K unlock, grid search, walk-forward validation, KC
reports, and zoom refinement. Both runs are deterministic and require no
network or API keys.
git clone https://github.com/hibou04-ops/omega-lock.git
cd omega-lock
pip install -e ".[dev]"
python examples/demo_replay.py
python examples/demo_sram.py
Install and import names
Name boundaries are intentionally distinct:
| Surface | Name |
|---|---|
| GitHub repo | hibou04-ops/omega-lock |
| PyPI distribution | omega-lock |
| Python import package | omega_lock |
| Installed console executable | none currently |
From source:
git clone https://github.com/hibou04-ops/omega-lock.git
cd omega-lock
pip install -e ".[dev]"
From PyPI, only if version 0.2.5 is published in the index you use:
pip install omega-lock==0.2.5
pip install "omega-lock[p2]==0.2.5"
Python import:
from omega_lock import P1Config, run_p1
from omega_lock.audit import AuditingTarget, Constraint, make_report, render_scorecard
Minimal audit example
from omega_lock import P1Config, run_p1
from omega_lock.audit import AuditingTarget, Constraint, make_report, render_scorecard
audited = AuditingTarget(
my_target,
constraints=[
Constraint(
"must_be_feasible",
lambda params, result: result.metadata["sharpe"] > 0.5,
),
],
)
result = run_p1(
train_target=audited,
config=P1Config(constraint_policy="prefer_feasible"),
)
report = make_report(audited, method="run_p1", seed=42)
print(render_scorecard(report)) # feasible best vs absolute best
For tamper-evident audit reports:
signed = report.to_json(with_hash_chain=True)
rehydrated = type(report).from_json(signed)
# Pass the embedded hash_chain from the parsed JSON object to verify_hash_chain.
Benchmark and claim evidence
run_benchmark and examples/benchmark_battery.py produce an objective
scorecard from mechanically computed metrics such as effective recall,
generalization gap, and stress_rank_spearman.
The checked-in benchmark regression fixture tracks deterministic
stress_rank_spearman values in the frozen fixture. This is a regression
signal, not a claim that Omega-Lock is superior to other optimizers.
Public README claims are tracked in the generated claim ledger:
- Source ledger: docs/claims/public_claims.yml
- Generated review table: docs/claims/generated_readme_claims.md
- Repository surface: docs/REPO_SURFACE.md
- Trust model: docs/TRUST_MODEL.md
- Toolkit positioning: docs/TOOLKIT_POSITIONING.md
Regenerate and check claim artifacts offline:
python scripts/generate_readme_claims.py
python scripts/generate_readme_claims.py --check
python scripts/check_repo_consistency.py --check
Scope
Omega-Lock is a CLI/Python package/CI audit tool. It should remain offline by default, deterministic where possible, and conservative about public claims.
License
Apache 2.0. See LICENSE.
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 omega_lock-0.2.5.tar.gz.
File metadata
- Download URL: omega_lock-0.2.5.tar.gz
- Upload date:
- Size: 124.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd4a410de7b3f47d9f2638e8029578172e2c0a174a67719b360f372753944352
|
|
| MD5 |
e5941697df31baa9bf0ce80b583b57e6
|
|
| BLAKE2b-256 |
6d3931f623922426704785e95b8e81084dbee08f282ac03740aad68d14145a8f
|
File details
Details for the file omega_lock-0.2.5-py3-none-any.whl.
File metadata
- Download URL: omega_lock-0.2.5-py3-none-any.whl
- Upload date:
- Size: 72.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab2747e72df9574c69a5e9630f7f14e6150e3a42ff66991ba9994294695cc4e4
|
|
| MD5 |
94bf9ac9ee046b5d569d0f255b1b7f17
|
|
| BLAKE2b-256 |
c6a2cdf93560be3205691c38c892afe13b60183fee71e2c24b0db6a9a66213c0
|