flashos-x86_64-capability-evidence.toml

# Evidence inventory for comparing Flash's portable capability contract with
# the current x86_64 FlashOS integration path. This file records observations;
# it does not classify a capability as native, adapted, unsupported, or as
# requiring kernel work.

schema_version = 1
platform = "flashos"
architecture = "x86_64"
target = "x86_64-unknown-redox"
platform_baseline = "flashos-x86_64.toml"
contract_source = "components/flash/crates/flash-platform/src/lib.rs"
selected_adapter = "flash-platform-flashos::FlashOsPlatform"
classification = "deferred"

[[source_evidence]]
id = "redox-selects-flashos"
path = "components/flash/crates/flash-cli/src/main.rs"
markers = [
  '#[cfg(target_os = "redox")]',
  'use flash_platform_flashos::FlashOsPlatform;',
  'type NativePlatform = FlashOsPlatform;',
  'FlashOsPlatform::new()',
]
observation = "Every Redox execution mode instantiates the dedicated FlashOS adapter while retaining the target-only terminal editor."

[[source_evidence]]
id = "adapter-declares-qualified"
path = "components/flash/crates/flash-platform-flashos/src/lib.rs"
markers = [
  "Capabilities::full_without(Capability::Signals);",
  "impl Platform for FlashOsPlatform",
  "PosixPlatform.spawn(request)",
]
observation = "The selected FlashOS adapter advertises the brought-up capability set and composes classified low-level operations through the POSIX implementation; this declaration is checked against target evidence rather than treated as evidence by itself."

[[source_evidence]]
id = "process-environment"
path = "components/flash/crates/flash-cli/src/main.rs"
markers = [
  "fn process_environment() -> Environment",
  "env::vars_os()",
  "Environment::from_snapshot",
]
observation = "Flash snapshots the process environment with native values before session creation."

[[source_evidence]]
id = "adapter-process-request"
path = "components/flash/crates/flash-platform-posix/src/lib.rs"
markers = [
  "fn spawn(&self, request: &SpawnRequest<'_>)",
  ".arg0(&request.argv()[0])",
  ".env_clear()",
  ".current_dir(cwd)",
]
observation = "The selected adapter passes explicit argv, the complete requested environment, and the requested working directory to a direct child spawn."

[[source_evidence]]
id = "adapter-working-directory"
path = "components/flash/crates/flash-platform-posix/src/lib.rs"
markers = [
  "fn resolve_working_directory",
  "std::fs::canonicalize(candidate)",
  "metadata.is_dir()",
]
observation = "The selected adapter resolves a logical request and validates that the result is a directory."

[[source_evidence]]
id = "adapter-file-actions"
path = "components/flash/crates/flash-platform-posix/src/lib.rs"
markers = [
  "fn open_file(",
  "fn open_file_io(",
  "fn inherit_descriptor(",
  "closed_descriptors()",
]
observation = "The selected adapter owns redirection opens, in-process file transfer, deliberate inherited descriptors, and explicit child closes."

[[source_evidence]]
id = "adapter-pipes"
path = "components/flash/crates/flash-platform-posix/src/lib.rs"
markers = [
  "fn pipe(&self) -> Result<PipeEndpoints, PipeError>",
  "io::pipe()",
  "fn read_descriptor(",
]
observation = "The selected adapter creates owned anonymous endpoints and exposes synchronous descriptor reads."

[[source_evidence]]
id = "adapter-process-lifecycle"
path = "components/flash/crates/flash-platform-posix/src/lib.rs"
markers = [
  "impl ChildProcess for PosixChild",
  "fn wait(&mut self) -> Result<ProcessStatus, WaitError>",
  "fn wait_for_transition(&mut self)",
  "fn try_wait_for_transition(&mut self)",
  "fn terminate(&mut self) -> Result<(), TerminateError>",
]
observation = "The selected adapter owns blocking and nonblocking child transition observation, termination, and final reaping."

[[source_evidence]]
id = "runtime-redox-session-observation"
path = "components/flash/crates/flash-runtime/src/background.rs"
markers = [
  'if cfg!(target_os = "redox")',
  "try_observe_one_transition(assignment, clock, events)",
  "fn wait_for_inline_transition",
]
observation = "Redox background children remain on the spawning session thread for nonblocking prompt refresh and blocking wait, avoiding a helper-thread ownership transfer while preserving real child transitions."

[[source_evidence]]
id = "runtime-process-groups"
path = "components/flash/crates/flash-runtime/src/execute.rs"
markers = [
  "if platform.capabilities().supports(Capability::ProcessGroups)",
  "ProcessGroup::New",
  "ProcessGroup::Join(group)",
]
observation = "The runtime requests a new group for an isolated pipeline and joins later members to the reported leader group."

[[source_evidence]]
id = "adapter-process-groups"
path = "components/flash/crates/flash-platform-posix/src/lib.rs"
markers = [
  "request.process_group().requires_capability()",
  "process_group::configure",
  "process_group::adopt",
]
observation = "The selected adapter performs requested child group placement and reports the resulting group."

[[source_evidence]]
id = "runtime-foreground-terminal"
path = "components/flash/crates/flash-runtime/src/background.rs"
markers = [
  "pub(crate) fn start_foreground(",
  "platform.snapshot_terminal_mode()",
  "apply_terminal_mode(token)",
  ".restore()",
]
observation = "The job coordinator hands the terminal to the established group, snapshots job-specific modes on every stop, reapplies them before continuation, and explicitly restores shell ownership after waiting."

[[source_evidence]]
id = "adapter-foreground-terminal"
path = "components/flash/crates/flash-platform-posix/src/lib.rs"
markers = [
  "fn foreground_process_group",
  "fn enter_foreground(",
  "foreground_terminal::hand_over",
]
observation = "The selected adapter queries, transfers, and restores foreground terminal ownership."

[[source_evidence]]
id = "adapter-signals"
path = "components/flash/crates/flash-platform-posix/src/lib.rs"
markers = [
  "fn install_job_control_signals",
  "fn signal_process_group(",
  "job_control_signals::install()",
  "process_signals::deliver(group, signal)",
]
observation = "The selected adapter installs shell signal dispositions and sends the portable outbound set to a process group."

[[source_evidence]]
id = "adapter-terminal-info"
path = "components/flash/crates/flash-platform-posix/src/lib.rs"
markers = [
  "fn is_terminal(&self) -> bool",
  "fn is_output_terminal(&self) -> bool",
  "fn terminal_size(&self)",
  "fn enter_raw_mode(&self)",
  "fn read_terminal_input(",
  "fn snapshot_terminal_mode(&self)",
  "fn apply_terminal_mode(&self, token: &dyn TerminalModeToken)",
]
observation = "The selected adapter detects both terminal ends, reads size, performs bounded terminal reads, owns raw-mode entry and restoration, and snapshots or reapplies opaque terminal attributes for stopped jobs."

[[source_evidence]]
id = "runtime-monotonic-clock"
path = "components/flash/crates/flash-runtime/src/eval.rs"
markers = [
  "pub trait Clock: Send + Sync",
  "pub struct SystemClock",
  "origin: SystemInstant",
  "self.origin.elapsed()",
]
observation = "Flash currently obtains monotonic readings from a runtime clock seam rather than a Platform method."

[[source_evidence]]
id = "flashos-standard-directories"
path = "components/flash/crates/flash-cli/src/main.rs"
markers = [
  "fn run_interactive(no_config: bool, no_history: bool)",
  "platform.standard_directories(&ProcessDirectoryEnvironment)",
  "FlashOsDirectoryEnvironment::new(standard_directories)",
]
observation = "The Redox interactive path obtains native configuration and state roots through FlashOsPlatform before honoring the discovery-disabling switches and opening either file."

[[source_evidence]]
id = "adapter-directory-read"
path = "components/flash/crates/flash-platform-posix/src/lib.rs"
markers = [
  "fn read_directory(",
  "fs::read_dir(path)",
  "PosixDirectoryStream",
]
observation = "The selected adapter opens a lazy standard-library directory iterator."

[[source_evidence]]
id = "runtime-explicit-glob"
path = "components/flash/crates/flash-runtime/src/eval.rs"
markers = [
  "ExpressionIntrinsic::Glob => return self.glob(&argument, span)",
  "read_directory(path)",
  "stream.next_entry()",
]
observation = "The explicit glob intrinsic reaches only the evaluator host directory-read seam and charges cancellation and resource checks around lazy entry advancement."

[[source_evidence]]
id = "runtime-glob-traversal"
path = "components/flash/crates/flash-runtime/src/glob.rs"
markers = [
  "PatternSegment::Recursive",
  "entry.kind() != DirectoryEntryKind::Directory",
  "path.push(entry.name())",
  "paths.sort()",
]
observation = "Flash owns deterministic native-path matching and recursive traversal and descends only through entries reported as directories."

[[source_evidence]]
id = "adapter-shell-executable"
path = "components/flash/crates/flash-platform-posix/src/lib.rs"
markers = [
  "fn shell_executable(&self)",
  "std::env::current_exe()",
]
observation = "The selected adapter asks the standard library for the running executable path."

[[source_evidence]]
id = "adapter-hangup-disposition"
path = "components/flash/crates/flash-platform-posix/src/lib.rs"
markers = [
  "fn ignore_hangup(&self)",
  "hangup_disposition::ignore()",
]
observation = "The selected adapter installs an ignored hang-up disposition for a background chain supervisor."

[[runtime_evidence]]
id = "qemu-terminal-editor"
path = "components/flash/platforms/flashos-x86_64-runtime-fixtures-v1.toml"
markers = [
  'id = "interactive-editing"',
  'input_hex = "70777a7f64"',
  'expect = "\r\n/home/user"',
]
observation = "The QEMU runner consumes the reusable suite, enters the target-only raw editor, applies byte editing, submits the corrected row, and produces the expected internal-command value. The same steps are rendered for manually observed real systems. History recall, multiline input, Ctrl-C cancellation, and prompt recovery remain outside this bounded observation."

[[runtime_evidence]]
id = "qemu-runtime-bringup"
path = "components/flash/platforms/flashos-x86_64-runtime-fixtures-v1.toml"
markers = [
  'input = "^echo pwd>x"',
  'input = "^echo p|^cat"',
  'input = "ls|length"',
  'input = "wait %4"',
  'input = "^sleep 9&&true&"',
  'reject = ["error[RUN001]"]',
]
observation = "The QEMU runner consumes the reusable suite and checks logical cwd, script creation and execution, a two-member external byte pipeline, structured directory data, a waited background child, and a waited conditional-chain supervisor without a runtime diagnostic. The same ordered steps and expectations are available to manually observed real systems."

[[capability]]
name = "environment"
rust_variant = "Environment"
requirements = ["snapshot native process variables", "mutate the session child environment", "install the complete native child environment"]
source_evidence = ["redox-selects-flashos", "process-environment", "adapter-process-request", "adapter-declares-qualified"]
runtime_evidence = []
source_observation = "The selected path snapshots native values and installs the complete requested environment for children."
runtime_observation = "No current FlashOS target-runtime evidence checks environment preservation or mutation."
classification = "deferred"

[[capability]]
name = "working-directory"
rust_variant = "WorkingDirectory"
requirements = ["read the startup directory", "resolve and validate a logical directory", "select a child working directory"]
source_evidence = ["redox-selects-flashos", "adapter-working-directory", "adapter-process-request", "adapter-declares-qualified"]
runtime_evidence = ["qemu-runtime-bringup"]
source_observation = "The selected path reads the process directory and the adapter resolves, validates, and applies child directories."
runtime_observation = "The current image changes to /tmp and observes that directory from both the interactive session and a child fsh script."
classification = "deferred"

[[capability]]
name = "file-actions"
rust_variant = "FileActions"
requirements = ["open redirection targets", "duplicate and inherit owned descriptors", "close unused child descriptors", "stream files in-process"]
source_evidence = ["redox-selects-flashos", "adapter-file-actions", "adapter-declares-qualified"]
runtime_evidence = ["qemu-runtime-bringup"]
source_observation = "The selected adapter contains the required owned redirection and descriptor operations."
runtime_observation = "The current image creates a script through an external stdout redirection and then executes the resulting file; broader descriptor permutations and in-process file streaming remain unobserved."
classification = "deferred"

[[capability]]
name = "pipes"
rust_variant = "Pipes"
requirements = ["create one anonymous byte pipe", "own and close both endpoints", "read and write bounded chunks"]
source_evidence = ["redox-selects-flashos", "adapter-pipes", "adapter-declares-qualified"]
runtime_evidence = ["qemu-runtime-bringup"]
source_observation = "The selected adapter creates and operates on owned anonymous pipe endpoints."
runtime_observation = "The current image completes a two-member external byte pipeline and renders its exact payload; backpressure and cancellation remain outside this bounded observation."
classification = "deferred"

[[capability]]
name = "process-spawn"
rust_variant = "ProcessSpawn"
requirements = ["spawn a resolved executable with exact argv", "wait for completion and transitions", "terminate and reap on cleanup"]
source_evidence = ["redox-selects-flashos", "adapter-process-request", "adapter-process-lifecycle", "runtime-redox-session-observation", "adapter-declares-qualified"]
runtime_evidence = ["qemu-runtime-bringup"]
source_observation = "The selected adapter implements direct requests and owned child lifecycle operations."
runtime_observation = "The current image completes foreground children, a waited background child, and a waited background supervisor without a runtime diagnostic; forced termination remains unobserved."
classification = "deferred"

[[capability]]
name = "process-groups"
rust_variant = "ProcessGroups"
requirements = ["make the first pipeline child a group leader", "join later children to that group", "report the established group"]
source_evidence = ["redox-selects-flashos", "runtime-process-groups", "adapter-process-groups", "adapter-declares-qualified"]
runtime_evidence = ["qemu-runtime-bringup"]
source_observation = "The runtime requests group isolation and the selected adapter contains placement/reporting operations."
runtime_observation = "The current image completes a two-member external pipeline through the group-enabled runtime path, but the bounded transcript does not expose group identity or membership directly."
classification = "deferred"

[[capability]]
name = "foreground-terminal"
rust_variant = "ForegroundTerminal"
requirements = ["query the current terminal owner", "hand the terminal to a process group", "restore the previous owner"]
source_evidence = ["redox-selects-flashos", "runtime-foreground-terminal", "adapter-foreground-terminal", "adapter-declares-qualified"]
runtime_evidence = ["qemu-runtime-bringup"]
source_observation = "The runtime and selected adapter contain guarded terminal handoff and explicit restoration."
runtime_observation = "The current image runs a foreground external pipeline and returns to a usable prompt; the transcript does not expose terminal ownership values directly."
classification = "deferred"

[[capability]]
name = "signals"
rust_variant = "Signals"
requirements = ["install and restore shell job-control dispositions", "send the portable signal set to a group", "observe stopped, continued, exited, and signaled child transitions"]
source_evidence = ["redox-selects-flashos", "adapter-signals", "adapter-process-lifecycle", "adapter-declares-qualified"]
runtime_evidence = []
source_observation = "The selected adapter contains signal disposition, group delivery, and child transition operations, but its qualification declaration excludes the indivisible signals group."
runtime_observation = "No current FlashOS target-runtime evidence signals an external job or observes stop, continue, or signaled completion."
classification = "deferred"

[[capability]]
name = "terminal-info"
rust_variant = "TerminalInfo"
requirements = ["detect terminal input and output independently", "read terminal dimensions", "enter and restore raw input mode", "read terminal input with a bounded wait", "snapshot foreground job terminal attributes", "reapply stopped-job terminal attributes"]
source_evidence = ["redox-selects-flashos", "runtime-foreground-terminal", "adapter-terminal-info", "adapter-declares-qualified"]
runtime_evidence = ["qemu-terminal-editor"]
source_observation = "The selected target path, job coordinator, and adapter contain terminal detection, sizing, bounded input, raw-mode entry/restoration, and opaque stopped-job mode preservation."
runtime_observation = "The current image proves target-only raw byte editing and internal-command submission; it does not assert target history recall, multiline input, Ctrl-C abandonment, prompt recovery, a non-default terminal size, or stopped-job mode restoration."
classification = "deferred"

[[capability]]
name = "monotonic-clock"
rust_variant = "MonotonicClock"
requirements = ["read a nondecreasing monotonic instant", "timestamp process and job events", "drive cancellation deadlines"]
source_evidence = ["runtime-monotonic-clock", "redox-selects-flashos", "adapter-declares-qualified"]
runtime_evidence = []
source_observation = "Flash uses std::time::Instant behind a runtime Clock seam; the Platform capability currently has no method."
runtime_observation = "No current FlashOS target-runtime evidence observes timestamps, elapsed time, or deadline behavior."
classification = "deferred"

[[capability]]
name = "standard-directories"
rust_variant = "StandardDirectories"
requirements = ["discover home, configuration, cache, and state locations", "preserve native path values", "define target-specific fallback conventions"]
source_evidence = ["flashos-standard-directories", "redox-selects-flashos", "adapter-declares-qualified"]
runtime_evidence = ["qemu-terminal-editor"]
source_observation = "The Redox path selects the FlashOS configuration and state conventions, preserves absolute native roots, and honors the no-config and no-history discovery gates."
runtime_observation = "The current image reaches the target editor after configuration and history initialization; alternate native roots, persisted history, and cache/state consumers remain unobserved."
classification = "deferred"

[[capability]]
name = "directory-read"
rust_variant = "DirectoryRead"
requirements = ["open a directory relative to logical cwd", "advance a lazy entry stream", "preserve native names, entry kind, and regular-file size"]
source_evidence = ["redox-selects-flashos", "adapter-directory-read", "runtime-explicit-glob", "runtime-glob-traversal", "adapter-declares-qualified"]
runtime_evidence = ["qemu-runtime-bringup"]
source_observation = "The selected adapter delegates lazy directory iteration and metadata projection to the standard library; Flash's explicit glob expression consumes only that portable seam for deterministic traversal."
runtime_observation = "The current image enumerates the controlled /tmp directory through the structured ls source and observes exactly one entry; explicit glob matching remains unobserved."
classification = "deferred"

[[capability]]
name = "shell-executable"
rust_variant = "ShellExecutable"
requirements = ["resolve the running shell executable independently of argv zero", "preserve a native absolute path suitable for supervisor re-execution"]
source_evidence = ["redox-selects-flashos", "adapter-shell-executable", "adapter-declares-qualified"]
runtime_evidence = ["qemu-runtime-bringup"]
source_observation = "The selected adapter delegates executable discovery to std::env::current_exe."
runtime_observation = "The current image starts and waits for a background conditional-chain supervisor that re-executes Flash."
classification = "deferred"

[[capability]]
name = "hangup-disposition"
rust_variant = "HangupDisposition"
requirements = ["ignore hang-up in the background chain supervisor", "keep the supervisor alive until its child is reaped"]
source_evidence = ["redox-selects-flashos", "adapter-hangup-disposition", "adapter-declares-qualified"]
runtime_evidence = ["qemu-runtime-bringup"]
source_observation = "The selected adapter contains a process-wide ignored hang-up operation used by the chain supervisor."
runtime_observation = "The current image executes the supervisor path that installs the hang-up disposition and observes normal final reaping; explicit hang-up delivery remains unobserved."
classification = "deferred"

Return to documentation →