Skip to content

move 4 authoring substrate: structured edit = recompile-gated transac… #114

move 4 authoring substrate: structured edit = recompile-gated transac…

move 4 authoring substrate: structured edit = recompile-gated transac… #114

Workflow file for this run

name: tests
# CI runs the full tiered suite (active + demoted). The CI=true env var
# triggers bin/beagle-test to include the demoted tier. Active failures
# block the build; demoted failures are advisory (logged in the run
# output and surface-debt.md tracks accumulated debt). See
# lab/journal/synthesis/design-principle.md "Test-cadence decomposition".
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install Racket
uses: Bogdanp/setup-racket@v1.14
with:
architecture: x64
distribution: full
variant: CS
version: '9.1'
- name: Link beagle packages
run: |
raco pkg install --auto --link \
beagle-lib/ beagle-test/ beagle/
- name: Run tiered test suite
env:
CI: 'true'
run: bin/beagle-test
# Byte-stable emit (move 2): the claims->source pretty-printer must be a
# deterministic, LOCAL, comment-preserving, round-trip-preserving formatter —
# the precondition for making claims canonical and text a regenerable lowering.
# Racket-only (no fram/bb), so it runs right after the suite.
- name: Byte-stable emit — fixed-point + locality + comments gate
run: bin/test/byte-stable-emit/run.sh
# Graph-native repair: beagle-cascade derives its call graph from the Fram
# claim graph (scope-correct), not regex over text. That runs on the Fram
# engine, so we install babashka + check out fram's committed classpath and
# gate the scope-correctness proof (a change to mod_a/helper must NOT blast
# mod_b's same-named helper). This is the load-bearing test for the thesis
# that graph-backed repair beats text-backed repair.
- name: Install babashka (graph-native repair tooling)
run: curl -sL https://raw.githubusercontent.com/babashka/babashka/master/install | sudo bash
- name: Checkout fram (the claim engine cascade runs on)
uses: actions/checkout@v5
with:
repository: tompassarelli/fram
path: .fram
- name: Graph-native cascade — scope-correctness gate
run: FRAM_OUT="$GITHUB_WORKSPACE/.fram/out" bin/test/cascade-graph/run.sh
# Repair pipeline: beagle-repair consumes blame.rkt's semantic suspicions as
# STRUCTURED records, not by regex-scraping the prose SUSPECT line. Gates that
# a suspicion on a validly-named function the prose regex can't parse (e.g.
# `total=`) survives. (Needs racket + bb, both above; no fram.)
- name: Repair pipeline — structured semantic suspicions gate
run: bin/test/repair-semantic/run.sh
# Move 3: code can be claim-canonical. The loop .bclj -> lossless claims ->
# (through a real Fram store) -> claims -> byte-stable .bclj is datum-identical
# through the engine AND recompiles to the IDENTICAL program (modulo srcloc
# debug pointers). Proven over fram/src. Needs racket + bb + fram's out/.
- name: Code as canonical claims — recompile-identity gate
run: CODE_AS_CLAIMS_CORPUS="$GITHUB_WORKSPACE/.fram/src" FRAM_OUT="$GITHUB_WORKSPACE/.fram/out" bin/test/code-as-claims/run.sh
# Capstone: repair as a GRAPH OPERATION. A scope-correct rename as a claim edit
# on the canonical store — mod_a's `helper` renamed, mod_b's identically-named
# one untouched (a text sed would corrupt both), string literals untouched,
# renamed tree recompiles, collision refused. Ties moves 1-3.
- name: Repair-as-graph-operation — scope-correct rename gate
run: FRAM_OUT="$GITHUB_WORKSPACE/.fram/out" bin/test/code-as-claims/rename.sh
# Cross-file rename CASCADE: rename a def + ALL its qualified cross-module
# readers in one claim edit (resolved through the require graph), scope-correct
# (same-prefix symbols untouched), recompiles. Proven on the real fram engine
# (fram.cnf/value! -> intern! across fram/src).
- name: Cross-file rename-cascade gate
run: CODE_AS_CLAIMS_CORPUS="$GITHUB_WORKSPACE/.fram/src" FRAM_OUT="$GITHUB_WORKSPACE/.fram/out" bin/test/code-as-claims/cascade.sh
# Move 4 authoring substrate: a structured edit (what an agent emits as data)
# is a RECOMPILE-GATED transaction — commit the new tree only if it builds
# clean, else fail closed. The deterministic surface an NL/LLM layer drives.
- name: Authoring substrate — recompile-gated edit transaction
run: FRAM_OUT="$GITHUB_WORKSPACE/.fram/out" bin/test/code-as-claims/author.sh
- name: Show accumulated surface debt
if: always()
run: |
if [ -f lab/surface-debt.md ]; then
head -20 lab/surface-debt.md
fi