feat(pbs): add explicit guest lifecycle hooks

This commit is contained in:
2026-10-28 09:12:48 +00:00
parent eb7d6a2398
commit 9504f4694a
41 changed files with 1209 additions and 24 deletions
@@ -289,3 +289,15 @@ This document is healthy when:
4. common backend obligations are not described as owned by PBS,
5. frontend-specific lowering specs only own emission into `IRBackend`,
6. and scope boundaries with optimization/emission specs are explicit.
## Preserving optional runtime hook metadata
Typed FunctionMetadata roles are frontend-neutral executable input. Lowering,
function ordering and optimization MUST retain externally entered role targets,
their dependencies and exact signature/capture/role metadata even without
ordinary CALL edges. Physical entry zero remains ordinary; deterministic linking
assigns other IDs to hooks. PBX emission consumes the existing role byte and
validates final targets, without role inference from function names or frontend
ASTs. Synthetic Init/Frame assembly is unchanged. FRAME_SYNC fixtures used to
test controlled-call rejection do not introduce frontend sync syntax.