# Free NFC v0.1 Conformance Suite

Status: frozen/stable for Free NFC v0.1.0, released 2026-08-25. Normative Core details are in `../spec/README.md`; this suite is the executable compatibility package for those requirements.

This directory defines the official Free NFC v0.1 conformance package. It tests the standard behavior that an external implementation can claim, without turning details of the `freenfc.tecn.pro` reference gateway into normative requirements.

## Compatibility Claims

An implementation MAY claim one or more of these labels after passing every MUST test in the matching profile:

- `Free NFC v0.1 Reference Parser/Carrier Compatible`
- `Free NFC v0.1 Manifest Compatible`
- `Free NFC v0.1 Library Compatible`
- `Free NFC v0.1 Resolver Compatible`
- `Free NFC v0.1 Player Selection Compatible`
- `Free NFC v0.1 Execution Plan Compatible`
- `Free NFC v0.1 Physical Carrier Equivalence Compatible`
- `Free NFC v0.1 Core Compatible`

`Core Compatible` means all required non-physical profiles pass: Reference Parser/Carrier, Manifest, Library, Local Resolver, Player Selection, and Execution Plan. It MUST NOT require MySQL, a remote gateway, online accounts, or a runtime media player.

Physical NFC and QR equivalence is documented as an evidence profile because server-side automation cannot scan a tag. The automated suite checks that the semantic identity model is equivalent across QR/Web Carrier and Native URI inputs, while the M7 fixture records physical scan evidence separately.

## Normative Scope

MUST tests define required Free NFC v0.1 behavior. SHOULD tests are recommended interoperability behavior. MAY tests are optional extensions or reference-implementation checks and do not block Core compatibility.

The reference implementation MAY provide additional commands, web pages, storage, gateway behavior, or player launch behavior. Those details are outside Core conformance unless explicitly covered by a MUST test in this suite.

## Running

From `nfc-player/`:

```sh
php bin/freenfc conformance
php bin/freenfc conformance --json
php bin/freenfc conformance --profile resolver
php tests/free-nfc-conformance.php --implementation-name "Example" --implementation-version "1.0.0"
```

The runner reports the spec version, implementation metadata when supplied, tested profiles, PASS/FAIL/SKIP counts, per-test status, and global result.

## Profiles

- `reference`: Reference Parser/Carrier conformance. Covers Web Carrier flexible and anchored forms, Native URI equivalence, multiple canonical IDs, percent-encoding, invalid UUID, invalid namespace, and unsupported reference versions.
- `manifest`: Manifest conformance. Covers valid and invalid manifests, versioning, identity validation, and path safety.
- `library`: Library conformance. Covers `@self`, local paths, HTTP URI candidates, and traversal rejection.
- `resolver`: Local Resolver conformance. Covers exact instance, canonical identity, service identity, ambiguous identity conflicts, and unsupported source reporting.
- `selection`: Player Selection conformance. Covers source priority, unsupported source types, and unsupported kind reporting.
- `execution`: Execution Plan conformance. Covers file, playlist, HTTP URI, missing resource, and playlist traversal handling without launching a runtime player.
- `physical`: Physical Carrier equivalence. Covers semantic equivalence between QR/Web Carrier and NFC/Native URI and records M7 physical evidence.
