Parent: #27
Depends on: #39, #40
Goal
Turn the mature BinDiffSynchronizer prototype into executable migration evidence so behavior is not lost or reinvented during extraction.
Source baseline
The current BinDiffSynchronizer prototype is not the target architecture, but it contains a large body of corrected behavior (700+ tests) accumulated while migrating from compatibility allocators/containers to PMM. Treat commits/issues/tests as a behavioral oracle, not as source files to copy mechanically.
High-value behaviors to preserve
-
Independent state / multiple databases
- The prototype had to move
pam_pmm_* from implicit global state to explicit pam_pmm_state&, then add synchronization.
- Standalone pjson must instead rely on its typed PMM manager boundary (
Config + InstanceId) and must not port the compatibility singleton wrappers.
-
RFC 6901 path correctness
- Decode
~1 -> /, ~0 -> ~ in object-key segments.
- Preserve root/empty-segment semantics and reject malformed escapes deterministically.
- Keep read-only walk and create/mutation walk separate; do not resurrect the historical false-const create mode.
-
Persistent container behavior
- Preserve growth/shrink/erase/save-load fixtures for pstring/parray/pmap where those tests exercise pjson semantics.
- Do not duplicate tests that belong purely to PMM allocation/container correctness.
- Do not port removed pvector/pool/pmap_pmm compatibility types.
-
Allocation/lifetime regressions
- Parse failures, replacement, erase, clone/free and read-only metrics must not leave persistent allocations behind.
- Test allocation/block-count baselines before/after failing operations.
-
Codec correctness
- One-pass object parsing; do not parse the first member twice to detect extension objects.
- Unicode escape handling and UTF-8 validation, including lone surrogates and values above U+10FFFF.
$base64 maps to binary semantic nodes; it is not an independent in-memory type.
$ref maps to ref semantic nodes with bounded/cycle-safe resolution.
-
Hot-path behavior
- Avoid repeated PMM pointer resolution/type reads for the same node inside one traversal step.
- Prefer bulk binary/string copies where PMM permits them.
- Share traversal machinery used by clone/free/count/codec instead of maintaining divergent recursive walkers.
-
Cross-platform test names/tooling
- Keep Catch2/CTest test names ASCII where filters are passed through Windows command-line encodings; the prototype had repeated MSVC failures from non-ASCII test names.
Classification workflow
Audit the BinDiffSynchronizer pjson/pjson_db_pmm suite and classify each test:
- Core JSON semantics -> port to pjson.
- PMM kernel semantics -> do not duplicate; rely on PMM tests.
- Legacy adapter behavior -> intentionally do not port unless a requirement needs it.
- BinDiff/sync behavior -> remain in BinDiffSynchronizer.
- DB/query/index behavior beyond pjson 1.0 -> defer to future pjson_db work.
For each relevant prototype test, record source commit/test identity and one disposition: ported, covered-by-PMM, sync-layer, pjson_db, or obsolete-compatibility.
Acceptance criteria
- A documented test inventory maps meaningful prototype tests to ported/skipped/deferred disposition.
- Ported tests use standalone pjson public/internal headers only.
- No compatibility header is added just to make old tests compile unchanged.
- Corrected behaviors from the mature prototype suite are represented before prototype deletion is considered.
- No test is ported merely because it exists; every ported test protects a pjson requirement/invariant.
- Windows CI does not depend on non-ASCII test filters.
Parent: #27
Depends on: #39, #40
Goal
Turn the mature BinDiffSynchronizer prototype into executable migration evidence so behavior is not lost or reinvented during extraction.
Source baseline
The current BinDiffSynchronizer prototype is not the target architecture, but it contains a large body of corrected behavior (700+ tests) accumulated while migrating from compatibility allocators/containers to PMM. Treat commits/issues/tests as a behavioral oracle, not as source files to copy mechanically.
High-value behaviors to preserve
Independent state / multiple databases
pam_pmm_*from implicit global state to explicitpam_pmm_state&, then add synchronization.Config + InstanceId) and must not port the compatibility singleton wrappers.RFC 6901 path correctness
~1 -> /,~0 -> ~in object-key segments.Persistent container behavior
Allocation/lifetime regressions
Codec correctness
$base64maps to binary semantic nodes; it is not an independent in-memory type.$refmaps to ref semantic nodes with bounded/cycle-safe resolution.Hot-path behavior
Cross-platform test names/tooling
Classification workflow
Audit the BinDiffSynchronizer pjson/pjson_db_pmm suite and classify each test:
For each relevant prototype test, record source commit/test identity and one disposition:
ported,covered-by-PMM,sync-layer,pjson_db, orobsolete-compatibility.Acceptance criteria