feat(host): expose memcard controls and qualify process persistence
Intrepid/Prometeu/Runtime/pipeline/head This commit looks good

This commit is contained in:
2026-10-30 10:10:07 +00:00
parent dcf6561ea7
commit a4bec5bc45
42 changed files with 4778 additions and 100 deletions
@@ -0,0 +1,128 @@
---
id: LSN-0073
ticket: memcard-public-host-persistence
title: Public persistence is a process and ownership contract
created: 2026-10-30
tags: [memcard, persistence, headless, host, ownership]
---
## Context
The runtime now exposes media preparation, three explicit boot choices, native
observation, protected teardown and same-media recovery through its installed
headless protocol. The file backend has a single owner across compatible hosts,
including read-only opens. Runtime tests remain neutral PBX/ABI programs and do
not depend on a source-language frontend or another application's build.
Historical source: accepted decision DEC-0068, executed through PLN-0199 from
AGD-0071. Their workflow files are disposable. The published contracts are
[Save Memory and MEMCARD](../../../docs/specs/runtime/08-save-memory-and-memcard.md)
and [Headless Automation](../../../docs/specs/runtime/11a-headless-automation-protocol.md#memcard-controls).
This lesson explains those published results rather than defining new behavior.
## A native API is not an installed integration surface
Injecting storage into an in-process host is useful for controlled faults, but
does not establish that a consumer can configure the distributed executable.
Media preparation and player choice therefore became explicit operations of
the existing transport. The negotiated minor and capability identify support;
an executable version string alone does not. A client without the extension
continues using the original non-memcard shapes.
Preparing media separately from boot lets missing, corrupt, read-only and busy
files produce native domain errors before game initialization. Opening is not
creation. A persistent choice does not turn into fresh RAM after a failure.
These distinctions belong to the provider so every consumer sees the same
storage and admission policy.
## Result knowledge, RAM state and resource lifetime are separate
A retained terminal result is a statement about an attempt. It is not evidence
that a worker still owns the source, and absence of a mounted backend is not
evidence that the worker is active. In particular, reacquisition can fail after
the previous IO safely returned. An explicit worker-return observation separates
that case from an outstanding operation.
This distinction also matters after watchdog escalation. A late completion can
provide the original worker error and return its resources without rewriting the
terminal result already exposed to the game. Same-card reconciliation keeps that
original result available until guest release. It does not consume the result
to make media operations easier. Controlled tests exercise both a refusal before
publication and an uncertain attempt inside metadata publication.
Ending a session does not establish media health. An installed image with an
indeterminate publication stays write-blocked after reset, and a new persistent
admission cannot bypass the need for explicit revalidation.
RAM has its own state. A memory-only commit completes without a durability claim
and leaves modified RAM dirty. Teardown first waits for or cancels already
admitted IO, then reevaluates RAM. It can avoid an unnecessary discard prompt if
the save completes cleanly during that wait. If dirty data remains, refusal keeps
the process, session and channel available for a later explicit decision.
## A process boundary makes file ownership visible
Serializing one runtime's transactions does not exclude another process that
opened the same image from making decisions against an older map. The shared
file backend now attaches an exclusive OS lock to the open file, including
read-only access. Hardlink and symlink tests exercise identity rather than path
string equality. Creation locks its new file before publishing a non-replacing
name. Resource ownership continues through cancellation, result release and
blocked teardown until IO actually ceases or the owner process dies.
Recovery has to account for the lock held by the same host. Opening another
descriptor before relinquishing the safely quiescent backend can conflict with
that host's own lock. The recovery boundary transfers ownership, validates the
expected card identity before mutation and preserves local RAM on failure.
The selected path containing a different card is an identity error, not implicit
permission to register or load a replacement game record.
## Deterministic guest progress and asynchronous observation coexist
The headless owner polls native IO between commands. Completion and deadlines
can become observable while guest PC, stack, tick and frame remain unchanged.
Driving IO does not require inventing game frames or restarting initialization.
Two integration details were exposed by the first real memcard frame. A
controlled bootstrap slice can consume the runtime's step marker before a logical
frame closes; the host retains its requested advancement until the frame or an
explicit stop boundary. Also, a host dialog can reuse frame ID zero. Its producer
is excluded from canonical game capture, so an initial game frame is neither
mistaken for the dialog nor rejected merely for sharing that numeric ID.
A resident game waiting for external media action is paused rather than
terminated. Recovery preserves its continuation and admitted RAM. It does not
call bootstrap again. Explicit continuation in RAM uses the existing SO choice
and remains distinct from restarting a game with fresh memory.
## A readback oracle should be unable to save its own answer
The neutral writer stores bytes 0, 127, 128 and 255 and exposes the guest query
SUCCESS through public state inspection. A different process runs a reader with
no save or presentation import. It checks each prior byte, traps on a wrong or
missing payload and exposes a separate readback result. The entire image remains
unchanged by that reader. A further process changes app_version while retaining
the same uint32 app_id. Read-only loading into RAM is qualified independently.
The same process oracle runs through the public dispatcher from another working
directory against a real extracted archive produced by the distribution workflow.
That establishes something stronger than reopening a native object in one test
process or copying target/debug binaries into a directory labeled as an install.
Archive, binary, schema and source fingerprints identify the evidence precisely
even while the implementation is an uncommitted checkout.
## Evidence and ownership boundary
[Qualification evidence](evidence/summary.json) records 1,107 passing workspace
tests, 73 passing release tests, strict formatter/clippy checks, and both extracted
distribution tests passing. The generic workspace gate has 14 ignored manual or
installation tests; the two installation tests were separately run successfully.
Execution was qualified on macOS arm64. This is not a physical power-cut,
cross-target or storage-latency qualification.
The runtime delivery prepares a supported contract and its independent evidence.
No consumer source, configuration, SDK, workflow or tests were changed or run.
Future client/frontend integration uses the published surface and has its own
acceptance criteria. Its completion is neither claimed nor required to close
this provider work. This boundary prevents a provider plan from absorbing another
domain merely because that consumer originally discovered the missing interface.
@@ -0,0 +1,6 @@
Checking prometeu-system v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/console/prometeu-system)
Checking prometeu-firmware v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/console/prometeu-firmware)
Checking prometeu-host-headless v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/host/prometeu-host-headless)
Checking prometeu-host-desktop-winit v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/host/prometeu-host-desktop-winit)
Checking prometeu-cli v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/tools/prometeu-cli)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.02s
@@ -0,0 +1,44 @@
Generated VERSION.txt with version 0.1.0
Preparing dist-staging...
Preparing dist-staging/stable (existing archives are retained)...
building artifacts:
prometeu-cli-aarch64-apple-darwin.zip
prometeu-cli-aarch64-apple-darwin.zip.sha256
prometeu-host-desktop-winit-aarch64-apple-darwin.zip
prometeu-host-desktop-winit-aarch64-apple-darwin.zip.sha256
pbxgen-dummy-boy-aarch64-apple-darwin.zip
pbxgen-dummy-boy-aarch64-apple-darwin.zip.sha256
pbxgen-stress-aarch64-apple-darwin.zip
pbxgen-stress-aarch64-apple-darwin.zip.sha256
building aarch64-apple-darwin target, using cargo profile dist --workspace)
Compiling prometeu-system v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/console/prometeu-system)
Compiling prometeu-firmware v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/console/prometeu-firmware)
Compiling prometeu-host-desktop-winit v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/host/prometeu-host-desktop-winit)
Compiling prometeu-host-headless v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/host/prometeu-host-headless)
Compiling prometeu-cli v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/tools/prometeu-cli)
Finished `dist` profile [optimized] target(s) in 39.63s
announcing v0.1.0
prometeu-cli 0.1.0
/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/target/distrib/prometeu-cli-aarch64-apple-darwin.zip
[bin] prometeu
[bin] prometeu-headless
[bin] prometeu-runtime
[misc] 11a-headless-automation-protocol.md, LICENSE, README.md, headless-protocol
[checksum] /Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/target/distrib/prometeu-cli-aarch64-apple-darwin.zip.sha256
prometeu-host-desktop-winit 0.1.0
/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/target/distrib/prometeu-host-desktop-winit-aarch64-apple-darwin.zip
[bin] prometeu-host-desktop-winit
[misc] LICENSE, README.md, VERSION.txt
[checksum] /Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/target/distrib/prometeu-host-desktop-winit-aarch64-apple-darwin.zip.sha256
pbxgen-dummy-boy 0.1.0
/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/target/distrib/pbxgen-dummy-boy-aarch64-apple-darwin.zip
[bin] pbxgen-dummy-boy
[misc] LICENSE, README.md
[checksum] /Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/target/distrib/pbxgen-dummy-boy-aarch64-apple-darwin.zip.sha256
pbxgen-stress 0.1.0
/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/target/distrib/pbxgen-stress-aarch64-apple-darwin.zip
[bin] pbxgen-stress
[misc] LICENSE, README.md
[checksum] /Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/target/distrib/pbxgen-stress-aarch64-apple-darwin.zip.sha256
Copying target/distrib content to dist-staging/stable...
@@ -0,0 +1,3 @@
# Historical baseline investigation
These files record the diagnosis at revision `dcf6561ea73446e0a3e1cf1c73eda20923b38df0`, before the public memcard interface and exclusive backend locking were implemented. The probe intentionally tests the old behavior and is not a current conformance runner. Current qualification, commands, artifact fingerprints and limits are recorded in [the provider evidence summary](../summary.json).
@@ -0,0 +1,95 @@
import json
from pathlib import Path
import subprocess
import tempfile
root = Path.cwd()
scratch = Path(tempfile.mkdtemp(prefix="runtime-memcard-review-"))
source = scratch / "image_access.rs"
source.write_text(r'''
use prometeu_drivers::memcard::FileMemcard;
use prometeu_hal::memcard::MemcardIoError;
use prometeu_system::memcard::{image::IMAGE_BYTES, transaction::Card};
fn main() {
let args: Vec<_> = std::env::args().collect();
let path = std::path::Path::new(&args[1]);
if args.get(2).is_some() {
let second = FileMemcard::open(path, false)
.map_err(|e| format!("{e:?}"))
.and_then(|io| Card::mount(Box::new(io)).map_err(|e| format!("{e:?}")));
match second {
Ok(card) => {
println!("second_process_rw_mount_accepted");
drop(card);
}
Err(error) => println!("second_process_rw_mount_rejected:{error}"),
}
return;
}
let io = FileMemcard::create(path, IMAGE_BYTES, |io, id| {
Card::format(io, id).map_err(|_| MemcardIoError::IoError)
}).expect("create private probe image");
let first_card = Card::mount(Box::new(io)).expect("first mount");
let output = std::process::Command::new(std::env::current_exe().unwrap())
.arg(path).arg("child").output().expect("child process");
assert!(output.status.success());
print!("{}", String::from_utf8(output.stdout).unwrap());
drop(first_card);
}
''')
binary = scratch / "image-access"
command = ["rustc", "--edition=2024", str(source), "-o", str(binary),
"-L", "dependency=" + str(root / "target/debug/deps")]
for crate in ("prometeu_drivers", "prometeu_hal", "prometeu_system"):
rlib = max((root / "target/debug/deps").glob("lib" + crate + "-*.rlib"),
key=lambda p: p.stat().st_mtime_ns)
command += ["--extern", crate + "=" + str(rlib)]
subprocess.run(command, check=True, capture_output=True, text=True)
access = subprocess.run([str(binary), str(scratch / "probe.pmc")],
check=True, capture_output=True, text=True)
process = subprocess.Popen([str(root / "target/debug/prometeu"), "headless", "--stdio"],
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, text=True)
hello = json.loads(process.stdout.readline())
def request(identity, command, params):
process.stdin.write(json.dumps({"requestId": identity, "command": command, "params": params}) + "\n")
process.stdin.flush()
return json.loads(process.stdout.readline())
required = request("probe-capability", "initialize", {
"protocolVersion": {"major": 1, "minor": 0}, "requiredCapabilities": ["memcard"]})
initialized = request("init", "initialize", {
"protocolVersion": {"major": 1, "minor": 0}, "requiredCapabilities": []})
invalid = request("probe-field", "boot", {"path": str(scratch), "memcard": {}})
state = request("state", "get_state", {})
shutdown = request("stop", "shutdown", {})
process.stdin.close()
process.wait(timeout=10)
assert process.returncode == 0
assert required["error"]["code"] == "unsupported_capability"
assert invalid["error"]["code"] == "invalid_params"
assert shutdown["result"] == {"closed": True}
report = {
"runtime_revision": subprocess.check_output(["git", "rev-parse", "HEAD"], text=True).strip(),
"scope": "read-only diagnosis using checkout debug binaries and isolated disposable image; no installed-process persistence qualification",
"scratch_directory": str(scratch),
"file_access_probe": {
"backend": "FileMemcard + Card::mount on a valid freshly created image",
"first_process_holds_rw_card": True,
"second_process_result": access.stdout.strip(),
"payload_writes": False,
},
"wire_probe": {
"capabilities": hello["capabilities"],
"required_capability_memcard": required["error"],
"unknown_boot_field_memcard": invalid["error"],
"get_state_fields": sorted(state["result"]),
"shutdown": shutdown["result"],
"note": "The memcard capability/field names are intentionally unsupported test input, not a proposed public contract.",
},
}
report_path = scratch / "summary.json"
report_path.write_text(json.dumps(report, indent=2) + "\n")
print(json.dumps(report, indent=2))
print("report_path=" + str(report_path))
@@ -0,0 +1,68 @@
{
"runtime_revision": "dcf6561ea73446e0a3e1cf1c73eda20923b38df0",
"scope": "read-only diagnosis using checkout debug binaries and isolated disposable image; no installed-process persistence qualification",
"scratch_directory": "/var/folders/0t/tfsqc14j5wbgh9h4s4dytwb00000gq/T/runtime-memcard-review-qa13v648",
"file_access_probe": {
"backend": "FileMemcard + Card::mount on a valid freshly created image",
"first_process_holds_rw_card": true,
"second_process_result": "second_process_rw_mount_accepted",
"payload_writes": false
},
"wire_probe": {
"capabilities": [
"boot",
"reset",
"set_input",
"clear_input",
"advance",
"capture",
"get_state",
"get_fault",
"cancel",
"shutdown"
],
"required_capability_memcard": {
"code": "unsupported_capability",
"details": {},
"message": "required capability unavailable"
},
"unknown_boot_field_memcard": {
"code": "invalid_params",
"details": {},
"message": "unknown field `memcard`, expected `path`"
},
"get_state_fields": [
"appId",
"logicalFrameIndex",
"pc",
"stackTop",
"status",
"tickIndex"
],
"shutdown": {
"closed": true
},
"note": "The memcard capability/field names are intentionally unsupported test input, not a proposed public contract."
},
"date": "2026-10-29",
"platform": "macOS-27.0.1-arm64-arm-64bit-Mach-O",
"studio_revision": "3a3417eb44c2e99ca183ce6f3fbbfff738b70f87",
"reproduction": [
"cargo test -p prometeu-cli --test automation_process -- --test-threads=1",
"python3 discussion/workflow/agendas/AGD-0071-evidence/review_probe.py"
],
"automation_process_tests": {
"passed": 12,
"failed": 0,
"ignored": 1,
"ignored_test": "packaged_installation_smoke",
"ignored_reason": "requires PROMETEU_PROTOCOL_TEST_INSTALL pointing to an extracted dist archive",
"covers_memcard": false
},
"qualification_limits": [
"No Studio Gradle/native memcard suite was rerun; its summary was inspected as existing evidence.",
"No configured installed-runtime memcard persistence test was performed.",
"Two simultaneous valid RW mounts were accepted; no concurrent payload publication was attempted.",
"No product code, normative specs or Studio files were modified."
]
}
@@ -0,0 +1,13 @@
Compiling prometeu-system v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/console/prometeu-system)
Compiling prometeu-firmware v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/console/prometeu-firmware)
Compiling prometeu-host-headless v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/host/prometeu-host-headless)
Compiling prometeu-host-desktop-winit v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/host/prometeu-host-desktop-winit)
Compiling prometeu-cli v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/tools/prometeu-cli)
Finished `test` profile [unoptimized + debuginfo] target(s) in 6.37s
Running tests/automation_process.rs (target/debug/deps/automation_process-018fadef87e61183)
running 2 tests
test memcard_process::packaged_memcard_process_persistence ... ok
test packaged_installation_smoke ... ok
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 20 filtered out; finished in 1.27s
@@ -0,0 +1,140 @@
Compiling prometeu-system v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/console/prometeu-system)
Compiling prometeu-firmware v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/console/prometeu-firmware)
Compiling prometeu-host-headless v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/host/prometeu-host-headless)
Compiling prometeu-host-desktop-winit v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/host/prometeu-host-desktop-winit)
Compiling prometeu-cli v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/tools/prometeu-cli)
Finished `release` profile [optimized] target(s) in 39.83s
Running unittests src/lib.rs (target/release/deps/prometeu_cli-a2a569acb4d2123a)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/main.rs (target/release/deps/prometeu-233bd0c6f7dfd1c0)
running 4 tests
test tests::child_exit_code_preserves_non_zero_one ... ok
test tests::child_exit_code_preserves_non_zero_other ... ok
test tests::child_exit_code_preserves_zero ... ok
test tests::child_exit_code_rejects_status_without_numeric_code ... ok
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/bin/prometeu-headless.rs (target/release/deps/prometeu_headless-891734b93133c22e)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/bin/prometeu-runtime.rs (target/release/deps/prometeu_runtime-2d42636990523667)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running tests/automation_process.rs (target/release/deps/automation_process-48ae7cde6854c255)
running 22 tests
test malformed_fragmented_and_oversized_commands_do_not_desynchronize ... ok
test handshake_versions_capabilities_and_limits_are_explicit ... ok
test conflicting_work_is_rejected_and_cancellation_reports_partial_progress ... ok
test faults_and_boot_failures_are_structured_not_log_parsing ... ok
test lifecycle_and_capture_match_the_in_process_canonical_oracle ... ok
test idle_eof_and_truncated_eof_close_the_process ... ok
test dispatcher_works_from_a_relocated_installation_and_other_cwd ... ok
test memcard_process::packaged_memcard_process_persistence ... ignored, requires PROMETEU_PROTOCOL_TEST_INSTALL pointing to an extracted dist archive
test independent_processes_match_pixels_ids_state_and_fault ... ok
test packaged_installation_smoke ... ignored, requires PROMETEU_PROTOCOL_TEST_INSTALL pointing to an extracted dist archive
test memcard_process::desktop_dispatch_forwards_explicit_media_without_interpreting_player_policy ... ok
test memcard_process::memcard_creation_race_and_process_death_release_real_ownership ... ok
test memcard_process::memcard_access_denial_is_typed_and_does_not_create_or_modify_media ... ok
test memcard_process::memcard_media_errors_and_negotiation_never_select_a_fallback ... ok
test memcard_process::memcard_dirty_refusal_retains_channel_and_explicit_ram_has_no_save ... ok
test schemas_and_distributed_request_fixtures_are_consistent ... ok
test memcard_process::memcard_idle_observation_never_advances_guest_counters ... ok
test shutdown_and_eof_interrupt_active_work_without_resuming_it ... ok
test missing_binary_and_invalid_cli_limits_fail_explicitly ... ok
test memcard_process::memcard_process_ownership_covers_aliases_readers_and_release ... ok
test partial_guest_fault_and_host_watchdog_are_distinct_outcomes ... ok
test memcard_process::memcard_public_distinct_process_save_readback_and_version_identity ... ok
test result: ok. 20 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 0.66s
Running tests/registry_fault_schema.rs (target/release/deps/registry_fault_schema-2274560704287ef1)
running 2 tests
test published_load_schema_requires_tag_context_and_the_matching_init_payload ... ok
test published_schema_accepts_structured_resource_fields_and_rejects_unknown_or_negative_values ... ok
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
Running unittests src/lib.rs (target/release/deps/prometeu_host_headless-751195d1585cd278)
running 13 tests
test automation::tests::bounded_lines_accept_fragmentation_and_recover_after_oversize ... ok
test automation::tests::response_limit_counts_the_complete_envelope_and_keeps_correlation ... ok
test automation::tests::input_snapshot_is_replacement_and_rejects_unknown_fields ... ok
test automation::tests::distributed_request_fixtures_are_accepted_by_the_actual_parser ... ok
test automation::wire::fault_tests::resource_trap_wire_preserves_native_fields_and_source_span ... ok
test automation::tests::capture_preserves_independent_ids_and_excludes_padding_without_channel_loss ... ok
test automation::wire::fault_tests::load_failure_wire_uses_shared_structured_serializer_and_no_runtime_pc ... ok
test automation::wire::fault_tests::executed_closure_quota_refusal_reaches_wire_with_machine_fields ... ok
test automation::wire::fault_tests::active_host_native_type_fault_preserves_wire_machine_fields ... ok
test host::tests::termination_during_frame_advance_clears_host_step_control ... ok
test host::memcard::tests::explicit_continue_in_ram_preserves_dirty_snapshot_and_uses_no_new_boot ... ok
test host::memcard::tests::same_media_recovery_rejects_replacement_and_preserves_ram_continuation ... ok
test host::memcard::tests::unceased_io_retains_lock_and_terminal_result_survives_late_return_and_reconcile ... ok
test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.09s
Running tests/deterministic_control.rs (target/release/deps/deterministic_control-98e9b0ea3dcb6c52)
running 25 tests
test headless_source_has_no_timing_wait_or_interactive_backend_dependency ... ok
test lifecycle_state_and_preconditions_are_structural ... ok
test instruction_step_fault_remains_structured ... ok
test batch_stops_early_on_fault_and_reports_partial_progress ... ok
test end_of_rom_completes_a_logical_frame ... ok
test advance_after_reset_reports_termination_without_ticking ... ok
test audio_play_does_not_need_a_device ... ok
test clear_input_drops_right ... ok
test injected_civil_clock_remains_the_runtime_source_across_lifecycle ... ok
test normalized_touch_edges_and_coordinates_use_the_same_input_surface ... ok
test one_frame_returns_and_captures_the_exact_published_frame ... ok
test normalized_button_press_hold_release_and_clear_are_observable ... ok
test right_hold_then_release_changes_pixels ... ok
test step_does_not_complete_a_logical_frame ... ok
test controlled_civil_time_is_independent_of_frames_pause_and_reset ... ok
test one_logical_frame_may_span_multiple_internal_ticks ... ok
test trap_is_structured ... ok
test stepping_frame_sync_is_not_a_fault_or_completed_runtime_frame ... ok
test vm_init_failure_is_returned_as_structured_boot_failure ... ok
test zero_frames_is_an_explicit_noop ... ok
test reset_matches_fresh_host ... ok
test two_runs_match_oracle ... ok
test three_hundred_frames_complete_without_realtime_pacing ... ok
test outer_frame_limit_is_a_host_error_and_finishes_paused ... ok
test audio_controls_quota_and_multiple_frames_are_device_independent ... ok
test result: ok. 25 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.18s
Running tests/input_queries.rs (target/release/deps/input_queries-2ee1672fd0295c9d)
running 4 tests
test catalogue_has_exact_names_ids_signatures_and_no_endpoint_aliases ... ok
test every_known_query_faults_when_unavailable_and_rejects_arguments ... ok
test vm_queries_charge_one_cycle_each_and_allocate_no_guest_objects ... ok
test every_button_uses_its_own_snapshot_and_queries_do_not_advance_frames ... ok
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
Running tests/typed_runtime.rs (target/release/deps/typed_runtime-e31573f60bd59e2a)
running 5 tests
test typed_native_argument_fault_inside_callback_reaches_active_host ... ok
test active_host_preserves_removed_opcode_load_context_and_null_fn_trap ... ok
test sync_in_callee_or_closure_resumes_next_pc_with_locals_and_init_once ... ok
test budget_exhaustion_inside_fn_keeps_the_same_open_logical_frame ... ok
test regenerated_cartridges_run_six_complete_frames_on_production_host ... ok
test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.07s
@@ -0,0 +1,157 @@
{
"date": "2026-10-30",
"scope": "runtime/host provider readiness only; no consumer modifications/builds/tests/configuration updates",
"baseline_revision": "dcf6561ea73446e0a3e1cf1c73eda20923b38df0",
"working_tree": "uncommitted implementation; identified by per-file SHA256 and combined source fingerprint",
"source_files_sha256": {
"crates/console/prometeu-drivers/src/memcard.rs": "cc0326c89033cca97d1798e7725f2bf52115c8592a12dab39146c9d3dcb19769",
"crates/console/prometeu-firmware/src/firmware/firmware_step_load_cartridge.rs": "3177c16ab016d45424b54e9b3bbf1746f9113db8ec607a2819cabc412202a4fb",
"crates/console/prometeu-hal/src/memcard.rs": "263d609d336d6e37b62fa4604d2be5ab98df26c45ec7c611557b0abfb8916bee",
"crates/console/prometeu-system/src/os/system_os.rs": "cbca29127df9ca28b6ed84bd5fa3f926b410a34f360c33bfce0456292cf4340b",
"crates/console/prometeu-system/src/services/memcard.rs": "a58517232ceef657d005da2f28fbc0cd484398bd407b2340b0d3571d083e53c5",
"crates/console/prometeu-system/src/services/memcard/admission.rs": "ecec0b0642da3aba3a38941ce25afdb35dc8d42b15f34d9da6ac9d06f765f741",
"crates/console/prometeu-system/src/services/memcard/diagnostics.rs": "99699c14c43090c8eb72624967e96846a99400a5809301a8dcc2564d8164ab61",
"crates/console/prometeu-system/src/services/memcard/guest.rs": "507913dc29ed07ab2a4ac6ec93583e935a73e35ec8f16798de0a5b55d392dd98",
"crates/console/prometeu-system/src/services/memcard/image.rs": "c4aedb43b050989ef95f8efbd5d0994b23928a16dd49358361ecd96ffed3811d",
"crates/console/prometeu-system/src/services/memcard/session.rs": "f6990ddac2f0cd2f2643d4323be6e18eef0e349ea1494c6dfd216cb5e2105d4a",
"crates/dev/prometeu-test-support/src/lib.rs": "4cf14e6065e40ec5bc84fdc20f653babee26e1d60c97687b1e68edfda9b1a219",
"crates/dev/prometeu-test-support/src/memcard_fixture.rs": "f63fd0c6dff5b862d228709d9160b38ab9edc1a90e62b051eb6540706977bd0f",
"crates/dev/prometeu-test-support/src/program.rs": "d6c2f720fb405355ea2d3648a5c08e7fa96f5fc8cfd289be0cfb17f911907696",
"crates/host/prometeu-host-headless/src/automation/mod.rs": "7d72c0eddf23b769047812e9a96746380f58dc18d5ef560188999160aee17c68",
"crates/host/prometeu-host-headless/src/automation/wire.rs": "0a1e3c786810499857f54d8d1795fded417ed809b17c4a03d1b39941b0d4dd28",
"crates/host/prometeu-host-headless/src/host.rs": "fc75f6c9dd842ec241e95f4389935d8edf619ed3c7c5134733d25b6dd58cbb2f",
"crates/host/prometeu-host-headless/src/lib.rs": "3b29775d61a26a6098562e2e4e98fba1d43580a36979be43682f44ce5f8655c8",
"crates/host/prometeu-host-headless/src/memcard.rs": "a32fcfc9cb30ddf18a2eb848101c34583a215817bf6e185124084a46f22ad329",
"crates/host/prometeu-host-headless/src/memcard_tests.rs": "66f566a8291014524a4ef0d5952252adf64d3f8c68b50bd9251f4482664e2f39",
"crates/host/prometeu-host-headless/src/resource_qualification_tests.rs": "243f51eadc91c30ef5895d34525574349dbad45ee7b77cb88bee25c7fd2e66a4",
"crates/host/prometeu-host-headless/tests/deterministic_control.rs": "5fe3f48575e0fd5f4f2640c76145603baa2571b67ad619de21caadf1ce35aa1b",
"crates/tools/prometeu-cli/src/lib.rs": "944840ef6e14400b98cc1dc659c95ba5eb6e7ef8a4cd4d28d37ba70392e7e2d6",
"crates/tools/prometeu-cli/src/main.rs": "2c956bc90756e31bc38cd6811933a717b3c49d1f0ab501ed39f5869e6b3d8c92",
"crates/tools/prometeu-cli/tests/automation_process.rs": "230dea8a6cabede2e168c35938284903fa41614eaa2619626bb6560a9527640f",
"crates/tools/prometeu-cli/tests/support/memcard_process.rs": "0a8581fb129238f39605a6e9485e813e58b639e7a2131e3cf06e9c390cce2bed",
"devtools/headless-protocol/invalid-requests.json": "f0f0a9a21735c7f90180e816093a884350c07303ea887ebe89a534fc6c8a7b3a",
"devtools/headless-protocol/request.schema.json": "d7e5b39917f0973e0cb697815937e21574bec7f24ebcab8c9a72ca3c05dca553",
"devtools/headless-protocol/requests.json": "5821af6fecb51a7b85e502fd27d22e046e140d417982bbb561fd260b9023ddf2",
"devtools/headless-protocol/response.schema.json": "0040bb288226eb2f34d4028d8a5f3f8a708d754d51d8f62eaa7e64b0da5c69a8",
"docs/specs/runtime/08-save-memory-and-memcard.md": "7ead27a4039a3451909e7319f8624ec37c62602fee4615f6766e4435b0f411d7",
"docs/specs/runtime/11a-headless-automation-protocol.md": "526e6aae664ffc5661289150410599fb3494e1a1665ba334fe802b0d69e46313"
},
"source_fingerprint_sha256": "87474a7172e3e233a9144c97202a40001892ea0e8a6c814b47581b67527c2575",
"platform": "macOS-27.0.1-arm64-arm-64bit-Mach-O",
"architecture": "arm64",
"rustc": "rustc 1.98.1 (48a229cea 2026-09-01)",
"cargo": "cargo 1.98.1 (797e8a9bc 2026-08-05)",
"cargo_lock_sha256": "cffad9ed62f38a591538abd81dd39270d6022397342c8189f4ac6c7baaa8e795",
"protocol": {
"major": 1,
"minor": 1,
"capability": "memcard",
"schema_sha256": {
"invalid-requests.json": "f0f0a9a21735c7f90180e816093a884350c07303ea887ebe89a534fc6c8a7b3a",
"request.schema.json": "d7e5b39917f0973e0cb697815937e21574bec7f24ebcab8c9a72ca3c05dca553",
"requests.json": "5821af6fecb51a7b85e502fd27d22e046e140d417982bbb561fd260b9023ddf2",
"response.schema.json": "0040bb288226eb2f34d4028d8a5f3f8a708d754d51d8f62eaa7e64b0da5c69a8"
}
},
"checks": {
"workspace_all_targets_all_features": {
"passed": 1107,
"failed": 0,
"ignored": 14,
"suites": 60
},
"release_cli_headless": {
"passed": 73,
"failed": 0,
"ignored": 2,
"suites": 10
},
"extracted_distribution": {
"passed": 2,
"failed": 0,
"ignored": 0,
"suites": 1
},
"clippy_all_targets_all_features": "passed; warnings denied",
"format": "passed",
"git_diff_check": "passed",
"docs_workflow_reference_scan": "no matches",
"edited_specification_links": "all resolve",
"uncertain_installed_media_admission": {
"passed": 1,
"failed": 0,
"ignored": 0,
"suites": 1
}
},
"commands": [
"cargo test --workspace --all-targets --all-features --no-fail-fast",
"cargo test --release -p prometeu-host-headless -p prometeu-cli --lib --tests",
"cargo clippy --workspace --all-targets --all-features -- -D warnings",
"cargo fmt --all -- --check",
"./scripts/local-dist.sh --artifacts local --target aarch64-apple-darwin --allow-dirty",
"PROMETEU_PROTOCOL_TEST_INSTALL=<isolated extraction> cargo test -p prometeu-cli --test automation_process packaged_ -- --ignored --test-threads=1"
],
"distribution": {
"builder": "cargo-dist 0.30.3 via existing local-dist workflow",
"target": "aarch64-apple-darwin",
"profile": "dist (inherits release, LTO)",
"archive": "target/distrib/prometeu-cli-aarch64-apple-darwin.zip",
"archive_sha256": "a6f66e814e0e9254cc4bba5e4a4307c9ec8a9963f8332f2f64a283a376d93b7c",
"extracted_to": "/tmp/pln199-install-0x57zot6",
"binary_sha256": {
"prometeu": "182e4d9a4d32201c8ad892a11c297de7059dcc0a837660bdd173be44808b9906",
"prometeu-headless": "7703190f63844d91fa125ba3a322b5e771db79a282b3cfbb3480eef76422b6ef",
"prometeu-runtime": "0e8e692395cedea799b6d555b416e40536dcabf3a98a2061327d2010c478e446"
},
"included_schemas_and_spec": "byte-identical to current checkout",
"qualification_harness_profile": "dev harness invokes only extracted dist executables"
},
"neutral_fixture": {
"producer": "runtime TestProgram / Registry writer / assembler; no frontend input or dependency",
"source": "crates/dev/prometeu-test-support/src/memcard_fixture.rs",
"source_sha256": "f63fd0c6dff5b862d228709d9160b38ab9edc1a90e62b051eb6540706977bd0f",
"save_bytes": [
0,
127,
128,
255
],
"app_id": 4294967295,
"versions": [
"1",
"2"
],
"oracles": {
"101": "guest query SUCCESS",
"104": "MEMORY_ONLY, remains dirty",
"201": "exact prior readback, reader has no save/presentation import",
"301": "dirty RAM, no commit"
},
"readback_checks": "separate public-dispatcher processes; exact bytes, no retained reader request and unchanged entire image; repeated across app_version and read-only memory-existing"
},
"additional_qualification": [
"minor/capability/schema parsing and 1.0 regression",
"dirty shutdown/reset refusal keeps session/channel; explicit discard and memory-only",
"missing/corrupt/read-only/access-denied errors, no fallback",
"cross-process RW/RO/hardlink/symlink exclusion, non-replacing creation race, actual owner process-death release",
"native controlled failures before/inside publication; lock retained with unceased IO; immutable original result and late worker error",
"same-card revalidation preserves RAM/continuation/original request; wrong identity rejected; explicit RAM detach",
"idle IO observation leaves guest PC/stack/tick/frame unchanged",
"desktop dispatcher forwards explicit options without launching a GUI",
"uncertain installed media remains write-blocked after session teardown; persistent readmission is refused pending explicit revalidation"
],
"limits": [
"Execution qualified on this macOS arm64 host, not other targets or storage devices.",
"No physical power-cut or latency claim.",
"14 unrelated/manual tests are ignored by the generic workspace gate; the two packaged tests are separately executed and passed.",
"Future frontend/client integration remains external and is not claimed."
],
"implementation_findings": [
"Lifecycle bootstrap can consume a debug step marker before the requested logical frame; headless retains its active advance until frame/stop.",
"Host dialogs may reuse FrameId zero; canonical capture excludes their producer.",
"Worker return is tracked separately from retained results and presence of a backend after failed reacquisition.",
"Ending a session does not clear uncertain publication; installed-media health and admission must preserve the write block."
],
"historical_investigation": "investigation/summary.json records the earlier baseline diagnosis, not the implemented protocol"
}
@@ -0,0 +1,8 @@
Compiling prometeu-system v0.1.0 (/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/console/prometeu-system)
Finished `test` profile [unoptimized + debuginfo] target(s) in 3.55s
Running unittests src/lib.rs (target/debug/deps/prometeu_system-5bd0bf863c9e944e)
running 1 test
test services::memcard::admission::tests::idle_uncertain_media_remains_blocked_before_another_persistent_admission ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 231 filtered out; finished in 0.05s