Skip to content
Open
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
7 changes: 7 additions & 0 deletions .github/workflows/actions.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ workflows:
'.github/workflows/mirror.yml': []
'.github/workflows/openssf-compliance.yml':
- 'actions/checkout@v7.0.1'
'.github/workflows/proven-lock-gate.yml':
- 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1'
'.github/workflows/push-email-notify.yml':
- 'hyperpolymath/smtp-notify-action@v0.5.1'
'.github/workflows/quality.yml':
Expand Down Expand Up @@ -54,6 +56,11 @@ workflows:
'.github/workflows/workflow-linter.yml':
- 'actions/checkout@v7.0.1'
dependencies:
'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1':
ref: 'v7.0.1'
commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
owner_id: 44036562
repo_id: 197814629
'actions/checkout@v7.0.1':
ref: 'v7.0.1'
commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
Expand Down
54 changes: 47 additions & 7 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,25 @@ on:
- 'src/**'
- 'ffi/**'
- 'tests/**'
- 'verification/proofs/**'
- '.github/workflows/e2e.yml'
- 'build/**'
- 'Justfile'
- '.tool-versions'
Comment thread
hyperpolymath marked this conversation as resolved.
Resolved
pull_request:
branches: [main, master]
paths:
- 'src/**'
- 'ffi/**'
- 'tests/**'
- 'verification/proofs/**'
- '.github/workflows/e2e.yml'
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
- 'build/**'
- 'Justfile'
- '.tool-versions'
workflow_dispatch:
permissions: read-all
permissions:
contents: read
concurrency:
group: e2e-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -42,17 +52,47 @@ jobs:
e2e:
name: E2E — smoke
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v7.0.1
- name: Check aspect harness silence, firing and unavailable controls
run: bash tests/workflows/aspect_scope_test.sh
- name: Check tracked source aspects
run: bash tests/aspect_tests.sh
- name: Bootstrap Idris2 0.8.0 from a verified source commit
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends chezscheme libgmp-dev gcc make git ca-certificates
idir="$RUNNER_TEMP/idris2-source"
git init -q "$idir"
git -C "$idir" remote add origin https://github.com/idris-lang/Idris2.git
git -C "$idir" fetch -q --depth 1 origin 15a3e4e70843f7a34100f6470c04b791330788df
git -C "$idir" checkout -q --detach FETCH_HEAD
test "$(git -C "$idir" rev-parse HEAD)" = "15a3e4e70843f7a34100f6470c04b791330788df"
make -C "$idir" bootstrap SCHEME=chezscheme
make -C "$idir" install
"$HOME/.idris2/bin/idris2" --version | grep -F "0.8.0"
echo "$HOME/.idris2/bin" >> "$GITHUB_PATH"
- name: Install Zig 0.16.0 from sha256-verified official archive
shell: bash
run: |
set -euo pipefail
url="https://ziglang.org/download/0.16.0/zig-x86_64-linux-0.16.0.tar.xz"
archive="$RUNNER_TEMP/zig-0.16.0.tar.xz"
curl --fail --location --silent --show-error --proto '=https' "$url" -o "$archive"
printf '%s %s\n' '70e49664a74374b48b51e6f3fdfbf437f6395d42509050588bd49abe52ba3d00' "$archive" | sha256sum --check -
tar -xJf "$archive" -C "$RUNNER_TEMP"
test "$("$RUNNER_TEMP/zig-x86_64-linux-0.16.0/zig" version)" = "0.16.0"
echo "$RUNNER_TEMP/zig-x86_64-linux-0.16.0" >> "$GITHUB_PATH"
- name: Declare current scope
run: echo "::notice::The harness builds Idris2 and separately tests Zig; it is not yet a linked Idris2-to-Zig P2P test or a composer E2E test."
- name: Run E2E harness
run: |
if [ -f tests/e2e.sh ]; then
bash tests/e2e.sh
else
echo "::notice::no tests/e2e.sh present — nothing to run"
fi
test -f tests/e2e.sh || { echo "::error::Required E2E smoke harness missing"; exit 2; }
bash tests/e2e.sh

# ─── End-to-End Tests (downstream stack-specific examples) ─────────
# Uncomment ONE of the following e2e job blocks matching your stack.
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/estate-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ jobs:
uses: actions/checkout@v7.0.1
- name: Root shape allowlist
run: bash scripts/check-root-shape.sh .
- name: AsciiDoc by default (no .md under docs/)
- name: Prove wiki-format policy controls (positive and negative)
run: bash tests/workflows/wiki_format_test.sh
- name: AsciiDoc for documents, Markdown for wiki sources
run: bash scripts/check-no-md-in-docs.sh .
31 changes: 31 additions & 0 deletions .github/workflows/main-estate-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# SPDX-License-Identifier: MPL-2.0
name: Central Estate CI/CD Audit

# Thin caller of the estate audit, which lives in hyperpolymath/proven-cicd-and-workflows as
# a reusable workflow and reports five component checks: governance,
# hygiene, manifests, languages, advisory. Do not copy the audit's steps in
# here. A copy freezes this repository at whatever cicd-suite commit its
# actions.lock happened to hold, and fixes made upstream never arrive.
#
# The pin is a full SHA, advanced weekly by track-estate-audit.yml (a PR
Comment thread
hyperpolymath marked this conversation as resolved.
Resolved
# whose own run of this audit is the check).
#
# ⚠ DE-ONBOARDED from actions.lock, deliberately, like the secret-scanner
# caller. A reusable workflow onboarded cross-repo startup-fails with zero
# jobs under sha_pinning_required (see the header of cicd-suite's
# main-estate-audit.yml). Do not run a full-directory `gh actions-lock` that
# re-onboards this file. If one does, cicd-suite/scripts/deonboard-estate-audit.sh
# reverses it.

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
estate:
uses: hyperpolymath/proven-cicd-and-workflows/.github/workflows/main-estate-audit.yml@5b6024c0ce6ea4a97ea6f4c87b1f4e34267d69a6 # cicd-suite main
120 changes: 120 additions & 0 deletions .github/workflows/proven-lock-gate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# SPDX-License-Identifier: MPL-2.0
# proven-cicd: proven-lock-gate@0.3.2 sha256:07266ed730561719a7a1f6ac8859b49d1d126d45bcd8390cfaecc9f289789069
# Stamped copy of hyperpolymath/proven-cicd-and-workflows templates/proven-lock-gate.yml.
# Do not edit by hand. A changed body fails this gate as drift. The applier
# moves the pinned suite SHA. The line after each `proven-cicd:local-next`
# marker is local and outside the stamp's hash.
#
# The gate judges this repository's actions.lock against its workflows with the
# proven lock kernel. It exits 0 for consistent, 1 for a defect or drift, and 2
# when it could not run. A run that could not run fails this job: it is never
# skipped and never continue-on-error, so a required check cannot pass without
# a verdict. Every way the gate can fail before its verdict has its own class:
# not_run:pin PROVEN_SHA is not a 40-hex commit
# not_run:identity the suite repository is not the one this gate pins
# (repository id 1326697643 owned by account id 6759885,
# hyperpolymath, after following a rename), it moved to
# another owner, or the name no longer exists: refer,
# never re-run
# not_run:identity-unreadable the repository or owner id could not be read
# (API outage or rate limit): a re-run
# not_run:fetch-missing the pinned commit does not exist in the suite (persistent)
# not_run:fetch the suite could not be fetched after retries (transient)
# not_run:checkout the fetched commit could not be checked out
# not_run:suite-behind the pinned suite is older than this copy: its manifest
# lists an earlier proven-lock-gate (or none). Fix: move
# PROVEN_SHA to a commit whose proven/manifest.json lists
# at least this copy's version
# not_run:suite the checkout is not the pinned commit, is modified, or
# lacks a file or directory the gate runs
# and the suite's own script adds drift, toolchain, build, selftest, extract and
# verdict. The Idris2 RefC runtime is vendored in the suite (dist/), so the build
# needs no network and has no class of its own for a third-party host.
name: Proven lock gate
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
proven-lock:
name: Proven lock gate
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
# proven-cicd:local-next
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Judge actions.lock with the proven suite at its pinned commit
env:
# proven-cicd:local-next
PROVEN_SHA: "5b6024c0ce6ea4a97ea6f4c87b1f4e34267d69a6"
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
fail() { echo "PROVEN_LOCK_CLASS=not_run:$1"; [[ -z ${2:-} ]] || echo "$2" >&2; exit 2; }
[[ $PROVEN_SHA =~ ^[0-9a-f]{40}$ ]] || fail pin
repo=hyperpolymath/proven-cicd-and-workflows
# The suite is pinned by commit; the id pins the repository itself, so a
# recreated repository under the same name is refused. A transfer keeps
# the repository id and GitHub redirects the old name to it, so the
# owner id is pinned as well: a transferred repository is refused, and a
# rename within the owner (same repository id, same owner id) passes.
# Two classes: an id that cannot be read is an availability failure (a
# re-run); an id that differs is a different repository (refer).
# A rename answers 301: follow it (-L) and judge the id it leads to.
# The request and every redirect are HTTPS only (--proto, --proto-redir),
# so a redirect cannot carry the token over plain HTTP. A name that no
# longer exists (404, 410) is permanent, so it is identity; any other
# non-200 (403, 429, 5xx) is availability, a re-run.
code=$(curl -sS -L --proto '=https' --proto-redir '=https' --retry 3 -o "$RUNNER_TEMP/proven-repo.json" -w '%{http_code}' \
-H "Authorization: Bearer $GH_TOKEN" "https://api.github.com/repos/$repo") ||
fail identity-unreadable "could not reach the API for $repo"
case $code in
200) ;;
404|410) fail identity "$repo does not exist (HTTP $code)" ;;
*) fail identity-unreadable "the API answered HTTP $code for $repo" ;;
esac
id=$(jq -r '.id // empty' "$RUNNER_TEMP/proven-repo.json" 2>/dev/null) || fail identity-unreadable "the reply for $repo is not JSON"
[[ $id =~ ^[0-9]+$ ]] || fail identity-unreadable "the reply for $repo has no id"
[[ $id == 1326697643 ]] || fail identity "$repo has id '$id', not 1326697643"
owner=$(jq -r '.owner.id // empty' "$RUNNER_TEMP/proven-repo.json" 2>/dev/null) || fail identity-unreadable "the reply for $repo has a malformed owner"
[[ $owner =~ ^[0-9]+$ ]] || fail identity-unreadable "the reply for $repo has no owner id"
[[ $owner == 6759885 ]] ||
fail identity "$repo (id $id) is owned by account $owner ($(jq -r '.owner.login // "?"' "$RUNNER_TEMP/proven-repo.json" 2>/dev/null)), not 6759885 (hyperpolymath): a transfer"
suite="$RUNNER_TEMP/proven-suite"
git init -q "$suite"
git -C "$suite" remote add origin "https://github.com/$repo.git"
git -C "$suite" config core.sparseCheckout true
printf '%s\n' dist/ scripts/ tests/fixtures/proven-lock/ /proven/manifest.json > "$suite/.git/info/sparse-checkout"
fetched=0
for delay in 0 10 30; do
sleep "$delay"
if git -C "$suite" fetch -q --depth=1 origin "$PROVEN_SHA" 2>"$RUNNER_TEMP/proven-fetch.err"; then fetched=1; break; fi
# A commit the server does not have will not appear on a retry.
if grep -qiE "not our ref|couldn't find remote ref|unadvertised object|no such remote ref" "$RUNNER_TEMP/proven-fetch.err"; then
fail fetch-missing "$(cat "$RUNNER_TEMP/proven-fetch.err")"
fi
done
[[ $fetched == 1 ]] || fail fetch "$(cat "$RUNNER_TEMP/proven-fetch.err")"
git -C "$suite" checkout -q --detach FETCH_HEAD || fail checkout
[[ $(git -C "$suite" rev-parse HEAD) == "$PROVEN_SHA" ]] || fail suite "checked out $(git -C "$suite" rev-parse HEAD), not $PROVEN_SHA"
[[ -z $(git -C "$suite" status --porcelain) ]] || fail suite "the suite checkout is modified"
# This copy needs a suite at least as new as itself (0.3.0 needs the
# vendored runtime): a pin older than the copy is its own class, so the
# fix is plain (move the pin), not a generic refusal.
mine=$(sed -n '1,2s/^# proven-cicd: proven-lock-gate@\([0-9]*\.[0-9]*\.[0-9]*\) .*/\1/p' "$GITHUB_WORKSPACE/.github/workflows/proven-lock-gate.yml")
[[ -n $mine ]] || fail suite "this copy has no proven-lock-gate stamp"
theirs=$(jq -r '[.artifacts[] | select(.artifact == "proven-lock-gate") | .version][0] // empty' "$suite/proven/manifest.json" 2>/dev/null || true)
[[ -n $theirs && $(printf '%s\n' "$theirs" "$mine" | sort -V | head -n 1) == "$mine" ]] ||
fail suite-behind "the suite at $PROVEN_SHA lists proven-lock-gate ${theirs:-nothing}, older than this copy's $mine; move PROVEN_SHA"
for f in scripts/proven-lock-gate.sh scripts/proven-stamp.sh scripts/build-proven-lock.sh \
scripts/extract-lock-facts.sh dist/proven-lock/proven-lock-verdict.c; do
[[ -f $suite/$f ]] || fail suite "the suite at $PROVEN_SHA lacks $f"
done
for d in dist/proven-lock/runtime/refc dist/proven-lock/runtime/c tests/fixtures/proven-lock; do
[[ -d $suite/$d ]] || fail suite "the suite at $PROVEN_SHA lacks $d/"
done
bash "$suite/scripts/proven-lock-gate.sh" "$GITHUB_WORKSPACE" .github/workflows/proven-lock-gate.yml
8 changes: 4 additions & 4 deletions .github/workflows/static-analysis-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "Skipped: panic-attack not available in this environment." >> "$GITHUB_STEP_SUMMARY"
- name: Upload panic-attack findings
uses: actions/upload-artifact@v7.0.2
uses: actions/upload-artifact@v7.0.1
with:
name: panic-attack-findings
path: panic-attack-findings.json
Expand Down Expand Up @@ -245,7 +245,7 @@
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "Skipped: Hypatia scanner not available in this environment." >> "$GITHUB_STEP_SUMMARY"
- name: Upload hypatia findings
uses: actions/upload-artifact@v7.0.2
uses: actions/upload-artifact@v7.0.1
with:
name: hypatia-findings
path: hypatia-findings.json
Expand Down Expand Up @@ -326,7 +326,7 @@
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "Skipped: panic-attack not available in this environment." >> "$GITHUB_STEP_SUMMARY"
- name: Upload bridge report
uses: actions/upload-artifact@v7.0.2
uses: actions/upload-artifact@v7.0.1
with:
name: bridge-report
path: bridge-report.json
Expand All @@ -340,7 +340,7 @@
# ---------------------------------------------------------------------------
# Job 4: deposit-findings (combines + archives for gitbot-fleet)
# ---------------------------------------------------------------------------
deposit-findings:

Check warning on line 343 in .github/workflows/static-analysis-gate.yml

View workflow job for this annotation

GitHub Actions / Hypatia neurosymbolic scan

[hypatia] job `deposit-findings` runs with `if: always()`, needs upstream jobs and downloads their artifacts. On a cancelled run it still starts, finds no artifacts and turns red. Use `if: ${{ !cancelled() }}` instead.
name: Deposit findings for gitbot-fleet
runs-on: ubuntu-latest
timeout-minutes: 15
Expand Down Expand Up @@ -418,7 +418,7 @@
echo "medium=$MEDIUM" >> "$GITHUB_OUTPUT"
echo "low=$LOW" >> "$GITHUB_OUTPUT"
- name: Upload unified findings (fleet scanner picks these up)
uses: actions/upload-artifact@v7.0.2
uses: actions/upload-artifact@v7.0.1
with:
name: unified-findings
path: findings/unified-findings.json
Expand Down
32 changes: 32 additions & 0 deletions docs/architecture/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: CC-BY-SA-4.0
= Scaffoldia Architecture
:toc:

== Current implementation boundary

Scaffoldia is a repository design and retrofit project in the design phase.
The repository presently supplies governance metadata, workflow automation
and independently buildable Idris2 and Zig modules. The actual composer,
repository mint operation, retrofit planner and linked ABI are not yet
implemented or qualified.

== Existing directory layout

* `src/` contains source pillars and a generic inherited foreign-function
interface scaffold; it does not contain a functioning composition engine.
* `tests/` contains existing compiler, Zig and source-scope test harnesses.
* `docs/architecture/` contains this introduction, the component topology,
and the source threat model.
* `.machine_readable/` holds repository machine metadata, some of which
is obsolete A2ML awaiting controlled migration to DEED.
* `.github/workflows/` contains automation whose individual checks
must run and report their true state.

== Contracts and limits

Read link:TOPOLOGY.adoc[TOPOLOGY.adoc] for the owning canon/spine/proven
boundaries, missing interfaces and the ABI mismatch. Read
link:THREAT-MODEL.adoc[THREAT-MODEL.adoc] for threats and mitigations.
The currently proposed engine decision is
link:../decisions/0002-scaffoldia-composer-architecture.adoc[ADR-0002].
Nothing here certifies that the composer works or that its ABI is linked.
Loading
Loading