4.0 KiB
4.0 KiB
| id | ticket | title | status | created | ref_decisions | tags | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PLN-0123 | multi-frontend-serializable-ir | Fix concrete IRBackend serialization leaks | open | 2026-07-15 |
|
|
Briefing
DEC-0044 allows incremental correction of concrete leaks found by audit and guardrail tests. This plan is intentionally last because it must operate on proven violations rather than speculative redesign.
Objective
Fix only the concrete public IRBackend serialization leaks identified by PLN-0120, PLN-0121, or PLN-0122, while preserving the accepted contract that no codec or transport is introduced.
Dependencies
- Accepted decision:
DEC-0044. - Required predecessor:
PLN-0120, to identify exact leak targets. - Required predecessor when tests exist:
PLN-0121, so non-serializable exposure is protected by tests. - Required predecessor when ordering is involved:
PLN-0122, so deterministic behavior is protected by tests.
Scope
- Replace public direct object references with explicit ids or stable symbolic keys when the audit proves they are part of the public handoff and violate
DEC-0044. - Replace public unordered or mutable collection exposure with ordered contract surfaces.
- Remove or encapsulate public callback, service, registry, visitor, or process-local lazy value exposure if any exists in the handoff.
- Add typed ids only for concrete leak targets where existing ids or stable symbolic keys are insufficient.
- Preserve backwards-compatible constructors or adapters only when they do not keep the forbidden shape in the public contract.
Non-Goals
- Do not redesign
IRBackend. - Do not migrate all textual identities to typed ids unless the audit proves a concrete contract leak.
- Do not introduce JSON, Protobuf, schema files, RPC, plugin loading, or process boundaries.
- Do not change PBS source semantics or backend lowering behavior except where required to consume the corrected handoff shape.
Execution Method
- Start from the exact violation list produced by
PLN-0120and failing tests fromPLN-0121orPLN-0122. - For each violation, choose the smallest correction that satisfies
DEC-0044:- direct reference to another handoff object becomes an explicit id or ordered table entry;
- unordered collection becomes an ordered list of value entries;
- mutable collection exposure becomes
ReadOnlyListor another existing immutable/read-only contract type; - callback/service exposure is removed from the public handoff and moved behind compiler-side assembly code.
- Update constructors, aggregators, lowerers, and tests that consume the corrected contract.
- Keep PBS-specific changes inside PBS lowering if PBS emitted the old shape.
- Run all relevant frontend API and backend tests after each correction group.
Acceptance Criteria
- Every concrete leak identified by predecessor plans is either fixed or explicitly documented as not part of the public
IRBackendhandoff. - Reflection guardrails from
PLN-0121pass. - Deterministic ordering tests from
PLN-0122pass. - Existing backend lowering tests continue to pass.
- No codec, schema language, RPC, external process, or plugin runtime is introduced.
Tests
Run:
- the
prometeu-frontend-apitests coveringIRBackendcontract models; - backend lowering tests that consume
IRBackend, includingLowerToIRVMServiceTestwhen available; - any conformance or architecture tests touched by the corrected public shape.
Affected Artifacts
prometeu-compiler/prometeu-frontend-api/src/main/java/p/studio/compiler/models/...prometeu-compiler/prometeu-frontend-api/src/test/java/p/studio/compiler/models/...prometeu-compiler/prometeu-build-pipeline/src/main/java/p/studio/compiler/backend/...only when a corrected handoff shape requires backend consumer updatesprometeu-compiler/prometeu-build-pipeline/src/test/java/p/studio/compiler/backend/...- PBS lowering files only when PBS emits a corrected handoff shape