omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / .github / workflows / evidence-immutable.yml
| 1 | name: evidence-immutable |
| 2 | |
| 3 | # Reviewed evidence is never rewritten. A pull request may add new files |
| 4 | # under evidence/, but may not modify, rename or delete one that already |
| 5 | # exists on the base branch. New receipts are content-addressed |
| 6 | # (<name>.<sha256>.json), so a rerun adds a file instead of replacing one. |
| 7 | |
| 8 | # Runs on every pull request, not only ones that touch evidence/, so it can be |
| 9 | # a required check: a path-filtered required check never reports on other PRs |
| 10 | # and would block them. The diff below is the only step and takes seconds. |
| 11 | on: |
| 12 | pull_request: |
| 13 | |
| 14 | permissions: |
| 15 | contents: read |
| 16 | |
| 17 | concurrency: |
| 18 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 19 | cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
| 20 | |
| 21 | jobs: |
| 22 | evidence-immutable: |
| 23 | runs-on: ubuntu-latest |
| 24 | steps: |
| 25 | - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 26 | with: |
| 27 | fetch-depth: 0 |
| 28 | - name: Refuse changes to existing evidence files |
| 29 | env: |
| 30 | BASE_SHA: ${{ github.event.pull_request.base.sha }} |
| 31 | HEAD_SHA: ${{ github.event.pull_request.head.sha }} |
| 32 | run: | |
| 33 | changed="$(git diff --name-status --diff-filter=MDRT "$BASE_SHA...$HEAD_SHA" -- evidence/)" |
| 34 | if [ -n "$changed" ]; then |
| 35 | echo "These existing evidence files would be changed:" |
| 36 | echo "$changed" |
| 37 | echo "Add a new, content-addressed file instead of rewriting reviewed evidence." |
| 38 | exit 1 |
| 39 | fi |
| 40 | echo "evidence/: additions only" |