107 lines
6.9 KiB
Markdown
107 lines
6.9 KiB
Markdown
# Stack/Queue implementation and qualification evidence
|
||
|
||
Owner: `compiler/pbs`. Accepted DEC-0080 / completed PLN-0158 in DSC-0097, R1–R9.
|
||
Captured 2026-10-27 over Studio baseline `01a19686`. The provider remained clean at
|
||
`dcf6561ea73446e0a3e1cf1c73eda20923b38df0`; no runtime write or commit occurred.
|
||
|
||
## Reproduction and outcome
|
||
|
||
From the Studio root:
|
||
|
||
```sh
|
||
./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. Temporary Cargo projects/targets stay outside the read-only
|
||
runtime checkout. Focused development runs used `--stack-queue-only`; retained
|
||
final VM evidence is from the two complete harness runs, including all existing
|
||
Registry, storage/copy, language and collection corpora.
|
||
|
||
Aggregated standard JUnit reports have 1,091 cases, zero failures/errors and 13
|
||
existing skips; 1,078 executed. The separate installed-knowledge task adds two
|
||
passing cases, compiling actual JAR resources in an isolated outside-checkout JVM.
|
||
The final Gradle run completed in 32 seconds with 15 executed and 79 up-to-date
|
||
tasks; unchanged suites retained valid passing results. See exact suites/skips in
|
||
[gradle-results.json](gradle-results.json). Existing skips remain BackendGateIIntegrationTest
|
||
(8), MainProjectPipelineIntegrationTest (4), ExternalSourceDevelopmentHostTest (1).
|
||
|
||
There are 106 mandatory new PBX files: 58 paired behavior/expected-fault cases,
|
||
34 paired operation-resource fixtures, four separate test-only injection files,
|
||
eight paired GC files and two import/installed examples. Each runtime profile
|
||
requires them all. The complete fixture directory contains 1,495 fingerprinted
|
||
PBX files; directory size is not itself a count of executed cases.
|
||
|
||
Each final profile observes 184 Stack + 180 Queue natural quota refusals, including
|
||
18 + 12 after visible writes (all during clear), four separate growth probes,
|
||
36 real GC observations and both distribution examples. Both ordinary and optimized
|
||
producer paths are mandatory in each profile. Missing fixtures fail qualification.
|
||
|
||
## Resources, phases and GC
|
||
|
||
[stack-queue-results.json](stack-queue-results.json) records all 34 operation/producer
|
||
peak vectors and refusal summaries per profile, natural counts, separate probes,
|
||
GC rounds and distribution results. Peak vector order is GuestBytes, HandleSlots,
|
||
AuxiliaryBytes, TemporaryBytes, StringBytes, StringAllocations, IndividualStringBytes,
|
||
CallDepth. These are whole-session/fixture peaks including setup and calls, not
|
||
standalone collection object sizes. Limits are lowered only where setup-to-operation
|
||
peaks increase, retaining the measured no-increase domains in the raw vectors.
|
||
|
||
Non-owning observations compare complete original collection/backing objects at
|
||
each instruction to the successful prefix. Before mutation, prior state survives;
|
||
afterward, earlier successful stores remain and no rollback is asserted. Clear
|
||
naturally demonstrates partial updates. Result preparation, typed empty returns,
|
||
copy/backing construction and snapshot-node refusals remain charged. Growing paths
|
||
observe at least two coexisting arrays; ordinary updates/capture retain one backing
|
||
and never reconstruct the whole collection.
|
||
|
||
The separate test-only growth probes fail after installing capacity three with
|
||
the new slot=42 and old size=2. The refused probe instruction preserves its own
|
||
entry storage/operands, retaining the earlier publication. These probes are only
|
||
in fixture-local SDK copies, never in production source, and are not counted as
|
||
natural refusal frequency.
|
||
|
||
Snapshot GC observes 1,200 → 1 → 1 → 0 nodes and Items, with no retained source
|
||
array. Collection GC observes 64 → 61 → 0 → 1 → 0 Items, one retained current/empty
|
||
backing through the first four rounds and zero afterward. Old growth backings are
|
||
not retained. Every observation asserts that the actual collection counter advanced.
|
||
Both producers and both runtime profiles pass. Final VM owner drop also releases
|
||
GuestBytes/HandleSlots/AuxiliaryBytes/TemporaryBytes/StringBytes/StringAllocations.
|
||
|
||
## Requirement coverage
|
||
|
||
| Requirement | Final evidence |
|
||
| --- | --- |
|
||
| R1 Types, identity, origin, construction | Frontend context/invariance/optional/privacy/homonym gates, SDK workspace gate, basic/capacity/references/snapshot/evaluation and alias imports |
|
||
| R2 Complete API and absence | basic/capacity, empty/single/multiple Cursor states, zero/false, evaluation, negative indexer/unsupported API cases |
|
||
| R3 Growth and bounds | exact 0→1→2→3→5→8, default/explicit capacities, arithmetic helper checks and negative/above-u32/required-size faults |
|
||
| R4 Dense/circular groups | wrap and wrapped-growth source cases, resource validation of every active/inactive slot and start/count/backing, tuple/native/reference execution |
|
||
| R5 Failure phases | 34 marked paired fixtures, successful-prefix comparisons, 364 natural refusals including 30 after writes, four separate post-write probes |
|
||
| R6 Lifetime and coexistence | array peak counts, no reconstruction on ordinary updates, actual removal/clear/reuse/old-backing GC, complete owner release |
|
||
| R7 Shared Cursor | both capture orders, sticky final/empty states, duplicates/shared mutation, mutation independence, both snapshot GC paths |
|
||
| R8 Frontend/editor/distribution | concrete public eight-method APIs/constructors/definitions, hidden fields, trusted aliases/reexports, isolated JAR compile and actual PBX execution |
|
||
| R9 Complete qualification | full regression, complete production debug/release corpora with both producers, reproducible fingerprints/raw logs and limits |
|
||
|
||
## Integrity and limits
|
||
|
||
- `source.sha256`: every changed/new code/spec/test surface, excluding discussion prose/evidence.
|
||
- `fixtures.sha256.gz`: all actual generated PBX fingerprints, including installed examples.
|
||
- `environment.json`: baseline/provider, host/tool versions, commands, mandatory fixture names,
|
||
uncompressed log digests and counts.
|
||
- `conformance-debug.log.gz`, `conformance-release.log.gz`, `regression.log.gz`:
|
||
lossless raw final outputs, compressed deterministically.
|
||
- `workflow.txt`: completion, CLI validation and housekeeping results.
|
||
- `SHA256SUMS`: integrity hashes of this evidence directory.
|
||
|
||
The standard existing skips and upstream headless-schema LifecycleRole/NonFiniteValue
|
||
gaps remain explicit. Original provider payloads remain in complete logs; those
|
||
cases are not called conformance to the unchanged schema. Qualification is local
|
||
macOS/arm64 without benchmark, cross-host or installed-game-readiness claims.
|
||
|
||
The CLI has no standalone lesson-ID query/creation. LSN-0095 was obtained through
|
||
the framework's read-only `DiscussionIndex.next_id` accessor; CLI housekeeping owns
|
||
lesson registration, counter advancement, index changes and workflow deletions.
|