Skip to content

feat(spec-compiler): sin-code compile-spec CLI + YAML→JSON compiler (issue #164, v0 spike) #127

feat(spec-compiler): sin-code compile-spec CLI + YAML→JSON compiler (issue #164, v0 spike)

feat(spec-compiler): sin-code compile-spec CLI + YAML→JSON compiler (issue #164, v0 spike) #127

Workflow file for this run

# Purpose: verify the Python sin-code-bundle package on PRs by installing the
# local source and running pytest + the audit-chain integrity check.
# Docs: .github/workflows/sin-verify.yml.doc.md
name: sin-verify
on:
pull_request:
branches: ["main"]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: "1.25.11"
cache: true
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install SIN-Code Bundle
run: pip install -e ".[dev]"
- name: Configure git identity for tests
run: |
git config --global user.email "sin-verify@opensin-code.local"
git config --global user.name "SIN Verify"
git config --global init.defaultBranch main
- name: Build and install local sin-code + tool wrappers
run: |
go build -o ~/.local/bin/sin-code ./cmd/sin-code
mkdir -p ~/.local/bin
cat > ~/.local/bin/execute <<'EOF'
#!/bin/sh
exec sin-code execute "$@"
EOF
cat > ~/.local/bin/scout <<'EOF'
#!/bin/bash
args=()
while [ $# -gt 0 ]; do
case "$1" in
--type) args+=("--search_type"); shift;;
--json) args+=("--format" "json"); shift;;
*) args+=("$1"); shift;;
esac
done
exec sin-code scout "${args[@]}"
EOF
chmod +x ~/.local/bin/execute ~/.local/bin/scout
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Run test suite
run: pytest -q
- name: Audit chain integrity
run: |
# Passes if no audit log exists yet (clean repo).
python -c "
from pathlib import Path
from sin_code_bundle.policy import AuditLog
ok = AuditLog(Path('.')).verify_chain()
print('Audit chain:', 'intact' if ok else 'TAMPERED')
raise SystemExit(0 if ok else 1)
"