-
Notifications
You must be signed in to change notification settings - Fork 0
Add GSIFI governance artifacts, validator CLI, tests, Makefile and CI workflow #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
OneFineStarstuff
merged 4 commits into
main
from
codex/develop-comprehensive-agi-governance-blueprint
Apr 27, 2026
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
6e20b5b
Add quiet mode for governance validator success output
OneFineStarstuff 83023c1
Merge branch 'main' into codex/develop-comprehensive-agi-governance-b…
gstraccini[bot] 5fcebc1
Merge branch 'main' into codex/develop-comprehensive-agi-governance-b…
OneFineStarstuff cc48933
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
||
| - 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "default": true, | ||
| "MD013": false, | ||
| "MD022": false, | ||
| "MD032": false, | ||
| "MD060": false | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.