Set and reusable identity qualification
Owner: compiler/pbs. Captured 2026-10-25 for accepted DEC-0078 / PLN-0156.
Studio baseline HEAD: 632ba6d0d6988a5e5020f0d70e4fb3993739bc85.
Runtime: clean dcf6561ea73446e0a3e1cf1c73eda20923b38df0, unchanged throughout.
No commit was created in either repository. Runtime builds used external targets.
Commands and outcomes
All commands ran from Studio unless a runtime working directory is specified. The compressed raw outputs and SHA-256 manifest are alongside this file.
./gradlew test :prometeu-app:installedKnowledgeTest --console=plain
python3 tools/runtime-catalog/verify.py --runtime ../runtime
CARGO_TARGET_DIR=/tmp/pln156-pbx-target python3 tools/pbx-conformance/run.py --runtime ../runtime
CARGO_TARGET_DIR=/tmp/pln156-pbx-target python3 tools/pbx-conformance/run.py --runtime ../runtime --release
All four commands returned zero. Gradle completed in 46 seconds: 94 actionable
tasks, 21 executed and 73 up-to-date. Aggregated JUnit reports contain 1,062 cases,
zero failures/errors and 13 existing skipped cases (1,049 executed cases). Skips
belong to BackendGateIIntegrationTest (8), MainProjectPipelineIntegrationTest (4)
and ExternalSourceDevelopmentHostTest (1); individual names and suite counts are
in gradle-results.json. None belongs to the new identity/Set tests. Installed
knowledge validation additionally completed outside the checkout using the built
distribution JARs and produced the mandatory hash/Set PBX examples.
Focused class sizes in the full regression: IdentityHashingPipelineTest 3, PbsIdentityHashingTest 3, PbsSetTest 15. PBS frontend totals 300; architecture totals 115; build-pipeline totals 200 including its 12 existing skips. The complete regression also covers editor/LSP, Array, List, Linked, generic structs/contracts, native groups, Random, compiler architecture and ordinary packaging.
Both complete production VM harness commands passed. Each includes the following new mandatory observations (no missing fixture is skipped):
| Corpus | Count per Rust profile |
|---|---|
| Scalar/String independent oracle + exact attempted cost + zero fuel | 60 |
| Complete reference/common/source groups, aliases, costs, unused results | 16 |
| Neutral category/TypeId/dead-code admission rejects | 8 |
| Partial group / truncated instruction admission rejects | 2 |
| Null views / complete invalid right operand / cost / fuel | 3 |
| Set success and expected callback/overflow faults, paired producers | 52 |
| Natural Set quota refusals with instruction-prefix comparison | 282 |
| Separate test-only post-publication quota injection | 2 |
| Snapshot GC observations / source Set GC observations | 4 / 4 |
| Real Set import/reexport and installed-example executions | 2 |
| Real installed hash-example execution | 1 |
The full harness additionally requires the existing common Registry, math, Random, input, structured values, generic contracts/structs, storage/copy, List/Linked, closure/lifecycle and loader/schema corpora. Historical upstream schema exceptions remain explicit: LifecycleRole and NonFiniteValue are absent from the selected provider's published headless enum. The harness preserves the original payload and does not call those two cases unmodified-schema conformance.
Provider supplement (runtime working directory; external target only):
cargo test --locked --offline --target-dir /tmp/pln156-provider-target -p prometeu-vm --test identity_hashing
cargo test --locked --offline --target-dir /tmp/pln156-provider-target -p prometeu-vm --lib identity_tests
cargo test --locked --offline --target-dir /tmp/pln156-provider-target -p prometeu-vm --lib 'hashing::'
The three suites passed 7 + 6 + 2 tests in debug and again with --release.
These provider tests cover stale handles/generation reuse, complete invalid
groups, fault order, non-finite injected Float bits, foreign/resident String
owners, quota-free borrowed queries, GC non-rooting and all independent reference
hash vectors. They supplement actual Studio-produced PBX; they do not substitute
for it. Two exploratory --lib hash_intrinsics:: filters in the retained combined
log selected zero tests and provide no additional qualification.
The explicit catalog exporter check passed one provider test and compared both CSV artifacts byte-for-byte against committed provider source and Studio mirrors.
Resource observations
Ordinary and optimized producers produced identical resource vectors. These are whole-fixture/session high-water measurements, including earlier setup, complete carriers and call preparation, not standalone object layout sizes.
| Operation | GuestBytes peak before → after | HandleSlots peak before → after | Maximum Set nodes / bucket tables | Natural refusals per producer |
|---|---|---|---|---|
| Growth 6 → 7 | 21,304 → 44,192 | 68 → 140 | 13 / 2 | 38 |
| Add without growth 5 → 6 | 17,288 → 22,216 | 55 → 71 | 6 / 1 | 28 |
| Duplicate add | 17,288 → 19,440 | 55 → 62 | 5 / 1 | 13 |
| Remove | 17,288 → 20,680 | 55 → 66 | 5 / 1 | 21 |
| Clear | 17,288 → 17,592 | 55 → 56 | 5 / 1 | 5 |
| Cursor | 17,288 → 31,808 | 55 → 102 | 5 / 1 | 36 |
Growth's AuxiliaryBytes peak was 9,968 → 17,648, TemporaryBytes 3,840 → 7,680 and CallDepth 5 → 7. The eight raw peak entries are GuestBytes, HandleSlots, AuxiliaryBytes, TemporaryBytes, StringBytes, StringAllocations, IndividualStringBytes and CallDepth. Detailed limits, fault opcodes and complete vectors are printed in both profile logs. Every natural refusal was before a structural write; an installed guard may remain. Snapshot failures always preserved the source Set and returned no partial result.
The independently named pbs-set-injected-refusal-growth* fixtures use an
in-memory SDK override that inserts one controlled Array allocation after the
real candidate table store. A GuestBytes quota refuses the probe: the source now
references a 16-bucket table with seven nodes, still reports old size six and
retains its guard. The failing instruction preserves its own entry state. This
is explicitly test-only post-write evidence, not production refusal frequency.
The production SDK has no injected allocation. Real safepoints measured snapshot nodes/payloads 1,200 → 1 → 1 → 0 without retained source Set nodes, and source collection nodes 64 → 61 → 0 → 0 after removal/clear/release. Captures and their final values assume no iteration order.
Hashing-first chronology and scope
The plan recorded a successful gate on 2026-10-24 before any Set algorithm edits:
60 scalar/String oracle executions plus 14 common/source reference executions.
At that stage IdentityHashingPipelineTest had two tests and
PbsIdentityHashingTest three. The original /tmp/pln156-hashing-* log names were
subsequently reused for expanded requalification. Retained focused logs therefore
show the later 89-observation corpus; they are not represented as untouched raw
outputs from the initial temporal gate. This chronology preserves the original
plan's contemporaneous record without fabricating an earlier log.
Final scope: local macOS 27.0.1, arm64; Rust 1.98.1; Java/Gradle toolchain recorded
in environment.txt; VM resource-diagnostics feature and default production
ceilings except explicitly lowered quotas. Source optimizer paths are independent
of Rust runtime profiles. Cross-host, installed game deployment, performance and
adversarial hash resistance are not qualified by these runs.
source.sha256 fingerprints 39 changed/new Studio production, test and documentation
files. fixtures.sha256.gz fingerprints 1,301 generated PBX artifacts available to
the full harness; regenerate them with the Gradle command. gradle-results.json
preserves all suite counts and skipped names. SHA256SUMS fingerprints retained
evidence files. Logs can be read with gzip -dc <file>.gz.
Workflow closure
discussion mark-plan PLN-0156 done completed successfully, followed by
discussion housekeep DSC-0092 --lesson discussion/lessons/DSC-0092-pbs-sdk-set/LSN-0093-reusable-identity-and-source-set-buckets.md.
The CLI removed three completed control artifacts and registered LSN-0093.
discussion validate passed afterward; DSC-0092 is done with only its lesson
registered. AGD-0089 and AGD-0095 reference the delivered result and keep Map's
remaining questions open. Final read-only workflow state is in workflow.txt.
Accepted requirement coverage
| Requirements | Final evidence |
|---|---|
| R1 / R3 | Source API/default/explicit/type/privacy tests, generic invariance, concrete editor projections and installed examples |
| R2 / R5 | Neutral IR instruction/width/encoding tests, oracle and complete-group source execution, malformed instructions and source-order fixtures |
| R4 | Topology assertions, 8 → 16 threshold, duplicate/no-shrink/clear, signed-long/u32 arithmetic and cached rehash counters |
| R6 / R7 | Alias reentrancy faults, permitted callback reads, callback-fault guard observations and natural/injected instruction-prefix resource evidence |
| R8 | Empty/single/multiple complete Cursor state table, payload sharing, independent capture and real GC lifetime |
| R9 / R10 | Hashing-first chronology, paired producer/profile runs, provider supplement, collision/callback counters and measured coexistence |
| R11 | Public Identity/hash handoff to Map without Map API/layout implementation |
| R12 | Clean fixed provider, external targets, English specs/lesson, packaged SDK/examples, full regression and CLI validation/housekeeping |