Skip to content

Commit 38dcf16

Browse files
tbitcsoz-agent
andcommitted
ci: enable full Zephyr Twister job, execute benchmarks, apply specsmith migrations
- Enable Zephyr CI job (was commented out): west init/update with narrow shallow clone, native_sim platform, west workspace cached by west.yml hash - Flip benchmarks from build_only to execute; harness_config regex gates pass/fail on final log line so timing numbers are captured as artifacts - Apply specsmith migrations v001-v006: governance YAMLs, compliance scaffold, ESDB WAL migration, agent-tools.json, session protocol - Gitignore .chronomemory/ and .specsmith/*.bak (machine-local state) Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent c86e7d4 commit 38dcf16

17 files changed

Lines changed: 437 additions & 66 deletions

File tree

.github/workflows/ci.yml

Lines changed: 84 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,87 @@ jobs:
5555
done
5656
exit $missing
5757
58-
# Zephyr/Twister tests require a full Zephyr SDK setup.
59-
# Uncomment when CI has west + Zephyr SDK available.
60-
# zephyr:
61-
# name: Zephyr Twister Tests
62-
# runs-on: ubuntu-latest
63-
# steps:
64-
# - uses: actions/checkout@v4
65-
# - name: Install west
66-
# run: pip install west
67-
# - name: Init workspace
68-
# run: west init -l .
69-
# - name: Update
70-
# run: west update
71-
# - name: Twister tests
72-
# run: west twister -T tests
73-
# - name: Twister samples
74-
# run: west twister -T samples
58+
zephyr:
59+
name: Zephyr Twister Tests
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
with:
64+
# west.yml declares self.path: app — match it so west module
65+
# resolution works correctly alongside modules/lib/arbiter/
66+
path: app
67+
68+
- uses: actions/setup-python@v5
69+
with:
70+
python-version: "3.11"
71+
72+
- name: Install west
73+
run: pip install west
74+
75+
# Cache the Zephyr tree and west state keyed on west.yml.
76+
# All three paths are saved/restored together so a partial
77+
# hit cannot leave the workspace in an inconsistent state.
78+
- name: Cache west workspace
79+
id: cache-west
80+
uses: actions/cache@v4
81+
with:
82+
path: |
83+
zephyr
84+
modules
85+
.west
86+
key: west-${{ hashFiles('app/west.yml') }}
87+
restore-keys: west-
88+
89+
# Only run init+update on a cache miss; .west/config is
90+
# restored from cache and is sufficient for subsequent steps.
91+
- name: West init
92+
if: steps.cache-west.outputs.cache-hit != 'true'
93+
run: west init -l app
94+
95+
# --narrow: only fetch projects in our top-level manifest
96+
# (zephyr + arbiter), skipping Zephyr's full HAL set.
97+
# -o=--depth=1: shallow clone to keep the runner fast.
98+
# native_sim needs only the Zephyr core tree, no HALs.
99+
- name: West update
100+
if: steps.cache-west.outputs.cache-hit != 'true'
101+
run: west update --narrow -o=--depth=1
102+
103+
- name: Install Zephyr Python requirements
104+
run: |
105+
pip install -r zephyr/scripts/requirements-base.txt
106+
pip install -r zephyr/scripts/requirements-build-test.txt
107+
108+
# Unit tests run as native executables on native_sim.
109+
- name: Twister — unit tests
110+
run: |
111+
west twister \
112+
-T app/tests/unit \
113+
-p native_sim \
114+
--inline-logs -v \
115+
--output-dir twister-out/unit
116+
117+
# Benchmarks execute on native_sim; Twister captures timing output
118+
# as an artifact. pass/fail is gated on the final log line regex.
119+
- name: Twister — benchmarks
120+
run: |
121+
west twister \
122+
-T app/tests/benchmarks \
123+
-p native_sim \
124+
--inline-logs -v \
125+
--output-dir twister-out/benchmarks
126+
127+
# All 17 samples are build_only; CI proves they compile clean.
128+
- name: Twister — samples
129+
run: |
130+
west twister \
131+
-T app/samples \
132+
-p native_sim \
133+
--inline-logs -v \
134+
--output-dir twister-out/samples
135+
136+
- name: Upload Twister results
137+
if: always()
138+
uses: actions/upload-artifact@v4
139+
with:
140+
name: twister-results
141+
path: twister-out/

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,7 @@ Thumbs.db
4141
htmlcov/
4242
.coverage
4343
coverage.xml
44+
45+
# specsmith machine-local state
46+
.chronomemory/
47+
.specsmith/*.bak

.specsmith/agent-tools.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"schema_version": 1,
3+
"primary_governance_command": "specsmith_run",
4+
"slash_prefix": "/specsmith",
5+
"verb_shortcuts": [
6+
"audit",
7+
"commit",
8+
"doctor",
9+
"load",
10+
"pull",
11+
"push",
12+
"run",
13+
"save",
14+
"status",
15+
"sync",
16+
"validate",
17+
"watch"
18+
],
19+
"description": "Use specsmith_run() or /specsmith <args> in the Nexus REPL for all governance operations (save, load, push, pull, audit, status, \u2026). REQ-SM-001: agents must not invoke the specsmith binary directly via run_shell when specsmith_run is available."
20+
}

.specsmith/compliance/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# .specsmith/compliance/
2+
3+
Project-specific compliance overlays for AI regulation.
4+
5+
## Structure
6+
7+
Each file overrides the built-in regulation status for this project:
8+
eu-ai-act.yaml — EU AI Act (Regulation 2024/1689)
9+
nist-rmf.yaml — NIST AI RMF 1.0 + AI 600-1
10+
omb-m-24-10.yaml — OMB M-24-10
11+
colorado-sb24-205.yaml — Colorado AI Act (effective Feb 2026)
12+
texas-hb1709.yaml — Texas AI Transparency Act
13+
etc.
14+
15+
## Usage
16+
17+
# Check compliance for all regulations
18+
specsmith compliance check
19+
20+
# Generate compliance report
21+
specsmith compliance report --format html --output compliance-report.html
22+
23+
# Store results to ESDB audit trail
24+
specsmith compliance audit
25+
26+
See: https://specsmith.readthedocs.io/en/stable/compliance/
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# EU AI Act (Regulation 2024/1689) — project overlay
2+
#
3+
# This file allows overriding compliance status for this specific project.
4+
# Leave fields empty to use specsmith's auto-detection.
5+
#
6+
# regulation_id: eu-ai-act
7+
# project notes:
8+
9+
risk_tier: minimal_risk # prohibited | high_risk | gpai | minimal_risk
10+
is_gpai: false # true if this is a General Purpose AI model
11+
gpai_systemic_risk: false # true if > 10^25 FLOP training compute
12+
13+
# Override specific article status (auto-detected if absent):
14+
# article_overrides:
15+
# Art.9:
16+
# status: compliant
17+
# notes: "Risk management system via specsmith AEE pipeline"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Generated by specsmith migrate m001
2+
# Edit this file; original MD kept as view.
3+
4+
content: '# Context Budget
5+
6+
7+
Keep governance files small. Lazy-load per task.
8+
9+
'
10+
generated_by: specsmith migrate (m001)
11+
kind: context-budget
12+
source_md: docs/governance/CONTEXT-BUDGET.md
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Generated by specsmith migrate m001
2+
# Edit this file; original MD kept as view.
3+
4+
content: '# Drift Metrics
5+
6+
7+
Use `specsmith audit` to check governance health.
8+
9+
'
10+
generated_by: specsmith migrate (m001)
11+
kind: drift-metrics
12+
source_md: docs/governance/DRIFT-METRICS.md
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Generated by specsmith migrate m001
2+
# Edit this file; original MD kept as view.
3+
4+
content: '# Project Lifecycle
5+
6+
7+
See `specsmith phase show` for current phase readiness.
8+
9+
See `specsmith phase list` for the full AEE lifecycle.
10+
11+
'
12+
generated_by: specsmith migrate (m001)
13+
kind: lifecycle
14+
source_md: docs/governance/LIFECYCLE.md

.specsmith/governance/roles.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Generated by specsmith migrate m001
2+
# Edit this file; original MD kept as view.
3+
4+
content: '# Roles
5+
6+
7+
- **Human**: Approves proposals
8+
9+
- **Agent**: Proposes and executes
10+
11+
'
12+
generated_by: specsmith migrate (m001)
13+
kind: roles
14+
source_md: docs/governance/ROLES.md

.specsmith/governance/rules.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# specsmith governance rules — structured YAML
2+
# Generated by: specsmith migrate run --version 1
3+
# Source: docs/governance/RULES.md
4+
# Edit this file; original MD kept as read-only view.
5+
6+
kind: rules
7+
source_md: docs/governance/RULES.md
8+
generated_by: specsmith migrate (m001)
9+
rules:
10+
- note: Could not parse rules — see source MD

0 commit comments

Comments
 (0)