Skip to content

Commit 2c3c00a

Browse files
Merge pull request #67 from OneFineStarstuff/codex/develop-comprehensive-agi-governance-blueprint
Add GSIFI governance artifacts, validator CLI, tests, Makefile and CI workflow
2 parents 917dde1 + cc48933 commit 2c3c00a

16 files changed

Lines changed: 1435 additions & 0 deletions
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: GSIFI Governance Artifacts CI
2+
3+
on:
4+
workflow_dispatch:
5+
6+
push:
7+
paths: &governance_paths
8+
- 'docs/schemas/gien-governance-event.schema.json'
9+
- 'docs/examples/gien_governance_event_sample.json'
10+
- 'docs/examples/sr_dsl_fairness_regression_v1.txt'
11+
- 'docs/policies/sentinel-tiered-autonomy.rego'
12+
- 'docs/reports/GSIFI_AGI_ASI_GOVERNANCE_BLUEPRINT_2026_2030.md'
13+
- 'docs/reports/GSIFI_GOVERNANCE_ARTIFACTS_RUNBOOK.md'
14+
- 'docs/reports/.markdownlint.json'
15+
- 'scripts/validate_gsifi_governance_assets.py'
16+
- 'scripts/__init__.py'
17+
- 'tests/**/*.py'
18+
- 'pyproject.toml'
19+
- 'setup.py'
20+
- '.github/workflows/gsifi-governance-artifacts.yml'
21+
- 'Makefile'
22+
pull_request:
23+
paths: *governance_paths
24+
25+
permissions:
26+
contents: read
27+
28+
concurrency:
29+
group: gsifi-governance-artifacts-${{ github.ref }}
30+
cancel-in-progress: true
31+
32+
jobs:
33+
validate-governance-artifacts:
34+
runs-on: ubuntu-latest
35+
timeout-minutes: 10
36+
37+
steps:
38+
- name: Checkout repository
39+
uses: actions/checkout@v4
40+
41+
- name: Setup Python
42+
uses: actions/setup-python@v5
43+
with:
44+
python-version: '3.11'
45+
46+
- name: Setup Node.js
47+
uses: actions/setup-node@v4
48+
with:
49+
node-version: '20'
50+
51+
- name: Install Python test dependencies
52+
run: |
53+
python -m pip install --upgrade pip
54+
pip install -e .[governance] pytest
55+
56+
- name: Verify installed console entrypoint
57+
run: validate-gsifi-governance-assets --help
58+
59+
- name: Run installed console entrypoint against default artifacts
60+
run: validate-gsifi-governance-assets
61+
62+
- name: Run governance check suite
63+
run: make check-gsifi-governance

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
.DEFAULT_GOAL := check-gsifi-governance
2+
3+
.PHONY: validate-gsifi-governance validate-gsifi-governance-module test-gsifi-governance lint-gsifi-governance check-gsifi-governance
4+
5+
validate-gsifi-governance:
6+
python scripts/validate_gsifi_governance_assets.py
7+
8+
validate-gsifi-governance-module:
9+
python -m scripts.validate_gsifi_governance_assets
10+
11+
test-gsifi-governance:
12+
python -m py_compile scripts/validate_gsifi_governance_assets.py tests/conftest.py tests/test_validate_gsifi_governance_assets.py tests/test_validate_gsifi_governance_cli.py
13+
pytest -q tests
14+
15+
lint-gsifi-governance:
16+
npx --yes markdownlint-cli@0.39.0 --config docs/reports/.markdownlint.json docs/reports/GSIFI_AGI_ASI_GOVERNANCE_BLUEPRINT_2026_2030.md docs/reports/GSIFI_GOVERNANCE_ARTIFACTS_RUNBOOK.md
17+
18+
check-gsifi-governance: validate-gsifi-governance validate-gsifi-governance-module test-gsifi-governance lint-gsifi-governance
119
.PHONY: governance-test governance-validate governance-validate-json governance-validate-json-check governance-check
220

321
governance-test:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"crs_uuid": "CRS-UUID-2026-04-24-000001",
3+
"event_type": "ai.decision",
4+
"timestamp_utc": "2026-04-24T12:00:00Z",
5+
"institution_id": "BANK_GSIFI_001",
6+
"jurisdiction_code": "EU",
7+
"risk_tier": "TIER_2",
8+
"model_id": "credit-risk-llm",
9+
"model_version": "2.4.7",
10+
"prompt_hash": "sha256:abc123",
11+
"context_hash": "sha256:def456",
12+
"policy_bundle_digest": "sha256:ghi789",
13+
"decision_outcome": "approve_with_conditions",
14+
"human_override_flag": false,
15+
"signature": "sig:pqc-hybrid:xyz"
16+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
TEST fairness_regression_credit_v1
2+
SCOPE jurisdiction=UK product=retail_credit
3+
ASSERT disparity_ratio <= 1.25
4+
ASSERT adverse_action_explanation_coverage >= 0.99
5+
ASSERT evidence_completeness == 1.0
6+
ON_FAIL severity=high remediation_window_days=14
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package sentinel.governance
2+
3+
default allow = false
4+
5+
allow if {
6+
input.risk_tier != "TIER_3"
7+
input.policy_checks.passed
8+
not input.sanctions_block
9+
}
10+
11+
allow if {
12+
input.risk_tier == "TIER_3"
13+
input.policy_checks.passed
14+
input.dual_authorization
15+
input.human_override_available
16+
not input.sanctions_block
17+
}
18+
19+
violation[msg] if {
20+
input.risk_tier == "TIER_3"
21+
not input.dual_authorization
22+
msg := "tier_3_requires_dual_authorization"
23+
}
24+
25+
violation[msg] if {
26+
not input.human_override_available
27+
msg := "human_override_must_be_available"
28+
}

docs/reports/.markdownlint.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"default": true,
3+
"MD013": false,
4+
"MD022": false,
5+
"MD032": false,
6+
"MD060": false
7+
}

0 commit comments

Comments
 (0)