Skip to content

Commit 39713fd

Browse files
fix: make the documented install path real (Justfile recipes, quickst… (#34)
…arts, smoke CI) PR 4 of 8 in the severity-ordered RCA chain (P0-docs): the primary user-facing install docs drove `just` recipes that were template stubs, so a new user following any quickstart could not install or run the software. This makes the documented path real and adds CI so it cannot silently rot. - Justfile: implement setup (Pkg.instantiate), deps (alias of setup), build/build-release (Pkg.precompile), run/run-verbose (main()); add a julia check to doctor; fix an invalid `//` comment on line 2 that made modern `just` fail to parse the file at all - QUICKSTART-USER.adoc: replace template placeholders with a real minimal quickstart; expected output now matches what main() actually prints (banner + LM Studio fallback to offline examples); drop references to nonexistent stapeln-run/install/uninstall recipes - QUICKSTART-DEV.adoc: replace {{LANG_STACK}}/{{BUILD_CMD}}/{{TEST_CMD}}/ {{MUST_INVARIANTS}} with real Julia commands and invariants; fix setup-dev -> setup, tests/ -> test/, Mustfile path; drop panic-scan/ llm-context/flake.nix references - QUICKSTART-MAINTAINER.adoc: trim to flows that work (build-release, doctor, load check, test); mark Containerfile/guix.scm as not yet functional; document the real env-var configuration - docs/QUICKSTART.md: was cloning a different repo (rsr-template-repo); reduced to a pointer at the canonical quickstarts - .tool-versions: pin julia 1.10.11 (same minor as e2e.yml CI) - README.adoc: correct module count 17 -> 40 (src/stats/*.jl) - .github/workflows/install-smoke.yml: NEW smoke job running `just setup && julia --project=. -e 'using Statistikles' && just --list` on ubuntu-latest with SHA-pinned checkout/setup-julia/cache/setup-just; step-level guards only (no job-level hashFiles/secrets conditionals) Verified locally (WSL Debian, Julia 1.10.11, just 1.56.0): just --list parses; every recipe referenced by any quickstart exists; just setup, package load, just run (offline fallback), just doctor all pass. <!-- SPDX-License-Identifier: CC-BY-SA-4.0 Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> --> ## Summary <!-- Briefly describe what this PR does and why. Link to related issues with "Closes #N". --> ## Changes <!-- List the key changes introduced by this PR. --> - ## RSR Quality Checklist <!-- Check all that apply. PRs that fail required checks will not be merged. --> ### Required - [ ] Tests pass (`just test` or equivalent) - [ ] Code is formatted (`just fmt` or equivalent) - [ ] Linter is clean (no new warnings or errors) - [ ] No banned language patterns (no TypeScript, no npm/bun, no Go/Python) - [ ] No `unsafe` blocks without `// SAFETY:` comments - [ ] No banned functions (`believe_me`, `unsafeCoerce`, `Obj.magic`, `Admitted`, `sorry`) - [ ] SPDX license headers present on all new/modified source files - [ ] No secrets, credentials, or `.env` files included ### As Applicable - [ ] `.machine_readable/STATE.a2ml` updated (if project state changed) - [ ] `.machine_readable/ECOSYSTEM.a2ml` updated (if integrations changed) - [ ] `.machine_readable/META.a2ml` updated (if architectural decisions changed) - [ ] Documentation updated for user-facing changes - [ ] `TOPOLOGY.md` updated (if architecture changed) - [ ] `CHANGELOG` or release notes updated - [ ] New dependencies reviewed for license compatibility (MPL-2.0 / MPL-2.0) - [ ] ABI/FFI changes validated (`src/abi/` and `ffi/zig/` consistent) ## Testing <!-- Describe how you tested these changes. --> ## Screenshots <!-- If applicable, add screenshots or terminal output demonstrating the change. --> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ffc1e0e commit 39713fd

8 files changed

Lines changed: 190 additions & 235 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
#
4+
# Statistikles — Install Smoke Test
5+
#
6+
# Exercises the documented install path (QUICKSTART-USER.adoc) so it cannot
7+
# silently rot: `just setup` must instantiate the environment, the package
8+
# must load, and the Justfile must parse.
9+
10+
name: Install Smoke
11+
12+
on:
13+
push:
14+
branches: [main]
15+
paths:
16+
- 'Justfile'
17+
- 'Project.toml'
18+
- 'src/**'
19+
- '.tool-versions'
20+
- '.github/workflows/install-smoke.yml'
21+
pull_request:
22+
branches: [main]
23+
workflow_dispatch:
24+
25+
permissions: read-all
26+
27+
concurrency:
28+
group: install-smoke-${{ github.ref }}
29+
cancel-in-progress: true
30+
31+
jobs:
32+
install-smoke:
33+
name: Smoke — Documented Install Path
34+
runs-on: ubuntu-latest
35+
timeout-minutes: 20
36+
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
40+
41+
- name: Setup Julia
42+
uses: julia-actions/setup-julia@fa02766e078afaaf09b14210362cee14137e6a32 # v2
43+
with:
44+
version: '1.10'
45+
46+
- name: Julia cache
47+
uses: julia-actions/cache@a45e8fa8be21c18a06b7177052533149e61e9b38 # v3.1.0
48+
49+
- name: Setup just
50+
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4.0.0
51+
52+
- name: Run documented install path
53+
run: just setup && julia --project=. -e 'using Statistikles' && just --list

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
just 1.36.0
2+
julia 1.10.11

Justfile

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: MPL-2.0
2-
// Owner: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
2+
# Owner: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
33
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
44
#
55
# RSR Standard Justfile Template
@@ -239,25 +239,14 @@ init:
239239
# BUILD & COMPILE
240240
# ═══════════════════════════════════════════════════════════════════════════════
241241

242-
# Build the project (debug mode)
243-
build *args:
244-
@echo "Building statistikles (debug)..."
245-
# TODO: Replace with your build command
246-
# Examples:
247-
# cargo build {{args}} # Rust
248-
# mix compile {{args}} # Elixir
249-
# zig build {{args}} # Zig
250-
# deno task build {{args}} # Deno/ReScript
242+
# Build the project (precompile the Julia environment)
243+
build *args: setup
244+
@echo "Precompiling statistikles..."
245+
julia --project=. -e 'using Pkg; Pkg.precompile()'
251246
@echo "Build complete"
252247

253-
# Build in release mode with optimizations
254-
build-release *args:
255-
@echo "Building statistikles (release)..."
256-
# TODO: Replace with your release build command
257-
# Examples:
258-
# cargo build --release {{args}}
259-
# MIX_ENV=prod mix compile {{args}}
260-
# zig build -Doptimize=ReleaseFast {{args}}
248+
# Release build — same as `build` (Julia has no separate release mode)
249+
build-release *args: build
261250
@echo "Release build complete"
262251

263252
# Build and watch for changes (requires entr or similar)
@@ -343,15 +332,13 @@ lint:
343332
# RUN & EXECUTE
344333
# ═══════════════════════════════════════════════════════════════════════════════
345334

346-
# Run the application
335+
# Run the assistant (falls back to offline examples if LM Studio is absent)
347336
run *args: build
348-
# TODO: Replace with your run command
349-
echo "Run not configured yet"
337+
julia --project=. -e 'using Statistikles; main()'
350338

351-
# Run with verbose output
339+
# Run with verbose output (traces method precompilation)
352340
run-verbose *args: build
353-
# TODO: Replace with verbose run command
354-
echo "Run not configured yet"
341+
julia --project=. --trace-compile=stderr -e 'using Statistikles; main()'
355342

356343
# Install to user path
357344
install: build-release
@@ -362,14 +349,14 @@ install: build-release
362349
# DEPENDENCIES
363350
# ═══════════════════════════════════════════════════════════════════════════════
364351

365-
# Install/check all dependencies
366-
deps:
367-
@echo "Checking dependencies..."
368-
# TODO: Replace with your dependency check
369-
# Examples:
370-
# cargo check
371-
# mix deps.get
372-
# gleam deps download
352+
# One-time setup: resolve and install Julia package dependencies
353+
setup:
354+
@command -v julia >/dev/null 2>&1 || { echo "Julia not found — install Julia 1.10+ from https://julialang.org/downloads/"; exit 1; }
355+
julia --project=. -e 'using Pkg; Pkg.instantiate()'
356+
@echo "Setup complete — try 'just run'"
357+
358+
# Install/check all dependencies (alias of `setup`)
359+
deps: setup
373360
@echo "All dependencies satisfied"
374361

375362
# Audit dependencies for vulnerabilities
@@ -729,6 +716,7 @@ doctor:
729716
@echo "Checking required tools..."
730717
@command -v just >/dev/null 2>&1 && echo " [OK] just" || echo " [FAIL] just not found"
731718
@command -v git >/dev/null 2>&1 && echo " [OK] git" || echo " [FAIL] git not found"
719+
@command -v julia >/dev/null 2>&1 && echo " [OK] julia ($(julia --version))" || echo " [FAIL] julia not found — install Julia 1.10+"
732720
@echo "Checking for hardcoded paths..."
733721
@grep -rn '$HOME\|$ECLIPSE_DIR' --include='*.rs' --include='*.ex' --include='*.res' --include='*.gleam' --include='*.sh' . 2>/dev/null | head -5 || echo " [OK] No hardcoded paths"
734722
@echo "Diagnostics complete."

QUICKSTART-DEV.adoc

Lines changed: 35 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,76 @@
11
// SPDX-License-Identifier: CC-BY-SA-4.0
22
// Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
3-
// Template: QUICKSTART-DEV.adoc — clone → build → test → PR
4-
// Replace statistikles, {{BUILD_CMD}}, {{TEST_CMD}}, {{LANG_STACK}} with actuals
53
= statistikles — Quick Start for Developers
64
:toc:
75
:toclevels: 2
86

97
== Tech Stack
108

11-
{{LANG_STACK}}
9+
* **Julia 1.10+** — all statistical computation and the CLI
10+
(dependencies: CSV, DataFrames, Distributions, HTTP, JSON3, StatsBase)
11+
* **Agda** — formal proofs in `proofs/` (not required to build or test)
12+
* **Zig** — FFI bridge in `ffi/zig/` (not required to build or test)
13+
* Optional: an OpenAI-compatible LLM endpoint (LM Studio by default) for the
14+
conversational interface
1215

1316
== Set Up Development Environment
1417

15-
=== Option A: Guix (preferred)
16-
17-
[source,bash]
18-
----
19-
guix shell
20-
----
21-
22-
=== Option B: Nix (fallback)
23-
24-
[source,bash]
25-
----
26-
nix develop
27-
----
28-
29-
=== Option C: Manual
30-
3118
[source,bash]
3219
----
3320
git clone https://github.com/hyperpolymath/statistikles.git
3421
cd statistikles
35-
just setup-dev
22+
just setup
3623
----
3724

25+
`just setup` runs `julia --project=. -e 'using Pkg; Pkg.instantiate()'` to
26+
resolve and install the Julia package dependencies.
27+
3828
== Build
3929

4030
[source,bash]
4131
----
42-
{{BUILD_CMD}}
32+
just build
4333
----
4434

35+
This precompiles the Julia project environment
36+
(`julia --project=. -e 'using Pkg; Pkg.precompile()'`).
37+
4538
== Test
4639

4740
[source,bash]
4841
----
49-
{{TEST_CMD}}
42+
just test
5043
----
5144

45+
This runs the full suite via `julia --project=. test/runtests.jl`.
46+
5247
== Project Structure
5348

5449
[source]
5550
----
5651
statistikles/
57-
├── src/ # Source code
58-
├── src/abi/ # Idris2 ABI definitions (if applicable)
59-
├── ffi/zig/ # Zig FFI bridge (if applicable)
60-
├── tests/ # Test suite
52+
├── src/ # Julia source (module: Statistikles)
53+
├── src/stats/ # Statistical function modules
54+
├── src/tools/ # Executor, chat, LM Studio client
55+
├── proofs/ # Agda proofs
56+
├── ffi/zig/ # Zig FFI bridge
57+
├── test/ # Test suite (runtests.jl)
6158
├── docs/ # Documentation
6259
├── .machine_readable/ # Checkpoint files (STATE, META, ECOSYSTEM)
6360
├── Justfile # Task runner recipes
64-
├── guix.scm # Guix environment
65-
├── flake.nix # Nix environment (fallback)
6661
└── 0-AI-MANIFEST.a2ml # AI agent entry point
6762
----
6863

6964
== Key Recipes
7065

7166
[source,bash]
7267
----
73-
just build # Build the project
68+
just setup # Install Julia package dependencies
69+
just build # Precompile the project environment
7470
just test # Run tests
71+
just run # Run the assistant
7572
just doctor # Self-diagnostic
7673
just lint # Lint and format
77-
just panic-scan # Security scan via panic-attacker
7874
just tour # Guided tour of the codebase
7975
----
8076

@@ -84,26 +80,24 @@ just tour # Guided tour of the codebase
8480
----
8581
just lint # Format and lint
8682
just test # All tests pass
87-
just panic-scan # No new security issues
8883
----
8984

9085
== Contractile Invariants
9186

92-
Read `.machine_readable/MUST.contractile` before making changes.
87+
Read `.machine_readable/contractiles/Mustfile.a2ml` before making changes.
9388
Key invariants that must never be violated:
9489

95-
{{MUST_INVARIANTS}}
90+
* **Neural-symbolic boundary**: no statistical value is ever produced by
91+
neural inference. Every number crosses `src/tools/executor.jl:execute_tool()`
92+
upward only after being computed by a verified Julia function.
93+
* No dangerous escape hatches in `src/` (`believe_me`, `assert_total`,
94+
`sorry`, `Admitted`) — enforced by CI.
95+
* SPDX license headers on source files.
9696

9797
== LLM/AI Agent Development
9898

99-
If using an AI assistant, load the warmup context first:
100-
101-
[source,bash]
102-
----
103-
just llm-context # Outputs role-appropriate context
104-
----
105-
106-
Or read `0-AI-MANIFEST.a2ml` and `.claude/CLAUDE.md` directly.
99+
If using an AI assistant, read `0-AI-MANIFEST.a2ml` first — it is the AI
100+
agent entry point and links the machine-readable state files.
107101

108102
== Get Help
109103

0 commit comments

Comments
 (0)