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 append-only JSON audit trails.
Omega-Lock runs after candidate generation. A search, tuning, or calibration method proposes a candidate; Omega-Lock decides whether that candidate survives the declared evidence gates before it is allowed to ship.
README family: Full README · 한국어 README · Easy README · 쉬운 한국어 README
Current local package version: 0.3.3. This README does not assert PyPI or
GitHub release status. Local version metadata is not proof of registry
publication; registry status requires explicit post-release verification.
What's new in 0.3.3
Classifier promotion only — no functional change for existing users:
Development Statuspromoted from3 - Alphato4 - Beta. There is no functional code change since 0.3.2: the dormant, default-off parallel-execution executor seam and the sdist packaging fix that shipped in 0.3.2 both stand.- Golden audit fixtures regenerated only to carry the new version string; the audit report schema and SHA-256 hash chain are unchanged.
Use it when
- before shipping a tuned or calibrated candidate
- when the highest-fitness candidate may violate a hard constraint
- when reviewers need
best_anyandbest_feasiblereported separately - when train/test or holdout transfer needs a walk-forward gate
- when an append-only JSON audit trail is needed for review or CI
- when deterministic, offline release hygiene matters
- when calibrating non-action objectives (math, ML, simulation) — see
KCThresholds.pure_objective()
Trust loop
- generate or receive candidate parameters
- evaluate them through
AuditingTarget - record hard-constraint outcomes on every candidate
- select
best_feasibleseparately frombest_any - apply walk-forward or holdout gates when configured
- emit JSON result, audit report, and scorecard
- optionally serialize with SHA-256 hash-chain evidence
- verify generated claims and repository consistency offline
Install
pip install omega-lock==0.3.3
pip install "omega-lock[p2]==0.3.3"
Use the PyPI command only after 0.3.3 is visible in the package index you use.
Local version metadata is not proof of registry publication.
From source:
git clone https://github.com/hibou04-ops/omega-lock.git
cd omega-lock
pip install -e ".[dev]"
Verification and evidence
Public README claims are tracked in a generated claim ledger. Local checks can verify the documentation/source alignment; registry publication still requires explicit post-release verification.
- Claim ledger (source): docs/claims/public_claims.yml
- Generated claim review: docs/claims/generated_readme_claims.md
- Repository surface: docs/REPO_SURFACE.md
- Trust model: docs/TRUST_MODEL.md
- Toolkit positioning: docs/TOOLKIT_POSITIONING.md
- Release checklist: RELEASE.md
- Changelog: CHANGELOG.md
- Offline quality CI: .github/workflows/quality-ci.yml
- Publish workflow: .github/workflows/publish.yml
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
Run the deterministic demos (no API, no network)
No API keys and no network access are required.
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
demo_replay.py 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.
The 60-second demo video shows the same local flow:
https://github.com/user-attachments/assets/1012965d-0a01-41b5-96f5-93f87ad751e7
How is this different?
| Capability | omega-lock | Generic optimizer | Ad-hoc grid/random search | Benchmark-only report |
|---|---|---|---|---|
| Treats raw winner as untrusted until audited | ✓ | ✗ | ✗ | partial |
Separates best_any from best_feasible |
✓ | ✗ | ✗ | ✗ |
| Records declared hard-constraint outcomes per candidate | ✓ | varies | manual | ✗ |
| Supports walk-forward / holdout gate when configured | ✓ | varies | manual | varies |
| Emits reviewable JSON audit artifacts | ✓ | varies | manual | report-only |
| Optional SHA-256 hash-chain tamper evidence | ✓ | ✗ | ✗ | ✗ |
| Generated README claim ledger | ✓ | ✗ | ✗ | ✗ |
| Claims global optimum or domain correctness | ✗ | sometimes | ✗ | ✗ |
Position: Omega-Lock is audit-gate-first, not optimizer-replacement-first. Optimizers answer "what scored highest?" Omega-Lock answers "what survived the declared evidence gates?"
What this is not
- not answer grading or gold-label scoring
- not proof of correctness
- not root-cause proof
- not a production runtime wrapper, dashboard, or web app
- not cryptographic signing or immutable storage
- not a published-registry verifier — registry status requires explicit post-release verification
- no installed console command — Omega-Lock does not currently ship a console
omega-lock diffcommand
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.
- Pure-objective preset (0.3.0):
KCThresholds.pure_objective()disables the action-count gates (KC-3 and the KC-4 trade-ratio sub-gate) and keeps the domain-neutral gates, so non-action objectives are not forced through action-count floors. - 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
AuditedRun— with phase, role, round, andcall_indexcontext — to an append-only JSON trail. - 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(...).
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.
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 |
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.
The public claim ledger and its proof links are listed under Verification and evidence above.
Badge and download analytics boundaries
Static badges in this README identify local metadata surfaces, supported Python version, local quality gates, and methodology positioning. 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.
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.3.3.tar.gz.
File metadata
- Download URL: omega_lock-0.3.3.tar.gz
- Upload date:
- Size: 201.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e88685811873b88ed90ac3052266e73ac0a32e9328bd7e8df5af7fb72c9cbbd
|
|
| MD5 |
0cce02e3116360ad37e0ec895a014f8a
|
|
| BLAKE2b-256 |
4ded70bdb1b8ac0fccae132e61ffcad73997bfb910ae78a48df0c3fbfeb77c17
|
Provenance
The following attestation bundles were made for omega_lock-0.3.3.tar.gz:
Publisher:
publish.yml on hibou04-ops/omega-lock
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omega_lock-0.3.3.tar.gz -
Subject digest:
0e88685811873b88ed90ac3052266e73ac0a32e9328bd7e8df5af7fb72c9cbbd - Sigstore transparency entry: 1749654405
- Sigstore integration time:
-
Permalink:
hibou04-ops/omega-lock@5025c79a2dd991110623c8afe4c39b43a66b0753 -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/hibou04-ops
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5025c79a2dd991110623c8afe4c39b43a66b0753 -
Trigger Event:
release
-
Statement type:
File details
Details for the file omega_lock-0.3.3-py3-none-any.whl.
File metadata
- Download URL: omega_lock-0.3.3-py3-none-any.whl
- Upload date:
- Size: 80.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a908d56946a0d0ae793f5b1bd006c8fc09f4c9a73535a8787a36ebf871967841
|
|
| MD5 |
09385d870ba52d4d59f0ff5b4c26ea66
|
|
| BLAKE2b-256 |
67fb479ce23e407e87ae43939408604328b3dd8ed7a167b24a8b1222a2460e00
|
Provenance
The following attestation bundles were made for omega_lock-0.3.3-py3-none-any.whl:
Publisher:
publish.yml on hibou04-ops/omega-lock
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omega_lock-0.3.3-py3-none-any.whl -
Subject digest:
a908d56946a0d0ae793f5b1bd006c8fc09f4c9a73535a8787a36ebf871967841 - Sigstore transparency entry: 1749654497
- Sigstore integration time:
-
Permalink:
hibou04-ops/omega-lock@5025c79a2dd991110623c8afe4c39b43a66b0753 -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/hibou04-ops
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5025c79a2dd991110623c8afe4c39b43a66b0753 -
Trigger Event:
release
-
Statement type: