Skip to content

Commit 677431e

Browse files
committed
Add reference authority check, live export helper, and invariant tests
1 parent 9849667 commit 677431e

14 files changed

Lines changed: 420 additions & 12 deletions

Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ else
2323
PYTHON ?= python
2424
endif
2525

26-
.PHONY: test test-reference test-slow test-solver test-vendor-moreau smoke-solver smoke-check env-check reference-correctness perf-benchmark diff-check trust-dashboard parity-native-licensed artifact-validation-report parity-report audit dashboard validate-fixture lint typecheck format format-check cov cov-gates compile-deps verify-extended bootstrap-moreau upgrade-host-realistic-vendor host-realistic-rehearsal export-upstream-rehearsal batch-solve-report verify-reference-system
26+
.PHONY: test test-reference test-slow test-solver test-vendor-moreau smoke-solver smoke-check env-check reference-correctness perf-benchmark diff-check trust-dashboard parity-native-licensed artifact-validation-report parity-report audit dashboard validate-fixture lint typecheck format format-check cov cov-gates compile-deps verify-extended bootstrap-moreau upgrade-host-realistic-vendor host-realistic-rehearsal export-upstream-rehearsal batch-solve-report verify-reference-system reference-authority-check refresh-live-upstream-export
2727

2828
test:
2929
$(PYTHON) -m pytest -q
@@ -73,12 +73,19 @@ export-upstream-rehearsal:
7373
upgrade-host-realistic-vendor:
7474
$(PYTHON) scripts/upgrade_host_realistic_vendor.py --force
7575

76-
verify-reference-system:
77-
$(PYTHON) scripts/refresh_published_run_index.py --check
76+
reference-authority-check:
77+
$(PYTHON) scripts/reference_authority_check.py
78+
79+
refresh-live-upstream-export:
80+
@echo "Usage: $(PYTHON) scripts/refresh_live_upstream_export.py --graph-json <path/to/offline_transition_graph.json>"
81+
82+
verify-reference-system: reference-authority-check
7883
$(PYTHON) -m pytest \
7984
tests/governance/test_published_run_index.py \
8085
tests/governance/test_host_realistic_publish_evidence.py \
8186
tests/governance/test_reference_evidence_tiers.py \
87+
tests/governance/test_reference_authority_invariants.py \
88+
tests/governance/test_native_arm_publish_evidence.py \
8289
tests/governance/test_run_host_realistic_publish.py \
8390
tests/governance/test_batch_solve_report.py \
8491
tests/bench/test_inter_sim_export.py \

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Optional: replace the committed export with a **live** inter-sim dump ([`docs/HO
5353

5454
---
5555

56-
Contributing and merge policy: [`CONTRIBUTING.md`](CONTRIBUTING.md), [`docs/CI_MERGE_GATES.md`](docs/CI_MERGE_GATES.md). Evidence tiers: [`docs/REFERENCE_EVIDENCE_TIERS.md`](docs/REFERENCE_EVIDENCE_TIERS.md). Local gate: `make verify-reference-system`.
56+
Contributing and merge policy: [`CONTRIBUTING.md`](CONTRIBUTING.md), [`docs/CI_MERGE_GATES.md`](docs/CI_MERGE_GATES.md). Reference authority map: [`docs/REFERENCE_AUTHORITY.md`](docs/REFERENCE_AUTHORITY.md). Evidence tiers: [`docs/REFERENCE_EVIDENCE_TIERS.md`](docs/REFERENCE_EVIDENCE_TIERS.md). Local gates: `make reference-authority-check`, `make verify-reference-system`.
5757

5858
## Installation
5959

@@ -198,6 +198,7 @@ See also [`docs/README.md`](docs/README.md) for a compact index.
198198

199199
**Status & roadmap**
200200

201+
- [`docs/REFERENCE_AUTHORITY.md`](docs/REFERENCE_AUTHORITY.md) — flagship release, gates, and maintainer checklist
201202
- [`docs/ENGINEERING_STATUS.md`](docs/ENGINEERING_STATUS.md) — what is implemented, CI, solver pins
202203
- [`docs/ROADMAP.md`](docs/ROADMAP.md) — external dependencies and deferred work
203204

benchmarks/external_evidence/EXPORT_PROVENANCE.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"export_json": "benchmarks/external_evidence/offline_graph_export_upstream.json",
44
"upstream_repository": "https://github.com/fraware/inter-sim-rl",
55
"upstream_revision_pin": "third_party/inter-sim-rl/REVISION",
6+
"export_kind": "structural_committed",
67
"graph_shape": "host_realistic_fork",
7-
"notes": "Multi-branch offline graph export (Root to NodeA/NodeB/NodeC). Structural host-shaped evidence committed for the export to bank to publish loop. Re-export from a patched inter-sim-rl host and replace this file when a live upstream dump is available; keep RUN_PROVENANCE.source_export_json aligned."
8+
"flagship_run_id": "host-realistic-20260525",
9+
"notes": "Multi-branch offline graph export (Root to NodeA/NodeB/NodeC). Structural host-shaped evidence committed for the export to bank to publish loop. For a live upstream dump use scripts/refresh_live_upstream_export.py then make upgrade-host-realistic-vendor."
810
}

benchmarks/reports/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Benchmark reports (committed examples)
2+
3+
Optional JSON reports that illustrate public benchmark evidence shapes. They are **not** live vendor timing claims unless regenerated on a licensed host and committed intentionally.
4+
5+
| File | Purpose |
6+
|------|---------|
7+
| [`batch_solve_report.example.json`](batch_solve_report.example.json) | Schema example for `scripts/batch_solve_report.py` output (`native_microbatch` vs `native_compiled_real_batch`) |
8+
9+
## Regenerate real batch evidence (licensed host)
10+
11+
```bash
12+
python scripts/performance_benchmark.py --batch-size 4
13+
python scripts/batch_solve_report.py output/performance_summary.json \
14+
--out benchmarks/reports/batch_solve_report.latest.json
15+
```
16+
17+
Document the workflow in [`docs/SOLVER_PATHS_AND_BATCHING.md`](../../docs/SOLVER_PATHS_AND_BATCHING.md).
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"schema_version": "conicshield_batch_solve_report/v1",
3+
"example_only": true,
4+
"generated_at_utc": "2026-05-26T00:00:00Z",
5+
"source": "illustrative — regenerate via scripts/performance_benchmark.py on a licensed host",
6+
"comparisons": [
7+
{
8+
"scenario_id": "default",
9+
"conditioning": "well",
10+
"device": "cpu",
11+
"auto_tune": false,
12+
"batch_size": 4,
13+
"mean_sec_sequential": 0.002,
14+
"mean_sec_batched": 0.001,
15+
"speedup_ratio": 2.0
16+
}
17+
],
18+
"summary": {
19+
"pairs": 1,
20+
"max_speedup_ratio": 2.0
21+
}
22+
}

docs/HOST_REALISTIC_RUNBOOK.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ You have a committed `run_id` under `benchmarks/published_runs/` whose `RUN_PROV
4040
|------|---------|
4141
| Full vendor rebuild | `make upgrade-host-realistic-vendor` or `python scripts/upgrade_host_realistic_vendor.py --force` |
4242
| Governance + parity only | `python scripts/upgrade_host_realistic_vendor.py --refresh-governance` |
43-
| Live upstream dump | Re-export to `benchmarks/external_evidence/offline_graph_export_upstream.json`, update `EXPORT_PROVENANCE.json`, then upgrade as above |
43+
| Live upstream dump | `python scripts/refresh_live_upstream_export.py --graph-json <dump.json>` then `make upgrade-host-realistic-vendor` |

docs/MAINTAINER_RUNBOOK.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ Use the fixture regeneration procedure. Do not overwrite the fixture casually.
4949
### Case E: a run appears good and all gates are green
5050
Use **`release_cli`** for a full publish (updates `CURRENT.json`, `HISTORY.json`, and `benchmarks/registry.json`). To refresh gate columns on `CURRENT.json` for an **already published** run after new parity evidence, use **`finalize_cli`** with **`--parity-summary-path`** and **`--sync-current-release`** — do not edit `CURRENT.json` by hand.
5151

52+
## Reference authority (flagship release)
53+
54+
Family **`conicshield-transition-bank-v1`** points at **`host-realistic-20260525`** (`vendor_native`, external export evidence). See [`REFERENCE_AUTHORITY.md`](REFERENCE_AUTHORITY.md).
55+
56+
```bash
57+
make reference-authority-check # index + audit --strict + flagship alignment
58+
make verify-reference-system # above + governance/bench pytest bundle
59+
```
60+
61+
Live upstream re-export: `python scripts/refresh_live_upstream_export.py --graph-json <dump.json>` then `make upgrade-host-realistic-vendor`.
62+
5263
## Standard commands
5364

5465
Tests marked `@pytest.mark.slow` (stress-scale replay, heavy subprocess work) are **excluded** from the default suite by [`pyproject.toml`](../pyproject.toml) (`not slow`), matching [`ci.yml`](../.github/workflows/ci.yml). Run them locally with `python -m pytest tests/ -q -m "slow or not slow"` (see [`DEVENV.md`](DEVENV.md)). Add a scheduled or manual workflow if you want slow tests in CI.

docs/NATIVE_ARM_PUBLISH_CHECKLIST.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,27 @@
22

33
## Canonical command block (licensed host)
44

5+
**Flagship (in-repo):** `host-realistic-20260525` is the family `current_run_id` with `vendor_native` evidence. Refresh with `make upgrade-host-realistic-vendor` or `--refresh-governance`.
6+
57
```bash
68
# Export → bundle (real projector + native arm)
9+
make upgrade-host-realistic-vendor
10+
11+
# Or explicit run_id:
712
python scripts/publish_native_arm_bundle.py \
813
--export-json benchmarks/external_evidence/offline_graph_export_upstream.json \
9-
--run-id <run_id> \
14+
--run-id host-realistic-20260525 \
1015
--force
1116

12-
# Or step-by-step:
17+
# Step-by-step:
1318
python scripts/run_host_realistic_publish.py \
14-
--export-json <path/to/export.json> \
15-
--run-id <run_id> \
19+
--export-json benchmarks/external_evidence/offline_graph_export_upstream.json \
20+
--run-id host-realistic-20260525 \
1621
--no-passthrough \
17-
--include-native-arm
22+
--include-native-arm \
23+
--governance-scaffold \
24+
--copy-to-published \
25+
--refresh-index
1826

1927
python scripts/governed_local_promotion.py all --source benchmarks/runs/<run_id>
2028
```

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Policy and runbooks for ConicShield. The repository root [`README.md`](../README
44

55
| Document | Purpose |
66
|----------|---------|
7+
| [REFERENCE_AUTHORITY.md](REFERENCE_AUTHORITY.md) | Flagship release, closed loop, maintainer gates |
78
| [ARCHITECTURE.md](ARCHITECTURE.md) | System layers and design intent |
89
| [ENGINEERING_STATUS.md](ENGINEERING_STATUS.md) | What ships in-tree vs vendor-only |
910
| [ROADMAP.md](ROADMAP.md) | External deps, closed milestones, open backlog |

docs/REFERENCE_AUTHORITY.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Reference authority
2+
3+
ConicShield is maintained as a **governed reference system** for one primary benchmark family (`conicshield-transition-bank-v1`). This page is the single map of what “reference authority” means in practice.
4+
5+
## Flagship release
6+
7+
| Item | Value |
8+
|------|--------|
9+
| Family | `conicshield-transition-bank-v1` |
10+
| `current_run_id` | **`host-realistic-20260525`** |
11+
| Evidence tier | `vendor_native` (`RUN_PROVENANCE.json`) |
12+
| Export | [`benchmarks/external_evidence/offline_graph_export_upstream.json`](../benchmarks/external_evidence/offline_graph_export_upstream.json) |
13+
| Integrity | [`benchmarks/PUBLISHED_RUN_INDEX.json`](../benchmarks/PUBLISHED_RUN_INDEX.json) (schema v2) |
14+
15+
Historical bundles (`wsl-real-*`, `wsl-native-*`) remain in `benchmark_bundle_paths` for comparison.
16+
17+
## Closed loop (in-repo)
18+
19+
```text
20+
export → transition_bank → reference_run → published_runs/<run_id>/ → parity → finalize → release
21+
```
22+
23+
Orchestration: [`scripts/run_host_realistic_publish.py`](../scripts/run_host_realistic_publish.py), [`scripts/upgrade_host_realistic_vendor.py`](../scripts/upgrade_host_realistic_vendor.py).
24+
25+
## Maintainer gates
26+
27+
| Gate | Command |
28+
|------|---------|
29+
| Reference authority (index + audit + flagship) | `make reference-authority-check` or `python scripts/reference_authority_check.py` |
30+
| Public verification bundle | `make verify-reference-system` |
31+
| Strict governance audit | `python -m conicshield.governance.audit_cli --strict` |
32+
33+
## Solver evidence (three paths)
34+
35+
See [`SOLVER_PATHS_AND_BATCHING.md`](SOLVER_PATHS_AND_BATCHING.md): reference CVXPY, sequential native (`batch_size=1`), true compiled batch (`NATIVE_MOREAU_BATCH`).
36+
37+
## Merge trust (binding)
38+
39+
Solver-touching PRs require documented vendor proof (`vendor-ci-moreau` or maintainer attestation). See [`CI_MERGE_GATES.md`](CI_MERGE_GATES.md), [`BRANCH_PROTECTION.md`](BRANCH_PROTECTION.md).
40+
41+
## Optional refresh
42+
43+
| When | Action |
44+
|------|--------|
45+
| Live inter-sim dump available | `python scripts/refresh_live_upstream_export.py --graph-json <dump.json>` then `make upgrade-host-realistic-vendor` |
46+
| Governance only | `python scripts/upgrade_host_realistic_vendor.py --refresh-governance` |
47+
48+
## Explicitly deferred
49+
50+
- Production shield autograd product claims (FD validation only)
51+
- Second benchmark family until published
52+
- `progress` / `clearance` constraint semantics
53+
54+
See [`ROADMAP.md`](ROADMAP.md) open backlog.

0 commit comments

Comments
 (0)