Skip to content

Commit 81a9c70

Browse files
Add validator_version metadata to JSON validation output
1 parent 4c7a1a3 commit 81a9c70

12 files changed

Lines changed: 1010 additions & 61 deletions
Lines changed: 50 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,36 @@
1-
name: governance-artifacts-ci
1+
name: Governance Artifacts CI
22

33
on:
4-
push:
4+
pull_request:
55
paths:
66
- 'docs/schemas/**'
77
- 'docs/reports/ENTERPRISE_CIVILIZATIONAL_AGI_ASI_BLUEPRINT_2026_2030.md'
8+
- 'G_STACK_GOVERNANCE_BLUEPRINT_2026_2030.md'
9+
- 'docs/reports/G_STACK_GOVERNANCE_BLUEPRINT_2026_2030.md'
10+
- 'gstack_artifacts/**'
11+
- 'tests/test_validate_artifacts.py'
12+
- 'tests/__init__.py'
813
- '.github/workflows/governance-artifacts-ci.yml'
914
- 'Makefile'
1015
- '.yamllint'
11-
pull_request:
16+
push:
17+
branches: [ main, master ]
1218
paths:
1319
- 'docs/schemas/**'
1420
- 'docs/reports/ENTERPRISE_CIVILIZATIONAL_AGI_ASI_BLUEPRINT_2026_2030.md'
21+
- 'G_STACK_GOVERNANCE_BLUEPRINT_2026_2030.md'
22+
- 'docs/reports/G_STACK_GOVERNANCE_BLUEPRINT_2026_2030.md'
23+
- 'gstack_artifacts/**'
24+
- 'tests/test_validate_artifacts.py'
25+
- 'tests/__init__.py'
1526
- '.github/workflows/governance-artifacts-ci.yml'
1627
- 'Makefile'
1728
- '.yamllint'
18-
name: Governance Artifacts CI
19-
20-
on:
21-
pull_request:
22-
paths:
23-
- 'ENTERPRISE_AGI_ASI_GOVERNANCE_BLUEPRINT_2026_2030.md'
24-
- 'governance_blueprint/**'
25-
- '.github/workflows/governance-artifacts-ci.yml'
26-
push:
27-
branches: [ main, master ]
28-
paths:
29-
- 'ENTERPRISE_AGI_ASI_GOVERNANCE_BLUEPRINT_2026_2030.md'
30-
- 'governance_blueprint/**'
31-
- '.github/workflows/governance-artifacts-ci.yml'
3229

3330
jobs:
34-
validate-governance-artifacts:
31+
validate-existing-governance-stack:
3532
runs-on: ubuntu-latest
36-
permissions:
37-
contents: read
38-
env:
39-
PYTHONUNBUFFERED: '1'
40-
timeout-minutes: 10
41-
33+
timeout-minutes: 12
4234
steps:
4335
- name: Checkout
4436
uses: actions/checkout@v4
@@ -50,15 +42,15 @@ jobs:
5042
cache: 'pip'
5143
cache-dependency-path: docs/schemas/requirements-governance.txt
5244

53-
- name: Install Python deps (pinned)
45+
- name: Install governance schema dependencies
5446
run: |
5547
python -m pip install --upgrade pip
5648
pip install -r docs/schemas/requirements-governance.txt
5749
5850
- name: Validate governance YAML/JSON artifacts
5951
run: make governance-validate
6052

61-
- name: Setup OPA (pinned)
53+
- name: Setup OPA
6254
uses: open-policy-agent/setup-opa@v2
6355
with:
6456
version: v1.15.2
@@ -69,42 +61,44 @@ jobs:
6961
- name: Validator and evidence bundle unit tests
7062
run: make governance-validator-test
7163

72-
- name: Build evidence manifest
73-
run: make governance-evidence-manifest
74-
75-
- name: Verify evidence manifest integrity
76-
run: make governance-evidence-verify
77-
78-
- name: Validate evidence manifest schema
79-
run: make governance-evidence-schema
80-
81-
- name: Generate machine-readable validation report
82-
run: make governance-report
83-
84-
- name: Validate run report schema
85-
run: make governance-report-schema
64+
- name: Build and verify evidence artifacts
65+
run: |
66+
make governance-evidence-manifest
67+
make governance-evidence-verify
68+
make governance-evidence-schema
69+
make governance-report
70+
make governance-report-schema
71+
make governance-check-generated
72+
73+
validate-gstack-artifacts:
74+
runs-on: ubuntu-latest
75+
timeout-minutes: 8
76+
steps:
77+
- name: Checkout
78+
uses: actions/checkout@v4
8679

87-
- name: Check generated artifacts are up to date
88-
run: make governance-check-generated
8980
- name: Setup Python
9081
uses: actions/setup-python@v5
9182
with:
92-
python-version: '3.11'
83+
python-version: '3.12'
84+
cache: 'pip'
85+
cache-dependency-path: requirements-dev.txt
9386

94-
- name: Run governance validation suite
95-
run: python3 governance_blueprint/validation/run_validation_suite.py --quiet --json-report governance-artifact-validation-report.json --suite-report governance-validation-suite-report.json
87+
- name: Run G-Stack CI composite target
88+
run: make gstack-ci
9689

97-
- name: Show validation report
98-
run: |
99-
cat governance-artifact-validation-report.json
100-
cat governance-validation-suite-report.json
90+
- name: Upload G-Stack test artifacts
91+
if: always()
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: gstack-test-results
95+
path: artifacts/test-results
96+
if-no-files-found: ignore
10197

102-
- name: Upload validation report
98+
- name: Upload G-Stack validation report
99+
if: always()
103100
uses: actions/upload-artifact@v4
104101
with:
105-
name: governance-validation-report
106-
path: docs/schemas/validation_run_report.json
107-
name: governance-validation-reports
108-
path: |
109-
governance-artifact-validation-report.json
110-
governance-validation-suite-report.json
102+
name: gstack-validation-report
103+
path: artifacts/validation/gstack-validation.json
104+
if-no-files-found: warn
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# G-Stack Civilizational Assurance Blueprint (2026–2030)
2+
3+
This document has been relocated to:
4+
5+
- `docs/reports/G_STACK_GOVERNANCE_BLUEPRINT_2026_2030.md`
6+
7+
Please update references and automation to use the canonical path above.

Makefile

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,22 @@ lint-gsifi-governance:
4949
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
5050

5151
check-gsifi-governance: validate-gsifi-governance validate-gsifi-governance-module test-gsifi-governance lint-gsifi-governance
52-
.PHONY: governance-test governance-validate governance-validate-json governance-validate-json-check governance-check
52+
.PHONY: governance-test governance-reports-validate governance-reports-validate-json governance-reports-validate-json-check governance-check
5353

5454
governance-test:
5555
python3 -m unittest discover tool_tests
5656

57-
governance-validate:
57+
governance-reports-validate:
5858
python3 tools/validate_governance_reports.py
5959

60-
governance-validate-json:
60+
governance-reports-validate-json:
6161
python3 tools/validate_governance_reports.py --json
6262

63-
governance-validate-json-check:
63+
governance-reports-validate-json-check:
6464
python3 tools/validate_governance_reports.py --json > /tmp/governance_validation.json
6565
python3 -c 'import json; p=json.load(open("/tmp/governance_validation.json", "r", encoding="utf-8")); assert p.get("status")=="passed", f"Validator JSON status not passed: {p}"; print("Validator JSON status is passed.")'
6666

67-
governance-check: governance-test governance-validate governance-validate-json-check
67+
governance-check: governance-test governance-reports-validate governance-reports-validate-json-check
6868
.PHONY: governance-setup governance-deps-check governance-lint governance-validate governance-artifact-inventory governance-policy-test governance-validator-test governance-evidence-manifest governance-evidence-verify governance-evidence-schema governance-report governance-report-schema governance-check-generated
6969

7070
governance-setup:
@@ -160,3 +160,37 @@ gov-suite-ci:
160160

161161
gov-clean:
162162
$(PYTHON) -c "from pathlib import Path; import shutil; report=Path('governance-artifact-validation-report.json'); suite=Path('governance-validation-suite-report.json'); report.exists() and report.unlink(); suite.exists() and suite.unlink(); [shutil.rmtree(p) for p in Path('governance_blueprint/validation').rglob('__pycache__') if p.is_dir()]"
163+
164+
.PHONY: gstack-setup gstack-validate gstack-validate-strict gstack-validate-json gstack-validate-json-check gstack-test gstack-check gstack-ci gstack-clean
165+
166+
gstack-setup:
167+
python3 -m pip install --upgrade pip
168+
python3 -m pip install -r requirements-dev.txt
169+
170+
gstack-validate:
171+
python3 gstack_artifacts/validate_artifacts.py --root gstack_artifacts
172+
173+
gstack-validate-strict:
174+
python3 gstack_artifacts/validate_artifacts.py --root gstack_artifacts --strict-schema
175+
176+
gstack-validate-json:
177+
mkdir -p artifacts/validation
178+
python3 gstack_artifacts/validate_artifacts.py --root gstack_artifacts --json --report-path artifacts/validation/gstack-validation.json
179+
180+
gstack-validate-json-check: gstack-validate-json
181+
python3 -c "import json; p=json.load(open('artifacts/validation/gstack-validation.json')); assert p.get('status')=='passed', p; print('gstack-validation.json status=passed')"
182+
183+
gstack-test:
184+
PYTHONPATH=. python3 -m unittest tests.test_validate_artifacts
185+
186+
gstack-check: gstack-test gstack-validate gstack-validate-json-check
187+
188+
gstack-test-ci:
189+
mkdir -p artifacts/test-results
190+
bash -lc "set -o pipefail; PYTHONPATH=. python3 -m unittest tests.test_validate_artifacts | tee artifacts/test-results/gstack-unittest.log"
191+
192+
gstack-ci: gstack-setup gstack-test-ci gstack-validate-strict gstack-validate-json-check
193+
194+
195+
gstack-clean:
196+
rm -f artifacts/validation/gstack-validation.json artifacts/test-results/gstack-unittest.log

0 commit comments

Comments
 (0)