feat(pbs): add Set and reusable identity hashing
This commit is contained in:
@@ -15,7 +15,7 @@ The Java tests generate PBX in the build-pipeline module's
|
||||
`build/registry-conformance`. `run.py` creates a temporary Cargo project, copies
|
||||
the runtime lockfile and references its bytecode/hal/vm/system crates by path.
|
||||
It never modifies the runtime checkout. Add `--online` for an uncached machine;
|
||||
by default Cargo uses only cached dependencies. Java 25, Rust and the runtime
|
||||
by default Cargo uses only cached dependencies. Java 21, Rust and the runtime
|
||||
checkout's dependencies are required.
|
||||
|
||||
The output identifies runtime revision, OS/architecture and load configuration.
|
||||
@@ -304,3 +304,60 @@ Evidence prints consumer/provider source hashes, selected revision and clean sta
|
||||
toolchain/platform/profile, lockfile/catalog hashes, capabilities, default ceilings
|
||||
and lowered refusal limits. Keep new qualification separate from historical List/
|
||||
Linked evidence; prior successful providers are not relabeled as the new target.
|
||||
|
||||
## PBS hashing, Identity and Set
|
||||
|
||||
`IdentityHashingPipelineTest` qualifies neutral 0x97/0x98 production, complete
|
||||
concrete/Trait groups and both optimizer paths. It also emits malformed-category,
|
||||
right-TypeId, unknown-TypeId, dead-code, partial-group and truncated fixtures.
|
||||
Unknown global inputs in two neutral cases reach production runtime validation:
|
||||
an absent/different left cannot hide the invalid complete right view. Refusal
|
||||
retains all three input slots, charges seven cycles and executes zero successful
|
||||
query steps; zero budget executes nothing.
|
||||
|
||||
`PbsIdentityHashingTest` selects all 30 scalar/String rows from the unchanged
|
||||
118-row independent provider C XXH64 oracle. Both producer paths preserve exact
|
||||
signed digest bits and attempted costs. Separate source fixtures qualify Struct,
|
||||
Array, Fn, Random, complete contracts, mutation, aliases and discarded scalar and
|
||||
reference results. The reference-query source gate ran before Set algorithm work.
|
||||
The consumer oracle copy is checked against the selected provider on every
|
||||
explicit harness invocation. Ordinary Gradle compilation uses local resources.
|
||||
|
||||
`PbsSetTest` exercises the complete source API, contextual/default/explicit
|
||||
construction, optional/default diagnostics, nominal origin, shared complete values,
|
||||
content opt-in, collisions, exact growth arithmetic, callbacks, aliases and Cursor.
|
||||
Counter strategies demonstrate that rehash and capture do not call hash/equals.
|
||||
SDK aliases, generic-function reexports and installed examples compile through
|
||||
actual workspace builders; installed compilation uses only installDist JARs in an
|
||||
external directory and writes mandatory PBX fixtures for runtime execution.
|
||||
|
||||
```sh
|
||||
./gradlew :prometeu-compiler:prometeu-build-pipeline:test --tests '*IdentityHashingPipelineTest'
|
||||
./gradlew :prometeu-architecture-tests:test --tests '*PbsIdentityHashingTest' --tests '*PbsSetTest'
|
||||
./gradlew :prometeu-app:installedKnowledgeTest
|
||||
CARGO_TARGET_DIR=/tmp/studio-pbx-target python3 tools/pbx-conformance/run.py --runtime ../runtime --identity-hashing-only
|
||||
CARGO_TARGET_DIR=/tmp/studio-pbx-target python3 tools/pbx-conformance/run.py --runtime ../runtime --set-only
|
||||
```
|
||||
|
||||
The Set quota corpus measures old/candidate coexistence and compares every
|
||||
original-object instruction prefix with a successful run. It treats guard writes
|
||||
separately from structural writes. Natural quota cases cover insertion, growth,
|
||||
duplicate inclusion, removal, clear and capture with no claim that all failures
|
||||
preserve the entire Set or that every theoretical failure boundary occurs at the
|
||||
sampled limits. Current natural runs refuse before structural mutation; this is
|
||||
reported explicitly by their summaries.
|
||||
|
||||
A **separate test-only instrumented source fixture** inserts a controlled Array
|
||||
allocation after the real candidate-table store and before size assignment. A
|
||||
lowered guest quota refuses that probe. The old size six, new table capacity 16,
|
||||
seven reachable nodes and active guard remain, while the refused instruction
|
||||
preserves its own entry state. This demonstrates the post-publication failure
|
||||
boundary; it is not a production SDK allocation, callback, algorithm or claim about
|
||||
natural refusal frequency. Its ordinary/optimized fixtures are named
|
||||
`pbs-set-injected-refusal-growth*` and are generated from an in-memory SDK copy.
|
||||
|
||||
Real safepoints qualify source Set node/candidate release, removal/clear, snapshot
|
||||
prefix reclamation and sticky final retention. Set GC tests do not assume an
|
||||
iteration order. Add `--release` to qualify the Rust release profile independently
|
||||
of the two producer variants; omit focused flags for the complete mandatory corpus.
|
||||
All harness builds remain outside the runtime checkout, which is consumed unchanged.
|
||||
|
||||
Reference in New Issue
Block a user