# Supported Syntax

This document describes the syntax and framework constructs that CheckTest Milestone-1 recognizes, the assertion forms it classifies, the executability establishment rule, and the declared analysis scope.

---

## Framework Allowlist

Both **Jest** and **Vitest** are supported. The detector recognizes **runtime** imports from:

- `jest`
- The 12 `@jest/*` subpaths in `JEST_RUNTIME_SPECIFIERS` that ship runtime code:
  `@jest/console`, `@jest/core`, `@jest/expect`, `@jest/expect-utils`, `@jest/fake-timers`,
  `@jest/globals`, `@jest/reporters`, `@jest/schemas`, `@jest/source-map`,
  `@jest/test-result`, `@jest/test-sequencer`, `@jest/transform`
- `vitest` and `vitest/*`

It also recognizes one non-import runtime signal: a member call `vi.<name>(...)` whose receiver is the bare identifier `vi` (Option A, 2026-11-02). Vitest's `globals: true` exposes `vi` on the global scope, so a globals-enabled file may use it with no import declaration; such a call marks the file Vitest. A property named `vi` on another object (`obj.vi.fn()`) or a longer identifier (`myvi.fn()`) does not count.

Type-only imports (`import type ...` or all-type named imports) are ignored — they prove nothing about the runtime framework.

A file with **no** runtime framework evidence and **no** bare-global declaration shape falls through to `UNKNOWN_FRAMEWORK` → `UNSUPPORTED`. However, a bare-global declaration shape **does** fire a derived fallback (see [Limitations §22](./limitations.md#22-mocha-class-bare-global-derivation-p2-sp2)): bare `describe`/`it`/`test` with or without bare `expect()` — no imports, no local bindings — derives `mocha` (DERIVED signal). Files with bare declaration **+** bare `expect(...)` keep the existing jest derivation (same provenance path). Imported bindings suppress all derivations. Mixed-framework files (two distinct framework signals present) still report `MIXED_FRAMEWORK` (not first-wins). Vitest is supported (B1, 2026-11-01): `it`/`test` declarations from a `vitest` import or `vi.*` evidence are collected like Jest.

**Source:** `src/adapters/typescript/support.ts:22` (`SUPPORTED_FRAMEWORKS = ['jest', 'vitest', 'mocha']`), `src/adapters/typescript/support.ts:105` (`JEST_RUNTIME_SPECIFIERS`), `src/adapters/typescript/support.ts:229` (`detectFramework`), `src/adapters/typescript/support.ts:289` (`isGlobalViMemberCall`), `src/adapters/typescript/support.ts:304` (`isTypeOnlyImport`), `src/adapters/typescript/collector.ts:184-187` (unsupported on non-supported framework), `tests/fixtures/ct-int-001/case-15-mixed-framework` (fixture 15), `tests/fixtures/ct-int-001/case-24-vitest-standard` (fixture 24), `tests/fixtures/ct-int-001/case-28-global-vi` (fixture 28).

---

<!-- The rule metadata `docsUrl` (src/rules/ct-int-001.ts) hardcodes the
     historical `#assertion-forms-11-forms-a9` fragment; this explicit anchor
     keeps that external link resolving after the heading rename below. -->

<a id="assertion-forms-11-forms-a9"></a>

## Assertion Forms (44 forms, A9)

The following 44 assertion form IDs are recognized. The first 42 map to a Jest/Vitest matcher on an `expect(...)` chain — the original 30 (11 + 17 added by the dogfood-gap-closure matcher expansion, council FROZEN FORM SET, 2026-11-22: 11 plain + 6 negated) plus 12 added by the open-item #1 matcher recognition (batch 1, 2026-11-24). The final 2 are supertest/superagent HTTP fluent forms, recognized on a non-`expect`-rooted chain (see [Supertest HTTP Assertion Chains](#supertest-http-assertion-chains-sp3-2026-11-09)). **These 44 strings are the verbatim elements of `SUPPORTED_ASSERTION_FORMS` in `src/adapters/typescript/capabilities.ts`.**

| Form ID                              | Matcher                                                                    | Syntax Example                                                      |
| ------------------------------------ | -------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| `expect-to-be`                       | `toBe`                                                                     | `expect(1 + 1).toBe(2)`                                             |
| `expect-to-equal`                    | `toEqual`                                                                  | `expect({ a: 1 }).toEqual({ a: 1 })`                                |
| `expect-to-be-truthy`                | `toBeTruthy`                                                               | `expect(value).toBeTruthy()`                                        |
| `expect-to-be-falsy`                 | `toBeFalsy`                                                                | `expect(value).toBeFalsy()`                                         |
| `expect-to-throw`                    | `toThrow`                                                                  | `expect(() => { throw new Error('x'); }).toThrow('x')`              |
| `expect-rejects-to-throw`            | `rejects.toThrow`                                                          | `await expect(Promise.reject(new Error('x'))).rejects.toThrow('x')` |
| `expect-to-match-snapshot`           | `toMatchSnapshot`                                                          | `expect(rendered).toMatchSnapshot()`                                |
| `expect-to-contain`                  | `toContain`                                                                | `expect(array).toContain(item)`                                     |
| `expect-matcher-utils`               | `expect.any` / `objectContaining` / `arrayContaining` / `stringContaining` | `expect(x).toEqual(expect.objectContaining({ a: 1 }))`              |
| `expect-to-match-object`             | `toMatchObject`                                                            | `expect(obj).toMatchObject({ a: 1 })`                               |
| `expect-to-have-been-called-times`   | `toHaveBeenCalledTimes`                                                    | `expect(mock).toHaveBeenCalledTimes(1)`                             |
| `expect-to-be-undefined`             | `toBeUndefined`                                                            | `expect(x).toBeUndefined()`                                         |
| `expect-to-have-property`            | `toHaveProperty`                                                           | `expect(obj).toHaveProperty('a')`                                   |
| `expect-to-be-defined`               | `toBeDefined`                                                              | `expect(x).toBeDefined()`                                           |
| `expect-to-have-length`              | `toHaveLength`                                                             | `expect(arr).toHaveLength(2)`                                       |
| `expect-to-be-greater-than`          | `toBeGreaterThan`                                                          | `expect(2).toBeGreaterThan(1)`                                      |
| `expect-to-be-null`                  | `toBeNull`                                                                 | `expect(x).toBeNull()`                                              |
| `expect-to-match`                    | `toMatch`                                                                  | `expect('abc').toMatch(/a/)`                                        |
| `expect-to-have-been-called`         | `toHaveBeenCalled`                                                         | `expect(fn).toHaveBeenCalled()`                                     |
| `expect-to-have-been-called-with`    | `toHaveBeenCalledWith`                                                     | `expect(fn).toHaveBeenCalledWith(1)`                                |
| `expect-to-match-inline-snapshot`    | `toMatchInlineSnapshot`                                                    | `expect('x').toMatchInlineSnapshot()`                               |
| `expect-to-be-greater-than-or-equal` | `toBeGreaterThanOrEqual`                                                   | `expect(2).toBeGreaterThanOrEqual(2)`                               |
| `expect-not-to-be`                   | `not.toBe`                                                                 | `expect(1).not.toBe(2)`                                             |
| `expect-not-to-contain`              | `not.toContain`                                                            | `expect([1]).not.toContain(2)`                                      |
| `expect-not-to-have-property`        | `not.toHaveProperty`                                                       | `expect(obj).not.toHaveProperty('b')`                               |
| `expect-not-to-be-null`              | `not.toBeNull`                                                             | `expect(x).not.toBeNull()`                                          |
| `expect-not-to-throw`                | `not.toThrow`                                                              | `expect(fn).not.toThrow()`                                          |
| `expect-not-to-have-been-called`     | `not.toHaveBeenCalled`                                                     | `expect(fn).not.toHaveBeenCalled()`                                 |
| `supertest-expect-status`            | `.expect(status)` on an HTTP chain                                         | `request(app).get('/').expect(201)`                                 |
| `supertest-expect-body`              | `.expect(status, body, …)` on an HTTP chain                                | `request(app).get('/').expect(201, 'Created')`                      |

**Source:** `src/adapters/typescript/capabilities.ts:25-56` (`SUPPORTED_ASSERTION_FORMS` — the 30 form IDs), `src/adapters/typescript/support.ts:46-68` (`ASSERTION_FORM_BY_MATCHER`), `src/adapters/typescript/support.ts:77-84` (`ASSERTION_NEGATED_FORM_BY_MATCHER` — the 6 sync `not.<matcher>` forms), `src/adapters/typescript/support.ts:375` (`SUPERTEST_HTTP_METHODS`), `src/adapters/typescript/support.ts:442-461` (`isSupertestChain`), `src/adapters/typescript/support.ts:463-466` (classifyForm supertest branch), `src/adapters/typescript/support.ts:457-494` (`classifyForm`). The 2 supertest forms (`supertest-expect-status`, `supertest-expect-body`) are recognized on non-expect-rooted chains — see [Supertest HTTP Assertion Chains](#supertest-http-assertion-chains-sp3-2026-11-09).

### Recognized Shapes

1. **Synchronous**: `expect(<arg>).<matcher>(...)` where `<matcher>` is one of the positive sync matchers above.
2. **Synchronous negation**: `expect(<arg>).not.<matcher>(...)` — a literal `.not` whose receiver is a direct `expect(...)` call, for the 6 negated matchers above. A computed `.not` (`expect(x).not[m]()`) and async negation (`expect(p).rejects.not.<matcher>()` / `resolves.not.`) are NOT classified (see below).
3. **Async rejects**: `await expect(<promise>).rejects.toThrow(<matcher>?)` — the only async form in the allowlist.

### Not Recognized (recorded as unsupported forms)

- `expect(x).toBeCloseTo(...)`, `expect(x).toBeCalledWith(...)`, and other matchers not among the 28 form IDs — matcher not in the allowlist.
- `expect(x)[computedMatcher]()` and `expect(x).not[computedMatcher]()` — matcher name (or the `.not` property) is not statically resolvable.
- `expect(x).rejects.not.toBe(...)`, `expect(p).resolves.not.<matcher>()` — async negation is deferred to milestone-2; the `.not` receiver is not a direct `expect(...)` call.
- `expect.soft(...)`, `expect.extend(...)` custom matchers, node:assert (`assert.*`), and custom assertion helpers — outside the declared `test-body` scope.
- Chai-style `assert.equal(x, y)`, `should`, `expect(...).to.be.*` — namespace `assert`/`chai`/`should` is in `UNSUPPORTED_ASSERTION_NAMESPACES`.
- Supertest HTTP assertion chains `request(app).<method>(...).expect(...)` are classified separately (see [Supertest HTTP Assertion Chains](#supertest-http-assertion-chains-sp3-2026-11-09)); a chain whose terminal call is neither a recognized supertest form nor a Jest matcher lands in the unsupported reporting path at `collector.ts:675` (expect-rooted) / `:682` (namespace check) — for chains rooted at `expect` or an `UNSUPPORTED_ASSERTION_NAMESPACES` member. Other fluent chains (non-expect, non-namespace terminals) remain null-recorded per the pre-existing heuristic gap (`support.ts:63-65`), not silently dropped from the recognized paths.

---

## Executability Establishment Rule (A7)

An assertion is **established** (counted toward `assertion_count`) **only** when it appears in the **straight-line body** of a test function — the exact definition is in [Straight-Line Body](#straight-line-body-e) below.

An assertion is **unestablished** (not counted, availability becomes `UNKNOWN`) when:

| Condition                                                                                                                       | Reason reported                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| After an unconditional `return` or `throw` in the same block                                                                    | `assertion appears after an unconditional return/throw; execution cannot be established statically`                 |
| Inside a nested block or control-flow construct (`if`/`else`, loop, `try`/`catch`/`finally`, `switch`, `do`, labeled statement) | `assertion is inside a nested block (if/loop/try/switch); straight-line execution cannot be established statically` |
| Inside a nested callback (arrow function, function expression, or function declaration nested in the test body)                 | `assertion is inside a callback; callback execution cannot be established statically`                               |
| Inside a test declaration whose form is not fully supported (`each` over a non-literal table, `skip`, `only`, ...)              | `'it.each' is not a supported test declaration form; how often its body runs cannot be established statically`      |

**Recognition completeness** (whether the collector _recognized_ the construct) is separate from **executability**. A recognized but unestablished assertion leaves `analysis.completeness = COMPLETE` but `evidence.assertion_count.availability = UNKNOWN`. An **unrecognized declaration form** is a recognition gap and additionally leaves `completeness = INCOMPLETE`. The nested-block census size (misc 108, nested-only 67) and the never-FAIL invariant are documented in [Limitations §35](./limitations.md#35-nested-block-assertions-stay-indeterminate-executability-honest-remainder-t8-council-frozen-2026-11-22).

**Source:** `src/adapters/typescript/collector.ts:68-73` (the three reason constants), `src/adapters/typescript/collector.ts:492-540` (`scanTestBody`), `src/adapters/typescript/collector.ts:542-555` (`isControlFlow`), `src/adapters/typescript/collector.ts:570-600` (`describeAssertion`).

### Examples

**Established (counts):**

```ts
it('adds', () => {
  expect(1 + 1).toBe(2); // straight-line body
});
```

**Unestablished — after return (does not count):**

```ts
it('returns before', () => {
  return;
  expect(1 + 1).toBe(2); // after unconditional return
});
```

**Unestablished — in callback (does not count):**

```ts
it('asserts in callback', (done) => {
  setTimeout(() => {
    expect(1 + 1).toBe(2); // inside nested callback
    done();
  }, 1);
});
```

**Unestablished — inside a nested block (does not count):**

```ts
it('asserts in a loop', () => {
  for (const value of []) {
    expect(value).toBe(1); // inside a loop — may never run
  }
});
```

---

## Straight-Line Body (E)

This is the definition of _straight-line_ used by the flow analysis in `scanTestBody`. It is a **syntactic shape test, not a dataflow analysis** — no branch conditions, loop trip counts or exception paths are evaluated.

An assertion is straight-line when **all five** rules hold:

| #   | Rule                                                                                                                                                                                                      |
| --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1   | It is a top-level statement of the test body (or the entire body of a concise arrow, `() => expect(x).toBe(1)`).                                                                                          |
| 2   | No top-level `return` or `throw` precedes it in that block. The first such statement ends the straight-line region; everything after it is unreachable.                                                   |
| 3   | It is **not** nested inside a block or control-flow construct — `if`/`else`, `for`/`for-in`/`for-of`, `while`, `do`, `try`/`catch`/`finally`, `switch`, or a labeled statement. These may or may not run. |
| 4   | It is not inside a function nested in the body (arrow function, function expression, or function declaration). That is a callback.                                                                        |
| 5   | Its enclosing declaration is a bare `it(name, fn)` / `test(name, fn)` — a modifier form (`each`, `skip`, `only`, …) changes how often the body runs in ways milestone-1 does not model.                   |

Failing a rule does **not** make the assertion unrecognized. It is still classified and reported; it only loses `established`, so it is excluded from the count and the availability becomes `UNKNOWN`. Presence alone never proves execution.

The outermost reason wins when several apply — an assertion after a `return` that also sits in a callback reports the `return`.

**Source:** `src/adapters/typescript/collector.ts:464-491` (the five rules, written in full above `scanTestBody`), `src/adapters/typescript/collector.ts:542-555` (`isControlFlow` — the construct list behind rule 3).

---

## Test Declarations (F)

Every `it` / `test` call site in the file is located and reported. A declaration is **never silently omitted**: the evidence record always carries `N test declaration(s) recognized, M not fully supported: …` whenever `M > 0`.

**Fully supported — the only form that can establish assertions:**

| Form                                                 | Example                                                                                             |
| ---------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| Bare declaration with an inline body                 | `it('name', () => { … })`, `test('name', function () { … })`                                        |
| `each` over a **statically countable literal table** | `it.each([[1, 2], [3, 4]])('adds', (a, b) => { ... })`, `test.each([1, 2])('n %i', (n) => { ... })` |

**Detected, but not fully supported (declared unsupported):**

| Form                            | Example                                                                         | Why not supported                                                                                                   |
| ------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `each` over a non-literal table | `test.each(rows)('adds', (a, b) => { ... })`, `it.each(makeRows())('n %i', fn)` | the table is an identifier, call, spread, template or computed member — the row count is not statically enumerable  |
| `each` (tagged template)        | ``test.each`row ${n}`('adds', (n) => { ... })``                                 | rows come from template interpolations, so the count is not statically enumerable either                            |
| `skip`                          | `it.skip('name', () => { … })`                                                  | the body does not execute at all                                                                                    |
| `only`                          | `it.only('name', () => { … })`                                                  | changes the executed test set; milestone-1 reports conservatively rather than modelling the filter                  |
| `todo`                          | `it.todo('name')`                                                               | declaration only — no executable body, contributes no assertions                                                    |
| `failing`                       | `it.failing('name', () => { … })`                                               | the body is expected to throw; its assertions do not run                                                            |
| `concurrent`                    | `it.concurrent('name', () => { … })`                                            | concurrent execution order is not modelled                                                                          |
| Chained modifiers               | `test.concurrent.only('name', () => { … })`, `it.skip.each(t)('name', fn)`      | the whole chain is recognized and reported as one declaration, modifier recorded as `concurrent.only` / `skip.each` |
| `skipIf` / `runIf`              | `it.skipIf(cond)('name', () => { … })`                                          | the condition is a runtime value                                                                                    |
| Any other modifier              | `it.whatever('name', () => { … })`                                              | unrecognized modifier on a recognized root — reported, never dropped                                                |
| Non-inline body                 | `it('name', helperFn)`                                                          | the body is an identifier the collector cannot resolve or scan                                                      |

### `it.each` / `test.each` over a literal table — counted as xN

An `each` table is **statically countable** when the table argument is an `ArrayExpression` whose elements are, recursively, primitive literals (string / number / boolean / null) or nested arrays of them — no spread, identifiers, calls, template literals or computed members (`literalTableRows`, `src/adapters/typescript/support.ts:821-839`). For such a declaration the gap closes: the ONE shared callback runs once per row, so the declaration's established count is multiplied by the row count (`rows x straight-line assertion count`) and the record reports `availability: KNOWN` with `coverage.status: COMPLETE`. One `TestScopeResult` per declaration site is kept — the value is an aggregate `xN`, not one record per row, so the test id shape (`<file>#<declaration>@<line>:<index>`) is unchanged.

Two limits keep the model honest:

- An **empty** literal table is not counted (jest rejects it and it runs nothing), and parentheses or negative numeric literals are not peeled: such a table keeps the `unsupported-form` gap rather than being counted off a form the model did not verify.
- A non-straight-line callback (nested block, callback, statement after `return`) still loses `established` per assertion exactly as a bare `it` does, so a partial body reports a partial count with `availability: UNKNOWN` — never a fabricated `rows x 0`.

Everything else — `it.runIf`, `it.skipIf`, `it.only`, `it.concurrent`, `it.failing`, chained modifiers, the tagged-template form, and any table that is not a literal array — is **unchanged**: recognized, reported, `unsupported-form` gap → `availability: UNKNOWN` → the rule's `unknown_evidence_policy` (INDETERMINATE by default).

**Detection is by root, not by an enumerated modifier list.** Any call whose callee peels down to the identifier `it` or `test` — through `.modifier`, `f(...)` chaining or a tagged template — is a declaration. That is why an _unrecognized_ modifier (`it.whatever`) is still reported instead of vanishing.

Calls rooted at anything else (`describe`, `beforeEach`, a local helper) are **not test declarations** and are correctly out of scope.

### Status and completeness consequences

**Scope of this table: the FILE-LEVEL aggregate record** (`AnalysisOutput.evidence`), not a per-declaration record. A per-declaration record is scoped to one site and is tabulated separately under [Five Declaration Gaps](#five-declaration-gaps-each-gets-its-own-record) — the two scopes do not necessarily agree, and reading one as the other is the source of the `it.todo` contradiction tracked as DPC-1.

| Situation (file-level aggregate)                                              | `coverage.status` | `analysis.completeness` | `availability` |
| ----------------------------------------------------------------------------- | ----------------- | ----------------------- | -------------- |
| All declarations bare, all assertions established                             | `COMPLETE`        | `COMPLETE`              | `KNOWN`        |
| Declaration-only form (`it.todo`) — body provably absent, so nothing was lost | `COMPLETE`        | `COMPLETE`              | `KNOWN`        |
| Modifier form **with** a body, or a non-inline body                           | `PARTIAL`         | `INCOMPLETE`            | `UNKNOWN`      |

The rows are single-cause shorthands: a declaration-only form is not a capability gap (`support.ts:779` `isCapabilityGap`), so a file whose ONLY gaps are declaration-only aggregates as `COMPLETE`/`KNOWN` above — but one declaration-only form mixed with any capability gap makes the aggregate `PARTIAL`/`UNKNOWN` (the fold-in is at `collector.ts:323-329`).

**Source:** `src/adapters/typescript/support.ts:530` (`TEST_DECLARATION_NAMES`), `:682-691` (`classifyTestDeclaration`), `:821-839` (`literalTableRows`), `:841-851` (`eachTableArgument`), `:853-893` (`declarationSite` — gap + `rowCount`), `:779` (`isCapabilityGap`), `:793-807` (`declarationGapReason`), `src/adapters/typescript/collector.ts:556-569` (`findTestDeclarations`), `:301-389` (`supported` — status/completeness fold-in).

---

## Declared Scope: `test-body` Only (A1)

Milestone-1 analyzes **only the body of `it` / `test` calls** in the single file passed to `--test`.

- Cross-file helper resolution: **out of scope**. A call like `expectValidUser(id)` is recorded as an unsupported form with reason `custom assertion helper is out of the declared test-body scope` — never silently dropped. The same holds for a test body passed as an identifier (`it('x', helper)`).
- Runtime execution: **out of scope**. The test file is never executed (`runtime_execution` capability is `UNAVAILABLE`).
- Table-driven tests (`test.each` / `it.each`): a **literal** table with an inline body is counted `rows x assertions`; a non-literal table and the tagged-template form are **detected and reported** as declarations without analyzing their bodies. `.skip` / `.only` bodies are never analyzed — see [Test Declarations](#test-declarations-f).

**Source:** `src/adapters/typescript/support.ts:16` (`ANALYSIS_SCOPE = 'test-body'`), `src/adapters/typescript/collector.ts:227` (`custom_helper_resolution: UNAVAILABLE`), `src/adapters/typescript/support.ts:67` (`CUSTOM_HELPER_NAME_PATTERNS`), `src/adapters/typescript/support.ts:853-893` (`declarationSite` — the non-inline body gap).

## Python

Supported frameworks: **pytest** and **unittest**. Both are statically collected — the test file is never executed (`runtime_execution: UNAVAILABLE`, `custom_helper_resolution: UNAVAILABLE` at `src/adapters/python/collector.ts:430-432`).

**Source:** `src/adapters/python/capabilities.ts:18` (`SUPPORTED_FRAMEWORKS = ['pytest', 'unittest']`), `src/adapters/python/collector.ts:430-432` (both capabilities `UNAVAILABLE`).

### Framework attribution (7.11)

Per-test framework labels come from declaration shape, not raw text:

- `class Test*` methods → `unittest` (class-membership rule).
- Module-level `def test_*` → `unittest` only if the body contains an actual `self.assert*(...)` **call node** (tree-sitter call walk; `ast.Call` attribute walk in the stdlib-ast fallback). String literals, docstrings and snippet text are never inspected, so a `pytester.makepyfile("…self.assertEqual…")` snippet stays `pytest`.
- Subject-level `test.framework` uses pytest-first precedence: any pytest-labeled test → `pytest`; else any unittest-labeled test → `unittest`; a file with no collected tests keeps the default attribution (`src/adapters/python/collector.ts:1004-1006`). A pytest file that merely contains a `class Test*` helper is attributed `pytest`.

The JSON report emits the subject-level `framework` (`src/reporters/json.ts:312`) and, inside each `testResults[]` entry, a per-test `test.framework` copied from the analysis envelope (`src/reporters/json.ts:200-203`). The per-test key is present-only: it is omitted when the test carries no framework attribution, so TS tests — whose adapter produces no per-test framework — have no `test.framework` key.

### Test declaration forms

| Form                                | Example                                                                         | Recognized |
| ----------------------------------- | ------------------------------------------------------------------------------- | ---------- |
| Bare `test_*` function              | `def test_add(): assert 1 + 1 == 2`                                             | yes        |
| `class Test*` with `test_*` methods | `class TestMath(unittest.TestCase): def test_add(self): self.assertEqual(1, 1)` | yes        |

Every collected declaration gets identity `<file>#<name>@<line>` with `declaration: 'def'` (`src/adapters/python/collector.ts:668-674`). Cross-file helper bodies are never resolved (`custom_helper_resolution: UNAVAILABLE`, `:430-432`).

**Source:** `src/adapters/python/collector.ts:315-319` (`isTestFunction` — a `function_definition` whose `name` starts with `test_`), `:372-380` (`class_definition` whose `name` starts with `Test`, members scanned for `test_*` methods), `:668-674` (declaration identity).

### Assertion forms

| Form ID                  | Syntax example                         |
| ------------------------ | -------------------------------------- |
| `assert`                 | `assert 1 + 1 == 2`                    |
| `pytest.raises`          | `with pytest.raises(ValueError): fn()` |
| `self.assertEqual`       | `self.assertEqual(1 + 1, 2)`           |
| `self.assertTrue`        | `self.assertTrue(True)`                |
| `self.assertFalse`       | `self.assertFalse(flag)`               |
| `self.assertIsNone`      | `self.assertIsNone(value)`             |
| `self.assertRaises`      | `self.assertRaises(ValueError, fn)`    |
| `self.assertIn`          | `self.assertIn(item, container)`       |
| `self.assertAlmostEqual` | `self.assertAlmostEqual(a, b)`         |

These are the verbatim elements of `SUPPORTED_ASSERTION_FORMS` in `src/adapters/python/capabilities.ts:24-34`. Detection: plain `assert` → `assert_statement` node (`collector.ts:332`); `self.assert*` forms arrive with the `self.` prefix stripped into `ASSERTION_METHODS` (`:58-61`, matched at `:337`); `pytest.raises` matches `attr.text === 'raises'` (`:337`; stdlib-ast fallback `:129-130`).

### Coverage formats

Auto-detected for Python: **coverage.py JSON** (`--cov-report=json`, parsed for `files.<name>.executed_lines`) and **lcov** (`--cov-report=lcov`, parsed via `SF:`/`DA:` records). For TypeScript/Jest/Vitest, supported coverage inputs are **Istanbul JSON** (`covered`), **c8 JSON** (`files.<path>.coveredLines`), raw Vitest `coverage-final.json` (flat Istanbul map, shape A — parsed natively; see [Limitations §25](./limitations.md)), and the **per-test-run derived shape**. See [Limitations §25](./limitations.md).

File identity matching differs by adapter. **Python:** the report must contain an entry for the analyzed test file itself, matched by **basename** (`collector.ts:444`); a report lacking it raises `no entry for <name> in ... report` (`:453`, `:464`). **TypeScript:** the provider matches the exact normalized path first (`coverage.ts:348-353`, `:545-547`); on an exact miss, multiple basename candidates fail closed with `ambiguous basename match: <sorted paths>` (`:553-554`), while zero or one candidate yields `no coverage data for <file>` (`:556`). Basename is never accepted as a substitute for an exact match; no wrong-file selection.

**Source:** `src/adapters/python/collector.ts:441-465` (`parseCoverageReport` — lcov branch `:446-453`, coverage.py JSON branch `:456-464`), `src/providers/coverage.ts:292/313/338-343` (format detection), `:348-353/545-556` (file identity matching), `tests/adapters/python/fixtures/coverage.json`, `tests/adapters/python/fixtures/coverage.lcov`.

### Mutation

Mutation is unsupported in v1: the collector emits `mutation_score` with `availability: UNKNOWN` and gap reason `'no mutation report supplied'` (`collector.ts:500-510` per-declaration, `:614-624` subject-level).

**Source:** `src/adapters/python/support.ts:52` (`NO_MUTATION_REPORT = 'no mutation report supplied'`), `src/adapters/python/collector.ts:500-510`, `:614-624`.

### Known gaps

| Gap                                    | Gap reason (verbatim from `support.ts`) | Trigger                                                                                                                                                                                                                                                         |
| -------------------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| hypothesis `@given` / property-based   | — (counted, not a gap)                  | `@given`-decorated test: body asserts counted, `availability: KNOWN`, `coverage: PARTIAL`, record tagged `property_based: true`; count not case-exhaustive (`decoratedWithGiven`, `collector.ts:381-387`; `testEvidence` `:713-737`; subject reason `:818-822`) |
| Unrecognized assertion shape           | `'unsupported-form'`                    | any assert not in `SUPPORTED_ASSERTION_FORMS`                                                                                                                                                                                                                   |
| Unparseable or missing coverage report | `'unparseable-coverage-report'`         | report path given but not parseable (`collector.ts:644-655`)                                                                                                                                                                                                    |

**`@given` consumer contract.** Key on the verdict, never on `availability`: a real `@given` test now carries `value > 0` with `availability: KNOWN` and `coverage: PARTIAL`, yet CT-INT-001 stays INDETERMINATE (PARTIAL → completeness guard). `property_based: true` is detection-affirmative only — its absence is NEVER negative evidence about a test's nature. The key is JSON-only and present-only (never `false`), appended after `unclassified_constructs` (`src/reporters/json.ts:119`); `REPORT_SCHEMA_VERSION` stays `'0.5'` and SARIF is unchanged.

**Source:** `src/adapters/python/support.ts:49` (`UNSUPPORTED_FORM_GAP = 'unsupported-form'`), `:55` (`UNPARSEABLE_REPORT_GAP = 'unparseable-coverage-report'`), `:52` (`NO_MUTATION_REPORT = 'no mutation report supplied'`).
---

## Framework Detection

Detection is deterministic. **Runtime evidence** — import declarations plus the one `vi.*` identifier signal — is authoritative. When there is none, a single **derived** fallback recognizes the bare-global test shape and records that inference honestly.

Runtime evidence (authoritative):

1. Only runtime imports count (type-only imports are ignored).
2. `jest` or a `JEST_RUNTIME_SPECIFIERS` subpath → Jest; `vitest` or `vitest/*` → Vitest.
3. A member call `vi.<name>(...)` on the bare identifier `vi` → Vitest (Option A, 2026-11-02). This is the one runtime identifier-usage signal, because Vitest's `globals: true` exposes `vi` globally and a globals-enabled file needs no import. A property named `vi` on another object (`obj.vi.fn()`) or a longer identifier (`myvi.fn()`) is not the global and is ignored.
4. Two different frameworks detected → `MIXED_FRAMEWORK` (not first-wins). A Jest import plus `vi.*` usage is `MIXED_FRAMEWORK`.

Derived fallback (P1.3, only when steps 1–4 found nothing):

5. A file that declares a bare **fully-supported** `it(...)`/`test(...)` call site **and** calls bare `expect(...)`, with no framework import and **no** local binding of `it`/`test`/`describe`/`expect`, is reported as `jest` with `derived: true` (`Provenance.DERIVED`, not a runtime observation). The collector publishes `framework_detection: PARTIAL` in `capabilities` and names the inference in the `assertion_count` evidence `reason`.
   - **Only the bare declaration form counts:** modifier/chained declarations (`it.each(t)(...)`, `test.concurrent.only(...)`) do **not** trigger the fallback. Their bodies are not scanned and are reported as unsupported-form gaps, so they must never be the reason a file is labelled `jest`.
   - **Why conservative:** bare `describe`/`it`/`test`/`expect` globals are shared by Jest, Mocha, Chai, Jasmine and Vitest, so the shape cannot be told apart statically. A file derived as `jest` may actually run under Mocha/Chai; assertions are therefore counted **only** when the matcher matches a `SUPPORTED_ASSERTION_FORMS` entry. An unsupported matcher form (e.g. Chai `expect(x).to.equal(y)`) is recorded as an unclassified construct → `PARTIAL` → `INDETERMINATE`, never a fabricated zero.
   - **`expect(` is required:** a file whose assertions live only in an unsupported API (supertest's fluent `.expect(200)`, chai, should) is left `UNKNOWN_FRAMEWORK`/`UNSUPPORTED`, so an unseen assertion can never be read as a proved zero-assertion `FAIL` (case-30).
   - **Imported names suppress the fallback:** `import { it } from 'mocha'`, `import type { it } from 'vitest'`, or any import binding of `it`/`test`/`describe`/`expect` makes those identifiers local, not globals (see case-10, case-26).

6. No runtime framework evidence and no bare-global declaration shape → `UNKNOWN_FRAMEWORK` → `UNSUPPORTED`.
7. No other heuristic on identifier usage: a variable or property named `expect` (e.g. `expect.extend(...)` at file scope with no declaration) still does not imply Jest.

**Source:** `src/adapters/typescript/support.ts:170` (`detectFrameworkDetail`), `src/adapters/typescript/support.ts:217` (`detectFramework`), `src/adapters/typescript/support.ts:253` (`isBareTestDeclarationCall`), `src/adapters/typescript/support.ts:265` (`isBareExpectCall`), `src/adapters/typescript/support.ts:226` (`collectImportedNames`), `src/adapters/typescript/support.ts:176` (`isGlobalViMemberCall`), `src/adapters/typescript/support.ts:99` (`JEST_RUNTIME_SPECIFIERS`), `src/adapters/typescript/support.ts:191` (`isTypeOnlyImport`), `src/adapters/typescript/collector.ts:89` (`FRAMEWORK_DERIVED_REASON`), `tests/fixtures/ct-int-001/case-28-global-vi` (fixture 28), `tests/fixtures/ct-int-001/case-29-bare-global-jest` (fixture 29), `tests/fixtures/ct-int-001/case-30-bare-global-without-expect` (fixture 30).

---

## Vitest-Specific Forms (SP1, 2026-11-06)

Milestone-1 treats Vitest and Jest symmetrically for the **supported** forms (bare `it`/`test` declarations, the 28 assertion matchers, the `vi.*` global signal). The eight fixtures added in SP1 (cases 31–38) document Vitest declaration and matcher shapes; `it.skip`/`it.skipIf`, `it.each` over a non-literal table (and its tagged-template form) and the `toBeCloseTo` matcher remain **unsupported** and produce INDETERMINATE or FAIL per the rules that apply to the equivalent Jest forms; a literal array table is counted `rows x assertions`, exactly like its Jest counterpart.

| Form                                                                             | Fixture | Status                                        | Completeness | Availability | `rule_result` | `reason_contains`                                                |
| -------------------------------------------------------------------------------- | ------- | --------------------------------------------- | ------------ | ------------ | ------------- | ---------------------------------------------------------------- |
| `it.each([[...]])(name, fn)` — literal array table (counted `rows x assertions`) | case-31 | No gap (countable)                            | COMPLETE     | KNOWN        | PASS          | `[]`                                                             |
| `it.each\`template\`` — tagged-template form                                     | case-32 | UNSUPPORTED-form gap                          | INCOMPLETE   | UNKNOWN      | INDETERMINATE | `["it.each", "not a supported test declaration form"]`           |
| `it.todo('name')` — declaration-only, no body                                    | case-33 | DECLARATION-ONLY gap                          | COMPLETE     | KNOWN        | FAIL          | `["it.todo", "declares no executable test body"]`                |
| `it.skip('name', fn)` — modifier with body                                       | case-34 | UNSUPPORTED-form gap                          | INCOMPLETE   | UNKNOWN      | INDETERMINATE | `["it.skip", "not a supported test declaration form"]`           |
| `it.skipIf(cond)('name', fn)` — conditional modifier                             | case-35 | UNSUPPORTED-form gap                          | INCOMPLETE   | UNKNOWN      | INDETERMINATE | `["it.skipIf", "not a supported test declaration form"]`         |
| Exported test fn (`export function testFoo() { … }`) — no `it`/`test` call site  | case-36 | No declaration recognized                     | COMPLETE     | KNOWN        | FAIL          | `[]` (0 assertions, no declaration gap)                          |
| `.not.toThrow()` — negated matcher                                               | case-37 | Supported (`expect-not-to-throw`, 2026-11-22) | COMPLETE     | KNOWN        | PASS          | `[]`                                                             |
| `toBeCloseTo` unsupported; `toHaveLength`/`toBeGreaterThan` now supported        | case-38 | Partial — `toBeCloseTo` unsupported form      | INCOMPLETE   | UNKNOWN      | INDETERMINATE | `["expect matcher is not one of the supported assertion forms"]` |

**Why these are INDETERMINATE, not FAIL:** The unsupported-form gaps that remain (`it.each` over a non-literal or tagged-template table, `it.skip`, `it.skipIf`, and the `toBeCloseTo` matcher in case-38) carry `availability: UNKNOWN`, so `unknown_evidence_policy` (default INDETERMINATE) applies — see [Five Declaration Gaps](#five-declaration-gaps-each-gets-its-own-record). `.not.toThrow()` (case-37) moved to a supported form on 2026-11-22 and is now PASS; `toHaveLength`/`toBeGreaterThan` (case-38) likewise; case-31's literal `it.each([[1, 2]])` moved to the countable literal-table model on 2026-11-22 and is now PASS with `value: 1`. The two FAIL outcomes (`it.todo`, exported-test-fn) have `availability: KNOWN` with `value: 0`; CT-INT-001 requires at least one assertion, so 0 asserts FAIL.

**Supported Vitest forms (unchanged from Jest):** bare `it('name', fn)` / `test('name', fn)` with inline body; all 28 assertion matchers on `expect(...)` chains (including the 6 sync `not.<matcher>` negations); `vi.<name>(...)` global member calls as a Vitest runtime signal. These behave identically to their Jest counterparts.

**Source:** `tests/fixtures/ct-int-001/case-31-vitest-it-each-array`, `case-32-vitest-it-each-template`, `case-33-vitest-it-todo`, `case-34-vitest-it-skip`, `case-35-vitest-it-skipif`, `case-36-vitest-exported-test-fn`, `case-37-vitest-not-to-throw`, `case-38-vitest-matchers`.

---

## Supertest HTTP Assertion Chains (SP3, 2026-11-09)

Milestone-1 recognizes two supertest/superagent fluent assertion forms on a chain whose root is **not** `expect(...)` but an HTTP request call. The terminal `.expect(...)` argument count selects the form:

| Form ID                   | Terminal call shape                       | Syntax Example                                 |
| ------------------------- | ----------------------------------------- | ---------------------------------------------- |
| `supertest-expect-status` | `.expect(status)` (1 argument)            | `request(app).get('/').expect(201)`            |
| `supertest-expect-body`   | `.expect(status, body, …)` (2+ arguments) | `request(app).get('/').expect(201, 'Created')` |

**Recognized chain shape:** `request(app).<method>(path)[.<chain>].expect(...)` where `<method>` ∈ `{get, post, put, patch, delete, head, options}` (`SUPERTEST_HTTP_METHODS`, `support.ts:375`). The root must not be the bare `expect` identifier — a jest-style `expect(...)` chain is classified by the 11 forms above. The terminal `.expect(...)` may carry a trailing callback (e.g. `done`); that argument counts toward the 2+ rule, so `.expect(201, done)` classifies as `supertest-expect-body`.

**Local-variable binding resolution (C2/S, 2026-11-22):** when the chain root is an identifier that is not `expect` and the chain itself carries no HTTP verb, `isSupertestChain` resolves that identifier to its enclosing `VariableDeclaration` initializer (nearest statement-list scope) and re-walks the initializer's chain for a verb. So `const test = request(app).post('/'); test.expect(413)` is recognized (verb-in-initializer), while a local variable whose initializer has no verb (`const h = makeThing(); h.expect(413)`) stays unrecognized. Resolution binds only declarations positioned **before** the use site — a use-before-declare forward reference (`res.expect(413); const res = req(app).post('/')`, const TDZ or var hoist) stays unrecognized. Fixtures: `tests/fixtures/ct-int-001/case-56-supertest-local-var` and `case-58-supertest-local-var-chain` (recognized), `case-59-supertest-nearmiss-no-verb-initializer` (near-miss, stays unrecognized).

**Corpus-verified scope:** express corpus, `checktest-corpus/express/test/res.sendStatus.js:17,29,41` (clone of expressjs/express; supertest `.expect(…)` chains). Fixture: `tests/fixtures/ct-int-001/case-40-supertest-chains` (post-SP3: 2 assertions, `COMPLETE`/`KNOWN`/`PASS`).

**Still unsupported (unchanged):** Chai `expect(x).to.equal(y)`, should.js `.should.equal(...)`, node `assert.*` remain in `UNSUPPORTED_ASSERTION_NAMESPACES` (`support.ts:67` unchanged). Chains rooted at `expect` or a namespace member land in the unsupported reporting path (`collector.ts:675` expect-rooted unsupported matcher; `:682` namespace check) → `PARTIAL` → `UNKNOWN` → `INDETERMINATE`, not silently dropped or read as zero. Other fluent chains (non-expect, non-namespace terminals) stay null-recorded per the pre-existing heuristic gap (`support.ts:63-65`).

**Source:** `src/adapters/typescript/support.ts:375` (`SUPERTEST_HTTP_METHODS`), `support.ts:437-450` (`isSupertestChain`, incl. binding resolution), `support.ts:459-460` (classifyForm supertest branch), `src/adapters/typescript/collector.ts:671-680` (unsupported expect-chain reporting path), `src/adapters/typescript/collector.ts:682-690` (namespace check), `tests/adapters/support.test.ts` (supertest chain forms describe), `tests/fixtures/ct-int-001/case-40-supertest-chains`, `tests/fixtures/ct-int-001/case-56-supertest-local-var`, `tests/fixtures/ct-int-001/case-58-supertest-local-var-chain`, `tests/fixtures/ct-int-001/case-59-supertest-nearmiss-no-verb-initializer`.

---

## Per-Test Evidence Granularity (v0.3)

### What Counts as One Test

One test = **one `it` / `test` call site** in the source file. The collector locates every declaration (`src/adapters/typescript/collector.ts:556-569` `findTestDeclarations`) and assigns a deterministic identity:

```
<file>#<declaration>@<line>
```

Example: `sample.test.ts#it@2` for `it('adds', () => { ... })` on line 2.

The identity uses the **declaration form as written** (`declaration` field): `it`, `test`, `it.each`, `test.each`, `it.skip`, `it.only`, `it.todo`, `it.failing`, `it.concurrent`, `it.skipIf`, `it.runIf`, or any unrecognized modifier chain (e.g., `test.concurrent.only`).

Declarations are reported in **source order** (AST walk order at `collector.ts:519-528`). This order is deterministic — no counters, no clock, no reordering.

### Five Declaration Gaps (Each Gets Its Own Record)

Every declaration receives a `TestScopeResult` (`src/core/analysis.ts:97-103`) with its own evidence and `declaration_gap` field. Five gap forms are **never silently dropped**:

`declaration_gap` holds the human-readable reason string itself (null on a fully scanned test), so the gap kind is readable from the text; the values below are verbatim from `support.ts:793-807` (`declarationGapReason`).

| Gap Kind             | Forms                                                                                                                                                  | `declaration_gap` Value                                                                                                            | Coverage                                                                  | Availability                                                                                                     | Can FAIL? |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | --------- |
| **declaration-only** | `it.todo('name')`, and any no-body form (`it.skip('name')`)                                                                                            | `"'it.todo' declares no executable test body; it contributes no assertions"`                                                       | UNAVAILABLE                                                               | UNKNOWN                                                                                                          | **Never** |
| **unresolved-body**  | `it('name', helperFn)`                                                                                                                                 | `"'it' body is not an inline function; the collector cannot resolve or scan it"`                                                   | PARTIAL                                                                   | UNKNOWN                                                                                                          | **Never** |
| **unsupported-form** | `it.each(<non-literal table>)`, `it.skip`, `it.only`, `it.failing`, `it.concurrent`, `it.skipIf`, `it.runIf`, unrecognized modifier, chained modifiers | `"'it.each' is not a supported test declaration form; how often its body runs cannot be established statically"`                   | PARTIAL                                                                   | UNKNOWN                                                                                                          | **Never** |
| **conditional**      | `(c ? it.skip : it)(...)`, `(c ? it : helper)(...)`, `(flag && it.skip)(...)`, `(cond                                                                  |                                                                                                                                    | it)(...)` (compound callees; one or both operands resolve to a test root) | `"'it.conditional' is a conditional declaration (...); which declaration runs cannot be established statically"` | PARTIAL   | UNKNOWN | **Never** |
| **aliased**          | `const t = it; t(...)` / `let t = it; t(...)` (verified in-file alias)                                                                                 | `"'it.aliased' is declared through a verified in-file test alias (it); the collector reports it without establishing how it runs"` | PARTIAL                                                                   | UNKNOWN                                                                                                          | **Never** |

The gap kind is decided by (has inline callback) × (has modifier) at `collector.ts:546-554`, so `it.skip('name')` — a modifier form with no body at all — lands in **declaration-only**, not **unsupported-form**: no body exists to scan, and the reason still names the form (`'it.skip'`), so the modifier is never lost.

**Conservative non-FAIL rule:** A declaration with `availability: UNKNOWN` (all three gaps: declaration-only, unresolved-body, unsupported-form) is **never** read as zero assertions and turned into FAIL. The rule's `unknown_evidence_policy` applies (default `INDETERMINATE`). This is enforced per test, not file-wide (SPEC:425 applied per declaration).

A `declaration-only` form (`it.todo`) has no body to scan, so it gets its **own** record with no value, `coverage.status: UNAVAILABLE` and availability `UNKNOWN` (`src/adapters/typescript/collector.ts:400-423` testScopeResult — the gap→coverage mapping and the value/availability pair, `src/core/evidence.ts:99-109`) — a record that can never become the basis of a FAIL verdict. Its analysis completeness stays `COMPLETE` (`collector.ts:487-488`): the declaration form itself was fully understood.

### Declaration Boundary Enforcement

- An assertion found in one declaration's body is **never** attributed to another (`src/adapters/typescript/collector.ts:683-701` `collectTestBodyFindings` returns findings per declaration; `collector.ts:644-646` stops a scan at a nested declaration node)
- A conflict on test A's evidence record never alters test B's verdict (`src/core/evaluation.ts:147-172` `evaluateTests` runs `decide` on each scope independently)
- A gap on test A's record leaves test B's value, availability and `declaration_gap` byte-identical (`tests/adapters/collector.test.ts:418-436` asserts the `it.todo` sibling case)
- The file-level `evidence` record remains the aggregate for backward compatibility

### Framework Detection Stays File-Scoped

Per-test framework detection is **impossible** because imports are module-scoped. A mixed-framework file is `UNSUPPORTED` at the file level and emits **no per-test records** (a per-test PASS on an unsupported file would be the over-claim rejected in KickOff:108-109).

---

## Provenance Reachability (WP1.4 / DPC-3)

Every evidence record carries a `provenance` value (`src/core/evidence.ts:14-18`) that identifies where the value came from — not how certain it is.

| Provenance | Producer                                                                                                                                                                                                                                                                                  | Reachable in Milestone-1                                                                                                                                                               |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DIRECT`   | `src/adapters/typescript/collector.ts:267` (failed scan), `:294` (unsupported framework), `:336` (file-level aggregate record), `:408` (per-declaration record)                                                                                                                           | YES — 4 sites in the AST collector                                                                                                                                                     |
| `DERIVED`  | `src/adapters/typescript/regex-assertion-count.ts:51` (regex stub that produces the fixture-13 conflict)                                                                                                                                                                                  | YES — test-only stub; no `src/` module imports it                                                                                                                                      |
| `EXTERNAL` | `src/providers/coverage.ts:90` (Istanbul file record), `:146` (c8 file record), `:281` (missing-file fallback), `:331` (per-declaration record); `src/providers/mutation.ts:194` (unavailable revision), `:210` (scoring failure), `:225` (scored record), `:360` (missing-file fallback) | YES — reachable via the coverage provider (file-level + per-declaration by line-range overlap, with `location` on per-declaration records) and the mutation provider (file-level only) |

This is documentation of reachability, not a test guarantee: `DIRECT` and `DERIVED` are observed in the AST collector, and `EXTERNAL` is now observed reachable via the coverage provider (file-level + per-declaration by line-range overlap) and the mutation provider (file-level only). The coverage provider now populates `location` on per-declaration records; the mutation provider does not. Mutation has no per-declaration attribution.

---

## Evidence Strength (D10)

`evidenceStrength` on an `EvidenceRecord` records **how** an assertion was established, along the syntax → execution axis. It is orthogonal to `provenance` and `availability`. Full contract: [Limitations §24](./limitations.md#24-evidence-strength-contract-d10).

### TypeScript (jest/vitest)

Classification by `classifyFormStrength` (`src/adapters/typescript/regex-assertion-count.ts:69`) over per-declaration findings; weakest finding decides (file-level and per-declaration records both use it).

| Construct                                                           | Strength                |
| ------------------------------------------------------------------- | ----------------------- |
| Straight-line module-level assertion (all 5 straight-line rules)    | `EXECUTION_ESTABLISHED` |
| Assertion nested in helper/branch/callback, or modifier declaration | `SYNTAX_OBSERVED`       |
| Unclassifiable matcher / gapped declaration with no classified form | `UNSUPPORTED`           |

### Python (pytest/unittest)

Classification in `countAsserts` (native `src/adapters/python/collector.ts:374-409`, and `AST_SCRIPT` `:136-156`); weakest-strength aggregation at subject level (`aggregateSubjectStrength`, `:752-768`).

| Construct                                                                                 | Strength                                                   |
| ----------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| pytest/unittest straight-line body assertion (class-method containment is NOT nesting)    | `EXECUTION_ESTABLISHED`                                    |
| Assertion inside a helper called from the body, or inside `if`/`for`/`while`/`try` branch | `SYNTAX_OBSERVED`                                          |
| `@given`-decorated test (assertions counted, tagged `property_based: true`)               | `SYNTAX_OBSERVED` (`CollectionStatus.PARTIAL` retained)    |
| Non-pytest `.raises` receiver form (`foo.raises(Exception)`, `self.assertRaises`)         | counted in `totalAsserts`, `UNSUPPORTED` (both substrates) |

### Orthogonality

`evidenceStrength` never turns `Availability.UNKNOWN` into `KNOWN`, and an observed form is never upgraded to execution-established by inference.
