From 2c2aaf94e6d7ae3a55bd5b15a37b8621c7ce4cd5 Mon Sep 17 00:00:00 2001 From: Frank O'Hara Date: Wed, 26 Aug 2026 15:26:00 -0600 Subject: [PATCH 1/3] ci: rehearsal probe for the flawd mutation gate (measurement branch, not for merge) --- .github/workflows/mutation-rehearsal.yml | 74 ++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 .github/workflows/mutation-rehearsal.yml diff --git a/.github/workflows/mutation-rehearsal.yml b/.github/workflows/mutation-rehearsal.yml new file mode 100644 index 0000000..991256c --- /dev/null +++ b/.github/workflows/mutation-rehearsal.yml @@ -0,0 +1,74 @@ +# CI rehearsal for the upcoming flawd mutation gate (dogfooding). +# This branch is a measurement probe and will NOT be merged: it times the +# pieces the real workflow needs on a hosted runner — flawd install from the +# public mirror, the unentitled failure mode, coverage generation, and the +# Docker image build — so the real mutation.yml lands with honest numbers. +name: Mutation CI rehearsal +on: + pull_request: + workflow_dispatch: + +jobs: + probe: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install flawd from the public mirror + run: | + t0=$SECONDS + curl -fsSL --retry 3 -o /usr/local/bin/flawd \ + "https://github.com/fixture-dev/flawd-releases/releases/latest/download/flawd-linux-x86_64" + curl -fsSL --retry 3 -o /tmp/flawd.sha256 \ + "https://github.com/fixture-dev/flawd-releases/releases/latest/download/flawd-linux-x86_64.sha256" + cd /usr/local/bin && echo "$(cut -d' ' -f1 /tmp/flawd.sha256) flawd" | sha256sum -c - + chmod +x /usr/local/bin/flawd + flawd --version + echo "### Install timing: $((SECONDS - t0))s" >> "$GITHUB_STEP_SUMMARY" + + - name: Unentitled failure mode (expected exit 5) + continue-on-error: true + run: | + set +e + flawd ci --diff "${{ github.event.pull_request.base.sha || 'HEAD~1' }}" > /tmp/unentitled.log 2>&1 + code=$? + echo "exit code: $code" + cat /tmp/unentitled.log + { + echo "### Unentitled flawd ci" + echo "- exit code: $code (expect 5)" + echo '```' + tail -8 /tmp/unentitled.log + echo '```' + } >> "$GITHUB_STEP_SUMMARY" + [ "$code" -eq 5 ] || echo "::warning::expected exit 5, got $code" + + - name: Preflight (flawd check) + continue-on-error: true + run: flawd check || true + + - name: Coverage generation timing (host toolchain) + run: | + rustup toolchain install stable --profile minimal --component llvm-tools-preview --no-self-update + curl -fsSL "https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz" \ + | tar xzf - -C "$HOME/.cargo/bin" + t0=$SECONDS + mkdir -p coverage + cargo llvm-cov --workspace --lcov --output-path coverage/lcov.info + dur=$((SECONDS - t0)) + echo "### Coverage generation (cold): ${dur}s" >> "$GITHUB_STEP_SUMMARY" + wc -l coverage/lcov.info >> "$GITHUB_STEP_SUMMARY" + + - name: Baseline test timing (host toolchain, warm build) + run: | + t0=$SECONDS + cargo test --workspace + echo "### cargo test (after coverage build): $((SECONDS - t0))s" >> "$GITHUB_STEP_SUMMARY" + + - name: Docker image build timing (flawd Dockerfile) + run: | + t0=$SECONDS + docker build -t lash-flawd-probe -f Dockerfile . + echo "### Docker image build (cold): $((SECONDS - t0))s" >> "$GITHUB_STEP_SUMMARY" From 8e645b34ab30d468936a5eaadbcd16576e4e83ac Mon Sep 17 00:00:00 2001 From: Frank O'Hara Date: Wed, 26 Aug 2026 15:57:31 -0600 Subject: [PATCH 2/3] ci(rehearsal): add cargo/target cache to measure warm-runner timings --- .github/workflows/mutation-rehearsal.yml | 11 +++++++++++ crates/lash-agent/src/context.rs | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mutation-rehearsal.yml b/.github/workflows/mutation-rehearsal.yml index 991256c..8ebedab 100644 --- a/.github/workflows/mutation-rehearsal.yml +++ b/.github/workflows/mutation-rehearsal.yml @@ -16,6 +16,17 @@ jobs: with: fetch-depth: 0 + - name: Restore cargo + target cache + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: flawd-rehearsal-${{ runner.os }}-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} + restore-keys: | + flawd-rehearsal-${{ runner.os }}- + - name: Install flawd from the public mirror run: | t0=$SECONDS diff --git a/crates/lash-agent/src/context.rs b/crates/lash-agent/src/context.rs index 467e1f1..baf9372 100644 --- a/crates/lash-agent/src/context.rs +++ b/crates/lash-agent/src/context.rs @@ -66,7 +66,7 @@ pub struct InclusionRules { impl Default for InclusionRules { fn default() -> Self { Self { - include_dependencies: true, + include_dependencies: false, include_blockers: true, include_completed: false, max_dependency_depth: 2, From 54dfb2017a19ce142095449c43d6c9feddcaf753 Mon Sep 17 00:00:00 2001 From: Frank O'Hara Date: Wed, 26 Aug 2026 16:04:19 -0600 Subject: [PATCH 3/3] fix: remove a stray mutation left by an interrupted flawd doctor sentinel probe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An interrupted 'flawd doctor' run on this checkout left its sentinel mutation (InclusionRules include_dependencies true->false) live in the working tree, and it rode into the previous commit unnoticed. The lash-agent mutant-killing tests caught it in CI immediately — which is the system working. Filed flawd-side: sentinel probes must be crash-safe (never mutate the user's tree in place without guaranteed restore). --- crates/lash-agent/src/context.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/lash-agent/src/context.rs b/crates/lash-agent/src/context.rs index baf9372..467e1f1 100644 --- a/crates/lash-agent/src/context.rs +++ b/crates/lash-agent/src/context.rs @@ -66,7 +66,7 @@ pub struct InclusionRules { impl Default for InclusionRules { fn default() -> Self { Self { - include_dependencies: false, + include_dependencies: true, include_blockers: true, include_completed: false, max_dependency_depth: 2,