OPERATION AND ASSURANCE
Diagnostics are stable coded records with severity, pipeline stage, message, source span, and remediation when available.
Activating a workspace diagnostic selects its logical module and exact source range. Machine consumers should use structured result fields, not parse display prose.
| Code or family | Area | Typical meaning |
|---|---|---|
PYC100x | Request and resources | Malformed contract identity or invalid resource policy. |
PYC28xx–PYC29xx | Functions and control flow | Unsupported statement, expression, signature, call, return, binding, recursion, or lifetime. |
PYC2940 | Lifetime | A reachable local read occurs before a proved store, including an unsafe loop-else read. |
PYC2941 | Loop target | A target may be unbound after zero iterations or escapes its proved lifetime. |
PYC2943 | Representation | A binding receives incompatible C representations. |
PYC33xx | Helpers | Required helper identity, dependency, manifest, or conformance rejected. |
PYC34xx | Containers | Invalid fixed shape, type, binding lifetime, access, mutation, or comprehension. |
PYC35xx | Modules | Invalid explicit import, module shape, binding, target, dependency, or document count. |
PYC36xx | Records | Invalid class, field, initializer, instance, access, or lifetime. |
PYC38xx | Scope proof | Branch publication evidence is incomplete, contradictory, malformed, or over budget. |
PYC41xx | Phase 16 analysis | Selective scope or loop-completion proof rejected before C publication. |
PYC9xxx | Internal conformance | Independent validation found a malformed or inconsistent internal product. |
| Code | Meaning | Typical correction |
|---|---|---|
PYC3402 | The set is empty, heterogeneous, duplicated after Python equality, nonliteral, string-valued, or otherwise lacks one supported fixed representation. | Use 1–64 unique direct literals of one exact numeric or Boolean type. |
PYC3403 | The local set binding is aliased, rebound, passed, returned, escaped, or used outside its admitted membership form. | Keep one direct local assignment and use its name only as the right side of in or not in. |
PYC3406 | A set comprehension, method, or mutation was requested. | Use a fixed direct literal with no mutation. |
PYC3410 | The searched value does not match the set element representation or the membership proof is incomplete. | Use an exact matching int, finite float, or bool expression. |
PYC3411 | Set indexing was requested. | Use membership; Python sets are not subscriptable. |
PYC3412 | Set iteration was requested. | Use an ordered list or tuple when iteration order is required. |
| Code | Area | Typical meaning |
|---|---|---|
PYC3901 | File shape | Unsupported with statement or session structure. |
PYC3902 | Open binding | open is shadowed or not context-owned. |
PYC3903 | Open arguments | Mode, encoding, newline, path category, or literal path is outside the profile. |
PYC3904 | Handle binding | Handle target or rebinding violates fresh ownership. |
PYC3905 | File operation | Read/write method, argument, mode, or result use is unsupported. |
PYC3906 | File lifetime | Handle or owned read value escapes its lifecycle. |
PYC3907 | File resources | File-operation count exceeds its configured bound. |
PYC3908 | File-effect ABI | Transpiled source calls a file-effect source function. |