feat(studio): deliver asset authoring and automation workflows
Test / Tests and coverage occurred while executing withChecks step.
Intrepid/Prometeu/Studio/pipeline/pr-master There was a failure building this commit

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.
This commit is contained in:
2026-11-11 01:21:25 +00:00
parent b351f2e582
commit 1471b427f1
325 changed files with 61179 additions and 323 deletions
@@ -0,0 +1,153 @@
---
id: LSN-0109
ticket: studio-headless-lifecycle-observability
title: Immutable Runtime Observations and Control Return
created: 2026-11-10
tags: [studio, automation, runtime-integration, diagnostics, mcp]
---
## Problem and ownership
**Owner:** studio. This lesson consolidates accepted DEC-0092 and completed
PLN-0170 from DSC-0110 / AGD-0112. Runtime owns native semantics; Studio owns
supervision, task authority and faithful observation through its shared services.
Native watchdog, guest fault, media refusal and unavailable transport could become
diagnostic strings. Initial boot exposed less information than reboot. Returning
control could obscure the difference between revoked authority and unfinished
cleanup. Inspecting a later session could also obscure the checkpoint of the
operation that originally failed.
The decision was to retain structured observations, with explicit uncertainty and
correlation, across API, Core, MCP and DEV. It did not change runtime budgets,
reset semantics, media policy, admission or the existing single operation runner.
No runtime repository files were written and no commits were created.
## Final implementation and qualification
All **433 tests passed**, with zero failures, errors or skips, across API, Core,
JavaFX, application, architecture, real desktop, installed runtime, memcard,
MCP/desktop and installed knowledge tasks. Exact commands, test cases, source and
report hashes are retained in [qualification](evidence/qualification.json).
[Runtime provenance](evidence/runtime-provenance.json) identifies the executed
installation; [native observations](evidence/native-observations.json) retain the
controlled real watchdog and disposable media artifact hashes.
The final result covers all eight decision rules: shared identities and native
cause, explicit lifecycle provenance, independent authority and cleanup, known
progress, conditional recovery, immutable final versus current observations,
DEV/MCP parity and installed guidance. Source navigation also passed the real
[desktop check](evidence/diagnostic-desktop.png).
ATR-09 and ATR-20 remain historical reports, not reproduced incidents. The actual
native watchdog fixture is a separate controlled case. Malformed transport,
failed follow-up inspection and termination races use process doubles, identified
separately in the qualification suites. Disposable media save/reopen checks retain
unchanged image hashes; no user card was used.
## Observation is a value, not another controller
`RuntimeObservation` is a deeply immutable neutral value. It carries session/build
identity, lifecycle, source/time, progress, last confirmed frame, capture staleness,
native details, correlation context, unavailable inspections and explicit recovery
actions. Each retained native payload has its own observation provenance.
Lifecycle distinguishes ABSENT, UNKNOWN, UNBOOTED, BOOTED, GUEST_OBSERVED, LOST and
TERMINATED. A legacy provider that supplies no lifecycle evidence yields UNKNOWN.
An acknowledgement is not proof of a firmware phase. Passive project snapshots
perform no native IO and remain usable while an operation is active.
For example, a real advance requested one frame, completed zero and returned
`watchdog_expired`. The native state still reported `paused` at tick 100000;
capture reported `no_frame_available`. All three observations survive. Zero
completed frames does not prove zero internal effects. If the transport instead
disappears before progress is known, completedFrames stays null.
## Preserve the original checkpoint
`TrackedOperation.observation` records the final observation of that operation;
`currentObservation` describes the later session. Reset clears the current frame
and records UNBOOTED without rewriting the prior advance result. Successful boot
and reboot expose equivalent available native state from the existing wire.
Correlation includes project, task, operation, client request, native request,
advance request, build and session identities where available. Lookup uses the
original clientRequestId or operationId. A lost response is recovered by lookup,
not by submitting the advance again. Existing deduplication and actual worker
termination remain authoritative.
## Authority and cleanup are independent facts
`ControlObservation` carries the authority state separately from cleanup
NOT_REQUIRED, PENDING, COMPLETED or FAILED, task revocation and the structured
failure. Task authority is revoked before cleanup starts. Manual admission remains
guarded until workers, process shutdown and document refresh actually finish.
The authenticated project-control query exposes cleanup progress. A revoked task
cannot continue inspecting results through its former grant. A fresh valid grant
is required for task-scoped access; a late worker update cannot resurrect it.
Recovery actions describe preconditions and always have automatic=false. A live
session may offer state/fault/media inspection. Reset requires explicit boot of
the same build before advance; process loss requires a new session. No observation
performs replay, implicit boot, card discard or budget changes.
## A shutdown race needs ordering, not better prose
Live progress publication exposed a real interleaving: return-control started
shutdown while an advance completion attempted follow-up state/media inspection.
That inspection could send a native command during shutdown and delay cleanup.
The process adapter now serializes native send with the closing transition,
rejects new inspection during closing, and records the skipped follow-up as
unavailable. The original result remains intact. Observation updates are also
serialized; a late state/progress reply cannot revive a LOST or TERMINATED process.
Confirmed termination can still refine the final lifecycle. The cancellation,
reclaim and full MCP/desktop gates passed after this fix.
## Keep data and IO on their proper boundaries
The mandatory architecture gate exposed four existing diagnostic violations in
nine unchanged sources. The [source audit](evidence/architecture-source-audit.json)
and [earlier failed qualification](evidence/qualification-before-boundary-repair.json)
preserve that history; [architecture-failures](evidence/architecture-failures.json)
are the initial failures, not the final state. All unchanged rules pass now.
Plain immutable value/default construction moved to the API. Bounded diagnostic
aggregation stays in the existing Core shipper module; its 1024 whole-issue and
1 MiB UTF-8 budgets remain intact. Read-only diagnostic navigation moved to the
existing Core project module behind `DiagnosticSources`, exposed by the project
session. Canonical path admission, byte limit, source revision and range checks
remain enforced; closed sessions deny further reads. JavaFX presents neutral
facts directly and delegates source reads through the port. API no longer imports
the mixed infrastructure module, and JavaFX owns neither file IO nor JSON codecs.
Creating a new top-level Core module for this repair would change the established
module contract. Keeping the helpers in existing project/shipper ownership
preserved modularity without weakening the boundary tests.
## Common mistakes
- Replacing the native error when a later inspection fails. Keep both, with source
and time, and make unavailable inspection explicit.
- Turning missing progress into zero, or a native `paused` status into an invented
boot/firmware phase.
- Showing current session state as the immutable final checkpoint of an earlier
operation.
- Equating revoked authority with finished cleanup, or letting late progress
restore authority or a dead process lifecycle.
- Sending an inspection command after shutdown admission has closed.
- Replaying an uncertain advance, implicitly booting after reset, or promoting
a simulated failure into evidence of a reproduced historical incident.
- Parsing diagnostic prose to manufacture structured facts in MCP or JavaFX.
## Operational references
The durable normative contracts are [Studio 9](../../../docs/specs/studio/9.%20Studio%20Core%20and%20Adapter%20Architecture%20Specification.md),
[Studio 10](../../../docs/specs/studio/10.%20DEV%20and%20Automation%20Specification.md)
and [Studio 11](../../../docs/specs/studio/11.%20MCP%20Tools%20and%20Project%20Knowledge%20Contract.md).
The preceding [explained diagnostics lesson](../DSC-0113-studio-ai-first-build-language-results/LSN-0105-explained-diagnostics-from-producers-to-studio.md)
covers producer facts and evaluation. Visual evidence (DSC-0105), isolated targets
(DSC-0106) and asset authoring (DSC-0107) consume these contracts in their own plans.
Completed workflow scaffolding DEC-0092/PLN-0170 is removed by housekeeping;
the qualification and this lesson preserve the outcome and acceptance mapping.
File diff suppressed because one or more lines are too long
@@ -0,0 +1,62 @@
{
"studioHead": "b351f2e5823039f82e3cd9666547578add13bebb",
"evidenceType": "unchanged-source-correlation; no separate baseline checkout test was run",
"sources": [
{
"path": "prometeu-studio-api/src/main/java/p/studio/api/diagnostic/StudioDiagnostic.java",
"sameBytesAsHead": true,
"currentSha256": "8a9916970f02ac50b8be2e6140730a57057db4c633eeb5454bec6ae1b53f8fbb",
"headSha256": "8a9916970f02ac50b8be2e6140730a57057db4c633eeb5454bec6ae1b53f8fbb"
},
{
"path": "prometeu-studio-api/src/main/java/p/studio/api/shipper/ShipperPrepareResult.java",
"sameBytesAsHead": true,
"currentSha256": "4e37e21f36faa73ea7c6a101710f4edf775e5219e6149c43babc3c8c5f56516d",
"headSha256": "4e37e21f36faa73ea7c6a101710f4edf775e5219e6149c43babc3c8c5f56516d"
},
{
"path": "prometeu-studio-core/src/main/java/p/studio/core/shipper/CompilerBuildFailure.java",
"sameBytesAsHead": true,
"currentSha256": "1afdf96d57907f5cefdc97f6f1079356447c8ea030827b1133f1ae4a8f6d61a1",
"headSha256": "1afdf96d57907f5cefdc97f6f1079356447c8ea030827b1133f1ae4a8f6d61a1"
},
{
"path": "prometeu-studio-core/src/main/java/p/studio/core/shipper/CompilerBuildGateway.java",
"sameBytesAsHead": true,
"currentSha256": "c4dfd68e090da1180695411a477d0012e30fecb5c4e710a368835e6e0893bcd3",
"headSha256": "c4dfd68e090da1180695411a477d0012e30fecb5c4e710a368835e6e0893bcd3"
},
{
"path": "prometeu-studio-core/src/main/java/p/studio/core/language/LanguageQueryExecution.java",
"sameBytesAsHead": true,
"currentSha256": "a12760d7d1518589565a800fc91615529eb94bf38d530482073af40c997410c1",
"headSha256": "a12760d7d1518589565a800fc91615529eb94bf38d530482073af40c997410c1"
},
{
"path": "prometeu-studio-core/src/main/java/p/studio/core/language/TaskLanguageQueries.java",
"sameBytesAsHead": true,
"currentSha256": "4454052bd296a44fee24731a60ed4e49ce2f51de1883e7f2d5838558a64f71fc",
"headSha256": "4454052bd296a44fee24731a60ed4e49ce2f51de1883e7f2d5838558a64f71fc"
},
{
"path": "prometeu-studio-core/src/main/java/p/studio/core/shipper/StudioShipperService.java",
"sameBytesAsHead": true,
"currentSha256": "1a5d6eb9aa3f64e0af8f249362961e7cddb1540986dacc794e1f71eb01476fe6",
"headSha256": "1a5d6eb9aa3f64e0af8f249362961e7cddb1540986dacc794e1f71eb01476fe6"
},
{
"path": "prometeu-studio-ui-javafx/src/main/java/p/studio/ui/javafx/diagnostics/DiagnosticNavigation.java",
"sameBytesAsHead": true,
"currentSha256": "44a67281f0968b73f1c0212f19ecdb574615f9c249f7a249d65209b55ee8d3a9",
"headSha256": "44a67281f0968b73f1c0212f19ecdb574615f9c249f7a249d65209b55ee8d3a9"
},
{
"path": "prometeu-studio-ui-javafx/src/main/java/p/studio/ui/javafx/diagnostics/DiagnosticResultsPane.java",
"sameBytesAsHead": true,
"currentSha256": "4efd8ed531d03a35a1688181637b88eb6e0a4faaf70ac3435c01cfc5cf88ca03",
"headSha256": "4efd8ed531d03a35a1688181637b88eb6e0a4faaf70ac3435c01cfc5cf88ca03"
}
],
"phase": "before required diagnostic boundary repair",
"recordedAt": "2026-11-10T18:31:33.490447+00:00"
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

@@ -0,0 +1,260 @@
[
{
"kind": "actual-watchdog",
"report": "prometeu-app/build/test-results/headlessProcessTest/TEST-p.studio.app.runtime.HeadlessTaskIntegrationTest.xml",
"data": {
"observation": {
"sessionId": "40147511b07ef77f666668f8b76fa2e6",
"buildId": "295bc39d-d86a-4c36-8adc-c62009748c5e",
"lifecycle": "GUEST_OBSERVED",
"source": "get_state",
"observedAt": "2026-11-10T19:17:21.524951Z",
"progress": {
"requestedFrames": 1,
"completedFrames": 0
},
"lastFrame": null,
"captureStale": true,
"nativeDetails": {
"runtimeVersion": "0.1.0",
"capabilities": [
"boot",
"reset",
"set_input",
"clear_input",
"advance",
"capture",
"get_state",
"get_fault",
"cancel",
"shutdown",
"memcard",
"memcard_mount",
"memcard_unmount",
"get_memcard_state",
"memcard_reconcile",
"memcard_continue_in_memory"
],
"limits": {
"callTimeoutMs": 60000,
"handshakeTimeoutMs": 5000,
"maxCommandBytes": 65536,
"maxFrames": 600,
"maxResponseBytes": 33554432,
"shutdownTimeoutMs": 5000
},
"runtimeVersionObservation": {
"source": "initialize",
"observedAt": "2026-11-10T19:17:21.464402Z"
},
"capabilitiesObservation": {
"source": "initialize",
"observedAt": "2026-11-10T19:17:21.464402Z"
},
"limitsObservation": {
"source": "initialize",
"observedAt": "2026-11-10T19:17:21.464402Z"
},
"state": {
"appId": 470396922,
"logicalFrameIndex": 0,
"pc": 10983,
"stackTop": [],
"status": "paused",
"tickIndex": 100000
},
"stateObservation": {
"source": "get_state",
"observedAt": "2026-11-10T19:17:21.524951Z"
},
"advance": {
"completed": 0,
"error": {
"code": "watchdog_expired",
"details": {
"hostTickLimit": 100000
},
"message": "headless host frame-advance watchdog expired after 100000 firmware ticks"
},
"requested": 1,
"stop": "host_error"
},
"advanceObservation": {
"source": "advance",
"observedAt": "2026-11-10T19:17:21.523Z"
},
"error": {
"code": "watchdog_expired",
"details": {
"hostTickLimit": 100000
},
"message": "headless host frame-advance watchdog expired after 100000 firmware ticks"
},
"errorObservation": {
"source": "advance",
"observedAt": "2026-11-10T19:17:21.523322Z"
}
},
"context": {
"runtimeRequestId": "aec5b2b4-c272-4364-b7db-40c79fcb456e",
"runtimeCommand": "get_state",
"advanceRequestId": "ba9ed2da-5af3-4ff9-b4ef-38ab4f4dd8f7",
"taskId": "e18cb1e8-f22d-42eb-89ca-e89b82a96f23",
"projectRoot": "/private/var/folders/0t/tfsqc14j5wbgh9h4s4dytwb00000gq/T/junit-7770727017417965049",
"clientRequestId": "watchdog",
"operationId": "d5f8b3d1-774c-49d6-a317-7fa3cebf971b"
},
"unavailable": [
{
"source": "capture",
"code": "NO_FRAME_AVAILABLE",
"message": "Runtime no_frame_available: no completed frame is available for capture",
"nativeError": {
"code": "no_frame_available",
"details": {},
"message": "no completed frame is available for capture"
},
"details": {},
"observedAt": "2026-11-10T19:17:21.524582Z"
}
],
"recovery": [
{
"action": "inspect_state",
"preconditions": [
"session process is available and no conflicting operation is active"
],
"automatic": false
},
{
"action": "inspect_fault",
"preconditions": [
"session process is available and no conflicting operation is active"
],
"automatic": false
},
{
"action": "lookup_operation",
"preconditions": [
"use the same clientRequestId or operationId",
"current task authority is required",
"lookup does not execute advance"
],
"automatic": false
}
]
},
"artifacts": {
"build/assets.pa": "dc609689d0e1a6ea46b27133bab5851e9f9a8b5f0cb6503bf3503c9afb48a276",
"build/asset_table.json": "5984eac0c5c6d947241e29dd5671b81a1546cedf77e08d38438ac47029969afa",
"build/preload.json": "5984eac0c5c6d947241e29dd5671b81a1546cedf77e08d38438ac47029969afa",
"build/asset_table_metadata.json": "5984eac0c5c6d947241e29dd5671b81a1546cedf77e08d38438ac47029969afa"
},
"sourceSha256": "0adf5bdac24e436e4a454932093030ec4673d0787c12addcf47c242237a084ce"
}
},
{
"kind": "actual-memcard-artifact",
"report": "prometeu-app/build/test-results/memcardProcessTest/TEST-p.studio.app.runtime.MemcardInstalledRuntimeTest.xml",
"data": {
"pbxSha256": "1fa2a19ebddcecaf248eb15bff4fd811dbc58d8ba605c3762d2900ec96b58696",
"producer": "writer",
"optimized": false,
"version": "1",
"manifestSha256": "3b3c3caa46ccbcb94707e4ffb1df710fdc466b10877d7cb8d3f1495593bcf6a4",
"sourceSha256": "5c32aad2088ce724ee658a191f42cc445dcea0d59d0e04c43c483e6749d3c261"
}
},
{
"kind": "actual-memcard-artifact",
"report": "prometeu-app/build/test-results/memcardProcessTest/TEST-p.studio.app.runtime.MemcardInstalledRuntimeTest.xml",
"data": {
"pbxSha256": "3538552c37261673366af3ccc9d3380683a996c8c22f57cef886a11071ff8f80",
"producer": "reader",
"optimized": false,
"version": "1",
"manifestSha256": "3b3c3caa46ccbcb94707e4ffb1df710fdc466b10877d7cb8d3f1495593bcf6a4",
"sourceSha256": "157effc63f3a324427437fe43c9d308a48ea523a5f0303129f24cfdfac439855"
}
},
{
"kind": "actual-media-preservation",
"report": "prometeu-app/build/test-results/memcardProcessTest/TEST-p.studio.app.runtime.MemcardInstalledRuntimeTest.xml",
"data": "PASS PBS process save/reopen optimizer=false version=1 unchangedImageSha256=b1492c501495d03511048be42dd34bf268c1fbdd788462e7e084904877c86b8b"
},
{
"kind": "actual-memcard-artifact",
"report": "prometeu-app/build/test-results/memcardProcessTest/TEST-p.studio.app.runtime.MemcardInstalledRuntimeTest.xml",
"data": {
"pbxSha256": "3538552c37261673366af3ccc9d3380683a996c8c22f57cef886a11071ff8f80",
"producer": "reader",
"optimized": false,
"version": "2",
"manifestSha256": "835d4deae52595df90d1934133519c9a756d79d97dbae4fcfd305dea704fd4e2",
"sourceSha256": "157effc63f3a324427437fe43c9d308a48ea523a5f0303129f24cfdfac439855"
}
},
{
"kind": "actual-media-preservation",
"report": "prometeu-app/build/test-results/memcardProcessTest/TEST-p.studio.app.runtime.MemcardInstalledRuntimeTest.xml",
"data": "PASS PBS process save/reopen optimizer=false version=2 unchangedImageSha256=b1492c501495d03511048be42dd34bf268c1fbdd788462e7e084904877c86b8b"
},
{
"kind": "actual-memcard-artifact",
"report": "prometeu-app/build/test-results/memcardProcessTest/TEST-p.studio.app.runtime.MemcardInstalledRuntimeTest.xml",
"data": {
"pbxSha256": "dcf7135361b6c14a22858df8d8eddb97c368528b7e0ea685d0744e5f275a259e",
"producer": "writer",
"optimized": true,
"version": "1",
"manifestSha256": "3b3c3caa46ccbcb94707e4ffb1df710fdc466b10877d7cb8d3f1495593bcf6a4",
"sourceSha256": "5c32aad2088ce724ee658a191f42cc445dcea0d59d0e04c43c483e6749d3c261"
}
},
{
"kind": "actual-memcard-artifact",
"report": "prometeu-app/build/test-results/memcardProcessTest/TEST-p.studio.app.runtime.MemcardInstalledRuntimeTest.xml",
"data": {
"pbxSha256": "3538552c37261673366af3ccc9d3380683a996c8c22f57cef886a11071ff8f80",
"producer": "reader",
"optimized": true,
"version": "1",
"manifestSha256": "3b3c3caa46ccbcb94707e4ffb1df710fdc466b10877d7cb8d3f1495593bcf6a4",
"sourceSha256": "157effc63f3a324427437fe43c9d308a48ea523a5f0303129f24cfdfac439855"
}
},
{
"kind": "actual-media-preservation",
"report": "prometeu-app/build/test-results/memcardProcessTest/TEST-p.studio.app.runtime.MemcardInstalledRuntimeTest.xml",
"data": "PASS PBS process save/reopen optimizer=true version=1 unchangedImageSha256=2a511e6f91767e20a0e7077b391a504b8e8b91ba9cd2c7619fe510427a916c5b"
},
{
"kind": "actual-memcard-artifact",
"report": "prometeu-app/build/test-results/memcardProcessTest/TEST-p.studio.app.runtime.MemcardInstalledRuntimeTest.xml",
"data": {
"pbxSha256": "3538552c37261673366af3ccc9d3380683a996c8c22f57cef886a11071ff8f80",
"producer": "reader",
"optimized": true,
"version": "2",
"manifestSha256": "835d4deae52595df90d1934133519c9a756d79d97dbae4fcfd305dea704fd4e2",
"sourceSha256": "157effc63f3a324427437fe43c9d308a48ea523a5f0303129f24cfdfac439855"
}
},
{
"kind": "actual-media-preservation",
"report": "prometeu-app/build/test-results/memcardProcessTest/TEST-p.studio.app.runtime.MemcardInstalledRuntimeTest.xml",
"data": "PASS PBS process save/reopen optimizer=true version=2 unchangedImageSha256=2a511e6f91767e20a0e7077b391a504b8e8b91ba9cd2c7619fe510427a916c5b"
},
{
"kind": "actual-memcard-artifact",
"report": "prometeu-app/build/test-results/memcardProcessTest/TEST-p.studio.app.runtime.MemcardInstalledRuntimeTest.xml",
"data": {
"pbxSha256": "f8372490b74aa96313f042fa96222191212024f3841ed414726d5c3eb0563b09",
"producer": "dirty",
"optimized": true,
"version": "1",
"manifestSha256": "3b3c3caa46ccbcb94707e4ffb1df710fdc466b10877d7cb8d3f1495593bcf6a4",
"sourceSha256": "0f3e6759a31694b88f225e927df2c436455316342a82dbce10bfc39c9a448e81"
}
}
]
@@ -0,0 +1,40 @@
{
"runtimeVersion": "0.1.0",
"protocolVersion": {
"major": 1,
"minor": 1
},
"capabilities": [
"boot",
"reset",
"set_input",
"clear_input",
"advance",
"capture",
"get_state",
"get_fault",
"cancel",
"shutdown",
"memcard",
"memcard_mount",
"memcard_unmount",
"get_memcard_state",
"memcard_reconcile",
"memcard_continue_in_memory"
],
"limits": {
"callTimeoutMs": 60000,
"handshakeTimeoutMs": 5000,
"maxCommandBytes": 65536,
"maxFrames": 600,
"maxResponseBytes": 33554432,
"shutdownTimeoutMs": 5000
},
"installation": "/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/dist-staging/stable/prometeu-cli-aarch64-apple-darwin",
"executables": {
"prometeu": "182e4d9a4d32201c8ad892a11c297de7059dcc0a837660bdd173be44808b9906",
"prometeu-headless": "7703190f63844d91fa125ba3a322b5e771db79a282b3cfbb3480eef76422b6ef",
"prometeu-runtime": "0e8e692395cedea799b6d555b416e40536dcabf3a98a2061327d2010c478e446"
},
"probe": "hello followed by shutdown; no initialize/boot/guest execution or media access"
}