mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-12-05 04:47:43 +08:00
scripts/fuzz.sh drives the libFuzzer targets in two shapes from one entry: a fixed --runs from a fixed --seed, so a CI smoke is a function of the code and not a lottery (O9), and a time-boxed --max-total-time for exploration. Checked-in seeds are copied into a working corpus under build/fuzz/, so a run never rewrites the repository; a crash leaves its reproducer behind and the script exits non-zero. Wired as a smoke into dry-run.yml and as exploration into nightly-soak.yml. The venue-parity contract rightly refused both workflow steps: a venue may provision or plumb, but only a CANONICAL leg entry may exercise the product, and neither script was registered. Registering them — rather than working around the contract — is the fix, since both own their leg end to end (build, corpus or binary, artifact paths, exit code) exactly as soak-legs.sh owns the soak. _memwaste.yml joins the policed venue walk for the same reason, and both scripts join the layer-5 interface probes. Those probes immediately earned their keep, finding two real defects: `fuzz.sh --help` exited 2 because the positional target consumed the flag, and memwaste.sh read a typo'd flag as the repository path — which would have indexed nothing and reported an empty lane as a clean one. test_shell_line_endings.sh now degrades where the checkout has no reachable repository metadata: the Linux container bind-mounts the working tree, and a git worktree's .git is a pointer to the host repository, so `git ls-files` cannot run there and the contract failed with "matched no files — the glob set is broken", killing the leg before it compiled. It is a repository property, so it stays gating in every venue that has the metadata (macOS host, the Windows VM's real checkout at C:\cbm with 117 files, every hosted-CI checkout). test_version_metadata_contract.sh already guards the same way for the same reason; the alternatives considered and rejected are recorded at the case. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
67 lines
2.7 KiB
YAML
67 lines
2.7 KiB
YAML
# Soak dispatcher — the weekly scheduled soak AND every on-demand soak run.
|
|
#
|
|
# Absorbs the retired soak.yml (the standalone "multi-hour #581" workflow): its
|
|
# reasons to exist — a job budget that actually covers a 4h run, and the
|
|
# query-leak mode that never reindexes so the #581 leak can accumulate — are
|
|
# now _soak.yml facts (timeout 560, legs input). A long #581-only run is
|
|
# `legs: query-leak` here, not a separate workflow with its own copy of the
|
|
# soak procedure. NON-GATING: never a required check, never blocks a merge.
|
|
name: Nightly Soak
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 2 * * 0' # Every Sunday at 2am UTC
|
|
workflow_dispatch:
|
|
inputs:
|
|
duration_minutes:
|
|
description: 'Soak duration in minutes PER LEG (default: 240 = 4h)'
|
|
type: number
|
|
default: 240
|
|
legs:
|
|
description: 'Soak legs (query-leak = the #581 detector alone)'
|
|
type: choice
|
|
options: ['quick,query-leak', 'quick', 'query-leak']
|
|
default: 'quick,query-leak'
|
|
run_asan:
|
|
description: 'Also run the 15-min ASan soak legs'
|
|
type: boolean
|
|
default: true
|
|
# Iteration convenience carried over from soak.yml: pushing a qa/soak-**
|
|
# branch starts a real run from that branch's own copy of the workflows.
|
|
push:
|
|
branches: ['qa/soak-**']
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
# Fuzz exploration: new inputs are the point here, so it runs for a time
|
|
# budget instead of a fixed count. NON-GATING like the soak; a crash uploads
|
|
# its reproducer, which becomes a fixed-seed regression input once fixed.
|
|
fuzz:
|
|
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 120
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Install deps
|
|
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev clang llvm libclang-rt-dev
|
|
- name: Fuzz exploration (30 min per target)
|
|
run: scripts/fuzz.sh all --max-total-time 1800 --seed 0
|
|
- name: Upload reproducers
|
|
if: ${{ failure() }}
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: fuzz-artifacts-nightly
|
|
path: build/fuzz/artifacts-*/
|
|
if-no-files-found: ignore
|
|
|
|
soak:
|
|
uses: ./.github/workflows/_soak.yml
|
|
with:
|
|
# On schedule/push events the inputs context is empty — fall back to the
|
|
# weekly defaults (4h, both legs, ASan on).
|
|
duration_minutes: ${{ inputs.duration_minutes || 240 }}
|
|
legs: ${{ inputs.legs || 'quick,query-leak' }}
|
|
run_asan: ${{ github.event_name != 'workflow_dispatch' || inputs.run_asan }}
|