From f9695246a839512ce6a7ae0d1a4720eedf3a34b1 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 14:14:52 +0000 Subject: [PATCH] fix: declare the Julia toolchain and drop the floating Containerfile The mint-gates job has been red on main since the template upgrade to 48671ce (983f619). This repo was instantiated and upgraded by hand, so two mint steps never ran here. mise.toml: the file was the template's own toolchain (idris2, zig) and did not declare julia. It is now rendered by scripts/render-mise.sh for this tree's languages (idris2, julia, zig). The SPDX-FileCopyrightText line is kept unchanged. mise.lock does not pin julia yet: run `just toolchain-refresh` (needs mise and the network). build/container/Containerfile: the file came from template base 889f7f7 and has 2 floating `FROM cgr.dev/chainguard/wolfi-base:latest` lines. Template #266 removed it from the template because it could not build. This repo publishes no image, so the file is removed here too. A repo that publishes an image adds it back pinned with scripts/pin-container-digests.sh. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0136P7ZoZwvZCfM387TZQ5kY --- build/container/Containerfile | 152 ---------------------------------- mise.toml | 23 ++--- 2 files changed, 13 insertions(+), 162 deletions(-) delete mode 100644 build/container/Containerfile diff --git a/build/container/Containerfile b/build/container/Containerfile deleted file mode 100644 index 691ec193..00000000 --- a/build/container/Containerfile +++ /dev/null @@ -1,152 +0,0 @@ -# SPDX-License-Identifier: MPL-2.0 -# Apodeixis.jl Container Image -# -# Multi-stage build template for Chainguard Wolfi base images. -# Customise the builder stage for your language and copy the -# resulting binary/release into the minimal runtime stage. -# -# This is the Tier-A artifact: a plain OCI image, buildable by ANY -# OCI-compliant engine — podman (recommended), nerdctl, or docker. -# It carries no hard dependency on the stapeln tier; the cerro-torre / -# svalinn files under build/container/stapeln/ are referenced only as labels. -# -# Build (engine-agnostic — substitute podman | nerdctl | docker): -# podman build -t apodeixis.jl:latest -f build/container/Containerfile . -# -# Run: -# podman run -p 8080:8080 apodeixis.jl:latest -# -# Run with persistent volume: -# podman run -p 8080:8080 -v apodeixis.jl-data:/data apodeixis.jl:latest -# -# Via the Justfile (auto-detects engine, prefers cerro-torre when present): -# just container-build - -# ============================================================================ -# Stage 1: Builder -# ============================================================================ -# -# Install build tools and compile the application. -# This stage is discarded after the build — only the compiled output -# is copied into the runtime stage. -# -# Language-specific examples (uncomment the one you need): -# -# --- Rust --- -# RUN apk add --no-cache rust pkgconf build-base -# COPY Cargo.toml Cargo.lock ./ -# COPY src/ ./src/ -# RUN cargo build --release -# # Output: /build/target/release/apodeixis.jl -# -# --- Elixir --- -# RUN apk add --no-cache erl27-elixir-1.18 erlang-27 erlang-27-dev git build-base -# COPY mix.exs mix.lock ./ -# COPY lib/ ./lib/ -# COPY config/ ./config/ -# ENV MIX_ENV=prod -# RUN mix local.hex --force && mix local.rebar --force && \ -# mix deps.get --only prod && mix compile && mix release -# # Output: /build/_build/prod/rel/apodeixis.jl/ -# -# --- Zig --- -# RUN apk add --no-cache zig build-base -# COPY build.zig build.zig.zon ./ -# COPY src/ ./src/ -# RUN zig build -Doptimize=ReleaseFast -# # Output: /build/zig-out/bin/apodeixis.jl -# -# Base image: `:latest` is right for a template scaffold (Chainguard rebuilds -# Wolfi daily). For PRODUCTION builds, pin by digest for reproducibility/supply- -# chain integrity, e.g.: -# FROM cgr.dev/chainguard/wolfi-base:latest@sha256: AS builder -# (cerro-torre's .ctp signing in build/container/stapeln/ records the resolved digest.) -FROM cgr.dev/chainguard/wolfi-base:latest AS builder - -# TODO: Install your language toolchain -RUN apk add --no-cache build-base - -WORKDIR /build - -# TODO: Copy source files and build -COPY . . -# RUN - -# ============================================================================ -# Stage 2: Runtime -# ============================================================================ -# -# Minimal production image. Only the compiled binary/release and runtime -# dependencies are included. No compilers, no source code, no build tools. -# -FROM cgr.dev/chainguard/wolfi-base:latest - -# OCI image labels (compatible with cerro-torre .ctp bundle metadata) -LABEL org.opencontainers.image.title="Apodeixis.jl" \ - org.opencontainers.image.description="Research-stage Julia verification toolchain for contracts, compiler analysis, numeric semantics, and verified FFI with independently checked proof targets." \ - org.opencontainers.image.url="https://github.com/hyperpolymath/Apodeixis.jl" \ - org.opencontainers.image.source="https://github.com/hyperpolymath/Apodeixis.jl" \ - org.opencontainers.image.vendor="hyperpolymath" \ - org.opencontainers.image.licenses="MPL-2.0" \ - org.opencontainers.image.authors="Jonathan D.A. Jewell " \ - dev.cerrotorre.manifest="build/container/stapeln/manifest.toml" \ - dev.cerrotorre.gatekeeper="build/container/stapeln/.gatekeeper.yaml" \ - dev.stapeln.compose="build/container/stapeln/compose.toml" - -# Install minimal runtime dependencies. -# Adjust this list for your application: -# - ca-certificates: TLS root certificates -# - curl: health check probe -# - libstdc++: C++ standard library (if needed by native deps) -# - ncurses: terminal UI (if needed, e.g. Elixir IEx) -RUN apk add --no-cache ca-certificates curl - -# Create non-root user for the application. -# Running as root inside containers is a security anti-pattern. -RUN addgroup -S appuser && adduser -S appuser -G appuser - -WORKDIR /app - -# TODO: Copy compiled binary/release from builder stage. -# Examples: -# COPY --from=builder /build/target/release/apodeixis.jl /app/apodeixis.jl -# COPY --from=builder /build/_build/prod/rel/apodeixis.jl /app/release/ -# COPY --from=builder /build/zig-out/bin/apodeixis.jl /app/apodeixis.jl - -# Copy entrypoint script -COPY build/container/entrypoint.sh /app/entrypoint.sh -RUN chmod +x /app/entrypoint.sh - -# OPTIONAL (Tier C — stapeln). A pure OCI image does NOT need these baked in: -# svalinn reads .gatekeeper.yaml from a mounted volume (see stapeln/compose.toml), -# and cerro-torre reads manifest.toml at pack time. Uncomment only if you want -# the policy/manifest embedded in the image itself. -# COPY build/container/stapeln/.gatekeeper.yaml /etc/svalinn/gatekeeper.yaml -# COPY build/container/stapeln/manifest.toml /app/manifest.toml - -# Create data directory for persistent storage (mountable volume) -RUN mkdir -p /data && chown appuser:appuser /data - -# Set ownership of the application directory -RUN chown -R appuser:appuser /app - -# Environment variables — customise for your application -ENV APP_HOST=[::] -ENV APP_PORT=8080 -ENV APP_LOG_FORMAT=json -ENV APP_DATA_DIR=/data - -# Declare /data as a volume for persistent storage -VOLUME ["/data"] - -# Run as non-root -USER appuser - -# Expose the application port -EXPOSE 8080 - -# Health check — the application must respond 2xx at /health -HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \ - CMD curl -sf http://localhost:${APP_PORT}/health || exit 1 - -ENTRYPOINT ["/app/entrypoint.sh"] diff --git a/mise.toml b/mise.toml index 85b94bb4..8d859380 100644 --- a/mise.toml +++ b/mise.toml @@ -1,23 +1,26 @@ # SPDX-License-Identifier: MPL-2.0 # SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) # -# The toolchain for Apodeixis.jl (idris2, zig). Specs are `latest`; mise.lock -# records the concrete version and per-platform checksum of each, so every -# checkout installs the same bits. Refresh both with: just toolchain-refresh +# The toolchain for this repository (idris2 julia zig). Rendered at mint by +# scripts/render-mise.sh from the languages the tree declares; the language→tool +# table is build/just/provision-lib.sh's, so this file and `just doctor` cannot +# disagree. Specs are `latest`; mise.lock records the concrete version and +# per-platform checksum of each. Refresh both with: just toolchain-refresh # Canon: hyperpolymath/standards 3-practice/provisioning (TRUST-DEFAULTS §toolchain). -# Estate policy: no python, node/npm/yarn, make or nix here. JavaScript runs Bun > Deno > -# pnpm from one package.json, so a repository with one pins all three (LANGUAGE-POLICY §1.4). +# Estate policy: no python, node/npm/yarn, make or nix here. JavaScript runs +# Bun > Deno > pnpm from one package.json (LANGUAGE-POLICY §1.4). # -# Idris2 is not a mise tool: it comes from pack (`just setup` says how). -# A repository created from this template gets this file re-minted for its own -# languages by `launch-scaffolder provision-set realign` (the deed's :repo differs). +# Hand-edited project tools belong below the table's end, never by replacing it: +# `scripts/check-mise-language.sh` fails when a tool matches no detected +# language, and when a detected language's tool is missing. [settings] lockfile = true [tools] just = "latest" -shellcheck = "latest" +shellcheck = "latest" # the shell scripts yq = "latest" # scripts/kyaml-format.sh (KYAML configs) -trivy = "latest" # just deps-audit +julia = "latest" zig = "latest" +trivy = "latest" # just deps-audit