Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/gsifi-governance-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: GSIFI Governance Artifacts CI

on:
workflow_dispatch:

push:
paths: &governance_paths
- 'docs/schemas/gien-governance-event.schema.json'
- 'docs/examples/gien_governance_event_sample.json'
- 'docs/examples/sr_dsl_fairness_regression_v1.txt'
- 'docs/policies/sentinel-tiered-autonomy.rego'
- 'docs/reports/GSIFI_AGI_ASI_GOVERNANCE_BLUEPRINT_2026_2030.md'
- 'docs/reports/GSIFI_GOVERNANCE_ARTIFACTS_RUNBOOK.md'
- 'docs/reports/.markdownlint.json'
- 'scripts/validate_gsifi_governance_assets.py'
- 'scripts/__init__.py'
- 'tests/**/*.py'
- 'pyproject.toml'
- 'setup.py'
- '.github/workflows/gsifi-governance-artifacts.yml'
- 'Makefile'
pull_request:
paths: *governance_paths

permissions:
contents: read

concurrency:
group: gsifi-governance-artifacts-${{ github.ref }}
cancel-in-progress: true

jobs:
validate-governance-artifacts:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install Python test dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[governance] pytest
Comment thread
OneFineStarstuff marked this conversation as resolved.

- name: Verify installed console entrypoint
run: validate-gsifi-governance-assets --help

- name: Run installed console entrypoint against default artifacts
run: validate-gsifi-governance-assets

- name: Run governance check suite
run: make check-gsifi-governance
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.DEFAULT_GOAL := check-gsifi-governance

.PHONY: validate-gsifi-governance validate-gsifi-governance-module test-gsifi-governance lint-gsifi-governance check-gsifi-governance

validate-gsifi-governance:
python scripts/validate_gsifi_governance_assets.py

validate-gsifi-governance-module:
python -m scripts.validate_gsifi_governance_assets

test-gsifi-governance:
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
pytest -q tests

lint-gsifi-governance:
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

check-gsifi-governance: validate-gsifi-governance validate-gsifi-governance-module test-gsifi-governance lint-gsifi-governance
16 changes: 16 additions & 0 deletions docs/examples/gien_governance_event_sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"crs_uuid": "CRS-UUID-2026-04-24-000001",
"event_type": "ai.decision",
"timestamp_utc": "2026-04-24T12:00:00Z",
"institution_id": "BANK_GSIFI_001",
"jurisdiction_code": "EU",
"risk_tier": "TIER_2",
"model_id": "credit-risk-llm",
"model_version": "2.4.7",
"prompt_hash": "sha256:abc123",
"context_hash": "sha256:def456",
"policy_bundle_digest": "sha256:ghi789",
"decision_outcome": "approve_with_conditions",
"human_override_flag": false,
"signature": "sig:pqc-hybrid:xyz"
}
6 changes: 6 additions & 0 deletions docs/examples/sr_dsl_fairness_regression_v1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
TEST fairness_regression_credit_v1
SCOPE jurisdiction=UK product=retail_credit
ASSERT disparity_ratio <= 1.25
ASSERT adverse_action_explanation_coverage >= 0.99
ASSERT evidence_completeness == 1.0
ON_FAIL severity=high remediation_window_days=14
28 changes: 28 additions & 0 deletions docs/policies/sentinel-tiered-autonomy.rego
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package sentinel.governance

default allow = false

allow if {
input.risk_tier != "TIER_3"
input.policy_checks.passed
not input.sanctions_block
}

allow if {
input.risk_tier == "TIER_3"
input.policy_checks.passed
input.dual_authorization
input.human_override_available
not input.sanctions_block
}

violation[msg] if {
input.risk_tier == "TIER_3"
not input.dual_authorization
msg := "tier_3_requires_dual_authorization"
}

violation[msg] if {
not input.human_override_available
msg := "human_override_must_be_available"
}
7 changes: 7 additions & 0 deletions docs/reports/.markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"default": true,
"MD013": false,
"MD022": false,
"MD032": false,
"MD060": false
}
Loading
Loading