Files
prometeu-studio/discussion/lessons/DSC-0093-pbs-sdk-map-keyval/evidence

Map/Keyval implementation and qualification evidence

Owner: compiler/pbs. Captured 2026-10-26 for accepted DEC-0079 / PLN-0157, with complete coverage of R1–R12. Studio baseline HEAD and host/tool versions are in environment.json. Runtime remained clean at dcf6561ea73446e0a3e1cf1c73eda20923b38df0; no runtime write or commit was made.

Reproduction and results

From the Studio root:

./gradlew test :prometeu-app:installedKnowledgeTest --console=plain
CARGO_TARGET_DIR=/tmp/studio-pbx-map-target python3 tools/pbx-conformance/run.py --runtime ../runtime
CARGO_TARGET_DIR=/tmp/studio-pbx-map-target python3 tools/pbx-conformance/run.py --runtime ../runtime --release
git diff --check
discussion validate

All returned zero. The two complete VM runs include all Map cases and the existing Registry, catalog, math, Random, input, Array/optional, Struct/contract, generic, closure, storage/copy, List, Linked, Set, Identity/hash, admission and schema corpora. Focused --map-only runs were used during development; final evidence is from the complete harness built from the final source fingerprints.

Aggregated standard JUnit reports contain 1,079 cases: zero failures/errors, 1,066 executed and 13 existing skips. The independent installed-knowledge task adds two passing cases outside the checkout using installed JARs. The final Gradle invocation completed in 15 seconds with 2 executed and 92 up-to-date tasks; unchanged suites retained valid prior successful results. Reported suites and individual skips are preserved in gradle-results.json. Existing skips belong to BackendGateIIntegrationTest (8), MainProjectPipelineIntegrationTest (4) and ExternalSourceDevelopmentHostTest (1). None is a new Map test. Frontend totals are 305 and architecture totals are 127.

Each Rust profile uses both ordinary and optimized source producers, including the GC fixtures. Eighty-eight mandatory Map files are fingerprinted: 64 behavior and expected-fault cases, 16 resource fixtures, 2 distinct injection fixtures, 4 GC fixtures and 2 real import/installed examples. Missing mandatory fixtures fail qualification. The full fixture directory contains 1,389 fingerprinted PBX files; a directory count is not itself a count of executed corpus cases.

New observation per Rust profile Count
Behavior / expected callback and overflow faults 64
Natural quota refusals with successful-prefix comparison 328
Separate test-only post-publication quota injections 2
Snapshot GC observations, ordinary + optimized 8
Collection/replacement/removal GC observations, ordinary + optimized 10
Import/reexport and installed-JAR example executions 2

Known upstream headless-schema gaps for LifecycleRole and NonFiniteValue remain printed explicitly. Original provider payloads are preserved and those cases are not called conformance to the unmodified published enum. No new exception was introduced for Map. Qualification is local macOS/arm64, not a timing benchmark or other-host/deployed-game qualification.

Resource and failure-phase observations

The paired producer paths and Rust profiles produced the same peak vectors. These are measured whole-fixture/session peaks including setup, wrappers and call preparation, not standalone Map object sizes.

Operation GuestBytes before → after HandleSlots before → after Peak Map nodes / tables Natural refusals per producer
Growth 6 → 7 26,776 → 50,576 86 → 161 13 / 2 38
Add without growth 21,848 → 27,688 70 → 89 6 / 1 25
Index replacement 21,848 → 24,912 70 → 80 5 / 1 16
put replacement 21,848 → 25,516 70 → 82 5 / 1 18
Remove 21,848 → 25,540 70 → 82 5 / 1 16
Clear 21,848 → 22,152 70 → 71 5 / 1 5
Cursor capture 21,848 → 37,888 70 → 122 5 / 1 30
Read 21,848 → 25,212 70 → 81 5 / 1 16

All 328 natural refusals in each final profile occurred before structural writes; an installed guard may remain. This does not prove post-write faults impossible or permit automatic safe reuse. The separate test-only probe after actual table installation retains 16 buckets, 7 nodes, old size 6 and active guard when the probe allocation fails, while the refused instruction preserves its own entry state. Production SDK source contains no such probe. The source prepares even typed none before publication because lowering that absence can materialize a private carrier.

Snapshot GC observes 1,200 -> 1 -> 1 -> 0 nodes and Keyvals and 2,400 -> 2 -> 2 -> 0 distinct key/value Items, without retaining the source Map table/nodes. Collection GC observes 64 -> 64 -> 61 -> 0 -> 0 Map nodes and 128 -> 128 -> 122 -> 0 -> 0 Items: overwritten values are reclaimed, removals release keys/values and clear releases all associations. Both producer variants pass these observations in both runtime profiles.

The eight peak vector components are GuestBytes, HandleSlots, AuxiliaryBytes, TemporaryBytes, StringBytes, StringAllocations, IndividualStringBytes and CallDepth. The complete vectors, refusal operation/resource/opcode records and GC counts are in map-results.json and the compressed raw logs.

Requirement coverage retained after housekeeping

Requirement Final evidence
R1 Construction, nominal origin, invariance Frontend Map tests, SDK interface gate, alias/reexport frame and installed source
R2 API and evaluation basic/scalars/evaluation source cases, typed string/object/tuple/native keys
R3 Optional presence optional source case, nested payloads, stored none/zero/false, actual installed example
R4 Representative and previous values content/basic cases, no-growth replacement resource baseline, snapshot independence
R5 Identity policies scalars/objects/references/random/tuple/native/pixel cases and nominal/default-strategy frontend negatives
R6 Read-only Keyval content case with distinct association instances and shared payloads; private-field semantic/editorial gates
R7 Buckets, bounds, cleanup collisions/arithmetic/overflow, structural validation of resource fixtures, collection GC
R8 Reuse, rehash, memory collision strategy counters, 13-node/2-table growth peak and full existing Set corpus
R9 Entry snapshot empty/single/multiple states, snapshots/content, callback reads, paired snapshot GC
R10 Guard and failure phases hash and equals callback fault matrices, successful-prefix quota comparison, separate post-publication injection
R11 Groups, owners, LSP tuple/native/pixel/contract/reference payloads, source-order checks, real GC and SDK provenance/privacy editor tests
R12 Production qualification and distribution Complete debug/release logs, both producer paths, isolated installed-JAR compilation/execution and regression reports

Files and workflow mechanics

  • regression.log.gz, conformance-debug.log.gz, conformance-release.log.gz: complete final raw outputs.
  • source.sha256: all changed/new version-controlled surfaces at qualification.
  • fixtures.sha256.gz: actual generated PBX fingerprints, including installed examples.
  • gradle-results.json, map-results.json, environment.json: machine-readable results.
  • workflow.txt: completed plan, validation and housekeeping output.
  • SHA256SUMS: evidence file integrity manifest.

The CLI has no standalone lesson creation/next-ID query. LSN-0094 was read through the framework's read-only model accessor; discussion housekeep performs its registration, counter advancement, index updates and workflow artifact removal. The index was not edited manually. The English lesson preserves the operational knowledge; completed agenda/decision/plan files are disposable workflow scaffolding.