Skip to content

Commit eb072aa

Browse files
committed
Snapshot local work before sync
1 parent 8f2e8f3 commit eb072aa

9 files changed

Lines changed: 272 additions & 221 deletions

File tree

.github/workflows/casket-pages.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
name: GitHub Pages
3+
4+
on:
5+
push:
6+
branches: [main, master]
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
24+
25+
- name: Checkout casket-ssg
26+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
27+
with:
28+
repository: hyperpolymath/casket-ssg
29+
path: .casket-ssg
30+
31+
- name: Setup GHCup
32+
uses: haskell-actions/setup@ec49483bfc012387b227434aba94f59a6ecd0900 # v2
33+
with:
34+
ghc-version: '9.8.2'
35+
cabal-version: '3.10'
36+
37+
- name: Cache Cabal
38+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
39+
with:
40+
path: |
41+
~/.cabal/packages
42+
~/.cabal/store
43+
.casket-ssg/dist-newstyle
44+
key: ${{ runner.os }}-casket-${{ hashFiles('.casket-ssg/casket-ssg.cabal') }}
45+
46+
- name: Build casket-ssg
47+
working-directory: .casket-ssg
48+
run: cabal build
49+
50+
- name: Prepare site source
51+
shell: bash
52+
run: |
53+
set -euo pipefail
54+
rm -rf .site-src _site
55+
56+
if [ -d site ]; then
57+
cp -R site .site-src
58+
else
59+
mkdir -p .site-src
60+
TODAY="$(date +%Y-%m-%d)"
61+
REPO_NAME="${{ github.event.repository.name }}"
62+
REPO_URL="https://github.com/${{ github.repository }}"
63+
README_URL=""
64+
65+
if [ -f README.md ]; then
66+
README_URL="${REPO_URL}/blob/${{ github.ref_name }}/README.md"
67+
elif [ -f README.adoc ]; then
68+
README_URL="${REPO_URL}/blob/${{ github.ref_name }}/README.adoc"
69+
fi
70+
71+
{
72+
echo "---"
73+
echo "title: ${REPO_NAME}"
74+
echo "date: ${TODAY}"
75+
echo "---"
76+
echo
77+
echo "# ${REPO_NAME}"
78+
echo
79+
echo "Static documentation site for ${REPO_NAME}."
80+
echo
81+
echo "- Source repository: [${{ github.repository }}](${REPO_URL})"
82+
if [ -n "${README_URL}" ]; then
83+
echo "- README: [project README](${README_URL})"
84+
fi
85+
if [ -d docs ]; then
86+
echo "- Docs directory: [docs/](${REPO_URL}/tree/${{ github.ref_name }}/docs)"
87+
fi
88+
echo
89+
echo "Project-specific site content can be added later under site/."
90+
} > .site-src/index.md
91+
fi
92+
93+
- name: Build site
94+
run: |
95+
mkdir -p _site
96+
cd .casket-ssg && cabal run casket-ssg -- build ../.site-src ../_site
97+
touch ../_site/.nojekyll
98+
99+
- name: Setup Pages
100+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
101+
102+
- name: Upload artifact
103+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
104+
with:
105+
path: '_site'
106+
107+
deploy:
108+
environment:
109+
name: github-pages
110+
url: ${{ steps.deployment.outputs.page_url }}
111+
runs-on: ubuntu-latest
112+
needs: build
113+
steps:
114+
- name: Deploy to GitHub Pages
115+
id: deployment
116+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4

.tool-versions

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
erlang 27.2.1
2-
elixir 1.18.2-otp-27
1+
elixir 1.19.5-otp-28

IMPLEMENTATION-ROADMAP.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# http-capability-gateway - Implementation Roadmap
22

3+
> NOTE (2026-03-30): This document is historical. The repository now contains a real Mix application, Elixir modules, and tests. Use `ROADMAP.adoc`, `TEST-NEEDS.md`, and `PROOF-NEEDS.md` as the current source of truth. The main gap is verification and scope control, not initial scaffolding.
4+
35
**Created:** 2026-01-22
46
**Current Status:** 30% (Design Phase)
57
**Target:** MVP v0.1.0 (80-90%)

Justfile

Lines changed: 33 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ set shell := ["bash", "-uc"]
1515
set dotenv-load := true
1616
set positional-arguments := true
1717

18-
# Project metadata - CUSTOMIZE THESE
19-
project := "RSR-template-repo"
20-
version := "0.1.0"
18+
# Project metadata
19+
project := "http-capability-gateway"
20+
version := "1.0.0"
2121
tier := "infrastructure" # 1 | 2 | infrastructure
2222

2323
# ═══════════════════════════════════════════════════════════════════════════════
@@ -55,29 +55,20 @@ info:
5555

5656
# Build the project (debug mode)
5757
build *args:
58-
@echo "Building {{project}}..."
59-
# TODO: Add build command for your language
60-
# Rust: cargo build {{args}}
61-
# ReScript: npm run build
62-
# Elixir: mix compile
58+
mix compile {{args}}
6359

6460
# Build in release mode with optimizations
6561
build-release *args:
66-
@echo "Building {{project}} (release)..."
67-
# TODO: Add release build command
68-
# Rust: cargo build --release {{args}}
62+
MIX_ENV=prod mix compile {{args}}
6963

7064
# Build and watch for changes
7165
build-watch:
72-
@echo "Watching for changes..."
73-
# TODO: Add watch command
74-
# Rust: cargo watch -x build
75-
# ReScript: npm run watch
66+
@echo "No dedicated watch recipe configured; use 'iex -S mix' for interactive development."
7667

7768
# Clean build artifacts [reversible: rebuild with `just build`]
7869
clean:
79-
@echo "Cleaning..."
80-
rm -rf target _build dist lib node_modules
70+
mix clean
71+
rm -rf _build deps doc coverage
8172

8273
# Deep clean including caches [reversible: rebuild]
8374
clean-all: clean
@@ -89,46 +80,31 @@ clean-all: clean
8980

9081
# Run all tests
9182
test *args:
92-
@echo "Running tests..."
93-
# TODO: Add test command
94-
# Rust: cargo test {{args}}
95-
# ReScript: npm test
96-
# Elixir: mix test
83+
mix test {{args}}
9784

9885
# Run tests with verbose output
9986
test-verbose:
100-
@echo "Running tests (verbose)..."
101-
# TODO: Add verbose test
87+
mix test --trace
10288

10389
# Run tests and generate coverage report
10490
test-coverage:
105-
@echo "Running tests with coverage..."
106-
# TODO: Add coverage command
107-
# Rust: cargo llvm-cov
91+
mix test --cover
10892

10993
# ═══════════════════════════════════════════════════════════════════════════════
11094
# LINT & FORMAT
11195
# ═══════════════════════════════════════════════════════════════════════════════
11296

11397
# Format all source files [reversible: git checkout]
11498
fmt:
115-
@echo "Formatting..."
116-
# TODO: Add format command
117-
# Rust: cargo fmt
118-
# ReScript: npm run format
119-
# Elixir: mix format
99+
mix format
120100

121101
# Check formatting without changes
122102
fmt-check:
123-
@echo "Checking format..."
124-
# TODO: Add format check
125-
# Rust: cargo fmt --check
103+
mix format --check-formatted
126104

127105
# Run linter
128106
lint:
129-
@echo "Linting..."
130-
# TODO: Add lint command
131-
# Rust: cargo clippy -- -D warnings
107+
mix compile --warnings-as-errors
132108

133109
# Run all quality checks
134110
quality: fmt-check lint test
@@ -144,39 +120,27 @@ fix: fmt
144120

145121
# Run the application
146122
run *args:
147-
@echo "Running {{project}}..."
148-
# TODO: Add run command
149-
# Rust: cargo run {{args}}
123+
mix run --no-halt {{args}}
150124

151125
# Run in development mode with hot reload
152126
dev:
153-
@echo "Starting dev mode..."
154-
# TODO: Add dev command
127+
iex -S mix
155128

156129
# Run REPL/interactive mode
157130
repl:
158-
@echo "Starting REPL..."
159-
# TODO: Add REPL command
160-
# Elixir: iex -S mix
161-
# Guile: guix shell guile -- guile
131+
iex -S mix
162132

163133
# ═══════════════════════════════════════════════════════════════════════════════
164134
# DEPENDENCIES
165135
# ═══════════════════════════════════════════════════════════════════════════════
166136

167137
# Install all dependencies
168138
deps:
169-
@echo "Installing dependencies..."
170-
# TODO: Add deps command
171-
# Rust: (automatic with cargo)
172-
# ReScript: npm install
173-
# Elixir: mix deps.get
139+
mix deps.get
174140

175141
# Audit dependencies for vulnerabilities
176142
deps-audit:
177-
@echo "Auditing dependencies..."
178-
# TODO: Add audit command
179-
# Rust: cargo audit
143+
mix hex.audit
180144

181145
# ═══════════════════════════════════════════════════════════════════════════════
182146
# DOCUMENTATION
@@ -220,18 +184,18 @@ cookbook:
220184
man:
221185
#!/usr/bin/env bash
222186
mkdir -p docs/man
223-
cat > docs/man/{{project}}.1 << EOF
224-
.TH RSR-TEMPLATE-REPO 1 "$(date +%Y-%m-%d)" "{{version}}" "RSR Template Manual"
225-
.SH NAME
226-
{{project}} \- RSR standard repository template
227-
.SH SYNOPSIS
228-
.B just
229-
[recipe] [args...]
230-
.SH DESCRIPTION
231-
Canonical template for RSR (Rhodium Standard Repository) projects.
232-
.SH AUTHOR
233-
Hyperpolymath <hyperpolymath@proton.me>
234-
EOF
187+
printf '%s\n' \
188+
'.TH HTTP-CAPABILITY-GATEWAY 1 "$(date +%Y-%m-%d)" "{{version}}" "HTTP Capability Gateway Manual"' \
189+
'.SH NAME' \
190+
'{{project}} \- policy-driven HTTP capability gateway' \
191+
'.SH SYNOPSIS' \
192+
'.B just' \
193+
'[recipe] [args...]' \
194+
'.SH DESCRIPTION' \
195+
'Utility recipes for building, testing, and validating the HTTP capability gateway.' \
196+
'.SH AUTHOR' \
197+
'Hyperpolymath <hyperpolymath@proton.me>' \
198+
> docs/man/{{project}}.1
235199
echo "Generated: docs/man/{{project}}.1"
236200

237201
# ═══════════════════════════════════════════════════════════════════════════════
@@ -288,11 +252,7 @@ ci: deps quality
288252
# Install git hooks
289253
install-hooks:
290254
@mkdir -p .git/hooks
291-
@cat > .git/hooks/pre-commit << 'EOF'
292-
#!/bin/bash
293-
just fmt-check || exit 1
294-
just lint || exit 1
295-
EOF
255+
@printf '%s\n' '#!/bin/bash' 'just fmt-check || exit 1' 'just lint || exit 1' > .git/hooks/pre-commit
296256
@chmod +x .git/hooks/pre-commit
297257
@echo "Git hooks installed"
298258

@@ -348,7 +308,7 @@ validate-state:
348308
fi
349309

350310
# Full validation suite
351-
validate: validate-rsr validate-state
311+
validate: fmt-check lint test validate-rsr validate-state
352312
@echo "All validations passed!"
353313

354314
# ═══════════════════════════════════════════════════════════════════════════════

0 commit comments

Comments
 (0)