OPERATION AND ASSURANCE

Diagnostics and results

Diagnostics are stable coded records with severity, pipeline stage, message, source span, and remediation when available.

Read a diagnostic

  1. Start with the stable code and stage; they identify the rejecting contract family.
  2. Use the source document and span to inspect the exact submitted text.
  3. Apply the stated remediation without assuming that a broader nearby Python form is supported.
  4. Transpile the complete bundle again. A previous C result remains stale and cannot become current through source editing alone.

Activating a workspace diagnostic selects its logical module and exact source range. Machine consumers should use structured result fields, not parse display prose.

Diagnostic families

Code or familyAreaTypical meaning
PYC100xRequest and resourcesMalformed contract identity or invalid resource policy.
PYC28xx–PYC29xxFunctions and control flowUnsupported statement, expression, signature, call, return, binding, recursion, or lifetime.
PYC2940LifetimeA reachable local read occurs before a proved store, including an unsafe loop-else read.
PYC2941Loop targetA target may be unbound after zero iterations or escapes its proved lifetime.
PYC2943RepresentationA binding receives incompatible C representations.
PYC33xxHelpersRequired helper identity, dependency, manifest, or conformance rejected.
PYC34xxContainersInvalid fixed shape, type, binding lifetime, access, mutation, or comprehension.
PYC35xxModulesInvalid explicit import, module shape, binding, target, dependency, or document count.
PYC36xxRecordsInvalid class, field, initializer, instance, access, or lifetime.
PYC38xxScope proofBranch publication evidence is incomplete, contradictory, malformed, or over budget.
PYC41xxPhase 16 analysisSelective scope or loop-completion proof rejected before C publication.
PYC9xxxInternal conformanceIndependent validation found a malformed or inconsistent internal product.

Set diagnostics

CodeMeaningTypical correction
PYC3402The 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.
PYC3403The 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.
PYC3406A set comprehension, method, or mutation was requested.Use a fixed direct literal with no mutation.
PYC3410The 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.
PYC3411Set indexing was requested.Use membership; Python sets are not subscriptable.
PYC3412Set iteration was requested.Use an ordered list or tuple when iteration order is required.

File-I/O diagnostics

CodeAreaTypical meaning
PYC3901File shapeUnsupported with statement or session structure.
PYC3902Open bindingopen is shadowed or not context-owned.
PYC3903Open argumentsMode, encoding, newline, path category, or literal path is outside the profile.
PYC3904Handle bindingHandle target or rebinding violates fresh ownership.
PYC3905File operationRead/write method, argument, mode, or result use is unsupported.
PYC3906File lifetimeHandle or owned read value escapes its lifecycle.
PYC3907File resourcesFile-operation count exceeds its configured bound.
PYC3908File-effect ABITranspiled source calls a file-effect source function.

Interpret the result

Stale generated C. Any source or identity edit makes a prior successful result stale. The workspace prevents saving it as though it represented the changed request.