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
4 changes: 4 additions & 0 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
SPDX-License-Identifier: MPL-2.0
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
-->
# CLAUDE.md - AI Assistant Instructions

## Machine-Readable Artefacts
Expand Down
4 changes: 4 additions & 0 deletions .claude/PROJECT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
SPDX-License-Identifier: MPL-2.0
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
-->
# Ochrance - Claude Code Instructions

This repository contains the Ochrance project.
Expand Down
34 changes: 34 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# SPDX-License-Identifier: MPL-2.0
# CODEOWNERS - Define code review assignments for GitHub
# See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

# Default: sole maintainer for all files
* @hyperpolymath

# Security-sensitive files require explicit ownership
SECURITY.md @hyperpolymath
.github/workflows/ @hyperpolymath
.machine_readable/ @hyperpolymath
contractiles/ @hyperpolymath

# License files
LICENSE @hyperpolymath
LICENSES/ @hyperpolymath

# Configuration
.gitignore @hyperpolymath
.github/ @hyperpolymath

# Documentation
README* @hyperpolymath
CONTRIBUTING* @hyperpolymath
CODE_OF_CONDUCT* @hyperpolymath
GOVERNANCE* @hyperpolymath
MAINTAINERS* @hyperpolymath
CHANGELOG* @hyperpolymath
ROADMAP* @hyperpolymath

# Build and CI
Justfile @hyperpolymath
Makefile @hyperpolymath
*.sh @hyperpolymath
6 changes: 6 additions & 0 deletions .github/copilot/coding-agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mcp_servers:
boj-server:
command: npx
args: ["-y", "@hyperpolymath/boj-server@latest"]
env:
BOJ_URL: http://localhost:7700
1 change: 1 addition & 0 deletions .github/workflows/boj-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
jobs:
trigger-boj:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/casket-pages.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,33 @@
# SPDX-License-Identifier: MPL-2.0
name: GitHub Pages

on:
push:
branches: [main, master]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Checkout casket-ssg
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
repository: hyperpolymath/casket-ssg
path: .casket-ssg

- name: Setup GHCup
uses: haskell-actions/setup@ec49483bfc012387b227434aba94f59a6ecd0900 # v2
with:
ghc-version: '9.8.2'
cabal-version: '3.10'

- name: Cache Cabal
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
Expand All @@ -42,11 +36,9 @@ jobs:
~/.cabal/store
.casket-ssg/dist-newstyle
key: ${{ runner.os }}-casket-${{ hashFiles('.casket-ssg/casket-ssg.cabal') }}

- name: Build casket-ssg
working-directory: .casket-ssg
run: cabal build

- name: Prepare site source
shell: bash
run: |
Expand Down Expand Up @@ -89,26 +81,23 @@ jobs:
echo "Project-specific site content can be added later under site/."
} > .site-src/index.md
fi

- name: Build site
run: |
mkdir -p _site
cd .casket-ssg && cabal run casket-ssg -- build ../.site-src ../_site
touch ../_site/.nojekyll

- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5

- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: '_site'

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
timeout-minutes: 15
needs: build
steps:
- name: Deploy to GitHub Pages
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,25 @@
# bumps for dependabot/fetch-metadata flow through the same path.

name: Dependabot Auto-Merge

on:
pull_request:
types: [opened, reopened, synchronize]

permissions:
contents: write # needed to enable auto-merge
pull-requests: write # needed to approve
contents: write # needed to enable auto-merge
pull-requests: write # needed to approve
# NB: keep narrow β€” do NOT add secrets: read or id-token: write here.

jobs:
automerge:
# Only run for PRs actually authored by Dependabot.
if: github.actor == 'dependabot[bot]' && github.event.pull_request.user.login == 'dependabot[bot]'
runs-on: ubuntu-latest

timeout-minutes: 15
steps:
- name: Fetch Dependabot metadata
id: meta
uses: dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34 # v2.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

# --- Policy gate -------------------------------------------------------
# Outputs from fetch-metadata we care about:
# update-type β†’ version-update:semver-{patch,minor,major}
Expand Down Expand Up @@ -106,7 +102,6 @@ jobs:
echo "security=$is_security" >> "$GITHUB_OUTPUT"
echo "update_type=$UPDATE_TYPE" >> "$GITHUB_OUTPUT"
echo "ghsa=$GHSA_ID" >> "$GITHUB_OUTPUT"

- name: Approve PR (if policy allows)
if: steps.policy.outputs.action == 'automerge'
env:
Expand All @@ -115,15 +110,13 @@ jobs:
run: |
gh pr review --approve "$PR_URL" \
--body "Auto-approving Dependabot security update (${{ steps.policy.outputs.ghsa }}, ${{ steps.policy.outputs.update_type }}). Policy: low/moderate security patches/minors only."

- name: Enable auto-merge (if policy allows)
if: steps.policy.outputs.action == 'automerge'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
gh pr merge --auto --squash "$PR_URL"

- name: Write decision to step summary
env:
ACTION: ${{ steps.policy.outputs.action }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/dogfood-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
a2ml-validate:
name: Validate A2ML manifests
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout repository
Expand Down Expand Up @@ -66,6 +67,7 @@ jobs:
k9-validate:
name: Validate K9 contracts
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout repository
Expand Down Expand Up @@ -115,6 +117,7 @@ jobs:
empty-lint:
name: Empty-linter (invisible characters)
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout repository
Expand Down Expand Up @@ -179,6 +182,7 @@ jobs:
groove-check:
name: Groove manifest check
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout repository
Expand Down Expand Up @@ -237,6 +241,7 @@ jobs:
eclexiaiser-validate:
name: Validate eclexiaiser manifest
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout repository
Expand Down Expand Up @@ -300,6 +305,7 @@ print(f'Valid: {project[\"name\"]} ({len(functions)} function(s))')
dogfood-summary:
name: Dogfooding compliance summary
runs-on: ubuntu-latest
timeout-minutes: 15
needs: [a2ml-validate, k9-validate, empty-lint, groove-check, eclexiaiser-validate]
if: always()

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
# SPDX-License-Identifier: MPL-2.0
name: E2E and Integration Tests
on:
push: { branches: [main] }
pull_request: { branches: ['**'] }
push: {branches: [main]}
pull_request: {branches: ['**']}
permissions:
contents: read
jobs:
e2e:
name: E2E tests
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Run E2E tests
run: bash tests/e2e_test.sh
integration:
name: Integration tests
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Install Rust
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/echidna-validation.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# SPDX-License-Identifier: MPL-2.0
name: ECHIDNA Validation

on:
push:
paths:
Expand All @@ -16,19 +15,17 @@ on:
- 'modules/**'
- 'src/abi/**'
schedule:
- cron: '0 6 * * 1' # Weekly on Monday at 06:00 UTC

- cron: '0 6 * * 1' # Weekly on Monday at 06:00 UTC
permissions:
contents: read

jobs:
echidna-totality:
name: ECHIDNA Totality & Safety Audit
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Dangerous pattern scan (Idris2)
run: |
echo "=== Idris2 Dangerous Pattern Scan (code only; comments excluded) ==="
Expand Down Expand Up @@ -57,7 +54,6 @@ jobs:
echo "FAIL: Dangerous patterns detected in Idris2 code" >&2
exit 1
fi

- name: Totality enforcement check
run: |
echo "=== Totality Enforcement ==="
Expand All @@ -72,7 +68,6 @@ jobs:
if [ "$MISSING" -gt 0 ]; then
echo "WARNING: Some modules lack totality enforcement"
fi

- name: Partial function check
run: |
echo "=== Partial Function Check ==="
Expand All @@ -82,7 +77,6 @@ jobs:
echo "Review required:"
grep -rn "^partial" ochrance-core/ src/abi/ --include="*.idr" 2>/dev/null
fi

- name: FFI stub status
run: |
echo "=== FFI Stub Status ==="
Expand All @@ -92,7 +86,6 @@ jobs:
else
echo "INFO: Echidna FFI may be implemented β€” verify libechidna.so linkage"
fi

- name: Zig FFI safety check
if: hashFiles('ffi/zig/src/*.zig') != ''
run: |
Expand All @@ -104,7 +97,6 @@ jobs:
grep -rn "$pattern" ffi/zig/src/ --include="*.zig" 2>/dev/null
fi
done

- name: Summary
run: |
echo "## ECHIDNA Validation Results" >> $GITHUB_STEP_SUMMARY
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/governance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# SPDX-License-Identifier: PMPL-1.0-or-later
name: Governance

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:

permissions:
contents: read

jobs:
governance:
uses: hyperpolymath/standards/.github/workflows/governance-reusable.yml@5a93d9d57cc04de4002d6d0ecd336fc7a8698910
5 changes: 1 addition & 4 deletions .github/workflows/instant-sync.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# SPDX-License-Identifier: MPL-2.0
# Instant Forge Sync - Triggers propagation to all forges on push/release
name: Instant Sync

on:
push:
branches: [main, master]
release:
types: [published]

permissions:
contents: read

jobs:
dispatch:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Trigger Propagation
if: ${{ secrets.FARM_DISPATCH_TOKEN != '' }}
Expand All @@ -29,6 +27,5 @@ jobs:
"sha": "${{ github.sha }}",
"forges": ""
}

- name: Confirm
run: echo "::notice::Propagation triggered for ${{ github.event.repository.name }}"
Loading
Loading