Keep PBX at v0 and simplify Jenkins quality gate
Intrepid/Prometeu/Runtime/pipeline/pr-master There was a failure building this commit
Intrepid/Prometeu/Runtime/pipeline/pr-master There was a failure building this commit
This commit is contained in:
@@ -193,9 +193,9 @@ The verifier statically checks bytecode for structural safety and stack‑shape
|
||||
- When adding new opcodes or object kinds, extend the verifier and GC traversal accordingly (children enumeration, environment scanning, root sets).
|
||||
- Update this document alongside any architectural change that affects runtime invariants.
|
||||
|
||||
## Program Registry v1
|
||||
## Program Registry
|
||||
|
||||
The [Program Registry contract](../specs/runtime/02c-program-registry-and-pbx-v1.md) defines immutable image-owned Type/Function metadata linked by dense IDs. Descriptors are native metadata outside guest GC; nominal identity does not depend on names. Stack/local execution retains Value, while typed storage uses resolved aligned layouts. PBX v1 is the sole target format; publication requires full bounded validation. Fn tag 4 and mandatory captures section 8 extend the Registry; no old-schema fallback is permitted.
|
||||
The [Program Registry contract](../specs/runtime/02c-program-registry-and-pbx-v0.md) defines immutable image-owned Type/Function metadata linked by dense IDs. Descriptors are native metadata outside guest GC; nominal identity does not depend on names. Stack/local execution retains Value, while typed storage uses resolved aligned layouts. PBX v0 is the sole target format; publication requires full bounded validation. Fn tag 4 and mandatory captures section 8 extend the Registry; no old-schema fallback is permitted.
|
||||
|
||||
`ValidatedProgramImage::load` publishes a shared image only after bounded decoding, native binding and Registry verification; `VirtualMachine::from_image` creates sessions that consume its typed signatures, constants and conversion instructions. Production and internal generators must use this sole sealed-v1 path. Typed Fn integration and legacy removal are implemented together; publication alone is not proof that every consumer has migrated. [Registry Boundaries and Owned Values](../../discussion/lessons/DSC-0058-program-registry-type-and-function-metadata/LSN-0059-registry-boundaries-and-owned-values.md) explains the published mechanisms. The [producer handoff](registry-producer-handoff.md) documents schema, input IDs and named-argument order, while [layout evidence](registry-layout-evidence.md) records reproducible load/access/GC measurements and the current publication boundary.
|
||||
|
||||
|
||||
@@ -119,22 +119,20 @@ fresh measurement.
|
||||
|
||||
## Commands and CI
|
||||
|
||||
`make ci-domains` is the authoritative repository quality gate. Both
|
||||
[GitHub CI](../../.github/workflows/ci.yml) and
|
||||
[Jenkins](../../files/config/Jenkinsfile) provision dependencies and invoke that
|
||||
same target. `make ci` is an alias. Invoke one gate per checkout at a time.
|
||||
[Jenkins](../../files/config/Jenkinsfile) orchestrates the quality gate through explicit
|
||||
stages invoking Makefile targets. `make ci-domains` runs the same checks locally
|
||||
and in [GitHub CI](../../.github/workflows/ci.yml); `make ci` is an alias.
|
||||
Invoke one gate per checkout at a time.
|
||||
|
||||
The Makefile supplies this ordered sequence to the serial evidence runner:
|
||||
The ordered checks are:
|
||||
|
||||
1. Clean LLVM coverage instrumentation from the previous run.
|
||||
2. Check formatting with `cargo fmt --all -- --check`.
|
||||
3. Run `cargo clippy --workspace --all-targets --all-features -- -D warnings`.
|
||||
4. Test gate failure/report handling with the Python regression suite.
|
||||
5. Run `cargo test --workspace --all-targets --all-features --no-fail-fast`.
|
||||
6. Run the five ignored debugger socket tests through `make test-debugger-socket`.
|
||||
7. Generate fresh workspace/all-feature LLVM coverage, HTML, full JSON,
|
||||
Cobertura XML and summary JSON.
|
||||
8. Audit source ownership/evidence and check every fixed coverage domain floor.
|
||||
1. Clean previous LLVM coverage instrumentation and reports.
|
||||
2. Check formatting.
|
||||
3. Run workspace Clippy with warnings denied.
|
||||
4. Run workspace tests across all targets and features.
|
||||
5. Run the five ignored debugger socket tests.
|
||||
6. Generate workspace coverage, HTML, full JSON, Cobertura and summary JSON.
|
||||
7. Audit source ownership/evidence and check every fixed coverage domain floor.
|
||||
|
||||
The socket command is deliberately restricted:
|
||||
|
||||
@@ -148,8 +146,8 @@ It selects `test_debug_port_opens`, `test_debug_reconnection`,
|
||||
Local sandbox TCP permissions must permit bind/connect; a permission denial is
|
||||
not evidence of a debugger behavior regression.
|
||||
|
||||
The runner executes child Make targets with `-j1` even if the outer invocation
|
||||
uses `-j`. CI invokes `make ci-domains` serially. Do not run a separate Cargo,
|
||||
The local Make recipe executes child targets serially with `-j1`, even if the outer
|
||||
invocation uses `-j`. Jenkins executes its stages sequentially. Do not run a separate Cargo,
|
||||
coverage-clean or report process concurrently in the same checkout: serialized
|
||||
steps inside one gate cannot protect against an independent process.
|
||||
|
||||
@@ -169,26 +167,20 @@ runner still uses this helper after installing stable Rust.
|
||||
|
||||
Linux packages include build-essential, pkg-config, libasound2-dev, libudev-dev,
|
||||
libxkbcommon-dev, libwayland-dev, libx11-dev, libxrandr-dev, libxi-dev, Python 3,
|
||||
jq, ripgrep, Git, curl and CA certificates. ALSA development files satisfy CPAL's
|
||||
jq, Git, curl and CA certificates. ALSA development files satisfy CPAL's
|
||||
Linux build dependency; a running audio device is not needed. Non-Linux local
|
||||
hosts must already provide native compiler/SDK tools, Bash, Make, pkg-config,
|
||||
Python 3, jq, rg and Git. The provisioning script verifies these commands.
|
||||
Python 3, jq and Git. The provisioning script verifies these commands.
|
||||
|
||||
`target/quality-gate/metadata.json` records revision, dirty working tree, host,
|
||||
Rust/coverage-tool versions, configuration/source fingerprints, ordered step
|
||||
exit codes and report hashes. Each step has a separate combined-output log.
|
||||
The runner stops on the first failed Make target and returns its nonzero exit
|
||||
status; the log preserves underlying Cargo diagnostics. Three regression cases
|
||||
check failure logs/identity, fresh success evidence and partial-report retention
|
||||
when a later gate fails.
|
||||
Jenkins owns stage status, console logs, build identity and artifact fingerprints.
|
||||
GitHub retains step logs and uploaded coverage artifacts. Local execution streams
|
||||
command output and stops at the first failed target; no separate Python runner
|
||||
or metadata report is required.
|
||||
|
||||
Both pipelines discard old generated report directories before environment checks or setup and
|
||||
publish current artifacts even after gate failure. An early failed gate has
|
||||
metadata/logs but no old coverage report. Failure after generation preserves the
|
||||
partial current reports. Prerequisite or setup failure can leave no report at all and
|
||||
still fails CI. Reports are archived from `target/quality-gate/**` and
|
||||
`target/llvm-cov/**`; Jenkins also publishes current HTML when present. Artifact
|
||||
publication does not turn a failed gate into success.
|
||||
Both pipelines discard old coverage reports before prerequisite checks or setup,
|
||||
and archive current `target/llvm-cov/**` reports even after failure. Early failures
|
||||
may leave no report; later failures retain partial current reports. Jenkins also
|
||||
publishes HTML when present. Artifact publication does not mask a failed gate.
|
||||
|
||||
List domains or inspect ownership and existing evidence:
|
||||
|
||||
@@ -218,7 +210,7 @@ cargo test -p prometeu-cli --test automation_process packaged_installation_smoke
|
||||
# File-host commit latency with the production asset decoder.
|
||||
cargo test --release -p prometeu-system --all-features qualify_file_commits_with_production_asset_decoder -- --ignored --nocapture
|
||||
# Explicit layout observation.
|
||||
cargo test --release -p prometeu-bytecode --test registry_v1 reference_map_probe -- --ignored --exact --nocapture
|
||||
cargo test --release -p prometeu-bytecode --test registry_v0 reference_map_probe -- --ignored --exact --nocapture
|
||||
```
|
||||
|
||||
Other ignored timing probes remain opt-in by their individual test names.
|
||||
@@ -342,5 +334,5 @@ on that platform without lowering the existing floors.
|
||||
|
||||
No physical audio, eight-hour soak, packaged-installation or ignored manual
|
||||
latency/layout qualification was selected by this gate. Prior manual observations
|
||||
remain separate evidence. Current executable metadata and reports are emitted
|
||||
under `target/quality-gate/` and `target/llvm-cov/` by every invocation.
|
||||
remain separate evidence. Current coverage reports are emitted under `target/llvm-cov/`; CI retains execution
|
||||
logs and build status.
|
||||
|
||||
@@ -163,7 +163,7 @@ For exact immediates and stack effects, see `CoreOpCode::spec()` which is the si
|
||||
|
||||
## Registry instruction encodings
|
||||
|
||||
The [Registry contract](../specs/runtime/02c-program-registry-and-pbx-v1.md#dynamic-and-reference-instructions)
|
||||
The [Registry contract](../specs/runtime/02c-program-registry-and-pbx-v0.md#dynamic-and-reference-instructions)
|
||||
defines opcodes 0x0090–0x0096. Tooling recognizes their u32 TypeId immediates:
|
||||
|
||||
```text
|
||||
|
||||
@@ -59,7 +59,7 @@ overshoot, and faults precede BudgetExhausted without successful-step credit.
|
||||
|
||||
Generated metadata exposes guest mutation and variable costs. No RNG execution
|
||||
uses HostContext, syscalls, host entropy/time/address initialization, FFI,
|
||||
bigint runtime arithmetic or a parallel catalog. PBX v1 remains unchanged;
|
||||
bigint runtime arithmetic or a parallel catalog. PBX v0 remains unchanged;
|
||||
unreachable unknown IDs reject with InvalidCode/NativeId and Unknown analysis
|
||||
retains full runtime checks.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Typed collection producer and consumer handoff
|
||||
|
||||
The [collection ISA](../specs/runtime/02-vm-instruction-set.md#typed-collection-instructions), [memory contract](../specs/runtime/03-memory-stack-heap-and-allocation.md#typed-array-and-struct-storage) and [attempt charging](../specs/runtime/01-time-model-and-cycles.md#collection-attempt-charging) are normative. This interface has executable evidence through locally serialized PBX v1, `ValidatedProgramImage::load` and `VirtualMachine::from_image`. Production initialize, internal test producers and both example generators use the same sealed v1 path. External SDK/frontend adaptation remains a separate consumer obligation.
|
||||
The [collection ISA](../specs/runtime/02-vm-instruction-set.md#typed-collection-instructions), [memory contract](../specs/runtime/03-memory-stack-heap-and-allocation.md#typed-array-and-struct-storage) and [attempt charging](../specs/runtime/01-time-model-and-cycles.md#collection-attempt-charging) are normative. This interface has executable evidence through locally serialized PBX v0, `ValidatedProgramImage::load` and `VirtualMachine::from_image`. Production initialize, internal test producers and both example generators use the same sealed v0 path. External SDK/frontend adaptation remains a separate consumer obligation.
|
||||
|
||||
## Encoding and complete groups
|
||||
|
||||
@@ -62,7 +62,7 @@ Consumers must recognize all seven encodings, invoke Registry-derived effects in
|
||||
|
||||
Executable oracles live in bytecode `tests/registry_isa.rs`, VM `tests/collection_conformance.rs`, VM `virtual_machine/collections_tests.rs` and layer `tests/typed_collections.rs`. They cover independent bytes, default/alias/group operations, attempt costs and refusals, malformed/proven types, ownership and actual FRAME_SYNC graph reclamation. VM unit tests inject otherwise unreachable invalid state only inside tests. Optimized ownership/conformance runs complement debug evidence.
|
||||
|
||||
Dummy Boy and Stress emit sealed PBX v1, including empty captures sections, and
|
||||
Dummy Boy and Stress emit sealed PBX v0, including empty captures sections, and
|
||||
run through the production host. Fn is a one-slot nullable HeapRef value in fields
|
||||
and arrays; Dynamic can carry it with its exact Fn TypeId. Closure environments and
|
||||
shared private cells participate in existing reference maps. Default construction
|
||||
|
||||
@@ -35,7 +35,7 @@ three PUSH_I64 at 2 each, three GET_LOCAL at 2 each, SET_LOCAL at 2 and RET at 4
|
||||
Its ordered results are Int64 bits 0x86B1DA1D72062B68, Float bits
|
||||
0x3FB304AA46C98538 and Int64 -7. The unit interval consumes the third word;
|
||||
a subsequent next returns bits 0xF9090E529A7DAE00. Actual producer emission is
|
||||
exercised by the VM random contract tests through the official PBX v1 writer
|
||||
exercised by the VM random contract tests through the official PBX v0 writer
|
||||
and loader, not direct host callbacks.
|
||||
|
||||
## Storage and Dynamic
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# Registry layout, load and GC evidence
|
||||
|
||||
This report records bounded technical fixtures for Registry layout, loading and GC. The normative contract is [Program Registry and PBX v1](../specs/runtime/02c-program-registry-and-pbx-v1.md); producer obligations and publication status are in the [producer handoff](registry-producer-handoff.md). [Registry Boundaries and Owned Values](../../discussion/lessons/DSC-0058-program-registry-type-and-function-metadata/LSN-0059-registry-boundaries-and-owned-values.md) explains the published mechanisms.
|
||||
This report records bounded technical fixtures for Registry layout, loading and GC. The normative contract is [Program Registry and PBX v0](../specs/runtime/02c-program-registry-and-pbx-v0.md); producer obligations and publication status are in the [producer handoff](registry-producer-handoff.md). [Registry Boundaries and Owned Values](../../discussion/lessons/DSC-0058-program-registry-type-and-function-metadata/LSN-0059-registry-boundaries-and-owned-values.md) explains the published mechanisms.
|
||||
|
||||
Measured on 2026-10-07: Darwin arm64, Rust 1.98.1 (`48a229cea`), host `aarch64-apple-darwin`, LLVM 22.1.8, optimized Cargo release profile. The code baseline is `c6fff08`; this report's commit also contains the load high-water instrumentation and measurement fixtures. Wall-clock values are single observations, not thresholds or statistically established throughput. No timing assertion is used.
|
||||
|
||||
## Reproduction
|
||||
|
||||
```sh
|
||||
cargo test -p prometeu-bytecode --release --test registry_v1 reference_map_probe -- --ignored --nocapture
|
||||
cargo test -p prometeu-bytecode --release --test registry_v0 reference_map_probe -- --ignored --nocapture
|
||||
cargo test -p prometeu-vm --release --lib probe -- --ignored --nocapture --test-threads=1
|
||||
cargo test -p prometeu-vm --release --lib decoded_trait_box_is_the_only_receiver_root_across_frame_sync_gc --quiet
|
||||
cargo test -p prometeu-vm --lib ownership_tests --quiet
|
||||
@@ -92,6 +92,6 @@ The native fixture stores one session-imported 13-byte String in both a String f
|
||||
|
||||
## Publication boundary
|
||||
|
||||
The sealed v1 image, bounded verifier, typed direct calls, Dynamic/reference execution, metered native strings and structured host diagnostics have executable evidence. Production `VirtualMachine::initialize` still uses the old loader, and existing generators still emit version 0. Their coordinated migration must preserve existing closures and requires a typed callable contract; the producer handoff records pending implementation targets and validation requirements.
|
||||
The sealed v0 image, bounded verifier, typed direct calls, Dynamic/reference execution, metered native strings and structured host diagnostics have executable evidence. Production `VirtualMachine::initialize` and both example generators now use the validated Registry format with typed callables and mandatory captures. The PBX version remains 0 during development; the producer handoff describes the current schema.
|
||||
|
||||
These measurements cover bounded layout/load/access/ownership/GC behavior. Representative-game capacity/headroom and coordinated long-run stress require separate workloads and evidence. No external compiler implementation, cross-host stress acceptance, regenerated production PBX smoke or final production activation is claimed by this report.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Registry v1 producer and consumer handoff
|
||||
# Registry producer and consumer handoff
|
||||
|
||||
This document describes the Registry v1 producer and consumer interfaces. The normative contract
|
||||
is [Program Registry and PBX v1](../specs/runtime/02c-program-registry-and-pbx-v1.md).
|
||||
This document describes the Registry producer and consumer interfaces. The normative contract
|
||||
is [Program Registry and PBX v0](../specs/runtime/02c-program-registry-and-pbx-v0.md).
|
||||
The rationale and published mechanisms are explained in [Registry Boundaries and Owned Values](../../discussion/lessons/DSC-0058-program-registry-type-and-function-metadata/LSN-0059-registry-boundaries-and-owned-values.md).
|
||||
The completed callable and production integration is explained in [Typed Callables and Frame-Owned Continuations](../../discussion/lessons/DSC-0052-vm-closures-captures-and-dynamic-calls/LSN-0061-typed-callables-and-frame-owned-continuations.md).
|
||||
|
||||
@@ -10,7 +10,7 @@ The completed callable and production integration is explained in [Typed Callabl
|
||||
The production `initialize` path uses bounded `ValidatedProgramImage::load` and
|
||||
`VirtualMachine::from_image`. The v0 decoder, slot-only verifier, scheduler and
|
||||
unchecked executable constructors have been removed. Internal test producers,
|
||||
Dummy Boy and Stress emit sealed v1 with typed Fn metadata and mandatory captures.
|
||||
Dummy Boy and Stress emit sealed v0 with typed Fn metadata and mandatory captures.
|
||||
The runtime retains existing constant/string ownership, collections, Dynamic and
|
||||
reference boundaries. The separate render frame scheduler remains active.
|
||||
|
||||
@@ -30,7 +30,7 @@ repository publishes requirements and oracles; those modules have not been edite
|
||||
|
||||
## Exact producer obligations
|
||||
|
||||
Emit PBX version 1 only. The header is 32 bytes: magic at 0, u16 version at 4,
|
||||
Emit PBX version 0 only. The header is 32 bytes: magic at 0, u16 version at 4,
|
||||
little-endian flag 0 at 6, reserved zero at 7, section count at 8 and twenty zero
|
||||
bytes at 12. Directory entries are file-relative u32 kind/offset/length triples.
|
||||
Mandatory kinds are 0, 1, 2, 4, 5, 6, 7 and 8; debug kind 3 is optional. Keep empty
|
||||
@@ -85,7 +85,7 @@ and payload publication cannot deadlock each other.
|
||||
## Independent binary oracles
|
||||
|
||||
The manually specified minimal executable in
|
||||
`crates/console/prometeu-bytecode/tests/registry_v1.rs::minimal_bytes` is 194 bytes.
|
||||
`crates/console/prometeu-bytecode/tests/registry_v0.rs::minimal_bytes` is 194 bytes.
|
||||
Its directory begins at 32; eight entries end at 128:
|
||||
|
||||
| Kind | Offset | Length | Payload |
|
||||
@@ -125,7 +125,7 @@ execution remains valid. Names do not adapt trait method compatibility.
|
||||
|
||||
## Endpoint-free input lowering
|
||||
|
||||
The [complete 54-entry table](../specs/runtime/02c-program-registry-and-pbx-v1.md#input)
|
||||
The [complete 54-entry table](../specs/runtime/02c-program-registry-and-pbx-v0.md#input)
|
||||
defines every accepted name/ID/result. Queries take zero guest arguments, read the
|
||||
logical-frame snapshot and cost one intrinsic cycle. States return Bool;
|
||||
hold/x/y return Int64. For example, `input.pad.a.down` lowers directly to
|
||||
|
||||
@@ -8,7 +8,7 @@ elapsed; the user explicitly waived the eight-hour completion requirement for
|
||||
this delivery. Eight-hour endurance was not demonstrated. Linux and other
|
||||
architectures have not been tested by this qualification.
|
||||
|
||||
The normative contracts remain [Registry/PBX v1](../specs/runtime/02c-program-registry-and-pbx-v1.md),
|
||||
The normative contracts remain [Registry/PBX v0](../specs/runtime/02c-program-registry-and-pbx-v0.md),
|
||||
[memory/GC](../specs/runtime/03-memory-stack-heap-and-allocation.md),
|
||||
[typed callables](../specs/runtime/02b-vm-function-values-and-closures.md), and
|
||||
[single-context lifecycle](../specs/runtime/09a-coroutines-and-cooperative-scheduling.md).
|
||||
@@ -56,9 +56,9 @@ and function context are checked where applicable. VM quotas are not RSS caps.
|
||||
| Resource / invariant | Accepted limit / rule | Enforcement and evidence |
|
||||
| --- | --- | --- |
|
||||
| Input PBX | 64 MiB | HAL `cartridge_loader::read_program` checks metadata before read and detects extra data without unchecked growth. `program_admission_accepts_exact_limit_and_rejects_growth_after_metadata`, metadata-before-read, short/interrupted-read and real sparse-file rejection tests. |
|
||||
| Code | 32 MiB | Bytecode envelope/owned decoder uses `LoadBudget` before materialization; `registry_v1` covers oversized declarations, truncation, code ranges and transactional payload refusal. |
|
||||
| Code | 32 MiB | Bytecode envelope/owned decoder uses `LoadBudget` before materialization; `registry_v0` covers oversized declarations, truncation, code ranges and transactional payload refusal. |
|
||||
| Type/function records | 65,536 each | Registry decoder/resolver bounded count admission; `oversized_counts_fail_before_dependent_allocation` and invalid reference tests. |
|
||||
| Implementation/nested records | 262,144 / 1,048,576 | Registry resolution/codec count checks; multi-slot/trait records, aggregate checks and owned-payload rollback coverage in `registry_v1`. |
|
||||
| Implementation/nested records | 262,144 / 1,048,576 | Registry resolution/codec count checks; multi-slot/trait records, aggregate checks and owned-payload rollback coverage in `registry_v0`. |
|
||||
| Names | 4,096 bytes each; 4 MiB aggregate | `name_limits_include_aggregate_and_empty_is_not_absent`; invalid UTF-8/flags/tails rejected before publication. |
|
||||
| Retained Registry | 64 MiB/image | Charged native layouts/capacities during resolution; `work_retained_and_temporary_limits_refuse_before_publication`; explicit reference-map probe records native representation. |
|
||||
| Load scratch | 128 MiB | Parser/writer/verifier temporary buffers charged and refunded; `scratch_is_refunded_per_function_and_preserves_prior_load_ownership`, `stack_analysis_refunds_all_state_buffers_and_preserves_prior_ownership`, sealed-image load probe. |
|
||||
@@ -79,7 +79,7 @@ and function context are checked where applicable. VM quotas are not RSS caps.
|
||||
| No-sync loop | Existing slice/fuel semantics | 1,000 finite slices of a sealed `JMP 0` program return BudgetExhausted, preserve PC/depth/capacities, perform no GC, and remain breakpoint-controllable. No frame completion is fabricated. |
|
||||
|
||||
Relevant test sources:
|
||||
[Registry v1](../../crates/console/prometeu-bytecode/tests/registry_v1.rs),
|
||||
[Registry](../../crates/console/prometeu-bytecode/tests/registry_v0.rs),
|
||||
[HAL cartridge admission](../../crates/console/prometeu-hal/src/cartridge_loader.rs),
|
||||
[heap](../../crates/console/prometeu-vm/src/heap.rs),
|
||||
[string ledger](../../crates/console/prometeu-vm/src/string_ledger/tests.rs),
|
||||
|
||||
@@ -123,4 +123,4 @@ layout.
|
||||
These synthetic boundary measurements establish lookup work and ownership
|
||||
behavior. They do not establish gameplay/frame speedups, long-run memory stability,
|
||||
other-platform timings or hardware-independent latency limits. The normative
|
||||
ownership contract is in [Registry and PBX](../specs/runtime/02c-program-registry-and-pbx-v1.md#memory-ownership-and-quotas).
|
||||
ownership contract is in [Registry and PBX](../specs/runtime/02c-program-registry-and-pbx-v0.md#memory-ownership-and-quotas).
|
||||
|
||||
Reference in New Issue
Block a user