Files
prometeu-studio/docs/specs/compiler/22. Backend Spec-to-Test Conformance Matrix.md
T
bquarkz ea1cc26fe3
Test / Tests and coverage occurred while executing withChecks step.
Intrepid/Prometeu/Studio/pipeline/pr-master There was a failure building this commit
feat(studio): improve compiler reliability and AI diagnostics
Preserve structured diagnostics, source attribution, phase outcomes and revision context through compiler, Studio, LSP, MCP and JavaFX. Add project service discovery and resilient VS Code reconnection.

Correct all eight reproduced PBS production failures in expression context, sibling executable bindings and nominal owner identity. Consolidate specs, lessons, immutable baseline evidence and the maintained source-to-guest qualification runner.

Validation: required Gradle gate recorded 724 tests, with 711 passed and 13 skipped. Full corpus passed 168 compilation observations and 108 guest runs (104 successes and four deliberate faults); supplemental controls passed 42 compilations and 16 guest runs. TypeScript compilation, two Node discovery tests and discussion validation passed.
2026-11-10 12:36:25 +00:00

39 KiB
Raw Blame History

Backend Spec-to-Test Conformance Matrix

The current typed Registry/PBX v0 contract is normative in Typed common Registry and PBX v0. Its complete typed function records, mandatory sections and verification rules replace the earlier slot-only artifact baseline.

Structured Compiler Diagnostic Qualification

These rows qualify Compiler 15 §7.1 and Compiler 19 §§12–13. They preserve the original verifier rules and codes. Controlled RET/join failures qualify attribution, not reproduction or correction of the historical Zelda reports. Local compiler qualification does not release the separate Studio/MCP integration gate.

Obligation Required behavior Tests Status
G19-12.1-RET Exact checked-program attribution, qualified function-relative byte PC and structured expected/actual heights. IRVMAttributionTest#retMustRetainOriginCoordinatesAndStructuredHeights pass
G19-12.1-JOIN Join destination and conflicting heights; detection does not claim cause. IRVMAttributionTest#joinMustPointAtDestinationAndRetainConflictingHeights pass
G19-12.1-LOWERING Preserve context when lowering fails before assigning IRVM. LowerToIRVMPipelineStageTest#validationMustPreserveOriginBeforeIrvmIsAssigned pass
G19-12.1-PASS Input and pass-output validation identify their actual programs and shifted PCs. IRVMAttributionTest#optimizationInputMustHaveItsOwnValidationPoint; IRVMAttributionTest#failingPassMustUseShiftedOutputAndSurvivingOrigin pass
G19-12.2-PROVENANCE Generated anchors, generated absence and unknown origin remain distinguishable. IRVMAttributionTest#generatedAndMissingOriginsMustBeExplicit; StructuredDiagnosticTest#provenanceMustRemainIndependentFromAvailability pass
G19-12.2-CONTEXT Function context does not replace missing primary source; real zero offsets survive. IRVMAttributionTest#functionContextMustNotReplaceMissingInstructionSpan; IRVMAttributionTest#retMustRetainOriginCoordinatesAndStructuredHeights pass
G19-12.2-NOPLAN Module-only and no-plan failures retain known coordinates and explicit absence. IRVMAttributionTest#moduleOnlyValidationMustPreserveFailureWithoutInventingSource pass
G15-7.1-REMAP Rewrites/removals preserve operation provenance and function context. IRVMAttributionTest#jumpRemappingMustRetainGeneratedOriginAndFunctionContext; existing G21-7.5 preservation tests pass
G19-12.4-PROJECTION Preserve message/phase, related relationships, template parameters and classification without transport dependencies. StructuredDiagnosticTest#projectionMustPreservePhaseParametersRelatedAndLongSpan; FrontendDiagnosticProjectionTest#frontendProjectionMustRetainMessageRelatedAndParameters pass
G19-12.4-PHASE Preserve a reported backend phase through the semantic diagnostic model without inventing an enum classification. StructuredDiagnosticTest#backendPhaseMustRoundTripWithoutInventingASemanticPhase pass
G19-12.4-LIMIT Existing verifier guards supply typed limit category and structured values through the stage adapter. BytecodePreloadVerifierServiceTest#resourceGuardsMustKeepLimitCategoryAndValuesWithoutMessageParsing; VerifyBytecodePipelineStageTest#stageMustPreserveTypedVerificationLimit pass
G19-12.4-IO An observed artifact-write I/O failure retains infrastructure category and output identity. WriteBytecodeArtifactPipelineStageTest#ioFailureMustBeInfrastructureWithStructuredOutputPath pass
G19-13-ANALYSIS Rejected analysis returns issues, stops later stages and makes no false success claim. CompilerFailurePayloadTest#rejectedAnalysisMustReturnIssuesWithoutSuccessOrLaterStages pass
G19-13-FACADE Compile/build fail-fast retains earlier warnings and technical failures are not empty analysis. CompilerFailurePayloadTest#failFastCompileAndBuildMustPreserveEarlierWarnings; CompilerFailurePayloadTest#technicalFailureMustNotBecomeAnEmptyAnalysis pass
G19-13-FILES Immutable source snapshots remain distinct when FileIds are reused and contexts end; legacy payload absence is explicit. CompilerFailurePayloadTest#compileMustPreserveAnalysisDiagnosticsAndIndependentSourceIdentities; StructuredDiagnosticTest#failuresMustKeepIndependentFileIdsAfterTablesAreCleared pass
G19-13-SYNTH Common invalid IR reaches the public facade with origin without PBS sources. SyntheticFrontendPipelineTest#invalidCommonIrMustReachFacadeWithSourceWithoutPbs pass
G19-13-PBS Original reduced PBS rejection has structured source and truthful logs; its materialized control still compiles. PbsFacadeDiagnosticTest#realPbsRejectionMustKeepStructuredSourceAndNoFalseSuccess; PbsFacadeDiagnosticTest#materializedControlMustStillCompileThroughPublicFacade pass

Existing positive lowering, optimizer equivalence, emitter determinism and verifier tests remain required controls. No new PBX format or runtime behavior is asserted by these rows.

Status: Draft v1 (Traceability Baseline)
Applies to: compiler/backend conformance traceability for canonical stage order and entrypoint-specific contracts

Last Updated: 2026-09-19

1. Purpose

This matrix maps each normative backend MUST from:

  1. docs/specs/compiler/19. Verification and Safety Checks Specification.md
  2. docs/specs/compiler/20. IRBackend to IRVM Lowering Specification.md
  3. docs/specs/compiler/21. IRVM Optimization Pipeline Specification.md
  4. docs/specs/compiler/23. Compiler Pipeline Entry Points Specification.md
  5. docs/specs/compiler-languages/pbs/13. Lowering IRBackend Specification.md (PBS lowering obligations only)

to concrete positive/negative test evidence and current status.

2. Status Legend

  • pass: requirement has explicit positive and/or negative evidence and currently passes.
  • partial: requirement is partially covered; evidence exists but scope is incomplete.
  • missing: no concrete automated evidence yet.
  • deferred: intentionally out of current executable scope.

3. Normative Matrix

Requirement ID Source MUST Positive Tests Negative Tests Status Notes
G19-5.1.1 Gate S-U MUST cover LowerToVM stage safety checks. LowerToIRVMServiceTest#lowerMustAssignEntrypointIdZeroAndSortRemainingDeterministically; LowerToIRVMServiceTest#lowerMustResolveJumpTargetsFromLabels LowerToIRVMServiceTest#lowerMustRejectMissingCallee; LowerToIRVMServiceTest#lowerMustRejectMissingJumpTargetLabel; LowerToIRVMServiceTest#lowerMustRejectUnterminatedFunction pass Includes deterministic id/callsite/control-flow checks.
G19-5.1.2 Gate S-U MUST cover OptimizeIRVM stage safety checks. OptimizeIRVMServiceTest#optimizeDefaultPassesMustRemoveUnreachableInstructions; OptimizeIRVMServiceTest#simplifyJumpToNextPcPassMustRemoveDirectFallthroughJump OptimizeIRVMServiceTest#optimizeMustRejectPassThatMutatesVmProfile pass Determinism also covered by BackendSafetyGateSUTest#optimizeStageMustBeDeterministicForSameInputProgram.
G19-5.1.3 Gate S-U MUST cover EmitBytecode stage safety checks. EmitBytecodePipelineStageTest#runMustEmitBytecodeWhenPreconditionsAreSatisfied; BytecodeEmitterTest#emitMustDeduplicateSyscallsByCanonicalIdentityAndPreserveFirstOccurrenceOrder EmitBytecodePipelineStageTest#runMustFailWhenInternalOpcodesRemain; BytecodeEmitterTest#emitMustRejectRawSyscallInPreloadPlan pass Covers layout, host-backed preload form and deterministic rejection.
G19-5.1.4 Gate S-U MUST cover deterministic diagnostics identity for required rejection surfaces. BackendSafetyGateSUTest#lowerStageMustExposeDeterministicFailureCodeForSameInvalidInput BackendSafetyGateSUTest#emitStageMustExposeMarshalingLinkageFailureDeterministically pass Uses stable code and phase.
G19-5.2.1 Gate S-I MUST cover valid pre-load host path. BackendGateIIntegrationTest#gateI_validHostcallPath N/A pass Runtime-backed and local adapter paths covered.
G19-5.2.2 Gate S-I MUST reject out-of-bounds HOSTCALL index. N/A BackendGateIIntegrationTest#gateI_rejectHostcallOutOfBounds pass
G19-5.2.3 Gate S-I MUST reject unused SYSC declarations. N/A BackendGateIIntegrationTest#gateI_rejectUnusedSyscallDeclaration pass
G19-5.2.4 Gate S-I MUST reject raw SYSCALL in pre-load artifact. N/A BackendGateIIntegrationTest#gateI_rejectRawSyscallInPreloadArtifact pass
G19-5.2.5 Gate S-I MUST reject host ABI mismatch. N/A BackendGateIIntegrationTest#gateI_rejectHostAbiMismatchAtEmitTime pass
G19-5.2.6 Gate S-I MUST reject missing capability at load-time. N/A BackendGateIIntegrationTest#gateI_rejectMissingCapability pass
G19-5.2.7 Gate S-I MUST cover valid VM-owned intrinsic path. BackendGateIIntegrationTest#gateI_validIntrinsicPath N/A pass
G19-5.2.8 Gate S-I MUST cover repeatability across runtime line. RuntimeBackedCompatibilityAdapterTest#checkMustPassInStrictModeWhenRuntimeCommandIsValid; RuntimeBackedCompatibilityAdapterTest#checkMustBeRepeatableAcrossDeclaredRuntimeLinesInStrictMode RuntimeBackedCompatibilityAdapterTest#checkMustFailInStrictModeWhenRuntimeCommandIsUnavailable pass Multi-line repeatability is asserted with strict runtime-backed checks over distinct declared runtime lines.
G19-11.1 A validation MUST live at the lowest layer that understands the failure without knowing the source language. ValidationOwnershipSpecTest#spec19MustBeCompilerGeneralAndPublishValidationOwnership N/A pass Spec 19 section 11 states the classification rule.
G19-11.2 Spec 19 MUST publish the validation ownership matrix. ValidationOwnershipSpecTest#spec19MustBeCompilerGeneralAndPublishValidationOwnership N/A pass Matrix families include parse/syntax, PBS linking, and lifecycle assembler.
G19-11.3 Platform diagnostics MUST use COMMON_* / LOWER_IRVM_* / MARSHAL_* and MUST copy origin/span when present. ValidationOwnershipSpecTest#spec19MustBeCompilerGeneralAndPublishValidationOwnership; LifecycleAssemblerServiceTest#assembleMustRejectMissingFrameRootWithoutRepair N/A pass Code families and span policy are normative in spec 19 section 11.1.
G19-11.4 The same fact MAY exist as a language diagnostic and a platform diagnostic with distinct identities. ValidationOwnershipSpecTest#spec19MustBeCompilerGeneralAndPublishValidationOwnership N/A pass Dual reporting is required when a check reads both source and common contract.
G19-11.5 Host admission MUST split source attribute shape from canonical IRReservedMetadata identity without moving the PBS validator in this plan. ValidationOwnershipSpecTest#spec19MustBeCompilerGeneralAndPublishValidationOwnership N/A pass Classified as platform; validator remains in the PBS package.
G19-11.6 Platform validators MUST NOT depend on PBS frontend module types or match __pbs. prefixes. PbsModuleBoundaryArchTest#productionOutsideAllowlistMustNotDependOnPbsModuleTypes; CommonBackendPbsPrefixScanTest#commonLifecycleAndBackendMustNotDiscoverRolesFromPbsNamePrefixes N/A pass ArchUnit covers PBS module origin, including facades outside p.studio.compiler.pbs; source scan still rejects __pbs. in backend, lifecycle, and common pipeline stages.
PBS12-11 PBS diagnostics MUST NOT claim common structural lifecycle/IRVM failures as PBS required coverage. ValidationOwnershipSpecTest#pbsDiagnosticsMustNotClaimCommonStructuralFailures N/A pass PBS spec 12 points those failures at spec 19 section 11 and spec 20.
G20-4.1.1 IRBackend MUST be the common frontend-to-backend executable handoff. LowerToIRVMServiceTest#lowerMustAcceptManuallyConstructedCommonIRBackend N/A pass Direct backend lowering from manually constructed common IRBackend proves PBS parser/frontend services are not required.
G20-4.1.2 Common backend code MUST NOT depend on types from the PBS frontend module. PbsModuleBoundaryArchTest#productionOutsideAllowlistMustNotDependOnPbsModuleTypes; PbsModuleBoundaryArchTest#irBackendModelsMustNotDependOnPbsModuleTypes N/A pass ArchUnit rejects PBS-module origin types in common production code, including facades outside p.studio.compiler.pbs.
G20-4.1.3 Public IRBackend contract MUST NOT expose PBS AST, token, parser, semantic, or editorial types. IRBackendExecutableContractTest#publicIRBackendContractMustNotExposePbsTypes N/A pass Reflection guard covers public contract fields, constructors, methods, and record components.
G20-4.2.1 Public IRBackend contract types MUST remain modelable as an acyclic, deterministic data graph. IRBackendExecutableContractTest#publicIRBackendContractMustExposeOnlySerializableShapes; IRBackendExecutableContractTest#aggregatorMustEmitDeterministicOrderedPublicContractShape N/A pass Covers public shape guardrails, generic type arguments, ordered aggregate emission, table remapping, and capability de-duplication order.
G20-4.2.2 Public IRBackend contract types MUST NOT expose callbacks, services, mutable/unordered collection contracts, frontend-owned objects, process-dependent lazy values, cyclic public references, or wire-format commitments. IRBackendExecutableContractTest#publicIRBackendContractMustExposeOnlySerializableShapes N/A pass Reflection guard covers public contract fields, constructors, methods, record components, and generic type arguments.
G20-4.2.3 Public IRBackend cross-object references MUST use explicit ids or stable symbolic keys. IRBackendExecutableContractTest#publicIRBackendContractAuditMustClassifyAllowedSupportTypes; IRBackendExecutableContractTest#publicIRBackendContractMustUseExplicitIdsOrStableKeysForKnownReferences N/A pass Current audit found no concrete public serialization leak requiring model correction. Existing FileId, ModuleId, CallableId, and IntrinsicId remain explicit table-scoped identifiers.
G20-4.3.1 Executable IRBackend MUST carry a typed, ordered, id-based IRLifecycleDeclaration as provenance. IRBackendExecutableContractTest#aggregatorMustRemapTypedLifecycleReferencesAndPreserveDeclaredModuleOrder; LifecycleAssemblerServiceTest#assembleMustMaterializeNeutralLifecycleArtifactsInDeclaredOrder IRBackendExecutableContractTest#aggregatorMustOmitLifecycleDeclarationWhenNoFileContributesOne pass Declaration uses ReadOnlyList, typed ids, roles, and source attribution; aggregator remaps ids with explicit module order.
G20-4.3.2 Missing lifecycle declaration MUST mean a deliberately non-executable handoff and MUST NOT synthesize entrypoints. LifecycleAssemblerServiceTest#assembleMustNoOpWhenLifecycleDeclarationIsAbsent; AssembleLifecyclePipelineStageTest#runMustNoOpForDeliberatelyNonExecutableHandoff N/A pass Assembler and stage leave the backend unchanged when the declaration is absent.
G20-4.3.3 Common lifecycle assembly MUST be the exclusive owner of derived artifacts and MUST use neutral identities. LifecycleAssemblerServiceTest#assembleMustMaterializeNeutralLifecycleArtifactsInDeclaredOrder; CommonBackendPbsPrefixScanTest#commonLifecycleAndBackendMustNotDiscoverRolesFromPbsNamePrefixes; PbsModuleBoundaryArchTest#productionOutsideAllowlistMustNotDependOnPbsModuleTypes LifecycleAssemblerServiceTest#assembleMustRejectPreMaterializedDerivedArtifacts pass Derived wrappers and boot guard are common-owned; ArchUnit rejects PBS-module types and the source scan rejects __pbs. prefix matching.
G20-6.2 IRVM_EXT MUST declare structural metadata (pops/pushes/is_branch/is_terminator). IRVMValidatorTest#validateMustApplyStructuralMetadataForCustomInternalExtension; IRVMValidatorTest#validateMustRejectCustomInternalExtensionWhenStructuralMetadataUnderflowsStack; IRVMOp record contract (pops/pushes/branch/terminator/internal) N/A pass Dedicated extension fixtures now assert structural metadata is consumed by validation behavior.
G20-6.3 IRVM_EXT MUST be eliminable before bytecode emission. OptimizeIRVMServiceTest#optimizeDefaultPassesMustEliminateUnreachableInternalExtensionBeforeEmission EmitBytecodePipelineStageTest#runMustFailWhenInternalOpcodesRemain; EmitBytecodePipelineStageTest#runMustFailWhenInternalOpcodesRemainEvenWithNonEmptyEmissionPlan; IRVMValidatorTest#validateMustRejectInternalOpcodeWhenConfigured pass Optimizer elimination path and emit-stage hard rejection path are both covered.
G20-6.4 IRVM MUST preserve per-function slot and identity headers. IRVMProgramTest#constructorMustRejectModuleAndEmissionPlanMismatch IRVMProgramTest#constructorMustRejectModuleAndEmissionPlanMismatch pass Header mismatch is rejected deterministically.
G20-7.2 Jump immediates MUST resolve to u32 function-relative offsets before emission. LowerToIRVMServiceTest#lowerMustResolveJumpTargetsFromLabels; BytecodeEmitterTest#emitMustEncodeJumpOpcodesWithU32Immediate LowerToIRVMServiceTest#lowerMustRejectMissingJumpTargetLabel pass
G20-7.3 Jump targets MUST be instruction-boundary valid. N/A IRVMValidatorTest#validateMustRejectInvalidJumpTarget pass
G20-7.4 Reachable fallthrough beyond function end MUST be rejected. N/A LowerToIRVMServiceTest#lowerMustRejectUnterminatedFunction; IRVMValidatorTest#validateMustRejectRetShapeMismatch pass
G20-8.1 Qualified entrypoint function id MUST be 0. LowerToIRVMServiceTest#lowerMustAssignEntrypointIdZeroAndSortRemainingDeterministically; LowerToIRVMServiceTest#lowerMustUseQualifiedEntrypointIdentityWhenProvided; LowerToIRVMServiceTest#lowerMustPublishSyntheticWrapperAtFunctionZeroAndKeepFinalRetInWrapperPath LowerToIRVMServiceTest#lowerMustRejectWhenEntrypointDeclarationIsMissing; LowerToIRVMServiceTest#lowerMustRejectMissingQualifiedEntrypointIdentity; LowerToIRVMServiceTest#lowerMustRejectWhenEntrypointIsAmbiguous; LowerToIRVMServiceTest#lowerMustRejectWhenPublishedWrapperWouldNotOccupyFunctionZero pass Entrypoint is resolved strictly by qualified identity; PBS wrapper publication now has dedicated zero-index coverage.
G20-8.2 Remaining function ids MUST follow deterministic moduleId-only ordering. LowerToIRVMServiceTest#lowerMustAssignEntrypointIdZeroAndSortRemainingDeterministically; LowerToIRVMServiceTest#lowerMustUseModulePoolCanonicalIdentityForNonEntrypointOrdering N/A pass Ordering key is (moduleId -> modulePool canonical key, callable_name, source_start).
G20-8.3 Same admitted input graph MUST produce identical function-id assignment. BackendSafetyGateSUTest#fullPipelineMustProduceDeterministicBytecodeForSameInput N/A pass Artifact determinism implies stable function mapping for fixed input.
G20-9.3 CALL_INTRINSIC MUST remain distinct from host-binding path and resolve ids from canonical registry artifact. LowerToIRVMServiceTest#lowerMustMapHostAndIntrinsicCallsites; BackendGateIIntegrationTest#gateI_validIntrinsicPath; IRVMIntrinsicRegistryParityTest#registryResourceMustExposeExpectedCanonicalEntries; IRVMIntrinsicRegistryParityTest#registryMustStayInSyncWithRuntimeBuiltinsTable IRVMValidatorTest#validateProgramMustRejectIntrinsicWithoutSignatureMetadata pass Distinct operation kinds and canonical registry parity checks are enforced.
G20-9.4.2 SPAWN arg count MUST match callee param_slots. BackendClaimScopeSpecTest#loweringSpecMustDeclareSpawnYieldOutsideCoreV1ClaimScope; BackendClaimScopeSpecTest#matrixMustMarkSpawnYieldRowsAsClaimRescoped; BackendClaimScopeSpecTest#decisionRecordMustExistForSpawnYieldClaimRescope N/A pass Requirement is out of scope for core-v1 claim by accepted Track B rescope decision; future profile must reintroduce executable coverage with dedicated tests.
G20-9.4.3 YIELD with non-empty operand stack MUST be rejected. BackendClaimScopeSpecTest#loweringSpecMustDeclareSpawnYieldOutsideCoreV1ClaimScope; BackendClaimScopeSpecTest#matrixMustMarkSpawnYieldRowsAsClaimRescoped; BackendClaimScopeSpecTest#decisionRecordMustExistForSpawnYieldClaimRescope N/A pass Requirement is out of scope for core-v1 claim by accepted Track B rescope decision; future profile must reintroduce executable coverage with dedicated tests.
G20-10 Backend MUST run structural pre-verification before emission. LowerToIRVMService + OptimizeIRVMService validator invocation; LowerToIRVMServiceTest positive fixtures IRVMValidatorTest#validateMustRejectStackMismatchJoin; IRVMValidatorTest#validateProgramMustApplyHostcallStackEffectsFromMetadata pass Pre-verification checks jump/stack/ret/callsite constraints.
G20-11.1 Lowering rejection MUST be deterministic. BackendSafetyGateSUTest#lowerStageMustExposeDeterministicFailureCodeForSameInvalidInput same pass
G20-11.2 Diagnostics identity/phase MUST remain stable. BackendSafetyGateSUTest#lowerStageMustExposeDeterministicFailureCodeForSameInvalidInput BackendSafetyGateSUTest#emitStageMustExposeMarshalingLinkageFailureDeterministically pass Stable rejection families are exercised.
G20-11.3 Source attribution MUST be preserved when source-actionable. LowerToIRVMPipelineStageTest#runMustAttachSourceAttributionForLoweringFailure; LowerToIRVMServiceTest#lowerMustMapHostAndIntrinsicCallsites LowerToIRVMServiceTest#lowerMustRejectMissingCallee pass Stage-level failure now carries explicit file/start/end attribution for lowering errors.
G21-5 OptimizeIRVM MUST NOT be skipped in canonical pipeline order. BuilderPipelineServiceOrderTest#canonicalOrderMustContainOptimizeBetweenLowerAndEmit N/A pass Canonical stage order is enforced.
G21-6.1 Optimize input MUST satisfy lowering obligations/profile/structural validity. OptimizeIRVMPipelineStageTest#runMustAcceptSupportedNonDefaultVmProfile OptimizeIRVMPipelineStageTest#runMustRejectUnsupportedVmProfile pass Input validation occurs before pass execution.
G21-6.2 Optimize output MUST preserve semantics/contracts and remain emission-valid. OptimizeIRVMEquivalenceHarnessTest#optimizeOnOffMustPreserveObservableTraceForLoweredHostIntrinsicFixture; OptimizeIRVMEquivalenceHarnessTest#optimizeOnOffMustPreserveObservableTraceForConditionalJoinFixture; OptimizeIRVMEquivalenceHarnessTest#optimizeOnOffMustPreserveObservableTraceForSimpleLoopFixture; OptimizeIRVMEquivalenceHarnessTest#optimizeOnOffMustPreserveObservableTraceForLinearCallFixture; EmitBytecodePipelineStageTest#runMustEmitBytecodeWhenPreconditionsAreSatisfied OptimizeIRVMServiceTest#optimizeMustRejectPassThatMutatesVmProfile pass Equivalence harness now validates on/off semantics and emission validity over CFG corpus with host/intrinsic paths.
G21-7.1 Optimization passes MUST preserve observable semantics. OptimizeIRVMEquivalenceHarnessTest#optimizeOnOffMustPreserveObservableTraceForConditionalJoinFixture; OptimizeIRVMEquivalenceHarnessTest#optimizeOnOffMustPreserveObservableTraceForSimpleLoopFixture; OptimizeIRVMEquivalenceHarnessTest#optimizeOnOffMustPreserveObservableTraceForLinearCallFixture N/A pass Observable trace equivalence is asserted across branching, loops, and call graphs.
G21-7.2 Optimization passes MUST be deterministic for same input/profile. BackendSafetyGateSUTest#optimizeStageMustBeDeterministicForSameInputProgram N/A pass
G21-7.3 Optimization passes MUST preserve profile compatibility. OptimizeIRVMPipelineStageTest#runMustAcceptSupportedNonDefaultVmProfile OptimizeIRVMServiceTest#optimizeMustRejectPassThatMutatesVmProfile pass
G21-7.4 Optimization passes MUST preserve host-vs-intrinsic boundary classification. LowerToIRVMServiceTest#lowerMustMapHostAndIntrinsicCallsites; BackendGateIIntegrationTest#gateI_validIntrinsicPath N/A pass No pass rewrites operation kind domains.
G21-7.5 Optimization passes MUST preserve diagnostics/source-attribution hooks. OptimizeIRVMServiceTest#unreachableInstructionEliminationPassMustPreserveJumpSpanWhenTargetIsRemapped; OptimizeIRVMServiceTest#normalizeRedundantJumpTargetsPassMustPreserveJumpSpanAfterRewrite; OptimizeIRVMServiceTest#simplifyJumpToNextPcPassMustPreserveSpanOnSurvivingOperation; LowerToIRVMServiceTest#lowerMustMapHostAndIntrinsicCallsites N/A pass Dedicated optimizer regressions now assert span/source-hook preservation for rewrite and elimination paths.
G21-9.1 Validation MUST include optimized-vs-non-optimized equivalence fixtures. OptimizeIRVMEquivalenceHarnessTest#optimizeOnOffMustPreserveObservableTraceForLoweredHostIntrinsicFixture; OptimizeIRVMEquivalenceHarnessTest#optimizeOnOffMustPreserveObservableTraceForConditionalJoinFixture; OptimizeIRVMEquivalenceHarnessTest#optimizeOnOffMustPreserveObservableTraceForSimpleLoopFixture; OptimizeIRVMEquivalenceHarnessTest#optimizeOnOffMustPreserveObservableTraceForLinearCallFixture N/A pass Dedicated opt on/off harness with reusable interpreter and deterministic trace assertions is in place.
G21-9.2 Validation MUST preserve known negative loader/verifier behavior. BackendSafetyGateSUTest#emitStageMustExposeMarshalingLinkageFailureDeterministically; BackendGateIIntegrationTest rejection suite N/A pass
G21-9.3 Validation MUST preserve deterministic artifact-level invariants. BackendSafetyGateSUTest#fullPipelineMustProduceDeterministicBytecodeForSameInput; BytecodeEmitterTest#emitMustRemainDeterministicAfterInterning N/A pass
G23-5.1 Canonical compiler pipeline MUST preserve the shared stage order through WriteBytecodeArtifact. BuilderPipelineServiceOrderTest#canonicalOrderMustContainOptimizeBetweenLowerAndEmit; MainProjectPipelineIntegrationTest#analyzeShouldNotWriteProgramBytecode; MainProjectPipelineIntegrationTest#compileShouldProduceInMemoryBytecodeWithoutWritingProgramBytecode; MainProjectPipelineIntegrationTest#buildShouldWriteProgramBytecode N/A pass Dedicated order assertion now covers analyses, compile, and build stage lists, including AssembleLifecyclePipelineStage.
G23-5.2 AssembleLifecyclePipelineStage MUST run immediately after FrontendPhasePipelineStage and before IRVM lowering. BuilderPipelineServiceOrderTest#canonicalOrderMustContainOptimizeBetweenLowerAndEmit; BuilderPipelineServiceOrderTest#analyzeMustTerminateAfterLifecycleAssemblyWithoutBackendArtifacts N/A pass Analyses terminate at lifecycle assembly; compile stages begin at LowerToIRVMPipelineStage.
G23-6.1 analyze MUST terminate after AssembleLifecycle and MUST NOT execute backend artifact stages. BuilderPipelineServiceOrderTest#analyzeMustTerminateAfterLifecycleAssemblyWithoutBackendArtifacts; MainProjectPipelineIntegrationTest#analyzeShouldNotWriteProgramBytecode N/A pass Analyze returns an assembled executable IRBackend with no IRVM, bytecode, or file output.
G23-6.2 compile MUST terminate after VerifyBytecode and MUST return a validated in-memory executable result without disk write. MainProjectPipelineIntegrationTest#compileShouldProduceInMemoryBytecodeWithoutWritingProgramBytecode; BuilderPipelinePublicSurfaceTest#compileResultMustExposeValidatedInMemoryArtifacts N/A pass Coverage asserts validated in-memory bytecode artifacts and the no-write boundary for compile.
G23-6.3 build MUST extend compile only with terminal artifact persistence. MainProjectPipelineIntegrationTest#buildShouldWriteProgramBytecode; BuilderPipelinePublicSurfaceTest#buildResultMustExposeArtifactPathAndCompilePayload N/A pass Coverage asserts that build retains the compile payload and writes the filesystem artifact path expected by callers.
G23-7.1 AnalysisSnapshot MUST expose the minimum shared analysis contract. MainProjectPipelineIntegrationTest#analyzeShouldNotWriteProgramBytecode; BuilderPipelinePublicSurfaceTest#analysisSnapshotMustExposeMinimumSharedContract N/A pass Both executable and structural contract checks now cover the shared minimum analysis payload.
G23-8.1 Caller-specific configs/contexts MUST NOT redefine canonical stage semantics. N/A N/A missing Requires explicit multi-entrypoint composition tests once non-filesystem contexts are implemented.
G23-8.3 A compile-only FrontendProvider registered by languageId MUST traverse compile() to verified bytecode without PBS, .pbs sources, or PBS stdlib. SyntheticFrontendPipelineTest#compileMustEmitVerifiedBytecodeWithoutPbs FrontendRegistryServiceTest#unregisterMustRefuseToRemoveDefaultPbs pass Synthetic synth provider is test-only; common pipeline must not require PBS types, PBS sources, or PBS stdlib.
G23-9.1 Legacy public run MUST be removed as the normative entrypoint and filesystem-default behavior MUST be expressed through build. BuilderPipelinePublicSurfaceTest#publicServiceSurfaceMustExposeExplicitEntrypointsAndNoPublicRun; MainProjectPipelineIntegrationTest#buildShouldWriteProgramBytecode N/A partial Public service coverage now proves run is no longer public and build is the filesystem artifact path, but the CLI composition path is not yet exercised by a dedicated automated test.
PBS13-12.0 PBS executable lowering MUST emit IRBackend satisfying frontend handoff obligations before common backend lowering. IRBackendExecutableContractTest suite; PBSFrontendPhaseServiceTest#shouldSynthesizePositiveTopic19FixtureAcrossFileInitProjectInitAndFrame LowerToIRVMServiceTest#lowerMustRejectWhenSyntheticWrapperEntrypointIsMissing; LowerToIRVMServiceTest#lowerMustRejectWhenHiddenBootGuardIsMissing; LowerToIRVMServiceTest#lowerMustRejectWhenSyntheticCallableOriginIsMissing pass Row group PBS13-12.x verifies PBS emission into the common handoff; common backend ownership is covered by G20 rows.
PBS13-12.7 PBS executable lowering MUST emit a typed lifecycle declaration and MUST NOT assemble derived wrappers. PBSFrontendPhaseServiceTest#shouldSynthesizePositiveTopic19FixtureAcrossFileInitProjectInitAndFrame; PbsFrontendCompilerTest#shouldExposeGlobalsAndTypedLifecycleDeclarationInBackendFile N/A pass Frontend tests assert declaration roles and the absence of module init, published wrapper, and boot guard.
PBS13-12.8 Project init MUST be excluded from file-init fragments and MUST execute exactly once after module initializers. PbsFrontendCompilerTest#shouldExposeGlobalsAndTypedLifecycleDeclarationInBackendFile; LifecycleAssemblerServiceTest#assembleMustInvokeProjectInitExactlyOnceAndExcludeItFromFileInit N/A pass Colocated [Init] is declared as project init and invoked once by the assembled wrapper.
PBS13-12.9 Lifecycle module order MUST propagate resolved dependency order without name or FileId inference. PBSFrontendPhaseServiceTest#shouldPublishDependencyOrderedLifecycleModulesInsteadOfNameOrFileIdOrder; IRBackendExecutableContractTest#aggregatorMustRemapTypedLifecycleReferencesAndPreserveDeclaredModuleOrder N/A pass Adversarial module names and file registration order do not change declared dependency order.
PBS13-12.1.1 Callable identity MUST be preserved at handoff. IRBackendExecutableContractTest#aggregatorMustPreserveExecutableFunctionOrderDeterministically N/A pass
PBS13-12.1.2 Observable callable signature MUST be preserved at handoff. IRBackendExecutableContractTest#functionContractMustRejectInvalidSlotAndSpanBounds N/A pass
PBS13-12.1.3 Callable category MUST be preserved at handoff. PbsFrontendCompilerTest#shouldLowerExecutableFunctionsWithCallsiteCategories N/A pass
PBS13-12.1.4 Source anchor (fileId/start/end) MUST be preserved. IRBackendExecutableContractTest#aggregatorMustPreserveExecutableSourceAttribution; IRBackendExecutableContractTest#functionContractMustRejectInvalidSlotAndSpanBounds N/A pass Handoff preserves function and instruction source anchors after aggregation/reindexing.
PBS13-12.1.5 Executable body representation MUST be backend-lowerable. LowerToIRVMServiceTest#lowerMustMapHostAndIntrinsicCallsites LowerToIRVMServiceTest#lowerMustRejectMissingCallee pass
PBS13-12.2.1 Callsite MUST be exactly one of CALL_FUNC/CALL_HOST/CALL_INTRINSIC. IRBackendExecutableContractTest#callInstructionMustRequireCategorySpecificMetadata IRBackendExecutableContractTest#instructionContractMustRejectMixedMetadataKinds pass
PBS13-12.2.2 Backend MUST NOT infer callsite category by textual heuristics. PbsFrontendCompilerTest#shouldClassifyCallableCallEvenWhenNameLooksHostLike; PbsFrontendCompilerTest#shouldNotInferCallableCategoryFromMemberCallText; PbsFrontendCompilerTest#shouldRejectAmbiguousCallableIdentityInsteadOfGuessingByText; IRBackendExecutableContractTest#callInstructionMustRequireCategorySpecificMetadata N/A pass Dedicated regression fixtures now cover textually misleading names and ambiguous callable identity without category guessing.
PBS13-12.3.1 Host-backed callsite MUST preserve canonical (module,name,version). LowerToIRVMServiceTest#lowerMustMapHostAndIntrinsicCallsites N/A pass
PBS13-12.3.2 Host ABI shape (arg_slots,ret_slots) MUST be preserved when available. LowerToIRVMServiceTest#lowerMustMapHostAndIntrinsicCallsites BytecodeEmitterTest#emitMustRejectAbiMismatch pass
PBS13-12.4.1 Intrinsic callsite MUST preserve canonical intrinsic identity. IRBackendExecutableContractTest#aggregatorMustReindexIntrinsicsToBuildGlobalPool N/A pass
PBS13-12.4.2 VM-owned intrinsics MUST NOT be reclassified as host bindings. LowerToIRVMServiceTest#lowerMustMapHostAndIntrinsicCallsites; BackendGateIIntegrationTest#gateI_validIntrinsicPath N/A pass
PBS13-12.5 requiredCapabilities MUST be deterministic for same admitted graph. PbsFrontendCompilerTest#shouldExtractReservedMetadataForInterfaceModuleSurfaces PbsFrontendCompilerTest#shouldRejectHostBindingCapabilityNotDeclaredInStrictContext; PBSFrontendPhaseServiceTest#shouldBlockDependentModulesWhenUpstreamModuleFailsHostAdmission pass Deterministic derivation + strict admission path.

4. PR-05.0.X Identity Foundation Coverage

PR Item Scope Evidence Status
PR-05.0.1 Shared NameTable context across frontend phases NameTableTest; PBSFrontendPhaseServiceTest multi-module fixtures pass
PR-05.0.2 ModuleId dense table and module wiring ModuleTableTest; PBSFrontendPhaseServiceTest#shouldBlockDependentModulesTransitivelyWhenUpstreamModuleFailsLinking pass
PR-05.0.3 Typed CallableId/IntrinsicId in executable contract IRBackendExecutableContractTest; LowerToIRVMServiceTest pass
PR-05.0.4 Callable shape and type-surface interning CallableShapeTableTest; TypeSurfaceTableTest; PbsModuleVisibilityTest pass
PR-05.0.5 Synthetic stdlib FileId via FileTable InterfaceModuleLoaderTest#shouldRegisterSyntheticStdlibFilesInFileTable pass
PR-05.0.6 Host binding canonical identity interning HostBindingTableTest; host admission fixtures in PbsFrontendCompilerTest pass

5. Maintenance Procedure

  1. Any backend PR that changes conformance-relevant behavior in FE/BE pipeline MUST update this matrix.
  2. If requirement coverage changes, update: mapped tests, status, and Last Updated date.
  3. New normative MUSTs in specs 19/20/21 or PBS 13 lowering obligations MUST add a new matrix row before merge.
  4. Conformance-relevant FE/BE code paths for hard-gate are:
    • prometeu-compiler/prometeu-build-pipeline/
    • prometeu-compiler/frontends/prometeu-frontend-pbs/
    • prometeu-compiler/prometeu-frontend-api/
    • prometeu-compiler/prometeu-compiler-core/

6. Review/Lint Gate

Matrix integrity is enforced by automated document lint:

  • BackendConformanceMatrixSpecTest validates file presence, required requirement IDs, and row status integrity.
  • BackendConformanceMatrixSpecTest enforces hard-gate policy:
    • if PROMETEU_MATRIX_HARD_GATE=true and PROMETEU_CHANGED_FILES contains a path under conformance-relevant FE/BE prefixes,
    • then this matrix file MUST be present in PROMETEU_CHANGED_FILES, otherwise the gate fails.
  • CI policy uses strict Gate I mode via PROMETEU_GATE_I_STRICT=true (or CI=true) and requires PROMETEU_RUNTIME_CHECK_CMD for runtime-backed evidence.

7. Typed Registry/PBX v0 qualification (2026-10-14)

Owner: compiler/general. These rows supersede slot-only PBX coverage claims; frontend syntax and lowering remain consumer-owned.

Requirement Evidence Status Scope
Stable declarations, nominal identity, structural deduplication and cycles LinkedRegistryTest; IRBackendExecutableContractTest pass Common API and linking
Complete typed signatures, captures, roles and implementations PbxRegistryConformanceTest; TypedCommonPipelineTest pass Common IR through emission
Exact PBX mandatory tables and multi-slot signatures Independent 194-byte oracle; fixed vec2 function bytes pass Wire format, not a self round-trip
Runtime final admission and execution tools/pbx-conformance/run.py pass Closure, trait, array, Dynamic, intrinsic, roles, joins, native binding; vec2 load-only
Invalid structures, references, code and resource refusal tools/pbx-conformance/main.rs mutation corpus pass Production loader, default/lowered limits
Structured initialization and binding diagnostics HeadlessProcessSessionTest; observed runtime JSON fixtures pass Preserves full payload through MCP, including null outer PC
Published schema covers current runtime reasons Actual LifecycleRole/NonFiniteValue payloads against runtime schema partial Runtime enum/schema mismatch recorded in AGD75; no payload rewriting
PBS migration and integrated delivery AGD75 and consumer tickets partial Existing PBS suite passing is not complete executable lowering evidence

Explained diagnostic propagation qualification

Contract Required executable proof
Backend check identity/explanation/qualified coordinates IRVMAttributionTest; controlledInvalidCommonIrRetAndJoinSurviveTheRealBuildGatewayAndAuthenticatedMcp in McpTaskToolsTest.
Real resource guard, unchanged code/budget BytecodePreloadVerifierServiceTest.resourceGuardsMustKeepLimitCategoryAndValuesWithoutMessageParsing.
Eight unchanged PBS production sources, successful/negative controls, actual revisions, UI/MCP parity StructuredDiagnosticsIntegrationTest with frozen corpus SHA-256 0ad291942af21e990f5cae3348a5be368dee865aa2843ba0d0effd1a9136cb87; authenticated MCP + production LSP/compiler/packer.
Retained analysis, version/digest mismatch and unavailable result DiagnosticAnalysisProtocolTest; AutomationLspQueriesTest.
Failure codes and actual child termination/admission LanguageFailureContractTest; TaskLanguageQueriesTest; existing task/revocation regressions.
Packer failed status/empty assets, payload preservation and cancellation StructuredShipperTest.
Immutable values, known null, whole-issue count/UTF-8 detail budgets DiagnosticPayloadTest.
Navigation revision and Unicode selection DiagnosticNavigationTest; desktop evidence is recorded separately from projection tests.

Controlled invalid common IR and protocol faults are labelled fixtures. They do not reproduce historical Zelda failures or claim guest/runtime qualification.