From bea3328227c9f2f130a1f9ab38649236c68714ad Mon Sep 17 00:00:00 2001 From: jefftj86 Date: Sun, 1 Nov 2026 14:31:43 -0800 Subject: [PATCH 1/2] feat(workbench): connect saved revisions Preserve exact saved revisions across Skills and Compose without discarding drafts or accepting late replies after navigation or Lock. Include synthetic folder qualification safeguards and reconciled build direction. Native GUI and encrypted workflow qualification remain open. --- README.md | 29 ++- .../tauri.conf.json | 2 + .../src/native_encrypted_qualification.rs | 40 +++- docs/application-architecture.md | 33 +++ docs/continue.md | 38 +++- docs/development.md | 98 +++++++++ docs/encrypted-workspace.md | 14 ++ docs/intent.md | 50 ++++- docs/operations-control-plane.md | 12 ++ docs/plan.md | 47 ++++- docs/product-experience.md | 22 ++ docs/provider-interoperability.md | 10 + docs/reviewer-guide.md | 17 +- docs/visual-system.md | 14 +- preview/analyze.mjs | 62 +++++- preview/composition-model.mjs | 9 +- preview/composition-skill-handoff.mjs | 31 +++ preview/composition-view.mjs | 19 +- preview/skill-compile-handoff.mjs | 23 +++ preview/skills-model.mjs | 14 +- preview/skills-view.mjs | 12 +- scripts/qualify-native-encrypted.py | 110 +++++++++- tests/composition-model.test.mjs | 64 ++++++ tests/composition-skill-handoff.test.mjs | 80 +++++++ tests/composition-view.test.mjs | 26 +++ tests/qualify_native_encrypted_test.py | 195 +++++++++++++++++- tests/skill-compile-handoff.test.mjs | 53 ++++- tests/skills-model.test.mjs | 19 ++ tests/skills-view.test.mjs | 24 +++ 29 files changed, 1127 insertions(+), 40 deletions(-) create mode 100644 preview/composition-skill-handoff.mjs create mode 100644 tests/composition-skill-handoff.test.mjs diff --git a/README.md b/README.md index df732cd..40798b8 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The desktop application is named **Rangoon**; Rangoon.si is the product wordmark **Current status:** an experimental native workbench with persistence, immutable skill/workflow revisions, composition, compilation/export/inspection and explicitly consented advisory model paths. The ordinary desktop source enables encrypted-workspace startup by default, with explicit setup/unlock and no plaintext fallback. Encrypted recovery has dated disposable macOS evidence, including recovery into a fresh independently keyed workspace and restart. Windows startup/custody/recovery remains unsupported in the current implementation; Linux GUI/custody and packaged release qualification remain open. Original instruction files and deliberately readable exports are outside workspace encryption. No live agent executor, scheduler, authority adapter or plugin runtime is mounted. -The [October 29 whole-application audit](docs/system-audit.md#october-29-whole-application-viability-and-drift-audit) reconciles current source against earlier architecture and usability checkpoints. The [completion plan](docs/plan.md#october-15-audit-completion-sequence) puts recovery, installed local tasks and usable editing ahead of more disconnected demonstrations. The [development ledger](docs/development.md) records exact validation and limits. Source tests, checksums, model reviews and source CI do not establish runtime enforcement, target-loader compatibility, desktop support or certification. +The [October 29 whole-application audit](docs/system-audit.md#october-29-whole-application-viability-and-drift-audit) reconciles current source against earlier architecture and usability checkpoints. The [completion plan](docs/plan.md#next-phase-packets--november-1-2026) puts recovery, installed local tasks and usable editing ahead of more disconnected demonstrations. The [development ledger](docs/development.md) records exact validation and limits. Source tests, checksums, model reviews and source CI do not establish runtime enforcement, target-loader compatibility, desktop support or certification. **Review today:** [the reviewer guide](docs/reviewer-guide.md) provides a short design/source task and a disposable-data native task. Browser samples and playgrounds are synthetic. The local Operations window reads one selected report and shows unverified observations; it is not a live feed. Use disposable data in an explicitly isolated review profile. Earlier macOS recovery evidence does not qualify the current working tree, normal-profile migration or every platform. Broader desktop beta and three-OS release support have separate qualification gates. @@ -25,6 +25,29 @@ Approval management, redacted correlated telemetry and live operations visualiza The [cross-runtime operator-record target](docs/operations-control-plane.md#cross-runtime-operator-record-acceptance-target) defines what Rangoon must show for denied, approved, changed, repeated and uncertain actions. It prioritizes read-only OpenShell observations for this goal while LNSAT evidence remains an independent later gate. No live cross-runtime record exists today. +## Source update — November 1, 2026 + +Skills and Compose now preserve exact saved revisions in both directions: add a saved skill to Compose, then inspect an actual saved output in Skills without silently substituting a newer revision. Native readback precedes result navigation; unsaved edits, busy states, duplicate/full inputs and open drafts retain work and explain recovery. Navigation and Lock reject stale replies. Draft creation, preview, save, review, compilation and export remain explicit. + +The disposable native harness also binds a synthetic folder and exact file inventory to each test run, rejecting mutation/replacement/link/unexpected-child cases before and after phases. The roadmap reconciles local completion with later authenticated peers, credential/key lifecycle and enterprise operation boundaries. Live peers, cloud control and distributed dispatch remain planned. + +These are source changes, not a desktop release. Current rendered/native encrypted-workflow qualification remains open; Windows/Proxmox testing is deferred and Windows custody/startup/recovery still needs implementation. Source tests do not qualify normal user data, provider enforcement or compliance. The [publication receipt](docs/development.md#source-branch-publication--november-1-2026) records the exact scope and evidence. + +## Build direction and next phases — November 1, 2026 + +Rangoon keeps its local-first capability workbench and native Rust trust boundary while improving project/target task continuity. The [prepared packet sequence](docs/plan.md#next-phase-packets--november-1-2026) starts with an artifact-bound encrypted local journey, then exact-revision editing/composition, retained file inspection, reversible instruction-file changes, one verified target-loading handoff and practical bulk organization. Original bytes and revisions stay authoritative; future syntax projections/indexes are derived and versioned. + +Finished radials, bars, icons, packaged system logos and refined abstract Rangoon artwork remain part of the [visual contract](docs/visual-system.md). Metrics must show real scope/counts/freshness and inspectable detail, with complete empty, stale, partial, denied, failure and recovery states. These docs do not claim that the proposed UI or enterprise features are implemented. + +Later [peer/enterprise work](docs/application-architecture.md#enterprise-operation-and-custody-boundaries--november-1-2026) requires verified tenant/actor scope, target-side operation guarantees, current ownership, scoped credentials/key lifecycle and recovery before writes or failover. Cloud hosting, cloud resource management and model inference are distinct profiles. Shared services, KMS/BYOK/federation, live peers and distributed dispatch remain planned; optional engines and VUSL retain their independent boundaries. Local usefulness does not wait for enterprise infrastructure. The [development receipt](docs/development.md#direction-reconciliation--november-1-2026) records this documentation-only reconciliation and remaining gates. + +## Local qualification preparation — October 30, 2026 + +The disposable macOS harness now includes the existing folder-metadata and explicit file-inspection permissions, plus a fixed synthetic folder bound to the run manifest and artifact inventory. It rejects changed contents, replaced entries, links and unexpected children before and after a phase. Input-integrity results remain separate from native UI results; the [manual workflow checklist](docs/reviewer-guide.md#disposable-native-workflow-checklist) still needs a fresh artifact and actual picker, Lock, restart and recovery observations. See the [development receipt](docs/development.md#nq-1-disposable-folder-qualification-preparation--october-30-2026) for validation and limits. + +Windows testing is deferred until the new Proxmox test host is available. Windows encrypted custody/startup/recovery implementation and three-OS GUI qualification remain outstanding. The next local milestones are a repeatable encrypted workflow, retained folder-row inspection, reversible project-file changes and one verified target-loading handoff. + + ## Application source update — October 29, 2026 This update brings the current local workbench into one source snapshot: encrypted default startup and recovery, instruction-history persistence, native lifecycle hardening, bounded Agent files and folder metadata, Markdown review/find, and exact saved-skill handoff to Compile. It preserves the newer public LNSAT offline inspection modules and independent VUSL direction. Rust manifests, local checks and source CI use the same **1.99.1** toolchain. Windows validation resolves the logical Cargo tool through rustup, then uses the returned absolute `.exe` paths; it never falls back to an unrelated compiler on PATH. The default encrypted Windows source build requires OpenSSL headers and the x64 MSVC import library; CI validates the hosted runner’s preinstalled copies explicitly. This build configuration does not enable the still-unsupported Windows workspace startup or key custody. Recovery-journal ownership now explicitly releases its lock at teardown, including when a duplicate handle survives temporarily; active competing owners still refuse access. @@ -35,6 +58,10 @@ Folder browsing returns metadata; inspecting content still requires an explicit **Open in Compile** carries a selected saved skill revision directly from Skills into Compile through an exact native read. Historical selection stays pinned; compilation, format choice and export remain explicit. Dirty edits for that skill, conflicts and pending requests block the handoff with recovery guidance. Navigation and Lock invalidate late reads. This slice has source-test evidence; the full-publication receipt records its additional synthetic rendered checks. Native task qualification remains separate. [Receipt and next steps](docs/development.md#cw-1-saved-revision-compile-handoff--october-29-2026). +**Add to Compose** carries the exact selected saved revision from Skills into Compose after a native read, including historical revisions. Existing inputs and drafts remain intact; unsaved edits, open Compose drafts, busy/unavailable states, duplicate pins and full selections explain why adding is blocked. Draft creation, preview and save remain explicit. Late navigation/selection/Lock replies are discarded. This is source-tested; rendered and native qualification remain open. See the [implementation receipt](docs/development.md#next-02a-saved-revision-compose-handoff--november-1-2026). + +Saved Compose results now open their **exact saved revision** in Skills after native readback, with matching editor focus. Later revisions are not substituted. Unsaved edits for that skill block opening; other drafts remain. Failed or stale reads keep the current workbench. [Source evidence and remaining rendered/native gates](docs/development.md#next-02b-exact-saved-result-continuation--november-1-2026). + Agent files already has bounded native folder metadata selection, source inspection and IDE-style Markdown review. Folder rows still require a separate explicit file selection to inspect content; persistent tags/indexing, remote transport and copying/applying instructions remain future work. The immediate completion order is a repeatable isolated native workflow, safe row-inspection custody, then one qualified external target. A custom executor, scheduler or larger demonstration catalog is not required for that local milestone. ## Engineering checkpoint — October 18, 2026 diff --git a/apps/desktop/native-encrypted-qualification/tauri.conf.json b/apps/desktop/native-encrypted-qualification/tauri.conf.json index a48b8fa..2c95068 100644 --- a/apps/desktop/native-encrypted-qualification/tauri.conf.json +++ b/apps/desktop/native-encrypted-qualification/tauri.conf.json @@ -33,6 +33,8 @@ "allow-begin-workspace-close", "allow-acknowledge-workspace-purge", "allow-select-and-analyze", + "allow-select-and-inspect-sources", + "allow-select-and-list-sources", "allow-list-snapshots", "allow-save-analysis", "allow-open-snapshot", diff --git a/apps/desktop/src/native_encrypted_qualification.rs b/apps/desktop/src/native_encrypted_qualification.rs index c45fdf0..0895ff6 100644 --- a/apps/desktop/src/native_encrypted_qualification.rs +++ b/apps/desktop/src/native_encrypted_qualification.rs @@ -64,6 +64,8 @@ mod macos { "allow-begin-workspace-close", "allow-acknowledge-workspace-purge", "allow-select-and-analyze", + "allow-select-and-inspect-sources", + "allow-select-and-list-sources", "allow-list-snapshots", "allow-save-analysis", "allow-open-snapshot", @@ -229,6 +231,8 @@ mod macos { nonce: String, #[serde(rename = "casePlanSha256")] case_plan_sha256: String, + #[serde(rename = "folderFixture")] + folder_fixture: Identity, directory: Identity, roots: BTreeMap, } @@ -350,7 +354,13 @@ mod macos { } impl Run { fn validate(&self) -> Result<(), ()> { - if !same_directory(&self.directory, &self.manifest.directory) { + if !same_directory(&self.directory, &self.manifest.directory) + || self.manifest.folder_fixture.uid != self.manifest.directory.uid + || !same_directory( + &self.directory.join("folder-fixture"), + &self.manifest.folder_fixture, + ) + { return Err(()); } for (name, id) in &self.manifest.roots { @@ -405,7 +415,7 @@ mod macos { return Err(()); } let manifest: Manifest = read_record(&directory.join("manifest.json"), meta.uid())?; - if manifest.schema != "rangoon.e1c4.run.v2" + if manifest.schema != "rangoon.e1c4.run.v3" || manifest.nonce != args[0] || manifest.case_plan_sha256 != plan_digest() || manifest.roots.len() != plan.roots.len() @@ -1119,6 +1129,32 @@ mod macos { #[cfg(test)] mod header_tests { use super::*; + #[test] + fn folder_qualification_permissions_are_exact_and_required() { + let config: Value = serde_json::from_str(include_str!( + "../native-encrypted-qualification/tauri.conf.json" + )) + .unwrap(); + assert!(valid_context(&config, true)); + for required in [ + "allow-select-and-inspect-sources", + "allow-select-and-list-sources", + ] { + let mut changed = config.clone(); + changed["app"]["security"]["capabilities"][0]["permissions"] + .as_array_mut() + .unwrap() + .retain(|permission| permission != required); + assert!(!valid_context(&changed, true)); + } + let mut broadened = config.clone(); + broadened["app"]["security"]["capabilities"][0]["permissions"] + .as_array_mut() + .unwrap() + .push(json!("allow-send-cloud-model")); + assert!(!valid_context(&broadened, true)); + } + #[test] fn header_callback_accepts_only_finite_classifications() { assert_eq!(header_reply("\"pending\""), Ok(HeaderReply::Pending)); diff --git a/docs/application-architecture.md b/docs/application-architecture.md index 5f971d3..0fac829 100644 --- a/docs/application-architecture.md +++ b/docs/application-architecture.md @@ -4,6 +4,26 @@ Authority: [intent.md](intent.md), October 5 engine architecture and October 7 p Owner: Jeff. Architecture, trust boundaries, schema, integration and release decisions remain with the primary controller. Validation/publication state belongs in [development.md](development.md). +## Enterprise operation and custody boundaries — November 1, 2026 + +Status: accepted planning direction; service, peer, cloud and distributed implementations remain proposed. This reconciles the existing modular core, [remote setup](#remote-setup-and-agent-file-management--october-26-2026), [capacity model](#capacity-model-for-a-5001000-person-organization), [deployment workflow](#deployment-management-as-a-control-plane-workflow) and [adapter strategy](#extension-and-standards-strategy). It does not add a new universal contract, scheduler or mandatory LNSAT/VUSL backend. The [next-phase queue](plan.md#next-phase-packets--november-1-2026) retains local completion first. + +**Shared application boundary.** Original bytes/revisions remain authoritative. Syntax/semantic projections and indexes identify their exact source, importer/profile/configuration version and diagnostics; they do not silently normalize originals or infer authorization. Keep deterministic import/compose/compile and store transactions. Introduce a typed shared use-case seam for a concrete second caller; local Tauri, eventual CLI and authenticated service adapters supply independently verified context and custody. A service never exposes raw Tauri commands, arbitrary paths or database files. A crashed process cannot recreate retained OS custody merely from a path saved in a job. + +**Scope and intent.** Distinguish operator, installation/workload, tenant/workspace/project, native target incarnation, adapter/version, root/file reference, content revision, command, attempt, authorization and outcome. Derive tenancy/actor from verified context, not caller labels, hostname or email. Apply it to database references, blobs, queues, caches, search/facets, cursors, dedupe, key/secret lookup, telemetry/export and administrative tools. Admission pins exact inputs/artifact, expected prior state, frozen target membership/exclusions, adapter/schema, relevant policy/configuration, approval evidence and expiry. Changed intent requires explicit revalidation/supersession. Classification, local review, semantic compatibility and a provider allow decision never become execution authority. + +**Ownership and regions.** Begin any hosted pilot with one bounded tenant/region; keep the same Rust core. A later regional cell is a deployment/shard with bounded tenants/state/quotas, not a second implementation. A qualified consistent assignment directory owns `tenant/target → cell, assignment epoch, transition state`. Routes are hints, not authority. Receivers validate current assignment; moves use compare-and-swap transitions, freeze old admission, establish successor authority and reject stale routes/epochs. Directory outage or a restored old directory cannot create a new owner. Use an existing qualified coordination/storage system rather than a custom consensus algorithm. Global active-active mutation is deferred until its target/consistency/recovery model is proved. + +**Effects and migration.** A lease, outbox, signature or idempotency key alone cannot make an external effect happen once. Target-side fencing/conditional writes and durable duplicate suppression must qualify per operation. Otherwise expose weaker coverage and disable unsupported automatic retry/takeover. Migration needs a target-enforced successor fence, or independently proved old-worker quiescence and effective revocation/expiry of all bounded delegated credential chains, plus reconciliation of already accepted provider jobs. A waiting period alone, unreachable worker, unbounded renewal or expired submitting token does not prove old effects stopped. Preserve unknown outcomes; no silent cross-instance/region failover. The native topology/consensus/authorization guarantees of LNSAT or another engine remain that product's responsibility. + +**Cloud and key separation.** Hosting Rangoon, managing cloud resources and calling model providers are distinct integration profiles. Prefer explicitly configured short-lived workload identities and scoped provider/account/region/resource roles; no ambient credential discovery or general fleet credential. Resolve secret references in the authorized host/service and recheck renewal/delegation/scope. Local OS workspace custody remains independent and usable without cloud KMS. Hosted tenant DEKs/KEKs, immutable key-version references, caches, rotation, retention and recovery follow the [key lifecycle contract](encrypted-workspace.md#enterprise-key-and-credential-lifecycle--november-1-2026). BYOK does not automatically hide authorized processing plaintext from a service. + +**Durability, scale and recovery.** Keep management commands, required outcome/evidence records, content and high-volume telemetry/projections as separate workloads. Use durable command/outbox/attempt state and exact receiver semantics; an ACK states its persistence boundary, not execution success. Scope ordering to tenant/producer/stream/epoch; clock time is not global order. Bound queues, pages, queries, subscriptions, retries, retention and key caches, with per-tenant fairness and reserved control/reconciliation capacity. Telemetry can have explicit gaps; it must not substitute for required effect evidence. Define workload units, tenant/cell count, event-size distribution, concurrency, quotas, RPO/RTO and revocation budgets before claiming capacity. + +Disaster restore pauses dispatch, checks metadata/outbox/evidence/object/key consistency, re-establishes independently current assignment/ownership authority and reconciles target outcomes before reopening. Restoring an archive must not reactivate old grants, approvals, leases or commands. VM clones need distinct enrollment; snapshot rollback needs a recovery protocol and cannot prove its own freshness. Rangoon outages do not weaken target enforcement: already admitted work follows its qualified runtime policy, and new actions requiring fresh authority remain pending/refused. A compromised unlocked endpoint remains outside stored-data encryption's protection. + +**Presentation and validation.** Keep project/target continuity, truthful per-target state, [finished visual components](visual-system.md) and [scoped operator flows](operations-control-plane.md#enterprise-operator-and-visual-state--november-1-2026). Logos/graphs identify and explain; they grant no coverage or authority. Before shared reads test tenant/actor isolation, stale scopes and egress; before effects test split brain, stale workers, altered duplicate payloads, lost replies, concurrent edits, revocation and restore; before scale test producer resets/gaps, full spools, noisy tenants and key/provider throttles. Source fixtures and the reviewed design are not live qualification. + ## Internal operations-first boundary — October 22, 2026 The [accepted internal-first direction](intent.md#internal-operations-first-direction--october-22-2026) prioritizes Hypler's own supervised workloads over speculative integration breadth or a funding narrative. It extends the existing operations/fleet and deployment designs below; it does not replace the local capability workbench or create a second control plane. @@ -207,6 +227,19 @@ Capacity must be specified by operation, not by an undifferentiated "request" co **Proposed qualification workload, not measured capacity or a release claim:** one large tenant with up to 1 million observed actions per day, a 60-second burst at 1,000 actions/second, and a synthetic planning factor of 10 minimized evidence events per action. That implies 10 million events/day and a 60-second burst at 10,000 events/second. At a *hypothetical* 1 KiB persisted event, raw event bodies alone consume about 9.5 GiB/day and 286 GiB per 30 days, before indexes, native evidence, replicas and backups. Payload-size distribution, tenant count, retention and concurrent readers must be measured before sizing a deployment. Sustained 1,000 actions/second would be 86.4 million actions/day and needs a separate scale tier and proof. A desktop selected-file O1 window, capped at 1,024 events and 2 MiB input, is an inspection unit, not a million-event ingest service. +### Qualification workload units — November 1, 2026 + +Both rows below are proposed **one-tenant aggregate workloads in one tested cell**, not per endpoint, per engine instance or all tenants combined. Assume ten minimized 1-KiB event bodies per observed action for arithmetic only. These are not measured capacity or employee-count guarantees; actual event sizes, indexes, evidence, replicas, backups, content and provider/key-service limits must be measured. + +| Synthetic envelope | Actions/day | Events/day and mean | 60-second offered burst | Raw bodies/day / 30 days | +| --- | ---: | --- | ---: | --- | +| First enterprise test | 1,000,000 | 10,000,000 / 115.74 events/s | 10,000 events/s | 9.54 GiB / 286.10 GiB | +| Larger-fleet test | 10,000,000 | 100,000,000 / 1,157.41 events/s | 100,000 events/s | 95.37 GiB / 2.79 TiB | + +The proposed first mix has 1,000 producer streams, 20 interactive sessions, 20 paged queries/s, ten concurrent change records and one new change-record admission/minute. The larger mix has 10,000 streams, 100 sessions, 100 queries/s, 50 concurrent change records and five admissions/minute. Use a bounded 200-metadata-row page for this test profile; this is not a new API limit or permission to execute external effects. State content sizes, key-cache conditions, active tenant count and read/write mix for every result. A separate fairness profile offers one hot tenant plus nine at 10% of the selected baseline, then synchronized bursts; report cell totals, accepted/rejected rates and each tenant's tail latency instead of multiplying a single-tenant result into a capacity claim. + +Partition a tenant's offered workload explicitly if it later spans cells. Benchmark p50/p95/p99 query/admission/readback, durable-ACK and replay lag, CPU/RSS/disk/network, provider/KMS quotas, rotation/renewal and failure recovery. Define authorization freshness, observation lag, revocation bounds, retry/tombstone horizon, retention, RPO/RTO and availability by operation/data class before accepting a deployment. Global active-active ownership and millions of telemetry events are not prerequisites for local authoring. + The hosted path should use admission with authenticated tenant and producer identity; bounded validation and redaction; a durable partitioned event log or equivalent append contract; idempotent, version-pinned projections; and paged query/subscription APIs. Partition by tenant and stable producer/stream identity so causal order has a defined scope; never claim a global total order. Separate immutable native evidence references from minimized searchable fields. Batch writes and projections where safe, but never combine distinct attempts or drop required evidence to improve throughput. Per-tenant quotas and fair scheduling prevent one fleet from exhausting other tenants. Bounded queues, explicit backpressure/retry signals, producer cursor checkpoints and replay make overload observable. On crash, retry or partition, duplicate identity with different bytes is a conflict; missing ranges and retention gaps remain visible. An ingestion acknowledgement means only the stated durability stage, never authority verification or completed execution. The local desktop remains a bounded single-user workbench. It may inspect paged or sampled *views* of a larger hosted history after a qualified connection, but evidence capture itself cannot be silently sampled. Do not route millions of events through one Tauri IPC response, one SQLite transaction or the renderer's graph state. Keep graph layout and animation downstream of bounded projections, with stable selection and a table/timeline fallback. A future service may scale ingest, projection and query workers independently while reusing domain contracts; that extraction requires explicit tenant context, storage and recovery tests rather than a raw HTTP wrapper over desktop commands. diff --git a/docs/continue.md b/docs/continue.md index 59f08ea..a981cfc 100644 --- a/docs/continue.md +++ b/docs/continue.md @@ -1,5 +1,41 @@ # Continue Rangoon application work -## Current: full application source publication — October 29, 2026 +## Current: source branch publication — November 1, 2026 + +Jeff authorizes committing and pushing the complete twenty-nine-path pending source delta on `codex/native-workflow-qualification-20261030`. [Intent](intent.md#source-commit-and-branch-push--november-1-2026) and [publication receipt](development.md#source-branch-publication--november-1-2026) own scope/evidence. This widens publication only; no merge/deploy/release or native/provider/data authority is added. Git history and the advertised remote branch ref identify the published commit; private local receipt retains command proof. + +Next remains actual rendered checks and the fresh disposable encrypted native journey once UI control is available. Preserve the original app/website worktrees. Normal files/keys/vault, providers/remote/cloud and LNSAT/VUSL remain closed; Windows/Proxmox stays deferred. + +## Current: NEXT-02b exact saved-result continuation — November 1, 2026 + +Saved Compose outputs now open exact revisions in Skills after validated readback, retaining unrelated drafts and targeting the matching editor heading. Same-skill unsaved edits block opening. Missing/substituted results, failures, repeat/disposed clicks and stale navigation/receipt/Lock replies cannot open a replacement revision. [Intent](intent.md#next-02b-exact-saved-result-continuation--november-1-2026) owns thirteen paths; [receipt](development.md#next-02b-exact-saved-result-continuation--november-1-2026) records evidence. Focused tests: 55 passed; full JavaScript checks: 646 passed. + +Next: restore reliable UI control for the NEXT-02 rendered keyboard/pointer/draft/failure/focus/Lock cases at 320/768/1440 dark/light with reduced motion, then complete NEXT-01's fresh disposable encrypted native journey. Neither rendered/native gate is closed by source tests. Preserve native preparation, direction docs, NEXT-02a and this packet; no normal data/keys/vault, providers/remote/cloud, LNSAT/VUSL changes, dependency fetch or publication/release. Windows/Proxmox remains deferred. + +## Current: NEXT-02a saved-revision Compose handoff — November 1, 2026 + +Skills now has **Add to Compose**, using the existing exact native saved-revision read. It retains other drafts and Compose inputs; open drafts, duplicate/full inputs and busy/unavailable/conflicting/unsaved state block adding with an explanation and a link to existing work. Stale selection/navigation/edit/Lock replies cannot add inputs. Nothing is composed, previewed or saved automatically. [Intent](intent.md#next-02a-saved-revision-compose-handoff--november-1-2026) owns exact files; [receipt](development.md#next-02a-saved-revision-compose-handoff--november-1-2026) owns validation/review. Focused tests: 68 passed; complete JavaScript build checks: 636 passed. Source completion does not qualify native use. + +Next: obtain reliable UI control and qualify keyboard/pointer, cancellation/failure/Lock, existing-draft continuity and 320/768/1440 dark/light views; then finish NEXT-01's disposable encrypted end-to-end native journey. Matching composition-result focus is a separate NEXT-02 subpacket. Preserve the prior native/direction work. No normal data/keys/vault, provider/remote/cloud services, engine changes, publication or release is authorized by this source packet. Windows/Proxmox remains deferred. + +## Current: reconciled direction and next packets — November 1, 2026 + +Jeff accepts documentation/planning reconciliation after the local/remote/enterprise reviews and reiterates finished radials, bars, icons, logos and professional visual states. [Intent](intent.md#direction-reconciliation-and-next-phase-preparation--november-1-2026) defines the exact eleven-document packet; [development](development.md#direction-reconciliation--november-1-2026) records its validators/review and preservation. This does not accept implementation of every future packet, provider access or publication. + +Start with [NEXT-01](plan.md#next-phase-packets--november-1-2026): restore reliable exclusive native UI control, then create a fresh NQ-1 v3 disposable artifact/run and prove picker/cancel/Lock purge plus the encrypted source → skill → compose → Compile/export → restart/recovery journey. NQ-1 source preparation and its dated tests are complete; native/rendered qualification remains open. This session has no native computer-use controller exposed; the earlier symlink-root startup failure remains dated diagnostic evidence. Recheck controller availability before any GUI run. Do not reuse an old artifact, open normal data/keys/vault, or change Codex configuration under this docs task. + +NEXT-02 connects exact saved revisions through Compose/Compile and matching result focus with polished real-data/empty/error states. Then retained row inspection, reversible external-file changes, one installed target-loading proof and persistent bulk organization follow. Freeze each source packet's final files/contracts/validators before implementation. Windows/Proxmox testing remains deferred until the upgraded host is ready; Windows custody/startup/recovery still needs implementation. Core local work and three-OS release gates remain independent of enterprise infrastructure. + +Later peer/service packets use the [enterprise boundaries](application-architecture.md#enterprise-operation-and-custody-boundaries--november-1-2026): authenticated tenant/actor scope, current cell/target ownership, qualified effect-side checks or honest weaker coverage, scoped cloud credential/key lifecycle, paused-restore reconciliation and explicit capacity units. VUSL/LNSAT stay independent. Public SDK waits for two real qualified adapters. No source/assets/schema/dependency/policy/CI, live provider/cloud/remote, normal data/key/vault, foreign-repo or publication operation belongs to this documentation update. Preserve the prior nine-file NQ-1 changes and all unrelated work. + +## Historical: native workflow qualification preparation — October 30, 2026 + +PR [55](https://github.com/hypler-dev/rangoon/pull/55) merged the complete application source onto main at `929873aa18521bebab911b410cf4705542b85b80`; the original application and website worktrees remain preserved. Jeff defers Windows testing until the upgraded Proxmox host is available next week. Windows custody/startup/recovery implementation and Windows/Linux GUI qualification remain open. + +NQ-1 prepares BF-2c testing: both isolated native permission lists include existing folder-metadata and explicit multi-file inspection commands. New disposable manifest v3 binds the fixed synthetic folder identity; the artifact binds its exact directory/file identities, sizes and hashes. The parent verifies those inputs before/after a phase, refusing replacements, links and unexpected entries. Old disposable runs must be recreated. Fixture integrity and clean exit are not picker, Lock-purge or workflow proof. + +[Intent](intent.md#nq-1-disposable-folder-qualification-preparation--october-30-2026), [receipt](development.md#nq-1-disposable-folder-qualification-preparation--october-30-2026), and [manual checklist](reviewer-guide.md#disposable-native-workflow-checklist) own the exact nine-path packet and evidence. Next: restore reliable exclusive UI control, create a fresh isolated artifact/run, prove folder selection/cancel and Lock purge, then complete source → skill → composition → Compile/export → restart/reopen and encrypted recovery. Codex UI startup remains blocked by the configured symlinked writable root; do not launch a vault-backed GUI without its controller or count source tests as native evidence. Then prioritize retained row custody, safe project-file Apply/Restore, one installed target's loaded instructions and persistent bulk organization. Normal data/keys/vault, providers/remote systems, LNSAT/VUSL changes and publication/release remain outside this packet. + +## Historical: full application source publication — October 29, 2026 Jeff authorized all current application work for GitHub main only. The publication candidate reconciles the complete authored app snapshot onto public main `01423598`, preserves PR51/53/54, and includes encrypted startup/recovery, instruction history, native lifecycle seams, Agent files/Markdown review, and Skills → Compile continuity. Original application and website dirt remain outside the publication worktree. The [accepted publication intent](intent.md#full-application-source-publication--october-29-2026) and [receipt](development.md#full-application-source-publication--october-29-2026) supersede the earlier source packets' publication holds for this snapshot only. diff --git a/docs/development.md b/docs/development.md index 4666181..ce9b558 100644 --- a/docs/development.md +++ b/docs/development.md @@ -1,4 +1,102 @@ # Development status + +## Source branch publication — November 1, 2026 + +Authority: Jeff requests “commit and push”; [accepted publication intent](intent.md#source-commit-and-branch-push--november-1-2026). Source branch: `codex/native-workflow-qualification-20261030`. Fetched public main and source base both resolve to `929873aa18521bebab911b410cf4705542b85b80`. Root owns aggregate integration, commit and non-force branch push; merge/deployment/release remain closed. Local evidence: `/rangoon-source-push-20261101`. + +**Delivered scope:** NQ-1 synthetic folder inventory/integrity preparation, reconciled local/remote/enterprise drafting records, exact saved-revision Skills → Compose handoff and exact saved-result Compose → Skills readback/focus. No new runtime dependency or engine integration is introduced. Earlier source packets retain their implementation and native-operation limits; this task authorizes their source publication only. + +**Exact authored paths (29):** + +- `README.md` +- `apps/desktop/native-encrypted-qualification/tauri.conf.json` +- `apps/desktop/src/native_encrypted_qualification.rs` +- `docs/application-architecture.md` +- `docs/continue.md` +- `docs/development.md` +- `docs/encrypted-workspace.md` +- `docs/intent.md` +- `docs/operations-control-plane.md` +- `docs/plan.md` +- `docs/product-experience.md` +- `docs/provider-interoperability.md` +- `docs/reviewer-guide.md` +- `docs/visual-system.md` +- `preview/analyze.mjs` +- `preview/composition-model.mjs` +- `preview/composition-skill-handoff.mjs` +- `preview/composition-view.mjs` +- `preview/skill-compile-handoff.mjs` +- `preview/skills-model.mjs` +- `preview/skills-view.mjs` +- `scripts/qualify-native-encrypted.py` +- `tests/composition-model.test.mjs` +- `tests/composition-skill-handoff.test.mjs` +- `tests/composition-view.test.mjs` +- `tests/qualify_native_encrypted_test.py` +- `tests/skill-compile-handoff.test.mjs` +- `tests/skills-model.test.mjs` +- `tests/skills-view.test.mjs` + +**Validation basis:** packet postimages reconcile exactly after accounting for later accepted overlays. The latest JavaScript source evidence is `npm run build:check` with 646 tests plus syntax/visual/vision checks; NEXT-02a and NEXT-02b independently passed 68 and 55 focused tests. Unchanged NQ-1 source retains its dated pinned offline desktop evidence (739 passed, 4 ignored, format/Clippy/build), four qualification-feature tests, custom-target offline build and Python 50 focused/114 aggregate tests. These are reused evidence, not new native GUI runs. Final document/shape/whitespace checks and fresh aggregate read-only review are recorded before publication; terminal commit/remote-ref proof is retained in local evidence and Git history. + +**Security/standards and open gates:** synthetic source/fixtures only; no normal data/keys/vault, provider/remote/cloud operation, LNSAT/VUSL edit, dependency fetch or executable distribution. Native/rendered qualification remains unassessed in this session because no UI controller is exposed. Windows/Proxmox is deferred; source CI is not three-OS GUI or key-custody proof. Existing plaintext export/host-compromise limitations remain. This branch publication claims no ISO/OpenSSF certification, security guarantee or production readiness. + +## NEXT-02b exact saved-result continuation — November 1, 2026 + +Authority: Jeff's “proceed” after NEXT-02a; [accepted intent](intent.md#next-02b-exact-saved-result-continuation--november-1-2026) owns thirteen paths, including a new presentation-only handoff module and its tests. Root owns integration. Baseline: branch `codex/native-workflow-qualification-20261030`, HEAD `929873aa18521bebab911b410cf4705542b85b80`; all twenty-three prior dirty paths preserved. Preimages, task-only patch and local validation/review receipt: `/rangoon-result-continuity-20261101`. + +**Experience:** opening a saved Compose output now reads its exact saved revision before moving to Skills. This keeps the saved result selected when its current head has advanced. Successful matching readback targets the editor heading; a failure stays in Compose with a recovery message. Busy states disable repeated result actions. Same-skill unsaved edits block opening; unrelated drafts remain. Existing routes, layout and explicit save/review/compile/export actions remain. + +**Technical:** buttons carry capability plus revision IDs; the handoff requires membership in the current validated composition receipt and uses the existing `open_capability` command. Skills open gains an optional caller guard and a Boolean completion result, preserving existing default callers. Guard checks before dispatch and retention supplement existing request/workspace generation checks. Receipt invalidation, navigation and Lock cannot retain late content or trigger result navigation. Focus uses a matching selected capability, revision and viewed revision. This is UI orchestration; native Rust remains responsible for saved-reference validation and transactions. + +**Validation:** `node --test tests/skills-model.test.mjs tests/composition-view.test.mjs tests/composition-skill-handoff.test.mjs`: **55 passed**. `npm run build:check`: syntax, visual/vision contracts and **646 JavaScript tests passed**. Coverage includes advanced current head versus exact historical result, draft preservation, invalid/missing/substituted references, native failure, late route/receipt/Lock replies, pre-dispatch reentry, repeated/disposed clicks and exact focus selection. One initial new view assertion failed because its fixture lacked a saved draft; the fixture was corrected and all focused/full checks rerun. `node scripts/validate-review.mjs` passed (640 authored text files, 8 image hashes); intent/plan/visual-spec shapes, six incremental links/anchors, whitespace and exact prior-work/new-path preservation passed. + +**Independent review:** fresh read-only `gpt_reviewer` returned **PASS, no actionable P1/P2/P3**, independently reran all 55 focused tests and verified exact patch membership/reverse integrity. Installed OpenAI role configuration pins `gpt-5.6-terra` at xhigh; its serving identifier is not exposed. Producer: root/Codex, OpenAI `gpt-6.1-sol` per active session configuration. Root owns final integration judgment. No GLM invocation was needed. Source review does not qualify rendered/native operation. + +**Security/standards impact:** no new native permission, persistence/schema, key/credential handling, dependency or network/build privilege. Saved local content crosses only existing native read and renderer lifecycle boundaries. Guard/identity tests contribute secure-development evidence; no ISO/OpenSSF, OS or release qualification is claimed. No normal files/keys/vault, engine/provider/cloud/remote operation, LNSAT/VUSL edit or dependency fetch occurred. + +**Open gates:** no computer-use UI controller is exposed. Actual keyboard/pointer, viewport/theme/reduced-motion rendering and the disposable encrypted native end-to-end journey remain **unassessed**. NEXT-02 source continuity is improved; the full visual/native packet is not complete. Windows/Proxmox remains deferred. No commit/push/merge/deploy or release. + +## NEXT-02a saved-revision Compose handoff — November 1, 2026 + +Authority: Jeff's next-phase “proceed”; [accepted intent](intent.md#next-02a-saved-revision-compose-handoff--november-1-2026) owns the thirteen-path packet. Baseline: branch `codex/native-workflow-qualification-20261030`, HEAD `929873aa18521bebab911b410cf4705542b85b80`; sixteen existing dirty paths preserved. Exact preimages and task delta: `/rangoon-compose-continuity-20261101`. + +**Experience:** Skills adds **Add to Compose** beside Compile. The selected saved revision is read through the existing native command before navigation to Compose. Historical selections stay exact; other skill drafts and selected Compose inputs remain. An open Compose draft, busy operation, duplicate pin or full sixteen-input selection offers a reason and a link to continue existing work. Existing styles, route, heading focus and explicit draft/preview/save steps remain. No graphics or layout rewrite is included. + +**Technical:** reuse saved-revision eligibility and `open_capability`; guard before dispatch and before retaining a reply. Route, selected-skill/revision, edits, conflict, busy state and workspace Lock invalidate stale handoffs. Cancellation releases only the initiating operation's pending state; Lock generation checks prevent content resurrection. The renderer provides navigation hints; Rust still resolves stored references and validates composition preview/commit transactions. No authoritative saveability, provider permission or execution is added. + +**Source validation:** focused `node --test tests/skills-view.test.mjs tests/composition-model.test.mjs tests/composition-view.test.mjs tests/skill-compile-handoff.test.mjs`: **68 passed**. `npm run build:check`: syntax, visual/vision contracts and **636 JavaScript tests passed**. New cases cover exact historical reads, prior inputs, same/unrelated drafts, draft/capacity/duplicate/unavailable/busy gates, malformed/substituted/failed replies, stale route/selection/edit/Lock and reentrant cancellation. `node scripts/validate-review.mjs` passed (638 authored text files, 8 image hashes); intent/plan/visual-spec artifact validation, six incremental links/anchors, whitespace, exact outside-owned dirty-file hashes and untracked preservation passed. A shell summary initially used zsh's reserved `status` variable after tests finished; the test log independently reports all 68 passing. No source failure was hidden by that wrapper error. + +**Independent review:** fresh read-only `gpt_reviewer` returned **PASS, no actionable P1/P2/P3** and independently reran the 68 focused tests. Installed OpenAI role configuration pins `gpt-5.6-terra` at xhigh; the serving model identifier is not exposed. Producer: root/Codex, OpenAI `gpt-6.1-sol` per active session configuration. Root retains integration judgment. Source review does not close the rendered/native gate. No GLM invocation was needed for this bounded packet. + +**Security/standards impact:** no new data category, dependency, native permission, database/schema, filesystem access, credential, network or build privilege. Saved content remains within the existing local workspace and renderer lifecycle; plaintext export and host-compromise limitations are unchanged. Exact identity/Lock tests support existing secure-development evidence; they establish no ISO/OpenSSF certification, maturity or release qualification. + +**Open gates:** actual keyboard/pointer, viewport/theme/reduced-motion and native encrypted workflow checks remain **unassessed**: no UI controller is exposed in this session. Source tests do not prove rendered behavior or native personal-data safety. Matching composition-result focus is a later NEXT-02 subpacket. NEXT-01 native qualification remains first before normal files/keys. No normal data/keys/vault, provider/cloud/remote operation, LNSAT/VUSL change, dependency fetch, commit/push/merge/deploy or release occurred. + +## Direction reconciliation — November 1, 2026 + +Authority: Jeff requests canonical drafting/development updates and preparation of the next phases after the reviewed workflow/enterprise direction. The [accepted intent](intent.md#direction-reconciliation-and-next-phase-preparation--november-1-2026) names exactly eleven documents. Root owns architecture/security/integration; a bounded documentation worker owns product experience and visual-system prose. Baseline: `codex/native-workflow-qualification-20261030`, HEAD `929873aa18521bebab911b410cf4705542b85b80`, with nine pre-existing NQ-1 authored changes preserved. Preimages, exact task delta and validation/preservation receipts live at `/rangoon-doc-direction-20261101`. + +**Experience:** project/target task continuity, original library/work area/inspector hierarchy, radials/bars, local logos/icons and refined abstract artwork remain linked acceptance requirements. The docs define truthful metric partitions, table/graph drill-down, credential references, scoped bulk review and complete real/empty/stale/partial/denied/error/recovery states. Required dark/light/narrow checks remain, with representative desktop/4K logical-scale profiles. These are mechanics and proposed acceptance, not a rendered implementation claim. + +**Technical:** canonical architecture now states source/projection identity, tenant/actor scope across all copies, authoritative cell assignment/epochs, target-qualified fence/CAS/idempotency or explicit weaker coverage, unknown-effect reconciliation, old-worker/credential migration limits, and coordinated recovery. Local versus hosted keys and provider credentials remain separate. Cloud KMS/BYOK/federation, shared tenant services, remote peers, dispatcher and scale remain unimplemented. Existing VUSL ownership, independent authority engines, two-qualified-adapter SDK gate and local release path are preserved. The [ordered packet queue](plan.md#next-phase-packets--november-1-2026) gives owners, candidate source boundaries and validators without accepting those implementations. + +**Security and standards impact:** no new data collection, credential/key operation, runtime authority, dependency, schema, asset or build privilege. The update clarifies proposed identity/storage/evidence/key lifecycle controls under existing ISO/OpenSSF development requirements; it adds no certification, maturity, throughput or platform-support claim and changes no standards pin. Internal strategic reasoning and private review paths are not published as product claims. Native, cloud, provider, normal-data and release gates remain separate. + +**Validation:** document/reference checks pass over 638 authored text files and eight image hashes; all 45 new/changed local links and heading anchors pass. Intent, plan and visual-spec artifact validators and whitespace pass. Exact outside-owned diff and untracked-path preservation pass against task preimages. Initial independent review identified a candidate-scope gap; the plan now lists verified existing paths, explicitly proposed new files and named validators for all eight packets. Fresh independent read-only recheck returns PASS with no actionable P1/P2/P3 findings. It verifies all eleven document postimages, 50 unique existing candidate paths, 18 explicitly absent/proposed paths, clean whitespace and the preserved five outside-owned NQ-1 files. Producer: OpenAI GPT-6.1 Sol; documentation worker: `gpt_docs`, configured OpenAI GPT-5.6 Luna; reviewer: `gpt_reviewer`, configured OpenAI GPT-5.6 Terra (worker/reviewer serving IDs are not exposed). Final metadata/reference/preservation checks close this documentation task; they do not qualify any future source packet. No source/runtime/rendered/load tests are run by this docs-only packet; earlier NQ-1 counts below remain dated evidence, not revalidation. No commit/push/merge/deploy/release or external operation. +## NQ-1 disposable folder qualification preparation — October 30, 2026 + +Authority: Jeff asks to keep working on the next local application phases while postponing Windows/Proxmox testing until the new host is ready. Root owns the exact nine paths named in [intent](intent.md#nq-1-disposable-folder-qualification-preparation--october-30-2026). Baseline is published main `929873aa18521bebab911b410cf4705542b85b80` on isolated branch `codex/native-workflow-qualification-20261030`; the original dirty application and website worktrees are outside this packet. + +**Experience:** the isolated test artifact can now reach the same explicit folder-metadata and multi-file inspection pickers as the existing local workbench. The [manual checklist](reviewer-guide.md#disposable-native-workflow-checklist) separates metadata browsing, explicit content selection, saved revisions and exported files. It requires cancellation, Lock-purge, restart and recovery observations before personal-use qualification. Product layout and normal command behavior are unchanged. + +**Technical:** the exact-match Rust/config permission pair gains only the two existing read-only picker grants. Disposable manifest `rangoon.e1c4.run.v3` adds a fixed `folderFixture` directory identity; native validation rechecks it with all existing case roots. Parent artifact metadata records the fixture's exact no-follow directory/file identities, byte lengths and SHA-256 values. Before and after each phase the runner verifies private permissions, entry sets, retained-handle identity and fixed content, refusing links, hardlinks, nonregular entries, replacements and mutations. The output includes fixture location and a separate `folderFixtureVerified` result; `folderUiVerdict` remains unassessed. A fresh artifact/run is mandatory. The unchanged 46-case plan and product persistence/schema/contracts retain their behavior. + +**Security and standards impact:** only literal synthetic Markdown and ignored test files are created in the nonce-scoped private run. No input file text enters receipts; only fixed names, identities, lengths and hashes do. This prepares reproducible validation evidence under existing ISO/OpenSSF development requirements; it establishes no compliance, encryption qualification or authorization. SHA-256 fixture checks detect changed test inputs and do not authenticate a hostile host. No dependency, product permission, provider, credential or execution boundary changes. Real OS custody and GUI observations remain separate. Normal data/keys/vault, live systems, LNSAT/VUSL edits, dependency fetches and publication/release stay closed. + +**Validation:** pinned Rust 1.99.1 passes four qualification-feature unit tests and builds the actual custom native target offline without launching it. The default desktop checker passes formatting, 739 tests (including one isolated child; four ignored), all-target warnings-denied Clippy and build. JavaScript syntax/vision/visual checks and all 628 tests pass, as do documentation, intent and whitespace checks. Python validation passes 50 focused harness tests and all 114 harness tests, including real parent init/manifest generation and mocked-child runner preflight/postphase/receipt checks. Independent review identified stale validation wording (P2) and missing runner-level coverage (P3); both are corrected, and fresh independent read-only review returns PASS with no actionable P1/P2/P3 findings. The custom qualification target retains non-fatal unused test-helper warnings; default desktop Clippy remains clean. Logs and review evidence are local at `/rangoon-nq1-20261030`. No native GUI was launched. Fresh CUA startup fails on the configured symlinked writable root before any app opens. A passing source/build result must not clear that native qualification gap. + ## Full application source publication — October 29, 2026 ### Windows lint completion during PR 55 diff --git a/docs/encrypted-workspace.md b/docs/encrypted-workspace.md index 4e8b4e4..61bcb50 100644 --- a/docs/encrypted-workspace.md +++ b/docs/encrypted-workspace.md @@ -5,6 +5,20 @@ Authority: the accepted local-first V1 objective and Jeff's October 7 request to Current source checkpoint: E1d-2 below adds native encrypted recovery to the accepted E1c-5c native/renderer path. The latter is now mounted with the existing encrypted feature selected by default and no Legacy fallback in an explicit no-backend build. [The mounting receipt](development.md#e1c-5c-encrypted-default-native-and-renderer-mounting--october-19-2026) owns exact source, tests, independent review and remaining native/platform qualification. Earlier proposed/unmounted descriptions below preserve their design baseline; they do not establish current release or normal-data migration status. +## Enterprise key and credential lifecycle — November 1, 2026 + +Status: planning direction only. Current local workspace/provider-secret custody and dated recovery evidence below retain their exact limits; no hosted tenant KMS, BYOK, federation, escrow, rotation service or distributed anti-rollback implementation is added. [Enterprise architecture](application-architecture.md#enterprise-operation-and-custody-boundaries--november-1-2026) owns deployment/identity context, and [adapter profiles](provider-interoperability.md#enterprise-adapter-and-credential-profiles--november-1-2026) own provider-specific semantics. Cloud custody must never become an implicit fallback key or mandatory unlock dependency for a local workspace. + +Separate local database keys, hosted data-encryption keys (DEKs), wrapping keys (KEKs), workload/device/signing identities, provider secrets and recovery material. A future hosted profile uses vetted encryption with scoped DEKs and an explicitly selected KMS/HSM/secret custodian, preserving ciphertext, wrapped key and immutable provider/key-version/region references and required authenticated context. Nonsecret context can still be sensitive or logged; use appropriately classified opaque IDs, never secrets or instruction content. Ordinary workbench views/plugins receive references rather than keys; an explicitly bounded secret-entry surface retains its own custody. Authorized decrypting processes necessarily handle plaintext, so BYOK/CMEK is not provider-blind processing. A client-only/self-hosted privacy profile has different search/support limitations. + +Rotation does not automatically re-encrypt old objects or retire their keys. Track dependencies across backups, journals, indexes, replicas and in-flight jobs; distinguish rewrap, DEK replacement and content re-encryption. Require a fresh restore rehearsal before retiring a needed version. Destruction requires appropriate separated duties, retention/legal-hold checks, pending/delay state and audit; retained copies, exports, cached DEKs and plaintext already delivered limit crypto-erasure claims. Never regenerate a lost key to conceal failed recovery. + +KMS/vault disable, outage, throttling, unavailable history and wrong context are explicit failure states. DEK/token caches need tenant/scope binding, bounded lifetime, purge/renewal and documented revocation limits; no indefinite extension or plaintext/cross-region fallback. IdP deprovisioning, session revocation, provider permission change and issued-token expiry are distinct. Close new Rangoon admission when known required authority is unavailable; provider-effective revocation can lag and must be verified or shown unknown. Cell/tenant moves must account for old valid credentials, cache access and already accepted effects; see the architecture's ownership transition rather than infer safety from TTL alone. + +Before any enterprise key profile, test wrong tenant/context/key/version, partial rotation, old-backup restore, key loss/disable, cache hot/cold, provider denial/throttle, retention/destruction conflicts and coordinated disaster restore with dispatch paused. Encryption/confidentiality alone does not prove freshness, complete deletion, authorization or protection from a compromised unlocked host. This direction preserves existing crypto dependencies and standards pins; new key/secret providers need separately reviewed source and disposable operational qualification. + +Design references checked November 1, 2026: [NIST SP 800-57 Part 1 Rev. 5](https://csrc.nist.gov/pubs/sp/800/57/pt1/r5/final) for key lifecycle, [AWS IAM guidance](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) for temporary workload credentials, [RFC 9700](https://www.rfc-editor.org/info/rfc9700/) for audience/credential defenses, [Google Cloud rotation](https://docs.cloud.google.com/kms/docs/key-rotation) for historical-key dependencies and [Azure managed identity guidance](https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/managed-identity-best-practice-recommendations) for permission-cache delays. These references inform proposed provider profiles and do not change the repository's standards pins, supported integrations or compliance status. + ## E1d-2 native SQLCipher recovery copy — October 25, 2026 Status: implemented source and selected disposable macOS native recovery evidence recorded under Jeff's explicit request. The [development receipt](development.md#e1d-2-native-encrypted-recovery--october-25-2026) owns validators and independent-review status. Dependency promotion is resolved by reusing the existing pinned SQLCipher backend. The unpublished age experiment is now standalone historical source outside active builds. No compatibility reader/converter is promised for it. No new cipher, KDF, helper process or runtime crypto dependency is introduced. diff --git a/docs/intent.md b/docs/intent.md index 93d1e75..2df1d1b 100644 --- a/docs/intent.md +++ b/docs/intent.md @@ -4,8 +4,54 @@ Status: accepted Authority: Jeff's dated explicit directions and the source-publication scope below; native operation and release retain their separate gates Owner: Jeff -Accepted by: Jeff; October 29 full application source publication to GitHub main only -Last updated: 2026-10-29 +Accepted by: Jeff; November 1 documentation reconciliation and next-phase preparation; earlier publication authority remains scoped below +Last updated: 2026-11-01 +## Source commit and branch push — November 1, 2026 + +Status: accepted publication task. Authority: Jeff explicitly requests “commit and push” after NEXT-02b. Root owns the exact twenty-nine pending authored paths listed in the publication receipt, including README/current records, NQ-1 native test-harness preparation, reconciled direction docs and NEXT-02a/NEXT-02b source/tests. This supersedes those packets’ publication holds for this aggregate delta only. Original application/website worktrees remain untouched. + +Commit the reviewed source snapshot on `codex/native-workflow-qualification-20261030` and push that branch to `hypler-dev/rangoon` without force. Main/base is `929873aa18521bebab911b410cf4705542b85b80`; fetched main matches the source base. README must substantively describe the final source scope and remaining qualification gaps. No merge, desktop package/release, website deployment, live provider/remote/cloud operation, normal user data/keys/vault, LNSAT/VUSL edit or dependency fetch is authorized. Native/rendered and deferred Windows gates remain unchanged. + +Acceptance: exact packet postimage reconciliation; latest matching source-test evidence; document/intent/whitespace/path checks; a fresh independent read-only review of the aggregate publication diff; exact staged path/tree verification before commit; push and remote advertised-ref readback. Reuse unchanged pinned Rust/native and latest JavaScript evidence where postimages match, distinguishing source qualification from GUI operation. [Publication receipt](development.md#source-branch-publication--november-1-2026) owns scope, validation and remaining gates; local evidence retains terminal commit/push identity. + +## NEXT-02b exact saved-result continuation — November 1, 2026 + +Status: accepted bounded source continuation. Authority: Jeff says “proceed” after NEXT-02a source completion. Root owns exactly `preview/{analyze,composition-view,skills-model}.mjs`, new `preview/composition-skill-handoff.mjs`, `tests/{composition-view,skills-model}.test.mjs`, new `tests/composition-skill-handoff.test.mjs`, `README.md` and `docs/{intent,plan,continue,development,product-experience}.md`. Preserve all prior native, direction and NEXT-02a work. Reuse the intent-driven-delivery workflow and existing local native read; no new contract or engine behavior. + +A saved composition result carries capability plus exact revision identity into Skills. Validate membership in the current saved receipt, then validate native readback before navigation and matching editor focus. Missing/malformed/substituted results or read failures keep the user in Compose with a bounded explanation. Same-skill unsaved edits block continuation; unrelated drafts remain. Recheck result identity, route, dirty state and workspace generation before retaining replies. Busy/pending/disposed/Lock and repeated click paths cannot replace a selection, navigate or retain late content. Navigation never saves, reviews, exports or executes. Existing routes, shell and styles remain. + +Acceptance: focused Skills model, composition view and new handoff tests (exact current/history pins, unrelated/same-skill drafts, failed/substituted/malformed results, receipt invalidation, route/Lock/reentrant cancellation, repeated/disposed clicks and exact focus targeting); full `npm run build:check`; document/intent/whitespace and prior-work preservation; fresh independent read-only review. Actual keyboard/pointer, reduced-motion and 320/768/1440 dark/light rendering plus native encrypted workflow remain required and unassessed while no UI controller is exposed. No native command/permission, storage/schema, provider/engine or dependency change; no normal files/keys/vault, network/cloud/remote operation, LNSAT/VUSL edit, publication or release. + +## NEXT-02a saved-revision Compose handoff — November 1, 2026 + +Status: accepted bounded source task. Authority: Jeff says “proceed” after the next-phase documentation. Root owns exactly `preview/{analyze,skills-view,composition-model,skill-compile-handoff}.mjs`, `tests/{skills-view,composition-model,skill-compile-handoff}.test.mjs`, `README.md`, and `docs/{intent,plan,continue,development,product-experience}.md`. Preserve all prior native qualification and direction-documentation changes. + +Add a Skills action that opens the selected saved revision in the existing Compose (merge) workbench through `open_capability`. Reuse saved-revision eligibility. Historical selections remain exact; unsaved same-skill edits block handoff. Retain other drafts and pinned inputs. An open Compose draft, duplicate pin, pending operation, unavailable bridge or full input list blocks adding without resetting work. Navigate only after a validated exact native read; selection, navigation and Lock changes invalidate late results before destination mutation. No latest-revision fallback, automatic draft creation, preview, save, review, export or execution. + +This subpacket does not include matching composition-result focus, new graphics, native commands, storage/schema, provider/engine changes or external-file actions. Acceptance: focused handoff/model/view tests covering exact current/history pins, draft preservation, unavailable/full/duplicate states, failures and stale/Lock/reentrant responses; full `npm run build:check`; documentation/intent/whitespace and outside-scope preservation; fresh independent read-only review. Actual keyboard/pointer and 320/768/1440 dark/light rendered checks remain required and explicitly unassessed if the UI controller is unavailable. Source completion does not qualify native use or normal user data. No normal files/keys/vault, provider/remote/cloud calls, dependency fetch, LNSAT/VUSL edits, publication or release. + +## Direction reconciliation and next-phase preparation — November 1, 2026 + +Status: accepted documentation and planning task. Authority: Jeff requests updating drafting/development documents after the reviewed local/remote/enterprise direction, and explicitly requires the original radials, bars, icons, logos and finished professional visual character. This accepts canonical documentation reconciliation and preparation of bounded packets, not implementation of every proposed service, source packet or cloud operation. + +Root owns exactly `README.md` and `docs/{intent,plan,continue,development,application-architecture,product-experience,visual-system,provider-interoperability,encrypted-workspace,operations-control-plane}.md`. The documentation worker owns only `product-experience.md` and `visual-system.md`; root owns architecture, security, integration and remaining records. Preserve the existing nine-file NQ-1 change set, including its source/test/configuration bytes and reviewer guide; retain historical receipts. Add mechanics and accurate gates without publishing private strategic reasoning or creating competing canonical contracts. + +Accepted planning direction: preserve the local-first Rust core, native custody/transactions, original bytes and immutable revisions. Improve project/target task continuity and complete visual states. Syntax/semantic projections and indexes remain versioned derived data. Future UI/CLI/service adapters reuse typed application use cases; authenticated peer/actor scope and target-side checks remain separate from translation, classification, local review and provider decisions. Enterprise planning includes tenant isolation, authoritative target/cell assignment, qualified effect ownership, scoped credential/key lifecycles, recovery and explicit workload envelopes. VUSL and LNSAT remain independent; Rangoon does not define a replacement VUSL contract or another engine's cluster semantics. + +[Architecture](application-architecture.md#enterprise-operation-and-custody-boundaries--november-1-2026), [experience](product-experience.md), [visual system](visual-system.md), [key custody](encrypted-workspace.md#enterprise-key-and-credential-lifecycle--november-1-2026) and [next packets](plan.md#next-phase-packets--november-1-2026) own their respective mechanics. Packet status remains proposed until its exact scope/ownership/validators and applicable native/external authority are accepted. The existing personal-use and three-OS release path remains; enterprise scope is not a prerequisite for useful local delivery. Windows/Proxmox testing is deferred until the upgraded lab host is ready, with Windows custody/startup/recovery implementation still required. + +Acceptance: document/reference/anchor checks, intent/spec/plan artifact validation, exact outside-scope/preimage preservation, whitespace and fresh independent read-only review. Source/runtime/rendered/load tests are not rerun or claimed by this docs-only packet. No source, schema, dependency, asset, CI/AGENTS policy or standards-pin change; no normal data/keys/vault, cloud/provider/remote operation, LNSAT/VUSL edit, commit/push/merge/deploy or release. The [development receipt](development.md#direction-reconciliation--november-1-2026) owns actual validation and unresolved gates. + +## NQ-1 disposable folder qualification preparation — October 30, 2026 + +Authority: Jeff asks to continue the next local application phases after deferring Windows testing until the upgraded Proxmox host is ready. This bounded task prepares the already accepted BF-2c native picker/Lock rehearsal. It does not accept normal personal data or expand provider, engine or release scope. + +Root owns exactly `scripts/qualify-native-encrypted.py`, `tests/qualify_native_encrypted_test.py`, `apps/desktop/src/native_encrypted_qualification.rs`, `apps/desktop/native-encrypted-qualification/tauri.conf.json`, `README.md`, and `docs/{intent,continue,development,reviewer-guide}.md`. Add the existing folder-metadata and explicit multi-file inspection grants to both isolated permission lists. Create a fixed synthetic folder in each new nonce run; bind its directory identity in a new disposable manifest version and its exact file/directory inventory in the artifact record. Refuse changed contents, replaced entries, links or unexpected children before/after a phase. Old disposable runs must be recreated; this is not a product storage or compatibility change. + +Reuse the current native commands and case plan. Keep metadata browsing separate from file inspection and save. Record fixture integrity separately from manual UI observations; a valid fixture or clean process exit never proves folder selection, Lock purge or the complete workflow. Native GUI proof requires a fresh artifact and exclusive, working UI control. Current Codex UI startup is blocked by the configured symlinked writable root; do not change Codex configuration or start a vault-backed GUI without a reliable controller. + +Acceptance: focused Python harness tests including fixture mutation/replacement/link/unexpected-child negatives, pinned Rust formatting and native qualification-target compilation/tests, existing desktop source checks as affected, document/intent/whitespace checks, and fresh independent read-only review. Retain the existing timeout, event/output bounds, isolated credentials and exact cleanup. Windows/Proxmox work remains deferred; normal data/keys/vault, real providers/remote systems, LNSAT/VUSL changes, dependency fetches and publication/release remain outside this task. The development ledger owns actual results and the reviewer guide owns the manual workflow checklist. + ## Full application source publication — October 29, 2026 Status: accepted. Authority: Jeff requested “push and deploy,” clarified “Update GitHub main only,” then expanded the scope to “we should push all of it.” This accepts publication of the complete authored Rangoon application snapshot, not only CW-1. It supersedes earlier packet-level publication holds for this snapshot; their implementation, native-operation and release limits remain historical and current evidence where applicable. diff --git a/docs/operations-control-plane.md b/docs/operations-control-plane.md index e9de96b..2d4b053 100644 --- a/docs/operations-control-plane.md +++ b/docs/operations-control-plane.md @@ -4,6 +4,18 @@ Authority: Jeff's accepted October 7 continuation in [intent.md](intent.md). Can Status: accepted product direction and proposed implementation contract. This document adds no runtime approvals, grants, policy evaluator, telemetry ingestion, live subscriptions, execution adapter or authority engine. Current `rangoon-engine` remains unavailable. The W3 editor authors inert definitions and checkpoints; its saved `validated` intent is structural inspection, not an execution approval. +## Enterprise operator and visual state — November 1, 2026 + +Planning refinement, not mounted service behavior. Reuse the [enterprise ownership contract](application-architecture.md#enterprise-operation-and-custody-boundaries--november-1-2026), [product experience](product-experience.md), [visual system](visual-system.md) and existing lifecycle/coverage records below. The original command-center character remains: compact metric strip, radials/bars, system logos/icons, table/work area and inspector. Finish success and loading/empty/stale/partial/denied/error/unknown/recovery views together; data provenance and functional tests remain necessary. + +Keep organization/workspace context concise; expose project/environment/region/target at the action. Existing local routes do not pretend to have a mounted fleet. A draft retains its original scope/revision when context changes; pending action eligibility and late results are fenced, while unrelated work is preserved. Systems tables, topology, charts, approvals and exports share the same authorized scope and selected target. Simple/Advanced changes density, never permission. Autocomplete, aggregates and support views must not leak protected names/counts. + +Bulk review freezes exact target IDs/incarnations, membership/exclusions, expected prior state, artifact, adapter/policy versions, evidence freshness and expiry. Filters or autoscaling do not silently add targets after approval. Show requester, distinct approver/delegation duties and remaining stages without making approval equivalent to target authorization. Compare desired/installed/effective revisions independently; a receipt/ACK or green connection is not effective configuration. Promotion requires qualified fresh readback and a denominator; partial/unknown targets stay visible. Rollback is a new explicit operation with its own failure/authorization limits. + +Metric cards carry label, exact units/counts, scope, source/watermark and state. Radial segments form declared disjoint buckets; unknown is not a green remainder. Bars show outcomes, latency/window/sample treatment, queue pressure or actual/reserved/estimated/unknown cost with a numeric/table alternative. Drill-down opens the same filtered table/inspector. Credentials/keys show reference, owner, allowed operation, expiry, verification and rotation/recovery state, never ordinary secret values. Packaged LNSAT/VUSL/provider logos identify modules without granting support or authority. No fake progress, compliance percentage or animated traffic is introduced by this direction. + +Before service/fleet claims, qualify actor/tenant/scope changes, target-set drift, revoked/expired delegates, old-cell callbacks, stale/wrong-profile observations, unreachable hosts, queue pressure and uncertain effects. Emergency requests require incident/target/time/scope binding and the applicable provider controls; they are not bypass switches. Source/static charts and synthetic events do not prove those native/remote outcomes. + ## Product outcome An operator can answer who requested an action, what exact action and resources were covered, which rules and versions applied, who could approve, who approved or denied, which authority issued a bounded authorization, where enforcement occurred and what outcome evidence exists. Each answer retains its source, time and verification state. Missing evidence and unknown effects remain visible. These are essential free-product safety and inspection surfaces; enterprise hosting adds organizational administration and scale rather than permission bypasses. diff --git a/docs/plan.md b/docs/plan.md index def8625..dad655b 100644 --- a/docs/plan.md +++ b/docs/plan.md @@ -4,9 +4,54 @@ Status: proposed Authority: [intent.md](intent.md), including accepted provider-independent, internal operations-first and personal-completion continuations Owner: Jeff -Last updated: 2026-10-25 +Last updated: 2026-11-01 +## Next-phase packets — November 1, 2026 + +Authority: [accepted documentation/planning direction](intent.md#direction-reconciliation-and-next-phase-preparation--november-1-2026). The table is the current preparation queue and supersedes earlier statements of the immediate next task; it preserves their historical scope and completed evidence. These are proposed implementation/qualification packets, not blanket source, native or external-operation acceptance. Freeze each final file list, interfaces, preimages, rollback and named validators before implementation. Reuse existing application, parser, store, history, coverage and SDK records rather than duplicate them. + +| Order / packet | Outcome and initial ownership | Acceptance before advancing | +| --- | --- | --- | +| NEXT-01 — native local journey | Root owns validation of the existing isolated target: `scripts/qualify-native-encrypted.py`, its Python tests, `apps/desktop/src/native_encrypted_qualification.rs` and isolated Tauri configuration. NQ-1 preparation is implemented; this packet supplies actual artifact-bound picker/Lock and source → skill → compose → compile/export → restart/recovery evidence. | Restore reliable exclusive UI control first; create a fresh v3 run, select only synthetic fixtures, prove cancel/late-result purge and recovery into a fresh encrypted workspace. Use the [manual checklist](reviewer-guide.md#disposable-native-workflow-checklist). Source tests/fixture integrity do not count as native proof. Defects need a separately bounded correction; normal data remains closed. | +| NEXT-02 — connected, finished local task | Root owns exact revision/source context and integration; one UI writer may own the accepted subset of `preview/{analyze,skills-view,composition-model,composition-view}.mjs` and their existing tests. Carry a saved skill into Compose as precisely as Compile; focus the matching saved result only after successful native read; preserve drafts, context and failures. | Tests: `tests/{skills-model,skills-view,composition-model,composition-view,compilation-model,compilation-view}.test.mjs`; full `npm run build:check`; actual keyboard/pointer/draft/conflict/Lock/late-result views in dark/light. Retain existing routes and native commands. Refine real local metrics/controls and complete empty/error/recovery states; enterprise charts need real sources before live claims. | +| NEXT-03 — retained folder-row inspection | Root owns file/IPC/lifecycle design; candidate modules are `crates/rangoon-host/src/source_inventory.rs`, native `source_collection`/`workspace_source_access`, registration/capability files and Agent files model/view tests. Freeze exact files and opaque reference contract before source. | Explicit content-inspection admission separate from metadata; no renderer path reopening. Root/file replacement, symlink/reparse, stale session, expiry, Lock/drain/cancel and bounded paging tests; pinned host/desktop checks and fresh disposable native proof. Unsupported OS/path profiles remain explicit. | +| NEXT-04 — reversible project-file changes | Root owns AR-3/AR-4 native selected-target custody, encrypted original capture, retained preview, explicit Apply/Restore, readback and durable reconciliation. Reuse [instruction change history](target-loader-qualification.md#instruction-change-archive-and-restore--october-25-2026) and existing store history/recovery. | Exact target/precondition, absent versus empty, concurrent edits, archive/key mismatch, crashes before/after possible effect and fresh-process recovery. Unknown effect cannot be blindly retried. Workspace-record history alone is not project-file undo. Freeze exact native/store/UI files in the source packet. | +| NEXT-05 — one target-loading proof | Root owns one artifact/version-pinned target adapter and disposable task. Reuse compilation/export/inspection and [target qualification](target-loader-qualification.md). | Demonstrate actual loaded/effective instructions, overrides/includes and loss report. Keep byte identity, loaded context, behavioral adherence and enforcement distinct. Installing/running a target, provider/model requests and credentials require their own explicit accepted test scope. | +| NEXT-06 — practical bulk organization | Root owns encrypted project/root catalog and versioned parser/projection/index contracts; bounded workers may own UI/fixtures after acceptance. Keep original bytes authoritative, current parser behavior compatible, indexes rebuildable and native revision lineage exact. | Incremental invalidation by source plus importer/profile/config version; rename/delete/case/Unicode/stale-finding handling; scoped search/tags and complete migration/backup/restore. Benchmark at least 1,000 metadata rows with exact limits. Evaluate a parser replacement only against compatibility/corpus/performance evidence; do not raise archive caps alone. | +| NEXT-07 — one authenticated read-only peer | Root owns RM-2 transport, enrollment, device plus actor identity, host-selected roots, grants and credential custody; one reviewed built-in adapter first. The lab/OS backend must be ready and qualified for its scope. | Two disposable installations, independently verified identities, metadata versus content consent, opaque host references, expiry/revocation/drain, reconnect/freshness/gaps, hostile reports, path profiles and bounded resource/egress tests. Offline RM-1 labels are not live grants. Remote writes remain closed. | +| NEXT-08 — single-region enterprise control | Root owns tenant/application context, current target/cell assignment, durable command/outbox/attempt semantics, effect-side support classes, key/credential lifecycle and operator scope. Prepare separate source packets for one tenant/service, one identity/KMS profile and one qualified effect adapter. | Prove tenant isolation across storage/cache/index/queue/keys; target fence/CAS or explicit weaker coverage; old-worker/credential quiescence; unknown-effect reconciliation; scoped renewal, key rotation/old-backup restore, DR with paused dispatch and overload fairness. Regional cells follow measured load/residency; global active-active effects remain deferred. Public SDK/registry requires two real independently qualified adapters. | + +**NEXT-02a status — November 1:** exact saved-revision Skills → Compose source handoff implemented and source-tested; [receipt](development.md#next-02a-saved-revision-compose-handoff--november-1-2026). Preserves existing drafts/inputs and rejects stale replies before retention. Rendered/native qualification remains open; matching composition-result focus and broader visual refinement remain later subpackets. The umbrella NEXT-02 is not complete. + +**NEXT-02b status — November 1:** saved composition outputs now carry exact revision identity into Skills through native readback, with matching editor-focus selection, draft preservation and stale-result guards. [Receipt](development.md#next-02b-exact-saved-result-continuation--november-1-2026). Source tests pass; actual rendered and encrypted native qualification remain open. NEXT-02 is not fully qualified. + +### Candidate files and named validators + +These paths are a preparation manifest, not a permitted write list. Existing paths were checked during this docs task; **new candidate** paths do not exist and their placement/names remain subject to the accepted source subpacket. Any required workspace/manifests, registration, schema, capability or dependency changes must be named in that final packet. Later umbrella rows must split into small independently reviewed slices. Test commands for new files/packages are proposed and are not runnable until those accepted files exist. Set the pinned toolchain and `CARGO_NET_OFFLINE=true` for Rust commands. + +**NEXT-01** — Existing candidates: `scripts/qualify-native-encrypted.py`, `tests/qualify_native_encrypted_test.py`, `apps/desktop/src/native_encrypted_qualification.rs`, `apps/desktop/native-encrypted-qualification/tauri.conf.json`. **New candidates:** None currently proposed.. Named validation: `python3 -m unittest tests/qualify_native_encrypted_test.py`; pinned offline custom native target build plus the named disposable phases; actual GUI checklist, not only source assertions. + +**NEXT-02** — Existing candidates: `preview/analyze.mjs`, `preview/skills-view.mjs`, `preview/composition-model.mjs`, `preview/composition-view.mjs`, `preview/skill-compile-handoff.mjs`, `tests/skills-view.test.mjs`, `tests/composition-model.test.mjs`, `tests/composition-view.test.mjs`, `tests/skill-compile-handoff.test.mjs`. **New candidates:** None currently proposed.. Named validation: `node --test tests/skills-view.test.mjs tests/composition-model.test.mjs tests/composition-view.test.mjs tests/skill-compile-handoff.test.mjs`; `npm run build:check`; named rendered context/draft/focus/failure/Lock/viewport cases. + +**NEXT-03** — Existing candidates: `crates/rangoon-host/src/source_inventory.rs`, `crates/rangoon-host/src/lib.rs`, `apps/desktop/src/source_collection.rs`, `apps/desktop/src/workspace_source_access.rs`, `apps/desktop/src/workspace_source_access_tests.rs`, `apps/desktop/src/main.rs`, `apps/desktop/build.rs`, `apps/desktop/capabilities/source-analysis.json`, `preview/agent-files-model.mjs`, `preview/agent-files-view.mjs`, `tests/agent-files-model.test.mjs`, `tests/agent-files-view.test.mjs`. **New candidates:** None currently proposed.. Named validation: `cargo test -p rangoon-host --locked --offline`; `node --test tests/agent-files-model.test.mjs tests/agent-files-view.test.mjs`; pinned desktop checks and fresh native row/Lock/cancel/replacement rehearsal. Command/permission names freeze only with the source packet. + +**NEXT-04** — Existing candidates: `crates/rangoon-store/src/instruction_history.rs`, `crates/rangoon-store/src/instruction_history_tests.rs`, `crates/rangoon-store/src/instruction_history_backup.rs`, `apps/desktop/src/workspace_source_access.rs`, `apps/desktop/src/main.rs`, `apps/desktop/build.rs`, `apps/desktop/capabilities/source-analysis.json`. **New candidates:** `apps/desktop/src/instruction_changes.rs`, `apps/desktop/src/instruction_changes_tests.rs`, `preview/instruction-change-model.mjs`, `preview/instruction-change-view.mjs`, `tests/instruction-change.test.mjs`. Named validation: `cargo test -p rangoon-store --locked --offline`; proposed `node --test tests/instruction-change.test.mjs`; pinned desktop checks plus target replacement/conflict/crash/unknown-effect and fresh encrypted restore/readback phases. Split read-only target preparation from effect mounting; do not open every candidate file at once. + +**NEXT-05** — Existing candidates: `crates/rangoon-compile/src/bundle.rs`, `crates/rangoon-host/src/instructions.rs`, `apps/desktop/src/compilation_tests.rs`, `preview/compilation-model.mjs`, `tests/compilation-model.test.mjs`, `tests/compilation-view.test.mjs`, `docs/target-loader-qualification.md`. **New candidates:** `scripts/qualify-target-loader.py`, `tests/qualify_target_loader_test.py`. Named validation: `cargo test -p rangoon-compile -p rangoon-host --locked --offline`; `node --test tests/compilation-model.test.mjs tests/compilation-view.test.mjs`; proposed `python3 -m unittest tests/qualify_target_loader_test.py`; separately accepted installed-target/version loading and denial/readback cases. + +**NEXT-06** — Existing candidates: `crates/rangoon-domain/src/lib.rs`, `crates/rangoon-import/src/lib.rs`, `crates/rangoon-store/src/lib.rs`, `crates/rangoon-host/src/source_inventory.rs`, `preview/agent-files-model.mjs`, `preview/agent-files-view.mjs`, `tests/markdown-review.test.mjs`, `tests/agent-files-model.test.mjs`, `tests/agent-files-view.test.mjs`. **New candidates:** `crates/rangoon-store/src/project_catalog.rs`, `crates/rangoon-store/src/project_catalog_tests.rs`. Named validation: `cargo test -p rangoon-domain -p rangoon-import -p rangoon-host -p rangoon-store --locked --offline`; `node --test tests/markdown-review.test.mjs tests/agent-files-model.test.mjs tests/agent-files-view.test.mjs`; encrypted migration/recovery and >=1,000-row benchmark with stated limits. New parser dependency/backends require separate review. + +**NEXT-07** — Existing candidates: `preview/remote-inventory-model.mjs`, `tests/remote-inventory-model.test.mjs`, `tests/fixtures/remote-inventory.v1.json`, `crates/rangoon-host/src/source_inventory.rs`, `apps/desktop/src/workspace_source_access.rs`. **New candidates:** `crates/rangoon-peer/Cargo.toml`, `crates/rangoon-peer/src/lib.rs`, `crates/rangoon-peer/tests/read_only.rs`. Named validation: `node --test tests/remote-inventory-model.test.mjs`; proposed `cargo test -p rangoon-peer --locked --offline` after reviewed workspace registration; synthetic TLS/identity/grant/egress negatives before separately accepted two-installation lab tests. No credential/transport choice is implied by placeholder paths. + +**NEXT-08** — Existing candidates: `docs/application-architecture.md`, `docs/provider-interoperability.md`, `docs/encrypted-workspace.md`, `docs/operations-control-plane.md`, `crates/rangoon-ops/src/lib.rs`, `crates/rangoon-integrations/src/lib.rs`, `crates/rangoon-store/src/lib.rs`, `apps/desktop/src/workspace_source_access.rs`, `tests/operations-model.test.mjs`, `tests/operations-parity.test.mjs`. **New candidates:** `crates/rangoon-application/Cargo.toml`, `crates/rangoon-application/src/lib.rs`, `crates/rangoon-management/Cargo.toml`, `crates/rangoon-management/src/lib.rs`, `crates/rangoon-management/tests/tenant_ownership.rs`, `crates/rangoon-management/tests/key_lifecycle.rs`. Named validation: Proposed `cargo test -p rangoon-application -p rangoon-management --locked --offline` after accepted manifests; wrong-tenant/old-owner/outbox/replay/key-history/restore/throttle conformance plus real-backend durability and selected cloud-profile qualification. Reuse/extract existing `rangoon-ops`, integration, store and native use-case contracts rather than redefine them in the proposed package names. Run existing `cargo test -p rangoon-ops -p rangoon-integrations --locked --offline` and `node --test tests/operations-model.test.mjs tests/operations-parity.test.mjs` for affected compatibility. Freeze one use case, storage/key profile and exact subpacket first; new package names are placeholders, not an accepted architecture/service/DB/IdP/KMS implementation. + +NEXT-01 gates personal-data use and native qualification claims. Independently accepted source/UI-only preparation may proceed while controller access is blocked; it does not bypass that gate or authorize normal-data/external operation. + +**Validator rails.** Set `CARGO_NET_OFFLINE=true` and pin Rust 1.99.1 through `node scripts/check-source-rust.mjs --toolchain-bin ` or its `--desktop` variant with locked/offline dependencies. Run packet-specific named tests first; broaden only for affected contracts. Document/reference/intent/whitespace checks and fresh independent review apply to each meaningful packet. UI packets retain 320/768/1440 dark/light checks and record representative desktop/actual 4K scale profiles, keyboard, reduced motion and forced colors. Each packet has linked technical and experience outcomes; a passing source test, logo, chart or rendered sample is not runtime/authority/release proof. + +**Scope and release.** Continue local work independently of optional engines/cloud services. Windows/Proxmox testing is deferred until the upgraded host is ready; current Windows custody/startup/recovery needs implementation before testing can establish support. Linux GUI and three-OS packaging remain separate gates. No enterprise scheduler, shared database, marketplace or global control plane is required for the personal local milestone. Publication remains separately scoped and must update README substantively. The [development ledger](development.md#direction-reconciliation--november-1-2026) owns current results; dates below retain historical evidence. + ## Current native recovery packet — October 25, 2026 The [E1d-2 packet](encrypted-workspace.md#e1d-2-native-sqlcipher-recovery-copy--october-25-2026) is implemented: the existing SQLCipher backend creates and verifies a canonical encrypted recovery image using a separate native-selected key file. The age experiment is preserved as standalone historical source, excluded from active builds; the active pre-experiment 167-package lock graph is unchanged. diff --git a/docs/product-experience.md b/docs/product-experience.md index ff4a3ad..10ec488 100644 --- a/docs/product-experience.md +++ b/docs/product-experience.md @@ -1,5 +1,27 @@ # Product experience: make the visual promise useful +## Current direction and acceptance — November 1, 2026 + +This is the current product-experience direction for the next planning phases. It preserves the existing library/work-area/right-inspector workbench, route IDs, grouped navigation, dark/light themes and abstract glossy Rangoon art. Marketing mascot art remains secondary. The proposed contexts are Workspace, Library, Systems and Activity; they are information-architecture proposals, not an implemented replacement shell. The canonical custody boundary is [enterprise operation and custody boundaries](application-architecture.md#enterprise-operation-and-custody-boundaries--november-1-2026), and packet sequencing is in [next-phase packets](plan.md#next-phase-packets--november-1-2026). + +Task continuity is project- and target-oriented. Every handoff carries the exact source, revision and target. Older-scope drafts remain available; navigation never silently retargets, auto-saves, runs or changes a selected target. Proposed target preparation stays distinct from effective-configuration readback. Any future enterprise operation scopes action at organization, workspace, project, environment, region and target levels. Immutable target sets, policy pins and artifact pins are recorded before approval; each target reports its own outcome and freshness. Credential references are shown only as references. Simple and advanced density change presentation, never authority. + +The next phase may make real local work easier to find and recover, but it must not invent fleet progress, packet animation, compliance/readiness claims or provider support. State coverage includes loading, empty, stale, partial, denied, error, unknown and recovery. Each state says what remains usable and the next safe action. Shared typography and tokens govern these states; real-state transitions stay subtle, with reduced-motion, forced-colors, keyboard, touch and text alternatives preserved. + +Acceptance for this direction is documentation and planning acceptance only. It does not accept source implementation, a replacement IA, rendered UI quality or native/runtime qualification. Root records reconciliation in [direction reconciliation](development.md#direction-reconciliation--november-1-2026). Future implementation must preserve existing route and control semantics, prove each target/state with source and rendered evidence, and keep unsupported or unqualified behavior visibly unavailable. + +## NEXT-02b inspect the exact saved output — November 1, 2026 + +A saved composition output opens its exact saved revision in Skills after successful native readback. The editor heading receives focus only when the selected capability and viewed revision match. A newer saved head never silently replaces the composition result. Missing or changed results, failed reads and unavailable/busy states retain the current workbench and explain the next step. Same-skill unsaved edits must be saved or discarded first; other drafts remain available. + +Result controls carry both identities, disable during opening and stop after disposal. Navigation, receipt invalidation and Lock reject stale completion. This continuation does not save, review, compile, export or execute. Source tests cover identity/focus decisions and lifecycle handling; rendered keyboard/pointer, theme/viewport/reduced-motion and native encrypted qualification remain open. [Development receipt](development.md#next-02b-exact-saved-result-continuation--november-1-2026) owns evidence. + +## NEXT-02a saved skill into Compose — November 1, 2026 + +**Add to Compose** carries the exact selected saved revision from Skills into the existing Compose workbench, after an existing native read validates the returned identity. Historical revisions remain pinned. The user chooses another input and starts a draft explicitly; navigation creates no composition, preview, save, review, export or execution. + +Keep skill edits and other work intact. Same-skill unsaved edits, conflict, unavailable/busy state, an existing Compose draft, duplicate pin and full input selection disable adding with an explanation. **Open Compose** remains available to continue retained work. Navigation, selection/edit changes and Lock discard late handoff replies. Failed reads keep the user in Skills and retain previous Compose work. Existing theme, button and heading-focus patterns apply. Source tests are complete; actual rendered keyboard/pointer/layout/Lock behavior remains unassessed until UI control is available. [Development receipt](development.md#next-02a-saved-revision-compose-handoff--november-1-2026) records evidence and remaining work. + ## CW-1 saved-revision continuation — October 29, 2026 Skills gains **Open in Compile** beside its saved-revision actions. It opens that exact saved revision, including a selected historical revision, in the existing Compile workbench and focuses the selected revision/profile area after loading. Choose the format and compile explicitly there; nothing is compiled, exported or executed by navigation. diff --git a/docs/provider-interoperability.md b/docs/provider-interoperability.md index 4f36fdd..4197536 100644 --- a/docs/provider-interoperability.md +++ b/docs/provider-interoperability.md @@ -4,6 +4,16 @@ October 18 source checkpoint: D2a OpenShell mapping and D3a LNSAT evidence decod Authority: [intent.md](intent.md), October 7 provider-independent continuation. Owner: Jeff; the controller owns architecture, privacy, integration and release judgment. Status: accepted product direction; I1 source contract frozen after fresh independent pre-code review; offline source and independent conformance fixtures qualified; native wiring and all real adapters remain unimplemented. Validation and publication evidence belongs only in [development.md](development.md). +## Enterprise adapter and credential profiles — November 1, 2026 + +Planning refinement: [enterprise architecture](application-architecture.md#enterprise-operation-and-custody-boundaries--november-1-2026) owns shared trust/operation semantics; this guide owns adapter-specific coverage. Current offline decoders, synthetic read-client evidence and fixed-origin advisory model path do not establish generic cloud administration, live peer access, workload federation or KMS support. + +Declare hosting, cloud resource management, model inference, peer file access and authority/evidence integration as separate profiles. Pin provider/product/adapter/schema/version, tested OS/path profile, allowed operations, resource/account/region, credential source by reference, expiry/renewal and data/egress/retention policy. Human SSO, workload/device authentication, application permission and provider authorization are separate facts. Resolve credentials only in the approved native/service boundary; forbid ambient SDK environment/profile discovery and unapproved fallback credentials, providers or regions. Renewal rechecks current actor/delegation and scope. Never forward an unrelated audience token or expose a credential to imported content, ordinary workbench state, telemetry or unconfined plugin code. + +Effect support is per operation: identify conditional-state/fence support, duplicate identity/payload binding and retention horizon, cancellation limits, target-native readback, revocation propagation and unknown-outcome reconciliation. A provider that cannot enforce a claimed guarantee receives an explicit weaker/unsupported coverage state; connection or a successful preparation does not fill the gap. An old worker's valid token or accepted provider job can outlive a routing/lease change. Engine instances retain independent IDs/stores and require their own qualified topology before failover. VUSL maps semantics/provenance without authorizing effects, and its specification/core remain upstream-owned. + +Use reviewed built-in adapters first. Public SDK/registry follows two real independently qualified adapters exercising its contracts; fixture-only connector models do not establish live support. A signed manifest/logo describes identity, not safety or privilege. Pin update artifacts/channels, keep active jobs on compatible versions, and require real OS/resource/filesystem/network confinement before untrusted executable plugins. Tests must include wrong tenant/issuer/audience/account, stale grants, changed payload/identity, provider/key outage, resource reuse, redirect/egress misuse, cache/renewal and partial/unknown outcomes. The [next packets](plan.md#next-phase-packets--november-1-2026) do not authorize installation, credentials or provider contact. + ## Reconciliation and release boundary Rangoon and LNSAT are separate products. Rangoon owns capability authoring, immutable source provenance, decomposition, composition, revisions, instruction compilation, export and inspection. These local workflows must start and remain usable without LNSAT or any other external provider installed, configured or running. A bundled inert diagnostic crate is not an installed external engine. An absent integration affects only its own optional operation; it cannot prevent local startup, reading, editing, recovery or export. diff --git a/docs/reviewer-guide.md b/docs/reviewer-guide.md index 0f03883..ece3df3 100644 --- a/docs/reviewer-guide.md +++ b/docs/reviewer-guide.md @@ -13,7 +13,7 @@ Current review focus: the [October 29 audit](system-audit.md#october-29-whole-ap | --- | --- | --- | | Design and usability, about 20 minutes | Run `npm start`; open `http://127.0.0.1:4377`. Compare the sample screens with the real `analyze.html` workbench. Try navigation, dark/light, narrow width, workflow editing and the Operations empty state. | Clarity, hierarchy, terminology, recoverability and visual fidelity. Sample counts and playground behavior are synthetic. Browser mode cannot save native records or inspect a selected local operations file. | | Source and architecture | Read the [current audit](system-audit.md#october-29-whole-application-viability-and-drift-audit), [architecture](application-architecture.md), [feature matrix](../README.md#product-and-feature-status), [OpenShell boundary](provider-interoperability.md#openshell-runtime-boundary-and-adapter-sequence) and [development evidence](development.md). Run `npm run build:check` and the relevant Rust package tests if desired. | Contract and implementation critique. Passing source tests do not establish installed desktop support, enforcement, certification or model accuracy. | -| Guided native task on disposable data | Use an explicitly prepared isolated qualification artifact and synthetic fixture, with its own manifest, app-data location and test-key custody. Select, save, derive, revise, review, open the saved revision in Compile, export and reopen after restart; retain the exact stopping point. Do not substitute an ordinary personal-profile launch. | A task observation for that exact artifact and machine. Default source uses Managed encryption and recovery has dated macOS evidence, but the current folder-picker harness still needs its permission/fixture correction. No private projects, normal keys, provider credentials or production data. | +| Guided native task on disposable data | Use an explicitly prepared isolated qualification artifact and synthetic fixture, with its own manifest, app-data location and test-key custody. Select, save, derive, revise, review, open the saved revision in Compile, export and reopen after restart; retain the exact stopping point. Do not substitute an ordinary personal-profile launch. | A task observation for that exact artifact and machine. Default source uses Managed encryption and recovery has dated macOS evidence, and the folder-picker harness now has source-level permission/fixture preparation; a fresh artifact and actual GUI observations are still required. No private projects, normal keys, provider credentials or production data. | No LNSAT, OpenShell, model account or provider credential is needed for core content work. Do not install an authority engine or configure a live gateway @@ -22,6 +22,21 @@ report and displays **unverified observations**; it is not a live event feed, approval inbox or execution controller. Provider comparisons describe candidate abilities and unavailable states, not connected support. +## Disposable native workflow checklist + +The October 30 NQ-1 changes prepare the existing macOS qualification runner; they do not record a native task pass. Use exclusive, reliable UI control and a new run from the exact reviewed source. Windows testing is deferred until the Proxmox test host is available; Windows encrypted custody still requires implementation. + +1. Build with pinned Rust 1.99.1 and offline dependencies using the existing `scripts/qualify-native-encrypted.py init` entry. Keep the resulting source/executable/manifest hashes and OS/architecture. Its `folderFixture` output names the only folder for this rehearsal. Manifest v3 rejects old runs; never edit an older manifest to reuse it. +2. Start the `authoring` phase with `run NONCE authoring`. Complete isolated Managed setup using the disposable app's own custody. Record each confirmation and expected cancellation; normal user workspaces and keys remain outside this test. +3. Open Agent files and cancel Choose folder first. Verify the current selection/results remain intact. Choose the exact printed `folder-fixture`: expect only `AGENTS.md` and `skills/review/SKILL.md`. Hidden `.git/ignored.md` and `notes.txt` must not appear. Check relative names, sizes, observed timestamps and complete-list status. Metadata selection must not expose content or create saved source records. +4. Select/filter a row, then Lock. Verify folder rows, selected metadata, timestamps and private filter/inspector state are cleared. Unlock must not revive previous metadata. Also test Lock while a picker/result is pending; late completion must not restore rows. Capture actual UI/accessible-tree evidence alongside native lifecycle observations. +5. Use the separate explicit file picker to inspect a synthetic Markdown file, then Import & Analyze's explicit selection to save a source. Derive a skill, revise it, inspect historical/current revisions and review the chosen revision. Open that exact saved revision in Compile; unsaved changes must request save/discard without losing another draft. +6. Complete a composition from saved references, inspect its source coverage and resulting revision, then compile/export. Verify selected format and exported bytes through the existing explicit inspection flow. Export produces readable files; do not use private instructions. An export receipt proves output creation, not that an external runtime loaded or obeyed it. +7. Lock, end `authoring` cleanly, then restart the app using the existing `relaunch` phase. Reopen the saved records and confirm their content, revision pins and lineage. Exercise encrypted backup/restore on a separate fresh disposable destination through the existing recovery procedure and retain its artifact-bound evidence. Workspace recovery is separate from undoing changes to external project files. +8. End each phase cleanly, retain its parent receipt and exact UI stopping point, then perform the existing isolated slot cleanup. `phaseExitVerified` and `folderFixtureVerified` describe process/input checks only. Keep the picker/Lock/full-journey verdict unassessed until each observation above is recorded. Never turn a missing observation, cancelled test or interrupted controller into a pass. + +The runner accepts fixed controls only; it does not automate these UI actions. Timeout remains 20 minutes per phase, with existing event/output bounds. The fixed folder is outside all workspace case roots and is never an instruction execution target. CUA currently fails before launch because of the configured symlinked writable root; resolve controller access before starting a vault-backed native rehearsal. + ## Feedback that changes the build For each observation, include route, platform/browser, task, expected result, diff --git a/docs/visual-system.md b/docs/visual-system.md index b7d722b..8b16fc4 100644 --- a/docs/visual-system.md +++ b/docs/visual-system.md @@ -4,7 +4,19 @@ Status: accepted Intent: [intent.md](intent.md), visual quality continuation Owner: Jeff; primary controller owns visual direction and integration -Last updated: 2026-10-18 +Last updated: 2026-11-01 + +## Current visual direction and acceptance — November 1, 2026 + +Retain the finished original command-center feel: radials, bars, icons, logos, restrained glossy abstract art, library/work area/right inspector, grouped navigation and dark/light themes. Visual refinement must strengthen this professional surface, not replace it with a marketing mascot or a generic dashboard. Existing route IDs and controls remain stable. The proposed Workspace, Library, Systems and Activity contexts are planning vocabulary only. + +Charts are evidence views, never decoration that implies capability. Metric cards state scope, numerator, denominator, source and watermark. Radial segments are disjoint. Desired, installed and effective are independent fields, not additive slices; use explicit effective, installed-only, pending, failed and unknown buckets where applicable. Composition coverage uses exact native-derived units. The renderer never becomes save authority. + +Bars show outcomes, latency, queue pressure and cost with explicit definitions: latency includes sample window, sample count and failure treatment; queues show age, depth/capacity and delayed/rejected counts; costs distinguish actual, reserved, estimated and unknown values with currency and period. Every bar supports table or inspector drilldown to the underlying scope and freshness. No invented progress, packet animation, fake compliance/readiness or unlabeled synthetic activity. + +Use packaged marks only: `preview/assets/authority/lnsat-mark.webp`, `preview/assets/foundations/vusl-logo.png` and the compact SVG catalog in `preview/icons.mjs`. Logos identify assets and provenance; they never imply support, permission, approval or runtime integration. Do not add external untrusted SVG/HTML or runtime asset fetches. Finish loading, empty, stale, partial, denied, error, unknown and recovery states with shared typography/tokens, subtle real-state transitions, reduced-motion, forced-colors, keyboard/touch access and text alternatives. + +Required viewport matrix remains 320, 768 and 1440 in dark and light. Add 1366×768 and 1920×1080 profiles, plus actual 4K profiles when available. Record logical viewport and scale/DPR for each 4K observation; do not confuse physical pixels with CSS layout. This update accepts design requirements only. Future implementation requires source/rendered evidence plus separate native/runtime qualification. The [enterprise custody boundary](application-architecture.md#enterprise-operation-and-custody-boundaries--november-1-2026), [next-phase packets](plan.md#next-phase-packets--november-1-2026) and [direction reconciliation](development.md#direction-reconciliation--november-1-2026) own cross-document sequencing and receipts. ## UI-V2 mature workbench art and hierarchy diff --git a/preview/analyze.mjs b/preview/analyze.mjs index 4f63199..3732221 100644 --- a/preview/analyze.mjs +++ b/preview/analyze.mjs @@ -1,3 +1,4 @@ +import { compositionResultIssue, openCompositionResultInSkills, compositionResultFocus } from './composition-skill-handoff.mjs'; import { bindMarkdownFind } from './markdown-find.mjs'; import { renderImportMarkdownLines, captureMarkdownReview, restoreMarkdownReview, jumpToMarkdownLine } from './markdown-review.mjs'; import { createAgentFilesController } from './agent-files-model.mjs'; @@ -22,7 +23,7 @@ import { createModelAssistanceController } from './model-assistance-model.mjs'; import { bindModelAssistanceView } from './model-assistance-view.mjs'; import { createCloudCredentialController } from './cloud-credential-model.mjs'; import { icon } from './icons.mjs'; -import { openSkillInCompilation, skillCompileSelection } from './skill-compile-handoff.mjs'; +import { openSkillInCompilation, skillCompileSelection, openSkillInComposition, skillCompositionIssue } from './skill-compile-handoff.mjs'; import { createStartupSplash } from './launch.mjs'; import { bindWorkbenchNavigation, renderWorkbenchNavigation } from './workbench-navigation.mjs'; import { createWorkspaceLockController, workspaceSaveDisclosure } from './workspace-lock-model.mjs'; @@ -149,6 +150,11 @@ let compilationActionFocus = null; let compilationHandoffRevision = null; let skillsCompileHandoff = { pending: false, error: null }; let skillsCompileEpoch = 0; +let skillsComposeHandoff = { pending: false, error: null }; +let skillsComposeEpoch = 0; +let compositionSkillHandoff = { pending: false, error: null }; +let compositionSkillEpoch = 0; +let skillsHandoffSelection = null; const text = value => escapeText(value); const formatBytes = value => new Intl.NumberFormat().format(value ?? 0); @@ -198,7 +204,23 @@ function renderComposition() { app.innerHTML = `
${renderRail()}
`; compositionViewRoute = route; compositionView = bindCompositionView(document.querySelector('#composition-root'), composition, { - onOpenSkill: id => { if (sourceBlocked()) return; location.hash = '#skills'; void skillsController.open(id); }, + getResultHandoff: () => compositionSkillHandoff, + onOpenSkill: async (capabilityId, revisionId) => { + const originRoute = route, navigation = navigationEpoch; + if (sourceBlocked() || nativeOperations || compositionSkillHandoff.pending || compositionControllers.get(originRoute) !== composition || location.hash !== `#${originRoute}`) return false; + const issue = compositionResultIssue({ composition, skills: skillsController, capabilityId, revisionId }); + if (issue) { compositionSkillHandoff = { pending: false, error: issue }; renderComposition(); return false; } + const request = ++compositionSkillEpoch; + const isCurrent = () => !sourceBlocked() && request === compositionSkillEpoch && navigation === navigationEpoch && route === originRoute && location.hash === `#${originRoute}`; + compositionSkillHandoff = { pending: true, error: null }; renderComposition(); + const opened = await openCompositionResultInSkills({ composition, skills: skillsController, capabilityId, revisionId, isCurrent }).catch(() => false); + if (!isCurrent()) return false; + compositionSkillHandoff = { pending: false, error: opened ? null : 'Could not open this saved revision. Your composition and other drafts are retained. Try again or open Skills.' }; + if (!opened) { renderComposition(); return false; } + skillsHandoffSelection = { capabilityId, revisionId }; + location.hash = '#skills'; + return true; + }, }); } else compositionView.render(); routeEntry = false; @@ -555,7 +577,7 @@ function renderSkills() { const disclosures = skillsDisclosureStates.get(skillsRenderedCapability); skillsOriginalOpen = disclosures?.original ?? false; skillsSavedOpen = disclosures?.saved ?? false; - app.innerHTML = `
${renderRail()}
${renderSkillsView(state, { discardConfirmation: skillsDiscardConfirmation, compileHandoff: skillsCompileHandoff })}
`; + app.innerHTML = `
${renderRail()}
${renderSkillsView(state, { discardConfirmation: skillsDiscardConfirmation, compileHandoff: skillsCompileHandoff, composeHandoff: { ...skillsComposeHandoff, composition: compositionControllers.get('merge')?.getState() } })}
`; routeEntry = false; announcer.textContent = state.message; if (skillsSourceDisclosures.has(skillsRenderedSource)) document.querySelector('.skills-source-create').open = skillsSourceDisclosures.get(skillsRenderedSource); @@ -568,7 +590,9 @@ function renderSkills() { if (library) library.scrollTop = libraryScroll; if (routeFocusPending === 'skills') { if (skillsCreateFocusPending) document.querySelector('.skills-source-create')?.setAttribute('open', ''); - document.querySelector(skillsCreateFocusPending ? '#skills-create-title' : '#skills-title')?.focus({ preventScroll: true }); + const resultFocus = compositionResultFocus(state, skillsHandoffSelection); + document.querySelector(resultFocus || (skillsCreateFocusPending ? '#skills-create-title' : '#skills-title'))?.focus({ preventScroll: true }); + skillsHandoffSelection = null; skillsCreateFocusPending = false; routeFocusPending = null; } else { @@ -716,7 +740,7 @@ for (const operation of compositionRoutes) { } return bridge(command, args); } : undefined, - onChange: () => { if (sourceBlocked()) return; if (route === operation) renderComposition(); }, + onChange: () => { if (sourceBlocked()) return; if (route === operation) renderComposition(); else if (route === 'skills' && operation === 'merge') renderSkills(); }, onCommitted: async () => { if (sourceBlocked()) return; invalidateCompositions('Composition saved. Preview other retained drafts against the current workspace before saving.', operation); @@ -964,7 +988,7 @@ app.addEventListener('click', event => { return; } if (event.target.closest('#skills-open-compile')) { - if (route !== 'skills' || location.hash !== '#skills' || nativeOperations || skillsCompileHandoff.pending || !skillCompileSelection(skillsController.getState())) return; + if (route !== 'skills' || location.hash !== '#skills' || nativeOperations || skillsCompileHandoff.pending || skillsComposeHandoff.pending || !skillCompileSelection(skillsController.getState())) return; const request = ++skillsCompileEpoch; const navigation = navigationEpoch; const isCurrent = () => !sourceBlocked() && request === skillsCompileEpoch && navigation === navigationEpoch && route === 'skills' && location.hash === '#skills'; @@ -977,6 +1001,20 @@ app.addEventListener('click', event => { location.hash = '#compile'; }); } + if (event.target.closest('#skills-open-compose')) { + const composition = compositionControllers.get('merge'); + if (route !== 'skills' || location.hash !== '#skills' || nativeOperations || skillsCompileHandoff.pending || skillsComposeHandoff.pending || skillCompositionIssue(skillsController.getState(), composition?.getState())) return; + const request = ++skillsComposeEpoch; + const navigation = navigationEpoch; + const isCurrent = () => !sourceBlocked() && request === skillsComposeEpoch && navigation === navigationEpoch && route === 'skills' && location.hash === '#skills'; + skillsComposeHandoff = { pending: true, error: null }; renderSkills(); + return openSkillInComposition({ skills: skillsController, composition, isCurrent }).catch(() => false).then(opened => { + if (!isCurrent()) return; + skillsComposeHandoff = { pending: false, error: opened ? null : 'Could not add this saved revision. Existing Compose work is retained. Check the selection and try again.' }; + if (!opened) { skillsActionFocus = '#skills-open-compose'; renderSkills(); return; } + location.hash = '#merge'; + }); + } if (event.target.closest('#skills-save')) { skillsActionFocus = '#skills-save'; return skillsController.save(); } if (event.target.closest('#skills-review')) { skillsActionFocus = '#skills-review'; return skillsController.review(); } if (event.target.closest('#skills-reload-list')) return skillsController.list(); @@ -1050,7 +1088,7 @@ app.addEventListener('input', event => { skillsController.updateDraft(event.target.matches('#skills-title-input') ? { title: event.target.value } : { content: event.target.value }); skillsDiscardConfirmation = null; document.querySelector('.skills-discard-confirmation')?.remove(); - syncSkillsEditorChrome(document, skillsController.getState(), { compileHandoff: skillsCompileHandoff }); + syncSkillsEditorChrome(document, skillsController.getState(), { compileHandoff: skillsCompileHandoff, composeHandoff: { ...skillsComposeHandoff, composition: compositionControllers.get('merge')?.getState() } }); }); app.addEventListener('change', event => { @@ -1080,6 +1118,11 @@ window.addEventListener('hashchange', () => { navigationEpoch += 1; skillsCompileEpoch += 1; skillsCompileHandoff = { pending: false, error: null }; + skillsComposeEpoch += 1; + skillsComposeHandoff = { pending: false, error: null }; + compositionSkillEpoch += 1; + compositionSkillHandoff = { pending: false, error: null }; + if (routeFromHash() !== 'skills') skillsHandoffSelection = null; if (routeFromHash() !== 'compile') compilationHandoffRevision = null; if (sourceBlocked()) return; retainSourceScroll(); @@ -1170,7 +1213,12 @@ function openWorkspaceLockDialog() { function purgeWorkspaceRenderer() { skillsCompileEpoch += 1; skillsCompileHandoff = { pending: false, error: null }; + skillsComposeEpoch += 1; + skillsComposeHandoff = { pending: false, error: null }; + compositionSkillEpoch += 1; + compositionSkillHandoff = { pending: false, error: null }; compilationHandoffRevision = null; + skillsHandoffSelection = null; let healthy = true; const attempt = callback => { try { if (callback() === false) healthy = false; } catch { healthy = false; } }; attempt(() => markdownFindBinding?.dispose()); diff --git a/preview/composition-model.mjs b/preview/composition-model.mjs index cffcecd..f39885c 100644 --- a/preview/composition-model.mjs +++ b/preview/composition-model.mjs @@ -252,14 +252,17 @@ export function createCompositionController({ operation, invoke, onChange = () = set({ pending: null, inputs: [input], message: 'Saved source selected. Start a draft to edit its proposed partition.' }); return true; }, - async addRevision(capabilityId, revisionId = null) { - if (!mutationAllowed() || operation === 'decompose' || state.draft || !validId(capabilityId, 'capability:') || (revisionId !== null && !validId(revisionId, 'revision:'))) return false; + async addRevision(capabilityId, revisionId = null, { isCurrent = () => true } = {}) { + if (!isCurrent() || !mutationAllowed() || operation === 'decompose' || state.draft || !validId(capabilityId, 'capability:') || (revisionId !== null && !validId(revisionId, 'revision:'))) return false; const max = operation === 'merge' ? 16 : 1; if (state.inputs.length >= max) return false; + const prior = { pending: state.pending, error: state.error, message: state.message }; const request = ++epoch; const identity = workspaceIdentity; set({ pending: 'revision', error: null, message: 'Opening saved skill revision…' }); - if (identity !== workspaceIdentity) return false; + if (identity !== workspaceIdentity || request !== epoch) return false; + if (!isCurrent()) { set(prior); return false; } const result = await call('open_capability', { capabilityId, revisionId }); if (identity !== workspaceIdentity || request !== epoch) return false; + if (!isCurrent()) { set(prior); return false; } const input = result?.outcome === 'opened' ? revisionInput(result.capability) : null; if (!input || input.reference.capabilityId !== capabilityId || (revisionId ? input.reference.revisionId !== revisionId : input.reference.revisionId !== input.latestRevisionId) || state.inputs.some(item => item.reference.kind === 'revision' && item.reference.capabilityId === input.reference.capabilityId && item.reference.revisionId === input.reference.revisionId)) { fail(result); return false; } set({ pending: null, inputs: [...state.inputs, input], message: 'Saved skill revision selected.' }); diff --git a/preview/composition-skill-handoff.mjs b/preview/composition-skill-handoff.mjs new file mode 100644 index 0000000..b16d6fb --- /dev/null +++ b/preview/composition-skill-handoff.mjs @@ -0,0 +1,31 @@ +// Presentation/navigation only. Native reads resolve the saved reference. +const exactId = (value, prefix) => typeof value === 'string' && new RegExp(`^${prefix}:[a-f0-9]{64}$`).test(value); + +export function compositionResultSelection(state, capabilityId, revisionId) { + if (!state?.bridgeAvailable || state.pending || !exactId(capabilityId, 'capability') || !exactId(revisionId, 'revision')) return null; + const result = state.results?.find(item => item.id === capabilityId && item.revision?.id === revisionId); + return result ? { capabilityId, revisionId } : null; +} + +export function compositionResultIssue({ composition, skills, capabilityId, revisionId }) { + if (!compositionResultSelection(composition.getState(), capabilityId, revisionId)) return 'This saved result is no longer available. Open the current composition results.'; + const state = skills.getState(); + if (!state.bridgeAvailable) return 'Open Rangoon desktop to inspect this saved skill.'; + if (state.pending) return 'Wait for the current skill operation to finish.'; + if (skills.hasUnsavedDraft(capabilityId)) return 'Save or discard this skill’s unsaved edits in Skills before opening the saved result.'; + return null; +} + +export async function openCompositionResultInSkills({ composition, skills, capabilityId, revisionId, isCurrent }) { + if (!isCurrent() || compositionResultIssue({ composition, skills, capabilityId, revisionId })) return false; + // Skills is pending during its read; only the origin and retained-draft guards apply here. + const current = () => isCurrent() && Boolean(compositionResultSelection(composition.getState(), capabilityId, revisionId)) && !skills.hasUnsavedDraft(capabilityId); + const opened = await skills.open(capabilityId, revisionId, { isCurrent: current }); + return Boolean(opened && current()); +} + +export function compositionResultFocus(state, selection) { + if (!selection || state?.pending) return null; + return state?.selected?.id === selection.capabilityId && state.selected.revision?.id === selection.revisionId && state.viewedRevisionId === selection.revisionId + ? '#skills-editor-title' : '#skills-title'; +} diff --git a/preview/composition-view.mjs b/preview/composition-view.mjs index 2f35c48..62f12b0 100644 --- a/preview/composition-view.mjs +++ b/preview/composition-view.mjs @@ -1,3 +1,4 @@ +import { compositionResultSelection } from './composition-skill-handoff.mjs'; import { escapeText } from './analysis-model.mjs'; import { icon } from './icons.mjs'; import { byteRangeText, textareaSelectionRange } from './composition-model.mjs'; @@ -239,7 +240,7 @@ function annotationList(state) { return `

COVERAGE RECORDS

Exceptions and conflicts

${annotations.map(([kind, title]) => `

${title}

${(draft?.[kind] ?? []).map((value, index) => `
${text(rangeLabel(value.range))}
`).join('') || '

None.

'}
`).join('')}

Manual conflicts

Declarations document local context. A resolution is not proof of semantic safety.

${(draft?.conflicts ?? []).map((value, index) => `
${text(value.title)}${(value.ranges ?? []).map(rangeLabel).join(' · ')}
`).join('') || '

No declared conflicts.

'}

Select at least two source ranges with “Add range to conflict” in inspector.

`; } -function previewPanel(state) { +function previewPanel(state, resultHandoff = {}) { const envelope = state.preview; const preview = envelope?.preview ?? envelope; const core = preview?.core ?? preview; @@ -249,7 +250,7 @@ function previewPanel(state) { const saveable = Boolean(preview?.saveable); const stale = Boolean(state.previewStale); const saved = Array.isArray(state.results) && state.results.length > 0; - return `

NATIVE PREVIEW

${saved ? 'Composition saved' : stale ? 'Preview stale' : previewReady ? saveable ? 'Preview ready' : 'Preview blocked' : 'Preview required'}

${saved ? 'Saved local composition. Open returned skills below.' : stale ? 'Recipe changed or preview failed. Inspect a new native preview before saving.' : previewReady ? 'Host returned this exact preview; it is not an approval or execution authority.' : 'Native host computes output content, coverage and saveability.'}

${diagnostics.length ? `
    ${diagnostics.map(item => `
  • ${text(item.message ?? item.code ?? 'Blocked by local validation.')}
  • `).join('')}
` : ''}${outputs.length ? `
${outputs.map((output, index) => `
Output ${Number(output.outputIndex ?? index) + 1}: ${text(output.title ?? state.draft?.outputs?.[index]?.title ?? 'Untitled')} · ${Number(output.byteLength ?? bytes(output.content ?? '')).toLocaleString()} bytes · ${text(preview?.appliedOutputs?.[index]?.kind === 'append' ? 'update existing' : 'create new')}
${text(output.content ?? '')}
`).join('')}
` : ''}${saved ? `

Actual saved skills

${state.results.map(item => ``).join('')}
` : ``}
`; + return `

NATIVE PREVIEW

${saved ? 'Composition saved' : stale ? 'Preview stale' : previewReady ? saveable ? 'Preview ready' : 'Preview blocked' : 'Preview required'}

${saved ? 'Saved local composition. Open returned skills below.' : stale ? 'Recipe changed or preview failed. Inspect a new native preview before saving.' : previewReady ? 'Host returned this exact preview; it is not an approval or execution authority.' : 'Native host computes output content, coverage and saveability.'}

${diagnostics.length ? `
    ${diagnostics.map(item => `
  • ${text(item.message ?? item.code ?? 'Blocked by local validation.')}
  • `).join('')}
` : ''}${outputs.length ? `
${outputs.map((output, index) => `
Output ${Number(output.outputIndex ?? index) + 1}: ${text(output.title ?? state.draft?.outputs?.[index]?.title ?? 'Untitled')} · ${Number(output.byteLength ?? bytes(output.content ?? '')).toLocaleString()} bytes · ${text(preview?.appliedOutputs?.[index]?.kind === 'append' ? 'update existing' : 'create new')}
${text(output.content ?? '')}
`).join('')}
` : ''}${saved ? `

Actual saved skills

${state.results.map(item => ``).join('')}

${text(resultHandoff.pending ? 'Opening saved revision…' : resultHandoff.error || 'Open a saved revision to inspect it in Skills.')}

` : ``}
`; } function coveragePanel(state) { @@ -263,10 +264,10 @@ export function renderCompositionView(state, graphUi = {}) { const layout = graphUi.workspaceLayout ?? { desktop: false, left: 240, right: 320, leftCollapsed: false, rightCollapsed: false }; const dock = (side, label, body, needsRestore = false) => `
${needsRestore && layout[`${side}Collapsed`] ? '' : ''}${body.replace('