Skip to content

Commit 12dd181

Browse files
committed
Add reference system status and branch protection audit
1 parent a003f9c commit 12dd181

18 files changed

Lines changed: 515 additions & 5 deletions

.github/pull_request_template.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,11 @@ If this PR touches `conicshield/core/moreau*`, `conicshield/parity/`, `benchmark
1414
- [ ] **Required (Policy B — repository law):** vendor attestation — green [`vendor-ci-moreau`](https://github.com/fraware/conicshield/actions/workflows/solver-ci.yml) run URL, `workflow_dispatch` link, or `make test-vendor-moreau` log excerpt. **Merge blocked without this.**
1515
- [ ] Reviewer checklist completed: [`docs/REVIEWER_MERGE_CHECKLIST.md`](docs/REVIEWER_MERGE_CHECKLIST.md)
1616
- [ ] If published bundles changed: `python scripts/refresh_published_run_index.py` was run and committed
17+
18+
## Host-realistic refresh triggers
19+
20+
If this PR changes `third_party/inter-sim-rl/REVISION`, export scripts, transition-bank generation, or release/governance logic:
21+
22+
- [ ] [`HOST_REALISTIC_CADENCE_POLICY.md`](docs/HOST_REALISTIC_CADENCE_POLICY.md) immediate refresh completed or scheduled
23+
- [ ] `EXPORT_PROVENANCE.json` / [`REFERENCE_AUTHORITY_LOG.md`](docs/REFERENCE_AUTHORITY_LOG.md) updated
24+
- [ ] `python scripts/generate_reference_system_status.py` committed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: branch-protection-audit
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 9 * * 1"
7+
8+
permissions:
9+
administration: read
10+
contents: read
11+
12+
jobs:
13+
audit:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Compare main protection to expected spec
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
run: |
21+
python scripts/verify_expected_branch_protection.py
22+
python scripts/audit_branch_protection_api.py --warn-only
23+
- name: Record audit note
24+
run: |
25+
echo "Attach Settings screenshot to docs/BRANCH_PROTECTION_RECORD.md when protection changes."

.github/workflows/host-realistic-refresh-cadence.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ jobs:
4949
--notes "Scheduled CI: capture + upstream export; licensed host must run host-realistic-refresh-cycle for bundle publish"
5050
- name: Cadence staleness check
5151
run: python scripts/check_reference_refresh_cadence.py --max-days 35
52+
- name: Inter-sim REVISION vs provenance
53+
run: python scripts/check_inter_sim_revision_cadence.py
54+
continue-on-error: true
5255
- name: Reminder — full cycle on licensed host
5356
run: |
54-
echo "Next: make host-realistic-refresh-cycle --record-refresh --trigger calendar-cadence on licensed WSL"
57+
echo "Next: make host-realistic-refresh-cycle-licensed"
5558
echo "See docs/HOST_REALISTIC_CADENCE_POLICY.md"

.github/workflows/reference-authority.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ jobs:
3232
run: python scripts/check_reference_refresh_cadence.py --max-days 35
3333
- name: Flagship refresh trigger paths
3434
run: python scripts/check_flagship_refresh_triggers.py --base-ref ${{ github.event.pull_request.base.sha || github.event.before || 'origin/main' }}
35+
- name: Reference system status artifact
36+
run: |
37+
python scripts/generate_reference_system_status.py
38+
python scripts/generate_reference_system_status.py --check
3539
- name: verify-reference-system
3640
run: make verify-reference-system
3741
- name: Published bundle file profile (all tiers)

.github/workflows/solver-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ name: vendor-ci-moreau
88

99
on:
1010
workflow_dispatch:
11+
schedule:
12+
- cron: "0 8 2 * *"
1113
pull_request:
1214
paths:
1315
- "conicshield/core/moreau*.py"

Makefile

Lines changed: 9 additions & 2 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 check-batch-acceptance check-batch-throughput-advisory validate-published-bundle-profile sync-community-metadata check-reference-refresh-cadence verify-branch-protection-expectations verify-reference-system reference-authority-check reference-authority-snapshot capture-inter-sim-graph refresh-live-upstream-export refresh-live-upstream-export-live host-realistic-refresh-cycle host-realistic-refresh-cycle-licensed host-realistic-refresh-milestone sync-published-readmes
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 check-batch-acceptance check-batch-throughput-advisory validate-published-bundle-profile sync-community-metadata check-reference-refresh-cadence verify-branch-protection-expectations verify-reference-system reference-authority-check reference-authority-snapshot reference-system-status reference-system-status-check capture-inter-sim-graph refresh-live-upstream-export refresh-live-upstream-export-live host-realistic-refresh-cycle host-realistic-refresh-cycle-licensed host-realistic-refresh-milestone sync-published-readmes
2727

2828
test:
2929
$(PYTHON) -m pytest -q
@@ -98,6 +98,12 @@ upgrade-host-realistic-vendor:
9898
reference-authority-check:
9999
$(PYTHON) scripts/reference_authority_check.py
100100

101+
reference-system-status:
102+
$(PYTHON) scripts/generate_reference_system_status.py
103+
104+
reference-system-status-check:
105+
$(PYTHON) scripts/generate_reference_system_status.py --check
106+
101107
reference-authority-snapshot:
102108
$(PYTHON) scripts/generate_reference_authority_snapshot.py
103109

@@ -123,7 +129,7 @@ sync-community-metadata:
123129
check-reference-refresh-cadence:
124130
$(PYTHON) scripts/check_reference_refresh_cadence.py --max-days 35
125131

126-
verify-reference-system: reference-authority-check validate-published-bundle-profile sync-community-metadata
132+
verify-reference-system: reference-authority-check reference-system-status-check validate-published-bundle-profile sync-community-metadata
127133
$(PYTHON) -m pytest \
128134
tests/governance/test_published_run_index.py \
129135
tests/governance/test_host_realistic_publish_evidence.py \
@@ -138,6 +144,7 @@ verify-reference-system: reference-authority-check validate-published-bundle-pro
138144
tests/governance/test_community_metadata.py \
139145
tests/governance/test_reference_refresh_cadence.py \
140146
tests/governance/test_record_reference_refresh.py \
147+
tests/governance/test_reference_system_status.py \
141148
tests/governance/test_run_host_realistic_publish.py \
142149
tests/governance/test_host_realistic_refresh_cycle.py \
143150
tests/governance/test_batch_solve_report.py \

benchmarks/external_evidence/EXPORT_PROVENANCE.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,6 @@
4343
"notes": "host-realistic-refresh-cycle host-realistic-20260525"
4444
}
4545
],
46-
"last_flagship_refresh_at_utc": "2026-05-28T17:00:56Z"
46+
"last_flagship_refresh_at_utc": "2026-05-28T17:00:56Z",
47+
"inter_sim_revision_sha": "f1f04ee11d064262f5ee2810abfcb01715260182"
4748
}

benchmarks/reports/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Optional JSON reports that illustrate public benchmark evidence shapes. They are
55
| File | Purpose |
66
|------|---------|
77
| [`reference_authority_snapshot.json`](reference_authority_snapshot.json) | Committed flagship release alignment (`current_run_id`, gates, provenance); CI `--check` via `reference_authority_check` |
8+
| [`reference_system_status.json`](reference_system_status.json) | Auditor summary: cadence, batch_story, refresh counts, claim boundaries |
89
| [`batch_solve_report.example.json`](batch_solve_report.example.json) | v2 schema: comparisons + `batch_story` (`viability_only` / `throughput_win`) |
910

1011
Regenerate snapshot after release or flagship bundle changes:
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"schema_version": "conicshield_reference_system_status/v1",
3+
"generated_at_utc": "2026-05-28T17:05:22Z",
4+
"flagship_run_id": "host-realistic-20260525",
5+
"family_id": "conicshield-transition-bank-v1",
6+
"reference_authority_aligned": true,
7+
"export_kind": "live_upstream_dump",
8+
"graph_shape": "host_realistic_fork",
9+
"last_flagship_refresh_at_utc": "2026-05-28T17:00:56Z",
10+
"refresh_count": 4,
11+
"full_cycle_refresh_count": 1,
12+
"cadence_age_days": 0.003079939814814815,
13+
"cadence_policy_ok": true,
14+
"batch_story": "throughput_win",
15+
"inter_sim_revision": "f1f04ee11d064262f5ee2810abfcb01715260182",
16+
"expected_required_checks": [
17+
"quality",
18+
"conic-trusted-shape",
19+
"governance-audit",
20+
"reference-authority",
21+
"solver-touch"
22+
],
23+
"public_claims": {
24+
"batch": "true batch path exists; viability-governed; not universal speedup",
25+
"differentiation": "validation only; not public autograd product",
26+
"host_realistic_graph": "fork via inter-sim RLEnvironment; not Maps/session navigation"
27+
},
28+
"docs": [
29+
"docs/REFERENCE_SYSTEM.md",
30+
"docs/REFERENCE_AUTHORITY.md",
31+
"docs/HOST_REALISTIC_CADENCE_POLICY.md",
32+
"docs/PUBLISHED_RUN_INDEX_FOR_CONSUMERS.md"
33+
]
34+
}

docs/BRANCH_PROTECTION_RECORD.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ make verify-branch-protection-expectations
3838
```bash
3939
python scripts/print_branch_protection_gh_recipe.py # gh api PUT recipe
4040
make verify-branch-protection-expectations # compare after gh auth login
41+
python scripts/audit_branch_protection_api.py # GITHUB_TOKEN / gh with admin read
4142
```
4243

44+
Weekly GitHub Action: [`.github/workflows/branch-protection-audit.yml`](../.github/workflows/branch-protection-audit.yml) (`workflow_dispatch` + Mondays 09:00 UTC).
45+
4346
### Screenshot / export (attach in PR or paste link)
4447

4548
<!-- Required: quality, conic-trusted-shape, governance-audit, reference-authority, solver-touch -->

0 commit comments

Comments
 (0)