# expected-failures.txt — suite-level known-failing tests for the
# doc-anchored agentic test suite under docs/generated/tests/.
#
# This is the agentic suite's OWN list. It is intentionally NOT shared
# with the default-test suite's `tests/expected-failure-*.txt` files,
# and the nightly does not consult those default lists either.
#
# Format
# ------
# One path per line. Comments start with `#` and are mandatory for
# documenting *why* the entry exists: each path must be preceded
# somewhere above by a `#` comment containing a reference link
# (tracking issue URL, GitHub Actions run URL, or `issues/NNN`-style
# reference). Lint enforces this.
#
# Scope
# -----
# Any test that is known-failing under the nightly's configuration and
# has a documented reason. Categories that belong here:
#   - filed compiler bugs that need fixing in the compiler,
#   - test-content bugs in auto-generated bundles awaiting regeneration
#     (hand-editing is discouraged by the per-file warning),
#   - platform-specific failures (e.g. Linux-only) with the cause
#     pending diagnosis,
#   - any other documented failure mode pending triage.
#
# When the agentic nightly invokes slang-test with
# `-expected-failure-list <this file>`, slang-test reclassifies matching
# failures as `failed(expected)` (TestResult::ExpectedFail), keeps them
# out of the unexpected-failure exit code, and surfaces a `passing tests
# that are expected to fail` section listing any entry that has started
# passing — the cue to remove it from this file.
#
# Not for: untracked flakes or anything that would otherwise be silently
# silenced. Every entry needs a comment block above it explaining why.

# https://github.com/shader-slang/slang/issues/11403 — slangi VM
# short-circuits `?:` contra the language-reference spec. The HLSL
# emit shows both branches; the VM evaluates only the selected
# branch. Discovered while writing the
# language-reference/expressions-operators bundle.
docs/generated/tests/conformance/expressions-operators/conditional-does-not-short-circuit.slang

# Pending: docs/generated/tests/_meta/findings/slangi-vm-vector-scalar-binary-op-wrong-values.yaml
# slangi VM computes `int4(1,2,3,4) - 1` as `int4(0,0,0,0)` instead
# of `int4(0,1,2,3)`. Vector-scalar binary op broadcast appears
# missing in the VM emitter. (Will become a tracking issue after
# human triage.)
docs/generated/tests/conformance/types-vector-and-matrix/vector-binary-scalar-broadcast.slang

# Pending: docs/generated/tests/_meta/findings/slangi-vm-swizzle-assign-bytecode-unimplemented.yaml
# slangi VM aborts with "unimplemented: VM bytecode gen for inst"
# when compiling a vector swizzle-assign (v.xz = int2(...)). The
# doc shows this as a supported construct.
docs/generated/tests/conformance/types-vector-and-matrix/vector-swizzle-assign.slang

# Pending: docs/generated/tests/_meta/findings/slangi-vm-matrix-mij-swizzle-working-set-oob.yaml
# slangi VM triggers "operand access out of bounds in working set
# section" when reading a matrix element via `_mij` swizzle. Doc
# lists this as supported.
docs/generated/tests/conformance/expressions-member-access/matrix-mij-zero-based.slang

# Pending: docs/generated/tests/_meta/findings/slangi-vm-global-var-bytecode-unsupported.yaml
# slangi VM aborts with "unsupported global inst for vm bytecode
# emit" when any module-scope global variable is declared (e.g.
# `static int x = 42;` in an enum extension). Doc Example 1 for
# enum extensions uses this exact construct.
docs/generated/tests/conformance/types-extension/enum-extension-static-members.slang

# Surfaced on nightly run 26934884546 (Linux agentic suite):
# https://github.com/shader-slang/slang/actions/runs/26934884546
# (no tracking issue filed yet; pending user triage). Both pass locally
# on macOS but fail in the slang-linux-clang-ci container — same
# stricter-Linux-spirv-val class as Cluster C.
#  - pointer-arithmetic-spirv-emission: root-caused 2026-09-12. Not a
#    host difference -- it reproduces anywhere once
#    SLANG_RUN_SPIRV_VALIDATION=1 is set, which is what the CI container
#    does. The emitter emits `OpPtrAccessChain` for pointer arithmetic on
#    a function-local array while declaring none of the capabilities that
#    opcode requires, so spirv-val rejects the module and slangc produces
#    no output for the CHECK to match. `requireVariableBufferCapabilityIfNeeded`
#    (slang-emit-spirv.cpp:12038) selects by address space and handles only
#    StorageBuffer and GroupShared; AddressSpace::Function falls through.
#    Keep this entry until the capability logic is fixed -- see
#    _meta/findings/ptraccesschain-function-storage-missing-capability.yaml
#    and _meta/triage/01-pointer-arithmetic-stale-entry.md.
#  - 29106: the `spirv-instruction-with-too-many-operands` diagnostic
#    test. Removed 2026-08-05: the diagnostics-catalog bundle no longer
#    generates that test, so the entry no longer resolved to a file.
docs/generated/tests/conformance/types-pointer/pointer-arithmetic-spirv-emission.slang

# Pending: docs/generated/tests/_meta/findings/new-expr-with-constructor-args-internal-error.yaml
# The `E99997 ... could not resolve target declaration for call` abort this
# block was opened for is fixed by
# https://github.com/shader-slang/slang/pull/12519, so the hlsl (`.slang`),
# metal (`.slang.3`) and wgsl (`.slang.4`) directives now pass and have been
# removed from this block. What remains is the separate emission gap #12519
# called out: a class object materialized in a shader still fails to emit on
# the Khronos targets, so glsl (`.slang.1`) reports `E99999 ... unhandled
# type` and spirv-asm (`.slang.2`) reports `E99997 ... Unhandled global inst
# in spirv-emit`. Remove these two once class emission works there.
docs/generated/tests/design/ast-reference/expressions/new-expr-constructor-args.slang.1
docs/generated/tests/design/ast-reference/expressions/new-expr-constructor-args.slang.2

# Pending: docs/generated/tests/_meta/findings/switch-case-decl-used-in-later-case-invalid-cpp-emit.yaml
# A local declared under one `switch` case label and used under another is
# accepted silently by the frontend, but the C++ emitted with debug info
# (`-g2`, which the `-cpu` COMPARE_COMPUTE path uses) references an
# undeclared `shared_0`, so clang rejects the generated file. (Will become
# a tracking issue after human triage.)
docs/generated/tests/design/ast-reference/statements/switchstmt-case-decl-used-in-later-case.slang (cpu)

# Pending: docs/generated/tests/_meta/findings/metal-append-buffer-params-missing-binding-slot.yaml
# On `-target metal` the element and counter pointers that
# `lowerAppendConsumeStructuredBuffers` synthesizes for an
# `AppendStructuredBuffer<T>` are emitted as kernel parameters with no
# `[[buffer(N)]]` attribute at all, while an ordinary RWStructuredBuffer
# beside them gets `[[buffer(3)]]`. MSL requires an attribute on every
# kernel argument. (Will become a tracking issue after human triage.)
docs/generated/tests/design/target-pipelines/metal/append-buffer-params-carry-buffer-slots.slang

# Pending: docs/generated/tests/_meta/findings/declarations-refaccessor-metal-unknown-addressspace-abort.yaml
# Pending: docs/generated/tests/_meta/findings/declarations-refaccessor-spirv-invalid-funcall-return-type.yaml
# The emission fan-out for the `ref`-accessor claim reaches the last two
# shader targets and both are broken: `-target metal` (directive `.1`) aborts
# with the internal error "Unknown addressspace encountered", and
# `-target spirv-asm` (directive `.2`) declares the accessor helper as
# `OpTypeFunction %int %_ptr_Function_Cell` while calling it as
# `OpFunctionCall %_ptr_Function_int`, so the module fails spirv-val.
# The entries name the two sub-tests rather than the file because the file's
# first directive (`-target hlsl`) still passes and must keep reporting.
# NOTE: `lint_expected_failures` resolves each entry as a path on disk, so it
# flags these two sub-test names as unresolvable; the lint rule does not yet
# know about slang-test's `<file>.<n>` sub-test naming. Remove these entries
# when either back-end is fixed. (Will become a tracking issue after human
# triage.)
docs/generated/tests/design/ast-reference/declarations/refaccessor-property.slang.1
docs/generated/tests/design/ast-reference/declarations/refaccessor-property.slang.2

# https://github.com/shader-slang/slang/issues/12443 — `Size(N)` enum
# construction is rejected inside a generic function's array bound with
# E33070 "expected a function, got 'typeof(Size)'", while the same spelling
# compiles in an ordinary expression. Recorded in
# _meta/findings/enum-cast-in-generic-array-bound-rejected.yaml.
docs/generated/tests/design/ast-reference/values/builtinoperationintval-enum-operands-fold.slang

# Surfaced on nightly run 34310111817 (first failed on the 2026-09-02
# nightly and every nightly since):
# https://github.com/shader-slang/slang/actions/runs/34310111817
# Compiler bug, bisected to
# https://github.com/shader-slang/slang/pull/12574. `prelinkIR` now clones
# an imported interface's definition into the user module instead of
# re-deriving it. `builtinRequirementKey` is hoistable, so the linker's
# cloner (`cloneInst` in slang-ir-link.cpp) dedups the cloned key onto the
# one lowering already created — and then runs `cloneDecorationsAndChildren`
# on that pre-existing inst anyway, so it ends up with
# `BuiltinRequirementDecoration` twice. slang-ir-clone.cpp guards against
# exactly this case (see PR #12569); the linker's cloner has no equivalent
# guard. All three tests pin "the role decoration is immediately followed by
# the key built from the same ordinal", which the duplicated line breaks.
# Remove once the linker stops grafting decorations onto a dedup hit.
docs/generated/tests/design/cross-cutting/ir-instructions/decoration-builtin-requirement-key-ir.slang
docs/generated/tests/design/ir-reference/decorations/builtin-requirement-key-decoration.slang
docs/generated/tests/design/ir-reference/differentiation/builtin-requirement-decoration.slang

# Surfaced on nightly run 34310111817:
# https://github.com/shader-slang/slang/actions/runs/34310111817
# Diagnostic text drift rather than a compiler bug.
# https://github.com/shader-slang/slang/pull/12616 merges type-flow sets
# directly instead of through an intermediate hash set, so `E50102` now
# reports "2 possible types: 'Square, Rect'" where the pinned text says
# "'Rect, Square'". Remove once the expected text is regenerated — or once
# the diagnostic sorts the list, which would make the text order-stable by
# construction rather than a reflection of the merge order.
docs/generated/tests/design/pipeline/05-ir-passes/typeflow-report-dynamic-dispatch-sites.slang
