Files
prometeu-studio/tools/pbx-conformance/README.md
T
bquarkz 1d8b8c2101
Test / Tests and coverage
Intrepid/Prometeu/Studio/pipeline/pr-master This commit looks good
feat(studio): integrate memcard persistence and headless controls
Persist cartridge identity and slot configuration, add MemcardBoot and the MemcardBuffer SDK, and consume the runtime's negotiated memcard host controls with protected teardown.

Qualify save/reopen and version upgrades through distinct configured runtime processes. Include specs, examples, regression evidence and the consolidated discussion lesson.
2026-10-30 11:01:02 +00:00

508 lines
30 KiB
Markdown

# Studio PBX producer conformance
Owner: compiler/general. This harness uses the production runtime loader and VM;
it does not implement a Java approximation of runtime admission.
## PBS memcard and MemcardBuffer qualification
Generate the production PBS corpus and the actual installed-JAR example, then run
both runtime profiles without modifying the runtime checkout:
```sh
./gradlew test :prometeu-app:installedKnowledgeTest --console=plain
CARGO_TARGET_DIR=/tmp/studio-pbx-memcard-target python3 tools/pbx-conformance/run.py --runtime ../runtime --memcard-only
CARGO_TARGET_DIR=/tmp/studio-pbx-memcard-target python3 tools/pbx-conformance/run.py --runtime ../runtime --memcard-only --release
```
The dedicated carrier has concrete Array<Int32> storage, capacity 0..4096, zero
initialization, checked byte access and reference aliasing. Ordinary PBS arrays
keep vacancy/optional semantics. The corpus checks all 14 native imports, both
producer optimizer variants, typed source boundaries and origin protection;
source aliases and canonical imported/reexported hooks; named evaluation order;
exact four-byte save/remount and no resave; 4096-byte transfers; 64-slot admission;
clear/commit; retained requests and BUSY; memory-only/pause/resume; public title,
format-version and 32x32 icon publication; absent/read-only/corrupt media; controlled
FAILURE/INDETERMINATE; hook refusal/trap/fuel; capacity/index/value/transfer traps.
The status-first facade forwards native calls without an intermediate typed RET,
so failed-domain Null payloads reach the caller's status check unchanged.
`memcard.rs` executes the production Firmware/SystemOS, VM, FileMemcard and its
shared worker. Fault storage distinguishes pre-publication failure from uncertain
metadata publication. The installed-JAR source fixture is also executed natively.
This is **native production-host evidence**. Multiple Firmware instances and a
file remount in this process do not establish save/reopen through the configured
installed runtime CLI/JSONL protocol. The separate process gate below consumes
the now-published provider surface for storage and explicit choices.
No alternative process protocol or physical power-cut qualification is claimed.
The separate Studio process gate now consumes the published protocol 1.1 memcard
extension through HeadlessProcessGateway and the configured installation:
```sh
./gradlew :prometeu-app:memcardProcessTest -PstudioRuntimeInstall=/absolute/extracted/installation
```
It builds actual PBS through the compiler and Studio shipper, requires a native
terminal commit SUCCESS, terminates the writer, then starts separate readers for
versions 1 and 2 with identical uint32 app_id. Both optimizer variants are required.
The reader's reachable entry/role graph contains no saving or presentation calls;
it validates exactly 00 7f 80 ff before rendering its observed oracle. Each read
leaves the complete image byte-identical and no native request submitted. A second
case proves missing-file open does not create, memory-only is explicit and dirty
shutdown refusal preserves the channel until explicit discard. Runtime dev/release
binary layouts and an extracted distribution are identified separately in evidence.
## PBS Map and Keyval qualification
Generate the mandatory Map corpus and actual installed-JAR example, then execute
the dedicated verifier in both runtime profiles:
```sh
./gradlew :prometeu-architecture-tests:test --tests '*PbsMapKeyvalTest' :prometeu-app:installedKnowledgeTest --console=plain
CARGO_TARGET_DIR=/tmp/studio-pbx-map-target python3 tools/pbx-conformance/run.py --runtime ../runtime --map-only
CARGO_TARGET_DIR=/tmp/studio-pbx-map-target python3 tools/pbx-conformance/run.py --runtime ../runtime --map-only --release
```
Each non-GC source case has ordinary/optimized PBS producer variants, independent
of the Rust dev/release profile. The manifest names every required success/fault,
resource, injection, GC, import and installed fixture; missing files fail. The
full harness includes Map separately from its historical catch-all PBS verifier.
The corpus covers typed non-positional keys; default/explicit Identity; optional
V and previous-value presence; original-key retention under content policies;
read-only Keyval instance identity; collisions/negative full hashes; rehash and
capture callback counters; complete tuple/native/contract groups; evaluation order;
alias reentrancy and permitted callback reads; and the shared snapshot state table.
Resource fixtures compare attempted instruction prefixes with successful
instruction prefixes under lowered production quotas. They separate installed
guard writes from structural mutation and measure old/candidate table/node and
snapshot/keyval peaks. A named test-only allocation after the real candidate-table
store qualifies permitted post-write incomplete invariants; production SDK has no
injected probe. Natural quota refusal counts are reported separately.
Real safepoints check independent key/value roots, obsolete-value release after
replacement, removed-key/value reclamation, Map-node reclamation, captured Keyvals,
consumed Cursor prefixes, retained final current and release after all owners exit.
Imported/reexported and installed examples execute through the production loader
and VM and actually construct the shared entry Cursor. This is local semantic and
resource qualification, not a performance benchmark or a new provider contract.
From the Studio root:
```sh
./gradlew :prometeu-compiler:prometeu-build-pipeline:test --tests '*LinkedRegistryTest' --tests '*PbxRegistryConformanceTest' --tests '*TypedCommonPipelineTest' --tests '*RuntimeCatalogPipelineTest'
./gradlew :prometeu-architecture-tests:test --tests '*PbsRuntimeAlignmentTest' --tests '*PbsStructuredValuesTest' --tests '*PbsClosuresTest' --tests '*PbsGenericContractsTest'
python3 tools/pbx-conformance/run.py --runtime ../runtime
```
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 21, Rust and the runtime
checkout's dependencies are required.
The output identifies runtime revision, OS/architecture and load configuration.
Positive fixtures distinguish loading from execution. The vec2 signature fixture
is deliberately load-only because its entry requires arguments. Native binding
uses SYSTEM for the positive case and NONE for missing-capability rejection;
all other cases use NONE. Resource tests explicitly lower default limits.
## PBS controlled guest lifecycle qualification
Generate the source corpus and installed example, then run both runtime profiles:
```sh
./gradlew :prometeu-architecture-tests:test --tests '*PbsGuestLifecycleTest' :prometeu-app:installedKnowledgeTest
python3 tools/pbx-conformance/run.py --runtime ../runtime --lifecycle-only
python3 tools/pbx-conformance/run.py --runtime ../runtime --lifecycle-only --release
```
`PbsGuestLifecycleTest` emits ordinary/optimized production PBX for both hooks,
each independently and neither, ordinary direct calls, fatal traps, total fuel
exhaustion and successful calls spanning slices. Arbitrary function names and
unmarked functions named BeforePause/BeforeResume distinguish role metadata from
name conventions. An actual workspace import/reexport case selects one original
declaration without requiring colocation with Frame. A conflicting declaration
must fail project analysis. Synthetic binary fixtures explicitly cover direct
and transitive FRAME_SYNC rejection; they do not add PBS sync syntax.
`lifecycle.rs` loads these images with the production VM and runs the production
Firmware/SystemOS foreground path using the standard TestPlatform hardware.
Home/resume asserts exact ordered guest effects, unchanged continuation PC and
game-session ticks/frames during hooks, preserved heap/global state and a single
Init execution. Direct suspension and Shell foreground handoff must not add a
reaction tick. A partial frame retains its existing operand and call frame while
controlled hooks run. Ordinary direct calls do not acquire a controlled context.
The independent 1,500,000-cycle fuel budget survives slices and debugger stops;
single stepping uses the same accounting. Fatal trap/fuel/sync cases cannot run
subsequent gameplay or publish a logical frame. After a crash, counters are read
from the retained game session rather than the newly active crash UI. Probe
functions run only as terminal observations after continuation/frame assertions.
The runner adds production firmware/driver dependencies to its temporary Cargo
project. Sources, manifests, lockfiles and build outputs in the runtime checkout
remain untouched. This is local lifecycle conformance; installed runtime/game
qualification and MemcardBoot/persistence remain separate scopes.
Negative fixtures mutate Java-produced bytes independently of the writer to
exercise malformed input that the writer correctly refuses to construct.
Initialization JSON comes from `prometeu_system::CrashReport`, and is checked
against the runtime's published headless schema. Saved JSON files remain under
the generated fixture directory. Studio process tests replay selected observed
payloads from `prometeu-app/src/test/resources/runtime` and assert unchanged MCP
projection, including null executed PC and nested verifier context.
## Known upstream schema defect
At runtime `f7d7c167531bb662a1af9d73fc326bb476bf8aa7`, the LoadReason Rust enum
includes LifecycleRole, LifecycleSignature, DuplicateLifecycleRole and
NonFiniteValue, absent from the published JSON schema enum. This corpus
observes LifecycleRole and NonFiniteValue. The harness prints an explicit
`UPSTREAM SCHEMA GAP` for those two reasons and verifies that adding exactly
the missing enum value makes the original payload valid. It never alters the
payload or reports those cases as conforming to the unmodified schema. Any
other schema failure remains fatal. Track the runtime correction in AGD75;
remove the exception once the schema is corrected.
The original registry/catalog fixtures qualify common backend production. The
PBS fixtures below additionally qualify source lowering; this harness does not
claim installed-runtime deployment or memcard persistence.
## Runtime catalog consumer fixtures
The catalog corpus adds common-IR Random calls with an aliased handle, a discarded
first result, mixed next/nextf/range calls and a subsequent next. The VM checks the
independent seed-42 handoff vector and identical charged work before/after
optimization. Constants are compared slot-by-slot against runtime materialization,
including exact Float bits and both slots of `vec2.zero`. Pool deduplication may
share a value but cannot omit a group component.
A known zero-argument touch query loads and traps `TRAP_UNAVAILABLE` without a
hardware context. A removed endpoint ID is rejected even after an unreachable
HALT. `color.html_rgba` executes with a String value and rejects a proven null
at load time, matching the runtime verifier's stricter rule despite the
dispatcher's nullable String carrier. These are distinct outcomes. Run the separate provider-export check with
`python3 tools/runtime-catalog/verify.py --runtime ../runtime` to compare the
selected source revision, imported CSV bytes and exporter output as well.
## PBS source and input qualification
`PbsRuntimeAlignmentTest` compiles actual SDK declarations and source programs
through the PBS frontend, production common IR, typed Registry and PBX writer.
Its 114 fixtures execute on the selected runtime: all 48 Pad combinations with
both literal Button arguments and enum locals passed through a typed function,
six Touch queries, numeric boundaries/conversions/faults, builtin groups,
String, fixed multiple returns and named application with observable Y,X effects.
The controlled input platform asserts the exact button/coordinate reader and
one read per public query. Each query is also executed without a platform to
prove TRAP_UNAVAILABLE. The loaded PBS registries are checked for the defaults
of all eight existing value types, including null String, positive Float zero
and complete vec2/pixel groups. No source constructors or new collection API
are introduced to test storage defaults.
The harness requires the complete fixture count. It must not pass by skipping
missing PBS fixtures. Integer arithmetic wrapping is distinct from checked
Int64-to-Int32 narrowing and Float numeric-range faults. The full installed
knowledge gate remains separate and mandatory for SDK resource/producer
integration.
## PBS typed arrays, optional and Struct/contract execution
`PbsStructuredValuesTest` generates 27 mandatory `pbs-structured-*` fixtures.
They cover contextual arrays, nested levels, vacancy/zero, clear/length, aliasing,
int/long bounds, single evaluation, lazy optional fallback, inferred/explicit
optional tuples, native vec2 groups, fields and constructors, overloads and Self,
contract elements/dispatch, imported services/structs/contracts, global file-init,
and the installed example. The runtime harness names every required fixture;
a missing file is an error.
Eighteen additional runs lower GuestBytes or HandleSlots to 0, 1 or 2. They assert
resource faults, bounded accounting, no object publication at zero quota, and
release of session ownership. The integer-storage fixture succeeds with one
handle total, proving that its three integers do not allocate individual boxes.
String session accounting is checked after each structured execution.
The GC fixture compiles all allocations, roots and post-collection reads from PBS.
A test-only driver hook replaces one isolated marker assignment with FRAME_SYNC
and NOPs without changing code offsets; it does not add PBS sync syntax. At the
real runtime safepoint, at least 1,100 discarded objects are reclaimed while
nested references, tuples and strings remain readable. `resource-diagnostics`
is enabled solely for observation. Default production ceilings and GC threshold
are unchanged outside the explicitly lowered quota runs. This is semantic and
resource conformance, not a performance benchmark or installed game qualification.
## PBS first-class functions and closure lifetime
`PbsClosuresTest` adds nine mandatory source/load/execute fixtures: named and
anonymous functions, snapshots, shared objects/arrays, nested function captures,
complete tuple groups and contract receivers, independent environments, Fn fields
and overload selection, imported functions, and the installed example. Each
returns 42. Six additional GuestBytes/HandleSlots runs at limits 0, 1 and 2 check
closure allocation faults and session ownership, bringing structured quota runs
to 24.
The tenth fixture, `closure-frame-lifecycle.pbx`, uses the existing production
lifecycle assembler without bytecode patching. Its first frame stores a closure
capturing an object; the next frame invokes it twice (41, then 42) and drops the
reference. Each of three frames also discards 1,200 closures. The harness asserts
threshold collections, retained closure/object reachability after frame one,
and reclamation after release. The remaining root is the global array.
PBS publishes FRAME_ROOT and the existing guarded wrapper returns normally.
No sync syntax, new frame integration, suspension or coroutine is introduced.
## PBS service constants and runtime math
`PbsRuntimeMathTest` produces 261 independent numeric cases in both ordinary and
optimized bytecode (522 mandatory executions per runtime profile), covering all
26 math/mathf signatures. The checked-in corpus preserves 240 provider scalar
fixture rows and exact contract examples (duplicates removed); provenance is in
`prometeu-architecture-tests/src/test/resources/math/provenance.txt`.
The harness verifies exact bits/faults, selected intrinsic identity and one
retained call per case. Single-step charging is compared with the provider's
opcode costs and independent fixture call cost; full-budget charging must equal
their sum, and optimization must preserve total cycles. Additional cases exercise
pi/tau, literal sin, ordinary int/long service constants, constant dependencies,
and real module imports with service aliases. The installed example also imports
both SDK services, so installedKnowledgeTest covers their packaged resources.
```sh
./gradlew :prometeu-architecture-tests:test --tests '*PbsRuntimeMathTest'
python3 tools/pbx-conformance/run.py --runtime ../runtime --math-only
python3 tools/pbx-conformance/run.py --runtime ../runtime --math-only --release
```
Omit `--math-only` for the full existing corpus. `--release` selects the optimized
Rust runtime harness; it is independent of the PBS optimizer variants included in
every run. Optional `CARGO_TARGET_DIR` can retain build artifacts outside the
runtime checkout. Each invocation prints runtime revision, platform, profile,
features, lockfile and provider catalog/oracle hashes. Local evidence qualifies
macOS/arm64 only; macOS/x86_64 and Linux/x86_64 remain pending.
## PBS explicit Random integration
`PbsRuntimeRandomTest` adds 226 source fixtures plus one real SDK import/alias
fixture. The 48 unchanged provider oracle rows produce 192 exact integer/Float
cases (six seeds, eight draws, two output kinds and two optimizer variants).
The remaining paired fixtures cover mixed/discarded draws, independent objects,
locals/globals/fields/arrays/parameters/results/captures, named/positional effects,
unit/extreme ranges, invalid limits, null and typed-null Dynamic storage, real
rejection followed by acceptance, and collection roots.
Each paired fixture runs with single-instruction budgets and twice with full
budgets, comparing exact result bits or faults, intrinsic charges and total
cycles. Explicit source `as long` conversions are charged separately. The GC
fixture reuses the existing test-only FRAME_SYNC marker hook; all allocations,
roots and post-collection draws are compiled PBS. At least 1,100 discarded Random
objects are reclaimed while array, field and closure references preserve the
same generator. The import fixture uses the production workspace builder and
lifecycle assembler. The focused driver calls file initializers before Probe.main;
it does not claim a new lifecycle API.
```sh
./gradlew :prometeu-architecture-tests:test --tests '*PbsRuntimeRandomTest'
python3 tools/pbx-conformance/run.py --runtime ../runtime --random-only
python3 tools/pbx-conformance/run.py --runtime ../runtime --random-only --release
```
The driver rejects an oracle copy that differs from the selected provider and
prints source/oracle/catalog/lockfile fingerprints and toolchain/profile details.
A complete run includes the Random corpus and keeps it separate from the older
114 input/type fixtures. Rare synthetic 64-attempt acceptance/cap/rollback,
malformed carriers and native provenance are provider tests, not PBS-produced
claims. Qualify those separately with the provider's `random_contract` suite and
`cargo test -p prometeu-vm --lib random` in debug/release. No alternate RNG or
public injection hook is used. Installed knowledge validation remains a separate
gate for packaged SDK/spec/example resources.
## PBS generic contracts
`PbsGenericContractsTest` generates fourteen mandatory source fixtures:
`identity`, `manual`, `multiple`, `tuple`, `optional`, `function`, `contract`,
`native`, `recursive`, `phantom`, `receiver`, `gc`, `installed` and `imports`.
The corpus uses ordinary concrete Trait descriptors on the existing runtime.
It checks several applications on one owner, ordered substitution, composed
multi-slot values, finite recursion, canonical aliases/reexports and distinct
same-named argument declarations. The imported program uses the production
workspace builder and lifecycle assembler.
The generic and handwritten concrete identity fixtures both execute with one
heap handle, establishing that contract adaptation needs no generic wrapper.
Typed absence and implementation index zero are valid. A mismatched Trait call
must be rejected by the verifier or trap with the runtime type check. The GC
fixture retains a contract receiver through a closure while at least 1,100
discarded objects are reclaimed. Reduced GuestBytes, HandleSlots and loader
implementation limits verify refusal and ownership release. Descriptor counts
and PBX byte sizes are printed as evidence, without a performance threshold.
```sh
./gradlew :prometeu-architecture-tests:test --tests '*PbsGenericContractsTest'
python3 tools/pbx-conformance/run.py --runtime ../runtime --generic-contracts-only
```
The full harness also requires these fixtures. The driver uses an external
runtime checkout without editing its sources or changing PBX, ISA or quotas.
## Minimal storage ISA, SDK collections and phase-aware refusals
Generate common/source fixtures and the real installed-JAR examples, then run:
```sh
./gradlew :prometeu-compiler:prometeu-build-pipeline:test :prometeu-architecture-tests:test :prometeu-app:installedKnowledgeTest
CARGO_TARGET_DIR=/tmp/studio-pbx-conformance python3 tools/pbx-conformance/run.py --runtime ../runtime
CARGO_TARGET_DIR=/tmp/studio-pbx-conformance python3 tools/pbx-conformance/run.py --runtime ../runtime --release
```
Focused `--list-cursor-only` and `--linked-only` modes include mandatory neutral
storage/copy/terminal/admission fixtures as well as their collection corpus. The
complete run requires both. No runtime source, manifest, lockfile or target
artifact is modified: the Cargo harness and target live outside that checkout.
The selected provider supports ARRAY_LEN and ARRAY_COPY, ordinary typed stores
and terminal TRAP. Four dead-code fixtures prove that 0xA7/0xA8/0xAA/0xAB reject
at real instruction positions; corresponding Int32-immediate fixtures must load.
All producer-opcode checks decode instruction boundaries rather than scanning
raw PBX bytes. Neutral ordinary/optimized programs qualify stores and copy without
PBS types. A store followed by TRAP_EXPLICIT proves that terminal failure retains
previous effects and source spans survive lowering/optimization.
Eleven paired neutral copy cases independently check scalar/vec2/String groups,
snapshot overlap, empty ranges, bad ranges/receivers, negative/above-u32 counts
and fault precedence. At the actual copy PC, zero budget executes nothing;
positive budget admits a complete attempt with overshoot. N=10/W=1 costs 24,
including receiver/range/scratch refusal; W=2 costs 44. Invalid or empty counts
cost base 4 as defined by the provider. Refusals preserve the five operands and
previous storage, release scratch and do not count a successful step. Native
String owners release with the session. Checked cost-overflow defenses requiring
synthetic internal widths are provider evidence, not an assertion that admitted
consumer layouts can attain those widths.
List source fixtures cover every mutator, exact growth, logical versus physical
bounds, int/long and named evaluation, holes, aliases and complete native/tuple/
Fn/contract/reference groups. Linked fixtures cover empty/single/multiple states,
reciprocal links, nearest-end lookup, complete values and both snapshot orders.
Logical SDK refusals now produce TRAP_EXPLICIT; physical instructions retain
their own faults. No missing ordinary or optimized fixture is silently skipped.
Four List and ten Linked source-generated mutation boundaries have normal and
optimized variants. GuestBytes, HandleSlots, AuxiliaryBytes and TemporaryBytes
ceilings are lowered from measured setup/success peaks. Non-owning diagnostic
observations inspect the original collection objects independently of guest code.
Every instruction prefix is compared with the corresponding successful prefix.
A refused instruction preserves its own observable entry state. Before visible
mutation the entire old collection must remain unchanged; after mutation the
previous successful writes remain, without a whole-method rollback or safe-reuse
claim. Successful single-instruction-budget traversal also qualifies suspension
and resumption in the middle of a source method. Snapshot capture failures must
always preserve their source and expose no partial result.
No-growth insertion prepares a one-slot private array before shifting and copies
that complete stored group into place; candidate/optional/result and operand/
frame preparation remain charged. ARRAY_COPY scratch remains a mandatory observed
refusal. Linked prepares nodes/results before its sequential link updates. The
corpus retains explicit coverage requirements for these resource refusal paths;
it does not rename old publication guarantees as new evidence.
Normal GC safepoints qualify removed nodes and payloads, collection clear,
snapshot independence, consumed-prefix reclamation and sticky final values.
The Cursor fixture requires 1,200 -> 1 -> 1 -> 0 snapshot nodes/payloads, with no
live source/snapshot array. Linked captures must not retain editable source nodes.
The actual installed SDK/spec/example is compiled outside the checkout and its
PBX is loaded/executed by the production VM; import/reexport fixtures also run.
Catalog schema 2 is imported with all 25 fields, per-entry nullable masks,
explicit invocation/scratch/context profiles and cost parameters. Ordinary parity
and rejection tests need no runtime checkout. Explicit exporter verification uses
`tools/runtime-catalog/verify.py` and the selected clean SHA/digests. Nullable
hash.string metadata is qualified independently of older non-nullable String
entries; importing it does not deliver PBS hashing facades or Set/Map.
Evidence prints consumer/provider source hashes, selected revision and clean state,
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.
## PBS Stack and Queue qualification
The mandatory Stack/Queue corpus is included in every complete run. A focused
run uses `python3 tools/pbx-conformance/run.py --runtime ../runtime --stack-queue-only`;
add `--release` for the optimized runtime profile. Both source producer paths are
mandatory in each profile. Generate fixtures with the architecture tests and
`:prometeu-app:installedKnowledgeTest` before executing the runner.
`stack_queue.rs` validates dense/circular storage, inactive-slot cleanup, exact
capacity/growth, wrapped growth, complete payloads, once/named evaluation, snapshot
orders/states, imports and actual installed-JAR examples. Lowered quota runs compare
complete original-object instruction prefixes to a successful run and distinguish
preservation before mutation from retained writes afterward. Separate test-only
growth probes demonstrate an installed candidate with old size after a later fault;
these probes are not shipped or counted as natural refusal frequencies.
GC fixtures require actual advancing collection counters. Snapshots release source
backings and observe 1,200 → 1 → 1 → 0 nodes/payloads. Collection fixtures observe
64 → 61 → 0 → 1 → 0 payloads and only one retained backing until its final owner
is dropped. Temporary Cargo projects/targets stay outside the runtime checkout.