# agentic-coverage-excludes.txt — paths skipped in the coverage agentic pass
#
# `tools/coverage/run-coverage.sh` reads this file and appends one
# `-exclude-prefix` flag to the agentic slang-test invocation for each
# entry. The agentic pass under coverage instrumentation can SIGSEGV
# inside slang-test on certain tests; the orchestrator dies and takes
# the tail of the suite down with it, so we exclude those tests up
# front to keep the rest of the suite running and producing coverage.
#
# This file is NOT consulted by nightly-slang-test.yml — those
# tests still run in the nightly against the uninstrumented binary,
# where they bucket as `failed(expected)` via expected-failures.txt
# where appropriate. The exclude is purely a coverage-stability hack.
#
# Format
# ------
# One path per line. Lines starting with `#` and blank lines are
# ignored. Comments after `#` on a path line are also stripped. Each
# entry is passed verbatim to slang-test's `-exclude-prefix` flag,
# which is a path-prefix filter — listing a directory excludes
# everything under it.
#
# Each entry SHOULD be accompanied by a `#` comment block above it
# documenting the symptom and how it was identified (CI run URL +
# the last-printed test before the crash), so a future maintainer
# can verify whether the underlying issue is still present.
#
# Reading a crash out of a coverage run
# -------------------------------------
# The agentic pass runs sequentially and in-process (`-server-count 1`,
# no `-use-test-server`), so a compiler SIGSEGV is a slang-test SIGSEGV.
# slang-test walks the suite in sorted path order and prints each result
# as it finishes, which makes the crashing test the one that comes
# immediately AFTER the last `passed test:`/`failed... test:` line before
# the `Segmentation fault`/`Bus error` message — it never gets to print
# its own result. Take that next path, add it here, and record the run
# URL plus the last-printed test in the comment block.
#
# Staleness signal
# ----------------
# `regenerate.py lint` checks that every path below still resolves on
# disk, so an entry orphaned by a regeneration round that renames or
# moves its test now fails the lint in nightly-slang-test.yml instead of
# silently excluding nothing. That catches the rename direction only.
#
# In the other direction, `-exclude-prefix` has no "passing tests that
# are expected to fail" reporter, so entries here can still rot silently
# once the underlying crash is fixed. To audit the list periodically:
#   1. Compile slang with coverage instrumentation locally.
#   2. Remove an entry below and run
#      `./tools/coverage/run-coverage.sh --with-agentic-tests`
#      (or trigger the coverage workflow on a branch with the
#      entry removed).
#   3. If the run completes without a SIGSEGV in slang-test, the
#      underlying crash has been fixed — drop the entry for real.
# A green nightly-slang-test.yml run on the same test is a
# necessary but NOT sufficient condition. Two things differ there:
# the binary is uninstrumented, and the test runs in a subprocess
# test server, so a fault is reported as a failure rather than taking
# the orchestrator with it. The exact failure mode varies per entry —
# see each entry's own comment block for its symptom and how (or
# whether) it also surfaces in the nightly.

# Local coverage reproducer (RelWithDebInfo + -fprofile-instr-generate,
# sequential -server-count 1): SIGSEGV in slang-test immediately after
# ir-reference/misc/string-hash-fold-emitted-constant.slang.6 passes —
# i.e. on the next test, string-hash-stable-value-cpu.slang. That test
# is a `//TEST:COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu` case; the
# in-process CPU host-callable execution segfaults the slang-test
# process, so unlike a normal failure the expected-failures.txt entry
# (`... (cpu)`) cannot catch it — the whole orchestrator dies and the
# tail of the suite (design/* after misc, coverage/autodiff, …) never
# runs and produces no coverage. The compiler itself is fine
# (`slangc -target ...` compiles it); this is a harness/host-callable
# in-process crash, so nightly-slang-test.yml (subprocess/test-server)
# still buckets it as failed(expected) via expected-failures.txt.
docs/generated/tests/design/ir-reference/misc/string-hash-stable-value-cpu.slang
