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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @bsommers
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Bug report
about: Something behaves wrongly or crashes
labels: bug
---

**Version** (`ontologic --version`):

**Command and `.logic` input** (smallest that reproduces it):

**Expected result:**

**Actual result:**
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Security vulnerability
url: https://github.com/bsommers/OntoLogic/security/advisories/new
about: Report security problems privately, not as a public issue.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Feature request
about: Propose a change or addition
labels: enhancement
---

**Problem to solve:**

**Proposed change:**

**Alternatives considered:**
6 changes: 6 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## What and why

## Checklist
- [ ] `stack test --ghc-options="-Wall -Werror"` passes locally
- [ ] Tests added or updated (a bug fix has a test that failed before)
- [ ] Docs and CHANGELOG updated if behaviour changed
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
- package-ecosystem: gradle
directory: /
schedule:
interval: monthly
- package-ecosystem: npm
directory: /editors/vscode
schedule:
interval: monthly
29 changes: 29 additions & 0 deletions .github/scripts/check_pending.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# Fail when the Hspec log reports pending examples other than the optional mermaid (mmdc) and docker-based neo4j ones.
# Usage: check_pending.sh <hspec-log>
set -euo pipefail
log="${1:?usage: check_pending.sh <hspec-log>}"

summary="$(grep -E '[0-9]+ examples?, [0-9]+ failures?' "$log" | tail -n 1 || true)"
if [ -z "$summary" ]; then
echo "ERROR: no Hspec summary line found in $log" >&2
exit 1
fi
echo "Hspec summary: $summary"

total="$(echo "$summary" | grep -oE '[0-9]+ pending' | grep -oE '[0-9]+' || echo 0)"
if [ "$total" -eq 0 ]; then
echo "No pending examples."
exit 0
fi

# Pending items are listed as " N) description" under a "Pending:" heading, followed by
# a "# PENDING: reason" line. Keep the numbered description lines of that section.
pending="$(awk '/^Pending:/{p=1;next} /^(Failures:|Finished in)/{p=0} p && /^ +[0-9]+\) /{print}' "$log")"
unexpected="$(echo "$pending" | grep -v 'mermaid' | grep -v 'real neo4j' | grep -v '^$' || true)"
if [ -n "$unexpected" ] || [ -z "$pending" ]; then
echo "ERROR: $total pending example(s); only the optional mermaid (mmdc) and docker-based neo4j examples may be pending:" >&2
echo "${unexpected:-$pending (could not list them; see the log)}" >&2
exit 1
fi
echo "Only the optional mermaid and neo4j examples are pending."
62 changes: 29 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,22 @@
name: CI
name: Full gate (manual)

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# Manual only. The full build-and-test gate is a local gate (AGENTS.md, "Pre-Push Verification
# Gate") and is deliberately not run automatically on GitHub, to conserve Actions minutes. Start
# this workflow by hand (Actions tab, "Run workflow") for a clean-room run. The automatic GitHub
# checks are docs.yml (link check) and pages.yml (site deployment).
on:
push:
# Feature branches are covered by their pull_request run; also pushing them
# here ran CI twice per change (the two refs never share a concurrency group).
branches: [ main ]
paths-ignore:
- 'docs/**'
- '**.md'
- '**.svg'
- '.codegraph/**'
- 'LICENSE'
pull_request:
branches: [ main ]
paths-ignore:
- 'docs/**'
- '**.md'
- '**.svg'
- '.codegraph/**'
- 'LICENSE'
workflow_dispatch:

permissions:
contents: read

jobs:
haskell-test:
name: Haskell Build & Test
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-24.04 # standard GitHub-hosted runner: free for public repos
timeout-minutes: 60 # a cold-cache stack build on a hosted runner is slow

Expand All @@ -47,13 +33,16 @@ jobs:
unzip -q /tmp/cvc5.zip -d /tmp/cvc5
sudo install -m 0755 "$(find /tmp/cvc5 -type f -name cvc5 | head -1)" /usr/local/bin/cvc5
}
curl -fsSL -o /tmp/vampire https://github.com/vprover/vampire/releases/download/v4.9casc2024/vampire || true
if [ -s /tmp/vampire ]; then
sudo install -m 0755 /tmp/vampire /usr/local/bin/vampire
vampire --version || true
fi
# No `|| true`: a missing Vampire must fail the job, not skip its specs silently.
curl -fsSL --retry 3 -o /tmp/vampire https://github.com/vprover/vampire/releases/download/v4.9casc2024/vampire
test -s /tmp/vampire
sudo install -m 0755 /tmp/vampire /usr/local/bin/vampire
vampire --version
z3 --version
cvc5 --version
command -v vampire
g++ --version | head -1
sqlite3 --version

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -71,6 +60,9 @@ jobs:
# rdflib: IriSpec resolves the OWL and SHACL output with a real RDF parser (#49)
pip install pydantic rdflib

- name: Check relative documentation links
run: python3 scripts/check_links.py

- name: Set up Node for the TypeScript check
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -113,29 +105,33 @@ jobs:
# Every stack call in this workflow (both jobs) passes the same
# --ghc-options: stack recompiles the package whenever they change, and
# the two jobs share one .stack-work cache.
- name: Install Stack dependencies & Build
- name: Install Stack dependencies
run: |
stack build --test --no-run-tests --ghc-options="-Wall -Werror"
stack build --test --no-run-tests --only-dependencies

- name: Warm Gradle dependencies for Java validation smoke test
run: |
chmod +x gradlew
./gradlew :models-java:compileJava

- name: Run Haskell Test Suite
# One test run does three jobs: -Wall -Werror build, the HPC coverage gate
# (scripts/check_coverage.sh, threshold 74%), and the pending-example check.
- name: Run Haskell test suite with coverage gate
env:
# Turn a missing toolchain into a failure: the generated-code checks in
# CompileSpec must actually run here, not silently report PENDING. This covers
# go, rustc, pydantic, npm, d2 and rdflib — the ones installed above. The genuinely
# optional checks (mmdc, which pulls chromium, and the neo4j service) use
# withOptionalTool and always skip when absent.
# go, rustc, pydantic, npm, d2 and rdflib. The genuinely optional check
# (mmdc, which pulls chromium) uses withOptionalTool and always skips.
ONTOLOGIC_REQUIRE_TOOLCHAINS: '1'
run: |
stack test --ghc-options="-Wall -Werror"
set -o pipefail
scripts/check_coverage.sh --ghc-options="-Wall -Werror" 2>&1 | tee "$RUNNER_TEMP/hspec.log"

- name: Fail on unexpected pending examples
run: .github/scripts/check_pending.sh "$RUNNER_TEMP/hspec.log"

java-gradle-test:
name: Java & Gradle Verification
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-24.04 # standard GitHub-hosted runner: free for public repos
timeout-minutes: 45

Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Docs

# The only automatic check on GitHub besides the Pages deployment. It needs no Haskell, Java or
# solver. The full build-and-test gate is local; see ci.yml (manual) and AGENTS.md.
on:
pull_request:
push:
branches: [ main ]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
docs:
name: docs
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Check relative documentation links
run: python3 -I scripts/check_links.py
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ models-java/src/generated/
.hpc/


# Private planning/session notes (kept locally, not published)
# Private planning/session notes (not published). Files already tracked stay tracked;
# new files here need `git add -f`. See .planning/STATE.md.
.planning/
.agents/
agy-evaluation/
Expand Down
Loading
Loading