Add shared human/task asset batches with reviewed atomic publication, explicit reference rebinds, ownership inspection and qualified glyph/scene budgets. Expose the same authoring and capacity results through Assets and MCP. Deliver isolated guest test targets, retained visual evidence and immutable runtime lifecycle/control observations. Preserve provider qualification and installed authoring examples alongside the completed discussion lessons. Close AGD-106 coordination and the delivered discussion workflows through housekeeping, updating lesson references and preserving qualification limits. Sound remains outside the asset delivery wave. Validation: 579 module tests and 31 additional desktop, process and installed checks passed; native glyph/scene 16/17 boundaries qualified. Discussion validation passed after housekeeping.
79 lines
3.1 KiB
Python
79 lines
3.1 KiB
Python
"""One native advance only, over a temporary copy of fixture-owned media.
|
|
Usage: python3 reproduce.py <installation> <output.json>
|
|
No runtime source/build/installation writes and no automatic advance retry.
|
|
"""
|
|
from pathlib import Path
|
|
import hashlib
|
|
import json
|
|
import queue
|
|
import shutil
|
|
import subprocess
|
|
import sys
|
|
import tempfile
|
|
import threading
|
|
|
|
fixture = Path(__file__).resolve().parent
|
|
installation = Path(sys.argv[1]).resolve()
|
|
output = Path(sys.argv[2]).resolve()
|
|
observations = []
|
|
with tempfile.TemporaryDirectory(prefix="pln172-native-reopen-") as directory:
|
|
image = Path(directory) / "owned-copy.pmc"
|
|
shutil.copyfile(fixture / "writer-memcard.pmc", image)
|
|
process = subprocess.Popen(
|
|
[str(installation / "prometeu"), "headless", "--stdio"],
|
|
cwd=directory, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
|
|
stderr=subprocess.PIPE, text=True, bufsize=1,
|
|
)
|
|
messages = queue.Queue()
|
|
def reader():
|
|
for line in process.stdout:
|
|
try:
|
|
messages.put(json.loads(line))
|
|
except ValueError as error:
|
|
messages.put(error)
|
|
threading.Thread(target=reader, daemon=True).start()
|
|
def receive():
|
|
item = messages.get(timeout=15)
|
|
if isinstance(item, Exception):
|
|
raise item
|
|
return item
|
|
def call(command, params):
|
|
request = {"requestId": str(len(observations) + 1), "command": command, "params": params}
|
|
process.stdin.write(json.dumps(request) + "\n")
|
|
process.stdin.flush()
|
|
while True:
|
|
reply = receive()
|
|
if reply.get("type") == "progress":
|
|
continue
|
|
assert reply.get("requestId") == request["requestId"], reply
|
|
observations.append({"request": request, "response": reply})
|
|
return reply
|
|
try:
|
|
hello = receive()
|
|
call("initialize", {"protocolVersion": {"major": 1, "minor": 2}, "requiredCapabilities": ["memcard", "log_read"]})
|
|
call("memcard_mount", {"path": str(image), "action": "open", "access": "read_write"})
|
|
call("boot", {"path": str(fixture / "reader-cartridge"), "memcardChoice": "persistent"})
|
|
call("get_logs", {"afterSequence": None, "limit": 128})
|
|
advanced = call("advance", {"frames": 1})
|
|
call("get_state", {})
|
|
call("get_fault", {})
|
|
call("get_memcard_state", {})
|
|
call("get_logs", {"afterSequence": None, "limit": 128})
|
|
call("shutdown", {})
|
|
process.stdin.close()
|
|
process.wait(timeout=8)
|
|
record = {
|
|
"hello": hello,
|
|
"observations": observations,
|
|
"exitCode": process.returncode,
|
|
"headlessSha256": hashlib.sha256((installation / "prometeu-headless").read_bytes()).hexdigest(),
|
|
"advanceCommands": 1,
|
|
"scope": "Native-only probe; temporary copy of fixture card; no Studio consumer and no advance retry.",
|
|
}
|
|
output.write_text(json.dumps(record, indent=2) + "\n")
|
|
print(json.dumps(advanced))
|
|
finally:
|
|
if process.poll() is None:
|
|
process.kill()
|
|
process.wait()
|