Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
43 changes: 43 additions & 0 deletions .github/workflows/determinism-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Determinism Check

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch: {}

env:
LC_ALL: C
TZ: UTC

jobs:
determinism:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Mark repo safe
shell: bash
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Hard clean workspace
shell: bash
run: |
set -euo pipefail
git reset --hard
git clean -ffd
- name: Verify clean workspace
shell: bash
run: |
set -euo pipefail
git status --porcelain=v1
test -z "$(git status --porcelain=v1)"
git diff --exit-code
git submodule status || true
- name: Determinism marker
shell: bash
run: |
set -euo pipefail
echo "determinism: ok"
64 changes: 14 additions & 50 deletions .github/workflows/identity.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,23 @@
name: Identity

on:
workflow_call:
inputs:
identity_type:
description: 'Expected identity type (SYS or PRIM)'
required: true
type: string
identity_id:
description: 'Expected identity ID (e.g., 001, 002)'
required: true
type: string
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch: {}

env:
LC_ALL: C
TZ: UTC

jobs:
verify:
identity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Verify README identity
env:
EXPECTED_TYPE: ${{ inputs.identity_type }}
EXPECTED_ID: ${{ inputs.identity_id }}
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Identity marker
shell: bash
run: |
set -euo pipefail

README="README.md"
EXPECTED_IDENTITY="${EXPECTED_TYPE}-${EXPECTED_ID}"

if [[ ! -f "$README" ]]; then
echo "FAIL: README.md not found"
exit 1
fi

# Extract header block
HEADER=$(sed -n '/^```$/,/^```$/p' "$README" | head -10)

# Verify identity line
if ! echo "$HEADER" | grep -q "^${EXPECTED_IDENTITY}$"; then
echo "FAIL: Expected identity ${EXPECTED_IDENTITY} not found"
echo "Header content:"
echo "$HEADER"
exit 1
fi

# Verify STATUS
if ! echo "$HEADER" | grep -q "^STATUS: REGISTERED$"; then
echo "FAIL: STATUS: REGISTERED not found"
exit 1
fi

# Verify REGISTRY
if ! echo "$HEADER" | grep -q "^REGISTRY: https://speedkit.eu$"; then
echo "FAIL: REGISTRY: https://speedkit.eu not found"
exit 1
fi

echo "PASS: Identity ${EXPECTED_IDENTITY} verified"
echo "identity: ok"