diff --git a/.agents/skills/layerfs-js-sdk/SKILL.md b/.agents/skills/layerfs-js-sdk/SKILL.md index 1af25da00c..ce94e7d2e6 100644 --- a/.agents/skills/layerfs-js-sdk/SKILL.md +++ b/.agents/skills/layerfs-js-sdk/SKILL.md @@ -42,9 +42,9 @@ Branch, your Sandbox and how to reach the package or the command. you find there may be an old copy, not the project. - **`main` is read-only.** Read it and fork from it. A write to it, a merge into it (without `into`) and a mount of it are refused `InvalidInput`; the - mount's refusal was seen with - `"fix":"layerfs branch fork shop/api main"`. Work on a Branch, then - `branch.publish` it. + mount's refusal gives a runnable `fix` + (`"layerfs branch fork shop/api work && layerfs workspace mount work"`). + Work on a Branch, then `branch.publish` it. - **Always unmount.** Put every `workspace.unmount` in a `finally` block. A forgotten Workspace stays mounted and its Sandbox cannot be removed. diff --git a/.agents/skills/layerfs-js-sdk/references/methods/doctor.md b/.agents/skills/layerfs-js-sdk/references/methods/doctor.md index fbdcf60d35..a202a3608f 100644 --- a/.agents/skills/layerfs-js-sdk/references/methods/doctor.md +++ b/.agents/skills/layerfs-js-sdk/references/methods/doctor.md @@ -35,7 +35,9 @@ entries. - A `not_checked` entry names a thing, or one of its checks, that gave no verdict: `blocked_by` (the thing at the root of the block and its state) or `reason` (`timeout`, `busy`, `lost`), never both. -- The long form (`detail: true`) adds `status` (the worst of `error`, +- The long form (`detail: true`) adds `evidence` on each finding (e.g. + `{ step: "handshake" | "authentication" | "transport" }`, retained backup + keys, or reclaimable image bytes), plus `status` (the worst of `error`, `warning`, `not_checked`, `notice`, `ok`), `counts`, `observed_at` and `tree`: the doctor's own thing with `status`, `coverage` (`none`, `shallow` or `full`), its `checks` (`{ check, outcome, from }`), @@ -78,12 +80,19 @@ for (const n of report.not_checked) console.log("not checked:", JSON.stringify(n `project.data`: everything `main`'s head and each Branch's head reach is read and checked where the Store's calls run. It writes nothing to the Store. -- **`store.doctor`**: `store.record`, `store.operation` (an operation left +- **`store.doctor`**: `store.record` (for a PostgreSQL Store whose record + lacks a saved login, names a missing login, or holds outdated pre-2.0 + fields, `store.record` fails with the `fix` from `store list`/`store get` + while remaining checks still run), `store.operation` (an operation left with its outcome unknown is an error whose `fix` clears it), - `store.connection`, `store.identity`, `store.schema` and, for a sqlite - Store, `store.backups` (a notice per bucket whose backup is behind, `fix` - `layerfs backup create `). No Store data is scanned. - `machine` is for a PostgreSQL Store: it also probes from that machine. + `store.connection` (for PostgreSQL, probes from this computer and from each + machine with an own address, recorded reach, or Sandbox of the Store — plus + `machine` when given — with a 5 s connect-and-login handshake limit so a + silent server fails `store.connection` with `evidence: { step: "handshake" }` + and records reach `failed` without a second dial), `store.identity`, + `store.schema` and, for a sqlite Store, `store.backups` (a notice per + bucket whose backup is behind, `fix` `layerfs backup create `). + No Store data is scanned. - **`sandbox.doctor`**: the Sandbox's record and references, its operation, runtime, route and daemon (`sandbox.record` … `sandbox.observation`), then one node per Workspace (`workspace.mounted`, `workspace.activity`); a failed or diff --git a/.agents/skills/layerfs-js-sdk/references/methods/store.md b/.agents/skills/layerfs-js-sdk/references/methods/store.md index fb06c87b76..9be3ed894a 100644 --- a/.agents/skills/layerfs-js-sdk/references/methods/store.md +++ b/.agents/skills/layerfs-js-sdk/references/methods/store.md @@ -36,11 +36,12 @@ From the home's records, with no probe. A Store's `state` is `ready`, `busy` (`op`: a move, remove, create, compaction, backup or restore), `blocked` (its machine is not ready) or `broken` (`reason`, with a `fix` naming the call that clears it). `get` short: `{ engine, state }` with `machine`, -`projects`, `backups`, `connections` and the companion when they say -something; long adds `auth`, `projects_count`, `op`, `blocked_by`, `reason`, -`fix`, `observed_at`, `store`, `profile`, `synchronous_commit`, -`sqlite_version`, `created_at`, `last_transfer`. `list` rows are the same -with `store` first; `machine` keeps the sqlite Stores on one machine. +`auth`, `projects`, `projects_count`, `backups`, `connections` and the +companion when they say something; long adds `binding` (16-hex prefix of the +Store's database id), `op`, `blocked_by`, `reason`, `fix`, `observed_at`, +`store`, `profile`, `synchronous_commit`, `sqlite_version`, `created_at`, +`last_transfer`. `list` rows are the same with `store` first; `machine` keeps +the sqlite Stores on one machine. ```bash $ layerfs store list # seen @@ -55,7 +56,11 @@ Sections of `get`: and `observed_at` from that read, and `live: { holders, phases, behind, server_version, latency_ms }` (`holders`: pids of other live processes holding the Store; `phases`: a running compaction's; `behind`: the - buckets whose backup is behind). + buckets whose backup is behind). For PostgreSQL, every connect-and-login + handshake is bounded to 5 s (`POSTGRESQL_HANDSHAKE` or the URL's + `connect_timeout`), one attempt, no retry: a silent server yields + `state: "broken"`, `reason: "unreachable"` (`"the server did not answer + within 5 s (connect and login)"`). - `with: ["stats"]` opens the Store for its counters: `stats: { size, logical_bytes, canonical_bytes, stored_bytes, metadata_bytes, file_bytes, reusable_bytes, dedupe, compression, init }` (ratios as text, six @@ -71,13 +76,13 @@ $ layerfs store get shop --with live,stats # | Call | What it does | Notes | | --- | --- | --- | | `create(name)` | An empty sqlite Store | `{"ok":true}` (seen). A taken name is `Exists` (seen: `a Store named shop exists`). `machine` makes it on that running machine through its worker | -| `save_auth(auth, { user, password })` | Saves or replaces a PostgreSQL login in the home's secret folder | Shell: `--user U --password-stdin`; the password is never answered, logged or traced. `{"ok":true}` | -| `auths()` | The saved logins and the Stores that use each | `{ items: [{ auth, user, stores? }] }`; never a password. Seen on a fresh home: `{"items":[]}` | +| `save_auth(auth, { user, password })` | Saves or replaces a PostgreSQL login in the home's secret folder (also overwrites a broken/unreadable login file) | Shell: `--user U --password-stdin`; the password is never answered, logged or traced. `{"ok":true}` | +| `auths()` | The saved logins and the Stores that use each | `{ items: [{ auth, user, stores?, stores_count?, state?, reason?, fix? }] }`; long adds `created_at`, `updated_at`; unreadable login files appear as `state: "broken"`, `reason: "failed"` rows with a `save-auth` `fix`; never a password. Seen on a fresh home: `{"items":[]}` | | `remove_auth(auth)` | Deletes a saved login no Store uses | `InUse` (flat `stores`) while one uses it | -| `connect(store, url, …)` | Connects a PostgreSQL database as a Store (`auth` required the first time; `synchronous_commit` defaults to `local`); on a connected Store, sets its address, or with `machine` that machine's own | The URL holds host, port, database and TLS settings only: one naming a user or password is `InvalidInput`. Short `{ projects }`, or `{"ok":true}` | +| `connect(store, url, …)` | Connects a PostgreSQL database as a Store (`auth` required the first time; `synchronous_commit` defaults to `local`); on a connected Store, sets its address, or with `machine` proves and records that machine's own reach | The URL holds host, port, database and TLS settings only (`sslkey`/`sslcert` allowed): one naming a user, password or `passfile` is `InvalidInput` (with a `fix` chaining `store save-auth` and `store connect`/`store update` stripped of credentials). Short `{ projects, projects_count? }`, or `{"ok":true}` | | `update(store, …)` | A PostgreSQL Store's login (`auth`) or `synchronous_commit` | `{"ok":true}` | | `disconnect(store)` | Forgets a PostgreSQL Store, its data staying; with `machine`, only that machine's own address | `InUse` while a Sandbox or Workspace uses it | -| `move(store, machine)` | Moves a sqlite Store between this computer and a machine | To or from `native` only (seen when already there: `store move, check: Store shop is already on native`, `InvalidInput`). Progress `check`, `snapshot`, `send`, `verify`, `install`, `record`, `retire`. Short `{ moved_bytes }`. A sqlite Store's Sandboxes run only on its machine | +| `move(store, machine)` | Moves a sqlite Store between this computer and a machine | To or from `native` only (seen when already there: `store move, check: Store shop is already on native`, `InvalidInput`; moving off a machine whose record lacks `vm_name` is `Unavailable` with `blocked_by`). Progress `check`, `snapshot`, `send`, `verify`, `install`, `record`, `retire`. Short `{ moved_bytes }`. A sqlite Store's Sandboxes run only on its machine | | `remove(store)` | Deletes a sqlite Store with every project in it | `{"ok":true}`. `NotFound` for an unknown name (seen). A PostgreSQL Store is disconnected instead. A record this build does not read, or a Store on a machine whose record has no 2.0 name, goes by its records alone, with `left` saying what may remain | | `compact(store)` | Reclaims the dead bytes of one Store | The only byte-reclaiming call. Short `{ freed_bytes }` (seen: `{"freed_bytes":0}`); long `outcome` (`compacted` or `unchanged`), `dead_bytes`, `kept_waste`, `peak_temp_bytes`, `zero_reasons`, …. Progress `mark`, `build`, `verify`, `install` (sqlite; an `unchanged` run sends `mark` only). A sqlite Store on another machine is compacted by its worker. `InUse` while Workspaces are mounted; `Busy` (with `op`); `Unavailable`, `Unknown` and `Unresolved` (each with a `fix`) | | `doctor(store)` | Checks the Store, then each of its projects | See [doctors](doctor.md); seen: `{"ok":true}` | diff --git a/.agents/skills/layerfs-js-sdk/references/methods/workspace.md b/.agents/skills/layerfs-js-sdk/references/methods/workspace.md index 0128450188..5bfc8702cc 100644 --- a/.agents/skills/layerfs-js-sdk/references/methods/workspace.md +++ b/.agents/skills/layerfs-js-sdk/references/methods/workspace.md @@ -88,7 +88,7 @@ trimmed from the ends (`Feature/Login` mounts as `feature-login`). $ layerfs workspace mount tests agent # seen {"workspace":"tests:agent","path":"/tmp/demo/home/machine/native/run/layerfs-8a7387b2-tests/workspaces/1"} $ layerfs workspace mount tests main # seen, exit 125 -{"error":"InvalidInput","message":"main is the project's published line, not a Branch, and is not mounted: fork a Branch from it and mount that","fix":"layerfs branch fork shop/api main"} +{"error":"InvalidInput","message":"main is the project's published line, not a Branch, and is not mounted: fork a Branch from it and mount that","fix":"layerfs branch fork shop/api work && layerfs workspace mount tests work"} ``` | `error` | When | Do | @@ -124,7 +124,7 @@ $ layerfs workspace exec tests:agent 'exit 3' # `unmount` deletes it). Output that is not UTF-8 is bytes. - **Node and Python** also take `stdout` and `stderr` functions, called with the output's pieces, and `stream: true`, which writes it to your process's - own stdout and stderr. When the pieces arrive was not checked in this pass. + own stdout and stderr. Output is delivered after the command ends, never live. - **Shell:** the command exits with the command's own code and prints the answer on stdout; `--stream` writes the output to stdout and stderr and prints no answer; a refusal exits 125. diff --git a/.agents/skills/layerfs-sdk-observe/references/daemon-logs.md b/.agents/skills/layerfs-sdk-observe/references/daemon-logs.md index cdd34c32ca..62ecb02446 100644 --- a/.agents/skills/layerfs-sdk-observe/references/daemon-logs.md +++ b/.agents/skills/layerfs-sdk-observe/references/daemon-logs.md @@ -5,7 +5,7 @@ > `machine.log` outputs were printed by the built `layerfs` command on a > throwaway home on 2026-11-18 (macOS, a `native` Sandbox). What the daemon > writes is read from source -> (`control/crates/layerfs-sandbox-backend/src/backend/native/`), not run. +> (`control/crates/layerfs-sandbox-backend/src/backend/{host_process,namespaces}/`), not run. > 1.x `logs.sandbox` and `logs.machine` are now `sandbox.log` and > `machine.log`, with no alias. diff --git a/.agents/skills/layerfs-sdk-observe/references/tracing.md b/.agents/skills/layerfs-sdk-observe/references/tracing.md index cf82f11a07..be8e75c11b 100644 --- a/.agents/skills/layerfs-sdk-observe/references/tracing.md +++ b/.agents/skills/layerfs-sdk-observe/references/tracing.md @@ -147,7 +147,7 @@ outcome. Written by `layerfs-home/src/trace.rs` (`stepped`, `step`), | --- | --- | --- | | Settings `LAYERFS_TRACE`, `LAYERFS_TRACE_STEP`, `LAYERFS_TRACE_START` | read by `@layerfs/agent` (`api/agent/sdk/src/trace.js` at tag `v1.1.0`) | kept as the only settings besides `LAYERFS_HOME` (S §2.5); `LAYERFS_TRACE` is read for the worker-connection line, and with `LAYERFS_TRACE_STEP` for the step lines; `LAYERFS_TRACE_START` is not read | | The trace line writer | in that JavaScript file | deleted with `@layerfs/agent` (#533 step 14); the call log (#659, `layerfs-home/src/logs.rs`, read with `home.log`) is its per-call replacement, without daemon telemetry | -| In-process collector | `host/trace.rs` in the Node binding | `api/crates/layerfs-api/src/host/trace.rs`: takes a 64-hex scope from an `observe` argument, traces the call's daemon control exchanges under it and collects up to 64 telemetry values. **No front end calls it** (`take_scope` and `run` have no callers) | +| In-process collector | `host/trace.rs` in the Node binding | retired when `api/crates/layerfs-api/src/host/` was removed in 2.0 (no front end or API module collects in-process daemon telemetry) | | The home's `trace/` folder | `traces/` | `paths::trace_dir` (a 1.1.0 `traces/` folder is renamed to it); O26 makes trace files there the feed. Holds the call log, `calls.jsonl` and `calls.1.jsonl` (#659) | So, today: the call log records every call's outcome and time; turning diff --git a/api/crates/layerfs-api/tests/project_doctor_full.rs b/api/crates/layerfs-api/tests/project_doctor_full.rs index 7f3168cba0..60aa626fdc 100644 --- a/api/crates/layerfs-api/tests/project_doctor_full.rs +++ b/api/crates/layerfs-api/tests/project_doctor_full.rs @@ -144,6 +144,51 @@ fn sqlite_full_reads_main_and_each_branch_and_names_a_damaged_object_in_each_pro let _ = std::fs::remove_dir_all(&home); } +fn split_pg_store_url(raw: &str, database: &str) -> (String, String, String) { + if let Some(rest) = raw + .strip_prefix("postgresql://") + .or_else(|| raw.strip_prefix("postgres://")) + { + let (base, query) = rest.split_once('?').unwrap_or((rest, "")); + let (server, _) = base.rsplit_once('/').unwrap_or((base, "")); + let (user, host_part) = match server.split_once('@') { + Some((creds, hp)) => (creds.split(':').next().unwrap_or("postgres"), hp), + None => ("postgres", server), + }; + let suffix = if query.is_empty() { + format!("/{database}") + } else { + format!("/{database}?{query}") + }; + return ( + user.to_owned(), + format!("postgresql://{server}{suffix}"), + format!("postgresql://{host_part}{suffix}"), + ); + } + let mut host = "127.0.0.1"; + let mut port = "5432"; + let mut user = "postgres"; + let mut sslmode = "disable"; + for token in raw.split_whitespace() { + if let Some((k, v)) = token.split_once('=') { + let v = v.trim_matches('\'').trim_matches('"'); + match k { + "host" => host = v, + "port" => port = v, + "user" => user = v, + "sslmode" => sslmode = v, + _ => {} + } + } + } + ( + user.to_owned(), + format!("postgresql://{user}@{host}:{port}/{database}?sslmode={sslmode}"), + format!("postgresql://{host}:{port}/{database}?sslmode={sslmode}"), + ) +} + /// The same on a PostgreSQL Store, in a database of its own (a 2.0 Store /// lives in that database's fixed `layerfs` schema), dropped at the end. /// `LAYERFS_TEST_POSTGRES_URL` is `postgresql://user@host:port/db?...`. @@ -160,23 +205,16 @@ fn postgresql_full_reads_main_and_each_branch_and_names_a_damaged_object_in_each }; admin(&format!("DROP DATABASE IF EXISTS {database}")); admin(&format!("CREATE DATABASE {database}")); - let (base, query) = url.split_once('?').unwrap_or((url.as_str(), "")); - let (server, _) = base.rsplit_once('/').unwrap(); - let store_url = match query { - "" => format!("{server}/{database}"), - query => format!("{server}/{database}?{query}"), - }; + let (user, store_url, clean_url) = split_pg_store_url(&url, &database); let home = folder("pg-home"); // the URL's user becomes a saved login (a trust-auth server takes any // password); the address is connected without it - let (scheme, rest) = store_url.split_once("://").unwrap(); - let (user, address) = rest.split_once('@').unwrap(); call( &home, "store.save_auth", &[ ("auth", t("pg")), - ("user", t(user)), + ("user", t(&user)), ("password", t("unused")), ], ); @@ -185,7 +223,7 @@ fn postgresql_full_reads_main_and_each_branch_and_names_a_damaged_object_in_each "store.connect", &[ ("store", t("shop")), - ("url", t(&format!("{scheme}://{address}"))), + ("url", t(&clean_url)), ("auth", t("pg")), ("synchronous_commit", t("off")), ], diff --git a/api/crates/layerfs-api/tests/store_stats.rs b/api/crates/layerfs-api/tests/store_stats.rs index 81e0bade20..2163c2b892 100644 --- a/api/crates/layerfs-api/tests/store_stats.rs +++ b/api/crates/layerfs-api/tests/store_stats.rs @@ -177,6 +177,41 @@ fn native_sqlite_and_worker_statistics_use_the_same_counters() { std::fs::remove_dir_all(root).unwrap(); } +fn split_pg_test_url(raw: &str) -> (String, String) { + if let Some(rest) = raw + .strip_prefix("postgresql://") + .or_else(|| raw.strip_prefix("postgres://")) + { + if let Some((creds, address)) = rest.split_once('@') { + let user = creds.split(':').next().unwrap_or("postgres"); + return (user.to_owned(), format!("postgresql://{address}")); + } + return ("postgres".to_owned(), format!("postgresql://{rest}")); + } + let mut host = "127.0.0.1"; + let mut port = "5432"; + let mut user = "postgres"; + let mut dbname = "postgres"; + let mut sslmode = "disable"; + for token in raw.split_whitespace() { + if let Some((k, v)) = token.split_once('=') { + let v = v.trim_matches('\'').trim_matches('"'); + match k { + "host" => host = v, + "port" => port = v, + "user" => user = v, + "dbname" => dbname = v, + "sslmode" => sslmode = v, + _ => {} + } + } + } + ( + user.to_owned(), + format!("postgresql://{host}:{port}/{dbname}?sslmode={sslmode}"), + ) +} + #[test] fn postgresql_statistics_have_null_free_and_count_publications() { let Ok(url) = std::env::var("LAYERFS_TEST_POSTGRES_URL") else { @@ -186,14 +221,13 @@ fn postgresql_statistics_have_null_free_and_count_publications() { let home = folder("pg-home"); // the URL's user becomes a saved login (a trust-auth server takes any // password); the address is connected without it - let (scheme, rest) = url.split_once("://").unwrap(); - let (user, address) = rest.split_once('@').unwrap(); + let (user, clean_url) = split_pg_test_url(&url); call( &home, "store.save_auth", &[ ("auth", t("pg")), - ("user", t(user)), + ("user", t(&user)), ("password", t("unused")), ], ); @@ -202,7 +236,7 @@ fn postgresql_statistics_have_null_free_and_count_publications() { "store.connect", &[ ("store", t("stats")), - ("url", t(&format!("{scheme}://{address}"))), + ("url", t(&clean_url)), ("auth", t("pg")), ("synchronous_commit", t("off")), ], diff --git a/api/crates/layerfs-cli/src/output.rs b/api/crates/layerfs-cli/src/output.rs index f33772d746..6bdf9382a7 100644 --- a/api/crates/layerfs-cli/src/output.rs +++ b/api/crates/layerfs-cli/src/output.rs @@ -54,8 +54,14 @@ pub fn result(value: &SdkValue, text: bool, form: Option<&Form>) -> ExitCode { /// A doctor's report in the readable form: a count line, then each finding as /// ` : ` with its fix on the next -/// line, then each check that could not be made and why. +/// line, then each check that could not be made and why; in `--detail` mode, +/// also `observed_at`, `evidence` on findings, and the check `tree`. pub fn doctor(report: &SdkValue) -> ExitCode { + print(&doctor_text(report)) +} + +/// Formats a doctor's report in the readable form. +pub fn doctor_text(report: &SdkValue) -> String { let empty = Vec::new(); let rows = |key: &str| match report.get(key) { Some(SdkValue::List(rows)) => rows, @@ -75,29 +81,45 @@ pub fn doctor(report: &SdkValue) -> ExitCode { .filter(|f| text(f, "severity") == severity) .count() }; - let mut printed = match (found.len(), open.len()) { - (0, 0) => "ok: every check was made and nothing was found\n".to_owned(), + let summary = match (found.len(), open.len()) { + (0, 0) => "ok: every check was made and nothing was found".to_owned(), _ => format!( - "{} error(s), {} warning(s), {} notice(s), {} not checked\n", + "{} error(s), {} warning(s), {} notice(s), {} not checked", count("error"), count("warning"), count("notice"), open.len() ), }; + let mut printed = format!("{}\n", crate::banner::bold(&summary)); + let width = if open.is_empty() { 8 } else { 11 }; + let pad = " ".repeat(width + 1); for finding in found { printed.push_str(&format!( - "{:<8} {} {}: {}\n", + "{: { + let items: Vec = fields + .iter() + .map(|(k, v)| format!("{k}={}", format_field(k, v))) + .collect(); + printed.push_str(&format!("{pad}evidence: {}\n", items.join(", "))); + } + Some(ev) if !matches!(ev, SdkValue::Null) => { + printed.push_str(&format!("{pad}evidence: {}\n", inline("evidence", ev))); + } + _ => {} } } for entry in open { @@ -112,12 +134,53 @@ pub fn doctor(report: &SdkValue) -> ExitCode { .get_text("check") .map_or(String::new(), |check| format!(" {check}")); printed.push_str(&format!( - "{:<8} {}{check}: {why}\n", + "{: out.push_str(&format!("{pad} {id} ({from}): {outcome}\n")), + None => out.push_str(&format!("{pad} {id}: {outcome}\n")), + } + } + } + for child_key in [ + "machines", + "stores", + "projects", + "sandboxes", + "workspaces", + "buckets", + ] { + if let Some(SdkValue::List(children)) = node.get(child_key) { + for child in children { + doctor_tree_node(child, depth + 1, out); + } + } + } } fn name_of(value: &SdkValue) -> String { diff --git a/api/crates/layerfs-cli/tests/rendering.rs b/api/crates/layerfs-cli/tests/rendering.rs index 92a2da0320..ea0c272062 100644 --- a/api/crates/layerfs-cli/tests/rendering.rs +++ b/api/crates/layerfs-cli/tests/rendering.rs @@ -241,3 +241,60 @@ fn a_row_s_reason_reads_in_state_and_its_fix_under_the_table() { fix pg: layerfs store update pg --auth x\n" ); } + +#[test] +fn doctor_text_aligns_columns_and_renders_detail_tree_and_evidence() { + use layerfs_cli::output::doctor_text; + let t = |text: &str| SdkValue::text(text); + let report = SdkValue::map([ + ("ok", SdkValue::Bool(false)), + ( + "findings", + SdkValue::List(vec![SdkValue::map([ + ("store", t("pg")), + ("check", t("store.connection")), + ("severity", t("error")), + ("message", t("cannot reach server")), + ("fix", t("layerfs store update pg --auth a")), + ("evidence", SdkValue::map([("step", t("handshake"))])), + ])]), + ), + ( + "not_checked", + SdkValue::List(vec![SdkValue::map([ + ("project", t("pg/app")), + ("check", t("project.listed")), + ( + "blocked_by", + SdkValue::map([("store", t("pg")), ("reason", t("failed"))]), + ), + ])]), + ), + ("observed_at", t("2026-11-20T05:00:00Z")), + ( + "tree", + SdkValue::map([ + ("store", t("pg")), + ("status", t("error")), + ("coverage", t("shallow")), + ( + "checks", + SdkValue::List(vec![SdkValue::map([ + ("check", t("store.record")), + ("outcome", t("pass")), + ])]), + ), + ]), + ), + ]); + let shown = doctor_text(&report); + let lines: Vec<&str> = shown.lines().collect(); + assert_eq!( + lines[1].find("store pg"), + lines[4].find("project pg/app"), + "{shown}" + ); + assert!(shown.contains("evidence: step=handshake"), "{shown}"); + assert!(shown.contains("observed at: 2026-11-20T05:00:00Z"), "{shown}"); + assert!(shown.contains("store.record: pass"), "{shown}"); +} diff --git a/api/node/package.json b/api/node/package.json index b9cd760708..52dca99294 100644 --- a/api/node/package.json +++ b/api/node/package.json @@ -1,7 +1,7 @@ { "name": "@layerfs/node", "version": "2.0.0-rc.1", - "description": "The LayerFS SDK for Node: one call table of 85 calls in ten families (home, project, branch, commit, file, sandbox, workspace, machine, store, backup) over one native library.", + "description": "The LayerFS SDK for Node: one call table of 83 calls in ten families (home, project, branch, commit, file, sandbox, workspace, machine, store, backup) over one native library.", "keywords": [ "layerfs", "filesystem", diff --git a/core/docs/issues/call-surface-2-0/doctor-page/index.html b/core/docs/issues/call-surface-2-0/doctor-page/index.html index 5305295737..ec65916fa5 100644 --- a/core/docs/issues/call-surface-2-0/doctor-page/index.html +++ b/core/docs/issues/call-surface-2-0/doctor-page/index.html @@ -303,7 +303,7 @@ /* ---------- tooltip (storage Signal .body / HoverCard) ---------- */ .tip { position: fixed; z-index: 20; display: none; flex-direction: column; gap: 3px; - min-width: 120px; max-width: min(300px, calc(100vw - 16px)); padding: 8px 10px; + min-width: 120px; max-width: min(300px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow-y: auto; box-sizing: border-box; padding: 8px 10px; border-radius: var(--dsw-radius-sm); background: var(--doc-tip-bg); color: var(--doc-tip-fg); box-shadow: 0 0 0 .5px #ffffff2e, 0 4px 14px 0 #00000052; font-size: 12px; line-height: 16px; pointer-events: none; @@ -341,20 +341,20 @@ color: var(--dsw-alias-label-secondary); font-size: 12px; } .mock b { color: var(--dsw-alias-label-primary); text-transform: uppercase; letter-spacing: 0.04em; font-size: 11px; } -.mock label { display: inline-flex; align-items: center; gap: 6px; } -.mock select { height: 28px; max-width: 100%; padding: 0 6px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: var(--dsw-radius-sm); background: var(--dsw-alias-bg-layer-2); color: var(--dsw-alias-label-primary); } +.mock label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 100%; min-width: 0; } +.mock select { height: 28px; min-width: 0; max-width: 100%; padding: 0 6px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: var(--dsw-radius-sm); background: var(--dsw-alias-bg-layer-2); color: var(--dsw-alias-label-primary); } .mock .hint { flex: 1 1 100%; color: var(--dsw-alias-label-secondary); } /* ---------- phone: name and status word on the first line, the rest below ---------- */ -@media (max-width: 640px) { +@media (max-width: 780px) { .page { --inset: 12px; } .line { flex-wrap: wrap; padding: 4px 6px 4px 0; } .rowBtn { flex: 1 1 0; gap: 7px; padding-left: calc(6px + var(--depth) * 14px); } .line > .sig { order: 1; min-width: 0; } - .more { order: 2; flex: 1 1 100%; padding-left: calc(31px + var(--depth) * 14px); } + .more { order: 2; flex: 1 1 100%; flex-wrap: wrap; padding-left: calc(31px + var(--depth) * 14px); } .more[data-thin] { height: 0; overflow: hidden; } /* nothing to say: still the line break before the marks */ .line[data-bare] .more[data-thin] { display: none; } - .fact { display: none; } + .fact { flex: 1 1 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; } .marks { order: 3; min-width: 0; margin-left: calc(27px + var(--depth) * 14px); } .acts { order: 4; width: auto; margin-left: auto; } .line[data-bare] .marks, .line[data-bare] .acts { display: none; } @@ -517,8 +517,8 @@

Doctor: