Skip to content

docs(claude): prune AI instructions to principles + conservative-maintainer rules #415

docs(claude): prune AI instructions to principles + conservative-maintainer rules

docs(claude): prune AI instructions to principles + conservative-maintainer rules #415

Workflow file for this run

name: FP Stability
# Runs the Verrou-based floating-point stability suite.
#
# What it tests (./mfc.sh fp-stability):
# sod_standard 1-D standard Sod, p_L/p_R=10, ideal gas (well-conditioned baseline)
# 25 cells, 5 steps, WENO5 + HLLC
# Threshold 1e-13 — should always pass
#
# sod_strong 1-D Sod shock, p_L/p_R=100,000, ideal gas
# 50 cells, 10 steps, WENO5 + HLLC
# Threshold 1e-10
# Probes: HLLC xi-factor cancellation near sonic contact
# (s_L - vel_L)/(s_L - s_S) when s_L ≈ s_S
#
# water_stiffened 1-D water shock, stiffened EOS (pi_inf=4046)
# 50 cells, 10 steps, WENO5 + HLLC
# Threshold 1e-8 (loosened; tightens to 1e-10 once Etilde scheme merges)
# Probes: pressure-recovery cancellation p=(E-pi_inf)/gamma
# loses ~4 decimal digits when pi_inf/p_right ~ 40,000
#
# For each case: 1 nearest-rounding reference run + N random-rounding runs.
# PASS if max L∞ deviation across all N samples stays below threshold.
# On FAIL: verrou_dd_sym runs to identify the responsible function symbols.
# Logs are uploaded as CI artifacts.
#
# Verrou (the pinned Valgrind+Verrou pair; versions live in toolchain/bootstrap/verrou.sh)
# is installed by fp-stability on first use and cached. The prebuilt download is seconds;
# a cache miss with no prebuilt falls back to a ~20-min source build.
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
jobs:
file-changes:
name: Detect File Changes
runs-on: ubuntu-latest
outputs:
checkall: ${{ steps.changes.outputs.checkall }}
steps:
- name: Clone
uses: actions/checkout@v4
- name: Detect Changes
uses: dorny/paths-filter@v3
id: changes
with:
filters: ".github/file-filter.yml"
fp-stability:
name: Floating-Point Stability (Verrou)
runs-on: ubuntu-latest
needs: [file-changes]
if: >-
!cancelled() &&
needs.file-changes.result == 'success' &&
(needs.file-changes.outputs.checkall == 'true' || github.event_name == 'workflow_dispatch')
steps:
- name: Clone
uses: actions/checkout@v4
- name: Cache Verrou
id: cache-verrou
uses: actions/cache@v4
with:
path: ~/.local/verrou
# Key off the installer's content so any version bump (or other edit) in
# verrou.sh auto-busts the cache and forces a fresh install — no hand-synced
# version string to drift out of date.
key: verrou-${{ hashFiles('toolchain/bootstrap/verrou.sh') }}-${{ runner.os }}
- name: Install system dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y \
build-essential automake python3 python3-numpy libc6-dbg \
cmake gfortran zstd
# Verrou is installed by `fp-stability` itself on first use (downloads the
# prebuilt artifact; aborts if that fails). The cache above restores it across
# runs so the download only happens on a cache miss.
- name: Build MFC (debug, serial)
# FFLAGS=-fno-inline prevents gfortran from inlining small functions into
# their callers. Without it, DWARF debug info attributes inlined ops to
# the caller's line (often a do-loop header), making Verrou dd_line point
# to loop boundaries instead of the actual arithmetic.
env:
FFLAGS: "-fno-inline"
run: ./mfc.sh build -t pre_process simulation --no-mpi --debug -j"$(nproc)"
- name: Run FP Stability Suite
run: ./mfc.sh fp-stability -N 5
- name: Upload FP stability logs
if: always()
uses: actions/upload-artifact@v4
with:
name: fp-stability-logs
path: fp-stability-logs/
if-no-files-found: ignore