◒ daybreak

Daybreak Terminal: a service workbench

A product specification for a polished Daybreak app with a visible compile–run–observe loop and evidence attached to individual service contracts.

One workbench, explicit run targets

The proposed app keeps three destinations: Playground for editing and observing a program; Services for checking a specific contract; Runs for reviewing artifacts and failures. A persistent target selector distinguishes Android/ShimKit, the Backstep loader, and a provisioned iOS guest. The selected device and runtime build remain visible while a run is active.

The interface is a proposal. It does not pretend that a browser animation is a connected Swift compiler or a device result.

SurfaceMain contentPersistent context
PlaygroundEditor, diagnostics, live device view, assertionsSource hash, run ID, target
ServicesContract, test cases, evidence, known gapsImplementation path and tested build
RunsBuild output, module hash, events, state changes, capturesPassed, failed, incomplete, or not run

A counter closes the loop only when it is observed

source revision
  → compiler exit + diagnostics
  → module hash + transfer receipt
  → module-load receipt on selected device
  → initial rendered value = 0
  → one supported input event
  → observed state value = 1
  → matching render revision / capture
  → saved run record

The current helper already compiles Swift on the Mac and transfers a library by ADB. The missing polished contract is a correlated run record across build, load, state, input, and display. Its shell pipelines suppress compiler exit status with || true, and its module naming uses second-resolution timestamps. A new workbench should retain compiler exit codes, use unique run IDs, and associate a load receipt with the exact module hash before calling the run successful.

An injected compile error should leave the last good module active and show the diagnostic. An absent or wrong device should prevent deployment. A failed state assertion should remain a failure even if the preview looks attractive.

[playground]

Service readiness must name the tested contract

ServiceUseful contractCurrent review result
LoaderIncluded Mach-O canary enters and returns 42Passed on this Mac in the isolated export
Swift playgroundChanged source loads and produces expected observed stateExisting helper inspected; device loop not rerun
Host sharingSwift call presents Android chooser; receiving app gets payloadNo implementation identified in inspected sources
Guest iOS sharingActivity UI, payload transfer, completion and cancel behaviorNot established
PersistenceWritten value survives a named lifecycle transitionNeeds per-target run evidence
Clipboard / network / lifecycleExplicit inputs, expected result and negative casesDo not inherit a pass from another service

Use “not run” for missing evidence, “unsupported” for an explicitly rejected capability, “failed” for a violated assertion, and “passed” only for the named case. A cancellation can be a correctly handled result. The table is an implementation review, not a fresh device certification.

A share-sheet acceptance test

For the host path, prepare a unique text payload, request the chooser, select a known receiving test app, and verify exact payload equality there. Exercise cancellation without launching a recipient. For file sharing, verify content type, readable content, and the intended permission lifetime. Record the device and receiver build so the outcome is reproducible.

For a guest path, use the iOS service contract being claimed and capture the guest-side result. Do not substitute an Android chooser demonstration for a working guest activity service. This is where a service workbench is more useful than a broad percentage labeled “Swift support.”

Testing, checking invariants, and formal verification

The current loader suite and the teaching-model checks are executable tests. They cover concrete cases and can catch regressions. A formal claim would require a specified model, assumptions, and a proof or exhaustive model-checking result for a stated property. “All iOS services work for the most part” is neither a bounded proposition nor a testable coverage definition.

Good first formal targets would be narrow: no accepted frame combines resources from different sequences; an accepted identical retry does not invoke a second frame callback; a touch queue never emits a move without an active contact. Proving a model property must still be connected to the implementation and its assumptions.

References and evidence

Implementation references describe a working-tree snapshot. They are not all present in a public repository. The source inventory records file hashes; historical notes are not new device tests.

  1. [map] Daybreak, SegmentMapper.swift / ApplyLinkEdit.swift / Execute.swift. Inspected working tree, 2026-09-10; machparse/Sources/MachParse/. Mapping, relocation, protection and host-stack entry. Private workspace source; collaborator access required.
  2. [playground] Daybreak, tools/playground.sh and Swift playground source. Inspected working tree, 2026-09-10. Mac compilation, ADB library delivery and polled current-file selection. Private workspace source; collaborator access required.
  3. [input] Daybreak, GuestCoordinates.kt / GuestTouchQueue.kt. Inspected working tree, 2026-09-10; same Android directory. Coordinate inversion, contact lifetime and move coalescing. Private workspace source; collaborator access required.
  4. [frame] Daybreak, GuestFrameDelivery.kt / GuestLayerStream.kt. Inspected working tree, 2026-09-10; android/app/src/main/java/com/daybreak/host/skia/. Envelope integrity, duplicate handling, frame-local resources. Private workspace source; collaborator access required.

Full source inventory and provenance →

← Research index · Daybreak Terminal proposal →