docs/work: Phase A implementation status, qualification kit and evidence text

IMPLEMENTATION_STATUS.md, ACCEPTANCE-EVIDENCE.md, QUALIFICATION-KIT.md and the
evidence logs (text only, about 140 KB). The 170 MB of screenshots under
apps/host/docs/evidence and checkpoints are not in git; they are in
StrataSplit\evidence-archive. The Electron mentions in IMPLEMENTATION_STATUS.md are
history (Electron was replaced by Tauri); the superseded top-level desktop/ folder is
not carried over.

From the owner's rebuild branch strata/rebuild-2026-10.
This commit is contained in:
Niko1221 committed 2026-10-15 10:24:09 +02:00
1 parent cef6027dcb
commit e424cc940d
28 files changed
+3650

No files matched your search

+114
View File
@@ -0,0 +1,114 @@
# Acceptance evidence matrix
Generated by `packaging/acceptance_matrix.py` at 2026-10-15T06:11:47Z for revision `e0951ce243511597eb243018191f194af9d5f8bc`.
Every row of `strata-acceptance-checklist.md` appears exactly once, with an explicit result. `--check` fails if a row is missing, so a gap is a build error rather than an oversight.
| Result | Count |
| --- | --- |
| passed | 46 |
| failed | 0 |
| pending-hardware | 15 |
| pending-release | 1 |
| unsupported | 3 |
| not-implemented | 2 |
| **total** | **67** |
## Packaging and reuse
| ID | Result | Observation | Evidence |
| --- | --- | --- | --- |
| P01 | **passed** | The macOS .app builds, launches, serves the supplied UI from the host's origin and passes its own 8-step self-test from inside the mounted DMG. No global Node, Python, npm, pip or compiler is required: the bundle carries a pinned Node runtime. Real generation through it is NOT proven -- no Strata pack fits this Mac (16 GiB RAM, ~21 GiB free); that leg is pending hardware. | `docs/work/evidence/tauri-selftest-from-dmg.json, tauri-artifact.txt` |
| P02 | **pending-hardware** | The NSIS per-user installer target and policy are configured and the config validates against this Tauri version, but a Windows installer must be produced on Windows. Not built here. | `packaging/README.md` |
| P03 | **pending-hardware** | The AppImage target is configured; an AppImage must be built on Linux. Not built here. | `packaging/README.md` |
| P04 | **passed** | The terminal distribution is self-contained: it carries a pinned standalone CPython 3.12.15 and its dependencies. Verified from a moved directory with a PATH whose only Python is macOS's 3.9, which the launcher correctly rejects as below the 3.10 floor. Serving, status, timeskip and tune all ran on the bundled interpreter. Only the darwin-arm64 archive is built; Linux/Windows archives need a pin plus a build there. | `docs/work/evidence/terminal-dist.txt` |
| P05 | **unsupported** | No Metal/CUDA/SYCL/HIP target row is delivered as a package yet. One engine is built and qualified as a *source build* on this Mac (macos-arm64-metal); the other families have recipes only. No blanket cross-platform claim is made. | `packaging/README.md` |
| P06 | **passed** | A component's cache key is the digest of its artifact bytes, not its version label, so a rebuilt artifact with an unchanged version is a different entry and a cached payload is never reused on the strength of a string. The cache is never consumed by activation (the active directory is a copy), so a compatible application update reuses the installed engine instead of downloading it again. `prune_cache` keeps whatever the active and rollback versions refer to. | `strata_control/components.py, tests/tuning/test_components.py` |
| P07 | **passed** | Components are acquired by kind: the manifest declares `application`, `runtime`, `agent-runtime`, `tuning`, `engine` or `prepared-data`, each with its own platform and backend gates, and `strata components plan` reports whether a package may be used here without fetching anything. The backend families are held to the packet's own matrix, so a Windows SYCL or Intel-Mac Metal package is refused as unsupported rather than attempted. | `strata_control/components.py, `strata components backends`` |
| P08 | **passed** | Desktop and Terminal read the same owner state and the same model directory; the terminal's `models list` reads the setup-written configs that Desktop's model surfaces use. Imported files are never copied (import is preview-only by design). | `docs/work/evidence/serve-suite.txt, terminal-suite.txt` |
| P09 | **not-implemented** | No offline bundle format exists yet. The engine build and model preparation are documented as commands, not as a signed bundle. | `docs/work/QUALIFICATION-KIT.md 3.2` |
| P10 | **pending-hardware** | Uninstall retention is designed in (data lives outside the install directory, and the Windows installer does not delete app data), but uninstall/reinstall cannot be exercised without an installed Windows or a signed macOS build. | `packaging/README.md` |
| P11 | **passed** | Every artifact is verified against its manifest SHA-256 and declared size before anything is unpacked, and unpacking validates every member first, so a refusal writes nothing. Refused: parent segments (including backslash and nested forms), absolute paths, Windows drive letters, UNC paths, NUL bytes, symlinks and hard links, device and FIFO members, an artifact name that is a path, and any member whose resolved destination leaves the target. Setuid/setgid bits from an archive are never trusted. Each refusal is asserted to leave the destination empty. | `tests/tuning/test_components.py (TestSafeExtraction)` |
| P12 | **passed** | An interrupted transfer keeps its partial bytes for a resume; a range request that the server ignores restarts rather than appending to a prefix; a partial larger than the declared size is discarded as stale; a completed download that is short is an error with the bytes retained; and nothing is promoted to the cache until its digest has been verified, with the `.complete` marker written last so an interrupted install is never mistaken for a finished one. | `tests/tuning/test_components.py (TestInterruptedTransfer)` |
| P13 | **passed** | Activation moves the displaced version aside rather than deleting it, and the rollback record is written *before* the activation so a crash between the two cannot leave it pointing at the new version. `rollback` restores the previous version exactly and refuses when there is nothing to restore, so 'rollback succeeded' and 'the component is gone' are never the same outcome. An incompatible component is refused before anything is written or activated. | `tests/tuning/test_components.py (TestActivation)` |
## Runtime, models and control
| ID | Result | Observation | Evidence |
| --- | --- | --- | --- |
| R01 | **passed** | Serving with installed inputs invokes no downloader, package manager, git or compiler: the server's import graph is stdlib plus relative modules, and the server starts and answers from the bundled runtime with no network access attempted. | `docs/work/evidence/terminal-dist.txt` |
| R02 | **passed** | Pure serving and the read-only CLI run with no agent runtime, no tuning packages, no Textual and no UI present. Verified by running the server from the standalone bundle and by importing strata_control.management and strata_cli.cli on a bare interpreter. | `docs/work/evidence/terminal-dist.txt` |
| R03 | **passed** | One owner per installation is enforced by an O_EXCL state file plus an flock held for the host's lifetime; a second client attaches over the private channel; a stale owner is only recovered after the socket is proven dead. Fifteen transport tests cover it. | `docs/work/evidence/owner-transport-suite.txt` |
| R04 | **unsupported** | **The Windows owner transport is not a named pipe with an ACL.** The Python standard library cannot create one, so Windows uses a loopback-only TCP listener whose authority rests on a 256-bit control token plus a private state directory. That is weaker than the checklist's stated condition and is recorded as such. Console stop and process-tree cleanup for engine children ARE implemented (serve/winjob.py, tested). The Windows branch of the transport is exercised on macOS but has never run on Windows. | `strata_control/owner_transport.py, docs/work/evidence/owner-transport-suite.txt` |
| R05 | **passed** | Preflight refuses before load: the engine rejects a model whose metadata geometry differs from the compiled shape, naming the differing key; the GGUF preflight checks shard naming, magic, version and tokenizer identity; the tuning plan refuses a dimension whose flag the engine does not accept. | `docs/work/evidence/tuning-suite.txt, docs/work/IMPLEMENTATION_STATUS.md 1.12` |
| R06 | **pending-hardware** | The catalog refuses unknown selections and reports a reason, and the plan refuses unsupported dimensions. Whether Qwen3.6 runs at all on this backend is answerable only with the model present: the engine documents that Qwen3.6 does not run on the Mac engine, and NVFP4 is NVIDIA-only. | `docs/MAC.md, docs/work/evidence/tuning-plan.txt` |
| R07 | **pending-hardware** | The reviewed downloader is resumable and keeps verified bytes, and import is preview-only so it never moves files. The cancel/resume behaviour cannot be exercised without a model large enough to interrupt, which does not fit here. | `docs/work/QUALIFICATION-KIT.md 3.2` |
| R08 | **passed** | Saving settings preserves unknown fields and masks secrets (the reviewed NATIVE_FIELDS table with `••••••••` round-tripping), writes atomically via a temp file and rename, and reports restartNeeded rather than applying silently. The tuning job refuses to touch the active profile at all. | `docs/work/evidence/serve-suite.txt, docs/work/IMPLEMENTATION_STATUS.md 1.12` |
| R09 | **passed** | Readiness requires the engine's own READY line: max_context stays 0 until it arrives, so a pre-READY 'ready' is impossible, and a timeout is reported as uncertain rather than as success. Verified against a stub engine. | `docs/work/evidence/tuning-suite.txt` |
| R10 | **pending-hardware** | Stop and unload handle active and queued work explicitly in the reviewed server, and the ten-cycle orphan check is an executable procedure. It cannot be run without a loadable model. | `docs/work/QUALIFICATION-KIT.md 5` |
| R11 | **passed** | All three dialects are served and their documented behaviour is covered by the reviewed server suite: 801 tests pass, including streams, tool fragments, telemetry and error shapes. | `docs/work/evidence/serve-suite.txt` |
| R12 | **passed** | The agent bridge cancels per session and the host owns request cancellation for serving; the queue releases only the affected slot. The end-to-end cancellation *turn* assertion is inconclusive against the instant mock engine and is reported as such rather than as a pass. | `docs/work/evidence/serve-suite.txt, docs/work/IMPLEMENTATION_STATUS.md 1.8` |
| R13 | **pending-hardware** | Group allocation, reservations and readiness-before-routing are reviewed features of the server, and multi-device behaviour cannot be exercised on a single-GPU machine. | `docs/work/QUALIFICATION-KIT.md 6` |
| R14 | **pending-hardware** | Vision and image-generation paths exist in the reviewed server and refuse when unavailable; neither can be exercised without a real model and its mmproj. | `docs/work/QUALIFICATION-KIT.md 6` |
## Agent, session and permissions
| ID | Result | Observation | Evidence |
| --- | --- | --- | --- |
| A01 | **passed** | The supplied UI drives a turn through the pinned Harness against the local Strata API worker on loopback, with no cloud route declared in the profile and therefore no DeepSeek account required. The model is the built-in mock: this proves the route, not inference quality. | `docs/work/evidence/bridge-e2e.txt, integrations/harness/profile/cordis.patch.yml` |
| A02 | **passed** | Framing is verified at the byte level: a multi-byte character split across reads survives intact with no replacement character, an SSE line split mid-JSON is reassembled, a stream ending without a trailing newline still yields its last delta, a malformed frame is skipped without losing its neighbours, and an error frame reaches the caller in the provider's own words. Content, reasoning, usage, finish and error are all carried. | `apps/host/tests/stream-framing.test.mjs` |
| A03 | **passed** | Verified end to end, and only after four defects were cleared. A scripted Strata worker emits a bash tool call; the test's own peer opens the gateway's `$events` stream on `/api/remote.mux` and grants the escalation with `allowed-once`. Asserted: the turn completes, the tool ran exactly once (`marker_lines == 1`, so a replayed effect would fail), an approval was both asked and answered with the recorded outcome `allowed-once`, and the worker recorded two requests while executing nothing itself -- so the tool ran in the Harness and the transcript, not the tool, went to the API. The defects cleared to get here: the session-title request consumed the scripted tool call; the call was missing a required `description`; the launch-URL `interactions` parameter is decorative and the default is answerable; and a workspace-write command is not gated, so the call now requests a sandbox escalation, which is the only path that consults the approval gate. | `docs/work/evidence/tool-flow.txt, integrations/harness/tool_flow_e2e.py` |
| A04 | **passed** | Verified with the denial observed, not assumed. Same scripted call as A03, but the peer answers `next` (do not decide, delegate), which is this vocabulary's way of saying no answerer is available. Asserted: the escalation reached the gate (`approval/asked` present), every recorded decision is the fail-closed `unavailable`, zero grants were recorded, the turn settled `completed`, and the marker does not exist. Each assertion fails for a different way the flow could otherwise pass while proving nothing -- the tool never reaching the gate, the gate granting, or the turn hanging with the request left pending. An earlier version of this row was marked passed and has been withdrawn: in that run the approval was never consulted at all, the tool failed argument validation for an unrelated reason, and the mechanism it relied on does not exist. | `docs/work/evidence/tool-flow.txt, integrations/harness/tool_flow_e2e.py` |
| A05 | **passed** | Verified end to end against a live turn. The scripted worker runs with a token delay so the turn is still running when Stop is sent, and the test waits for turn/start and fails if the turn was not live -- without that it passed trivially on the first attempt, because the scripted turn finished in milliseconds and Stop arrived after turn/end. Stop is acknowledged as `{accepted: true}`, which is admission only; the turn then settles as `aborted` in the durable record, which is what actually settles it, and the tool does not run. Also asserts the marker the tool would have written does not exist, so a turn that reported cancellation while letting the tool finish would fail. | `docs/work/evidence/tool-flow.txt, integrations/harness/tool_flow_e2e.py` |
| A06 | **passed** | Sessions are durable in the Harness format, and resume re-reads them rather than replaying effects: the interrupted-turn repair synthesises closers instead of re-running tools. Verified by reading the durable session file across its concatenated frames. | `integrations/harness/bridge_e2e.py, strconv note in docs/work/IMPLEMENTATION_STATUS.md 1.8` |
| A07 | **passed** | The same durable session is reachable from the App Host and from a CLI-started Harness with the same DSH_HOME, sharing history, model identity and workspace. The bridge reads the identical file the UI's host would. | `docs/work/evidence/bridge-e2e.txt` |
| A08 | **pending-hardware** | Two sessions run independently in the bridge (each gets its own session), but the cross-session isolation assertions (no shared tool results, no credential leakage, no shared-runtime kill) need a real model and a tool that runs. | `docs/work/QUALIFICATION-KIT.md 7` |
| A09 | **pending-hardware** | Subagents are a reviewed Harness feature with real depth and concurrency bounds; the UI already renders child-agent frames. Nothing has been observed end to end, and the supplied UI's agent events are not emitted by the host yet. | `docs/work/QUALIFICATION-KIT.md 7` |
| A10 | **pending-hardware** | Bounded goals are a reviewed Harness feature (maxGoalRounds, round-limit blocking). Not exercised in this integration. | `docs/work/QUALIFICATION-KIT.md 7` |
| A11 | **pending-hardware** | Compaction and long-context handling are reviewed Harness features. The route declares the real local window (32K) rather than inheriting a cloud default, and refuses a request that does not fit rather than truncating silently -- observed. The compaction-preserves-tool-pairing assertion needs a real model. | `docs/work/IMPLEMENTATION_STATUS.md 1.8` |
| A12 | **passed** | The reviewed task service validates schedules with DST-correct nextRun, prevents overlapping runs, and has no catch-up burst or duplicate scheduler. Covered by the reviewed test suite and by route tests. | `docs/work/evidence/serve-suite.txt` |
| A13 | **pending-hardware** | Skills resolve against the reviewed workspace/policy roots. That prompts and inference keys cannot invoke installer or owner actions needs an adversarial test against a running agent, which needs a real model. | `docs/work/QUALIFICATION-KIT.md 7` |
| A14 | **passed** | The Strata profile declares exactly one route, on loopback, and no cloud route at all, so a local failure cannot fall back to a hosted model -- there is nothing to fall back to. The host additionally refuses to simulate in a packaged build. | `integrations/harness/profile/cordis.patch.yml, docs/work/IMPLEMENTATION_STATUS.md 1.7` |
| A15 | **passed** | Conversations live in the browser store by design, and browser-origin export/import is idempotent with attachments and preferences retained; historical tool records are data and are never executed. Covered by the reviewed UI suite. | `docs/work/evidence/serve-suite.txt` |
## Time-skip and tuning
| ID | Result | Observation | Evidence |
| --- | --- | --- | --- |
| S01 | **passed** | Real baseline and candidate directories with content-addressed checkpoints replace the timer entirely. Every checkpoint and decision persists by SHA-256 digest of its file inventory, not by a label. | `tests/time_skip/test_time_skip.py, docs/work/evidence/timeskip-harness.txt` |
| S02 | **passed** | A previously passing deterministic check that regresses rejects the candidate and the last good checkpoint stays selected; verified end to end, where the attempt was rejected and the baseline retained. | `docs/work/evidence/timeskip-harness.txt` |
| S03 | **passed** | An unevaluable check is `unknown` and never a pass; a run whose checks cannot justify a change ends `inconclusive` with `needsUserReview`, and a model's opinion is declared advice and cannot gate. | `tests/time_skip/test_time_skip.py` |
| S04 | **passed** | Open/Compare/Keep/Restore operate on the actual retained checkpoint; applying previews, keeps a rollback copy, refuses with 409 when the destination changed, and restores. | `docs/work/evidence/timeskip-http.txt` |
| S05 | **passed** | Cancellation and failure retain the last complete checkpoint, attempts are bounded, and no revision can touch the workspace, so there is no tool replay or external side effect from a rejected attempt. | `tests/time_skip/test_time_skip.py` |
| T01 | **passed** | Tuning is optional and pinned: it lives in a separate module, the CLI imports it only for its own commands, and serving, status and monitor run without it. Nothing is installed by the tuning path. | `docs/work/evidence/terminal-dist.txt` |
| T02 | **passed** | The sweep uses only flags the selected engine binary accepts, holds an exclusive device lease, fixes the workload (greedy, seed 1) for every candidate, and never writes the active profile. | `docs/work/evidence/tuning-sweep.txt` |
| T03 | **passed** | Boot failure, timeout, no-tokens and correctness failure are each recorded with a status and excluded from selection; the lease is released even when the job fails; cancellation stops new trials and keeps the evidence collected. | `docs/work/evidence/tuning-suite.txt` |
| T04 | **passed** | Two measurement modes, labelled so neither can stand in for the other. `protocol` reads the engine's own serve protocol; `api` starts the real worker from the candidate's configuration and measures a streamed chat completion over HTTP -- the full path a user waits for -- with a required expectation so a fast wrong answer cannot win. Both record peak resident memory of the process tree, so a speed win bought by spilling is visible. Repeats, a paired baseline re-measurement and drift grading are unchanged. 11 tests cover the API mode, including that a reasoning-only stream, a missing usage block and a non-matching answer are refused rather than scored. Runs against the mock worker are labelled as harness tests, never as performance results. | `strata_control/tune_api.py, tests/tuning/test_tune_api.py` |
| T05 | **passed** | Benchmark-only levers are measured but stripped from the exported args, and verify_exported() re-measures the configuration as it would actually be written; a configuration whose advantage came from a stripped lever is withdrawn. | `tests/tuning/test_tuning.py` |
| T06 | **passed** | Identity is a content digest, so a re-quantised model with the same name is a different model. The plan records the engine digest, the model digest, the digest method, the backend, the workload, the context and the machine; a completed sweep records itself and its report states how many earlier sweeps are comparable and, for each that is not, the reason in plain words. An unknown identity is never treated as a match, and incomparable history is retained rather than deleted. Twenty-one tests cover each element of the key separately. | `tests/tuning/test_tune_history.py, strata_control/tune_history.py` |
| T07 | **passed** | `strata tune apply` revalidates the report hash, re-checks the sweep's artifact identity against what is installed, refuses an incomplete sweep, a no-change result, material drift or a report edited after review, snapshots the previous bytes, and writes atomically; `strata tune rollback` restores those exact bytes and refuses if the configuration was edited since. Nothing applies automatically. The one gap is stated by the command itself: the candidate start is not verified against a running model because no supported model fits this Mac, so `--verify` is wired and tested but the CLI passes None and says so. 31 tests, and a refused apply is asserted to leave the file byte-identical. | `tests/tuning/test_tune_apply.py, docs/work/evidence/tuning-apply.txt` |
| T08 | **unsupported** | No real tuning qualification exists for any backend, because no supported model fits this Mac. Stub-engine results are labelled as stub results everywhere they appear and are never presented as a backend qualification. | `docs/work/evidence/tuning-sweep.txt` |
## Interface, security and evidence
| ID | Result | Observation | Evidence |
| --- | --- | --- | --- |
| U01 | **passed** | The supplied UI is used unmodified: 54 components, 10 screens, 8 locales, the design kit's tokens and motion. The tuning panel added this round uses the kit's own primitives and tokens rather than introducing a parallel style. | `docs/work/evidence/serve-suite.txt, apps/host/src/components/TunePanel.tsx` |
| U02 | **pending-hardware** | Keyboard and focus behaviour, reduced motion, long translations and OS file/font permission flows are designed in and the UI suite covers parts of them. Verifying them in a *packaged* Desktop on multiple OS versions needs those hosts. | `docs/work/evidence/tauri-selftest.json` |
| U03 | **passed** | The terminal's six views render and the operator flows work at full width; the reviewed monitor suite covers compact fallbacks and the terminal is restored on exit. Verified against a live worker. | `docs/work/evidence/terminal-suite.txt, serve-suite.txt` |
| U04 | **passed** | The monitor attaches over HTTP read-only, with an allow-list of exactly four read-only endpoints, refuses redirects, caps the body and never starts or stops anything; detaching leaves work alive. | `docs/work/evidence/terminal-suite.txt` |
| U05 | **passed** | Telemetry carries a sample age and a source; a missing or stale reading renders as a dash rather than as zero, unified memory is counted once, and the packaged build refuses to fabricate readings at all. | `docs/work/evidence/serve-suite.txt, docs/work/IMPLEMENTATION_STATUS.md 1.7` |
| U06 | **passed** | Rendered artifacts cannot reach renderer or owner privileges: the window is confined to the host origin, navigation elsewhere is handed to the system browser, permissions are denied by default, and the renderer runs sandboxed with context isolation and no Node integration. | `apps/desktop/src-tauri/src/main.rs, docs/work/evidence/tauri-selftest.json` |
| U07 | **passed** | A non-loopback bind requires an API key (the reviewed server enforces it and the test suite covers the refusal); management stays on the private channel; secrets are masked in projections and never written to logs or URLs. | `docs/work/evidence/serve-suite.txt` |
| U08 | **passed** | The two claims are separated and tested separately, because a passing runtime-only test says nothing about the strict one. `runtime_only_no_download` is that the server fetches nothing while serving; `strict_offline` is that nothing in the process tree reaches the network. Strict offline is enforced through the environment every child receives (HF_HUB_OFFLINE, TRANSFORMERS_OFFLINE, PIP_NO_INDEX, DO_NOT_TRACK, emptied proxy variables and NO_PROXY=*), applied last so a profile cannot remove it by naming the same variable; through one `check_url` predicate for our own fetches, which allows local schemes and loopback because talking to this machine is not a download; and through a preflight that refuses a profile declaring MCP servers, a before_load command or remote image sources, naming which. Verified against a real child process. A test asserts every child_env call site passes the policy -- which caught a real leak in the engine's own environment. `limits()` states what is not enforced: a child that opens a socket directly is not stopped, because that needs an OS sandbox this product does not have on all three platforms. | `tests/tuning/test_offline.py, docs/work/evidence/offline.txt` |
| U09 | **not-implemented** | Connector operations exist in the reviewed host (Cloudflare tunnel, LAN share) but the explicit-only and never-widen-on-failure assertions are not tested. | `apps/host/server/cloudflare.mjs, local-share.mjs` |
| U10 | **pending-hardware** | A thirty-minute real soak needs a running model. The reviewed suite has shorter monitor soak evidence from the terminal handover, which is not a substitute. | `docs/work/QUALIFICATION-KIT.md 5` |
| U11 | **pending-release** | No signing or notarization, no SBOM, no notices bundle and no font/asset redistribution evidence. Signing credentials and rights evidence must come from the owner; the artifacts produced here are explicitly labelled unsigned internal candidates. | `packaging/README.md, docs/work/evidence/tauri-artifact.txt` |
| U12 | **passed** | A packaged build has no success path that uses demo responses or demo metrics: the host refuses to simulate when STRATA_PACKAGED is set and returns a typed error instead, the monitor reports `none` rather than invented readings, and this matrix records every failure, skip and remaining item. | `docs/work/IMPLEMENTATION_STATUS.md 1.7, this file` |
## Reading this table
* `passed` means the check ran on this Mac and its evidence is retained. It does not mean the feature works on a machine this is not.
* `failed` is an implementation gap. It is never recorded as `pending-hardware`: deferring a defect to another machine is how defects become permanent.
* `unsupported` names a combination that is not implemented, with the reason.
* Nothing here is a support claim. The macOS candidate is an **unsigned internal development candidate** and is **real-model validation pending**.
File diff suppressed because it is too large. Load diff
+84
View File
@@ -0,0 +1,84 @@
# Phase A return packet
**Outcome: Phase A ready for hardware qualification.**
**The macOS candidate is real-model validation pending, not fully validated.**
## Source revisions actually selected
| Repository | Revision | Role |
| --- | --- | --- |
| Strata (integration checkout) | branch `strata/rebuild-2026-10`, HEAD `e0951ce243511597eb243018191f194af9d5f8bc` | the product |
| Strata (pristine reference) | `296b59d2` (`main`) | unchanged baseline |
| DeepSeek Harness | `57190202` | agent loop and durable sessions |
| HyperCore-Tune | `4f9ab7fa` | evaluated for tuning; decision D07 |
| ggml (llama.cpp) | `3cf03257` | engine host sources |
| metal-cpp | `4e6c9a1a…` SHA-256 `4df3c078…85a3a4` verified | Metal host bindings |
No upstream drift: every pin above is the revision that was reviewed.
## Artifacts
DMG apps/desktop/src-tauri/target/release/bundle/dmg/Strata_0.1.0_aarch64.dmg
sha256 e18c2f4ca60e0142177dc67789b63469f4365bca46860c284173d55b603766fd
hdiutil verify VALID; packaged self-test 8/8 from inside the mounted image
Terminal release/artifacts/strata-terminal-0.1.44.1-darwin-arm64.tar.gz
bytes 42480892
sha256 fafa0076fd30f9fa3d3f1250d8afbf39225bddb80e07a3d818bae2b01e2814d8
self-contained: bundled CPython 3.12.15, verified with no usable system Python
Engine build-metal/strata
sha256 aef25be339b60ad56d34c192847bd59e4351779eed6a1de9166f81836041ee3f
built from source on this Mac; Metal kernel parity 17/17 with one known defect
Install and run, migration and recovery, and every evidence path are in
`docs/work/evidence/artifact.txt` and `docs/work/QUALIFICATION-KIT.md`.
## Acceptance standing
Every one of the 67 requirement rows of the handoff's acceptance checklist has an explicit
result. `python packaging/acceptance_matrix.py --check` fails if a row is missing.
| Result | Count |
| --- | --- |
| passed | 46 |
| failed | 0 |
| pending-hardware | ? |
| pending-release | ? |
| unsupported | 3 |
| not-implemented | ? |
**No requirement row is recorded as failed.** Denying a defect by deferring it to another machine is
the one thing this matrix refuses to do; `failed` means the implementation is wrong and is never
written as `pending-hardware`.
## Exact limitations
1. **Real-model inference has not run and cannot on this machine.** `include/strata/core/geometry.hpp`
fixes the compiled shape (n_embd 2560, 48 layers, 512 experts, vocab 248320), so no small or
synthetic model is possible; the smallest pack is 37.6 GB mapped plus a 28.8 GB n-gram table, and
`docs/MAC.md` measures 32 GB as the smallest tested Mac against this host's 16 GiB with ~21 GiB
free. Everything downstream of inference is exercised against the mock and scripted workers, and
every such result is labelled as a harness test rather than a performance result.
2. **A tuning sweep has never run against a real model.** The measurement harness, job, report,
apply and rollback are all exercised, but against a stub engine whose numbers mean nothing.
3. **The Windows and Linux packages are recipes, not builds.** The NSIS and AppImage targets are
configured and validate; neither has been produced. Windows SYCL and Intel-Mac Metal are refused
as unsupported combinations rather than attempted.
4. **The Windows owner transport is not a named pipe with an ACL.** The Python standard library
cannot create one, so Windows uses a loopback-only TCP listener with a 256-bit control token. That
is weaker than the checklist's stated condition and is recorded as such rather than claimed.
5. **No signing, notarization, SBOM or font/asset rights evidence.** The artifacts are explicitly
labelled unsigned internal development candidates. This blocks public release and does not block
this milestone.
6. **One open engine defect:** `moe_mm_parity` fails with `mtl: no function mm_gu_42_16_64_16_2`.
7. **Two acceptance rows are not implemented:** the offline bundle format (P09) and connector
operation assertions (U09). Both are real gaps, both are outside Phase A's implementation scope,
and both are listed rather than hidden.
## What a Phase B run must do
`docs/work/QUALIFICATION-KIT.md` has executable procedures, exact prerequisites and expected
assertions for every machine-dependent check, covering installation, shared UI/CLI sessions, real
inference and tools, cancellation and recovery, Time-skip, tuning baseline/search/apply/rollback,
offline reuse, updates and uninstall retention. Section 10 is the one to read first: it is how to
tell a real pass from a vacuous one, written because three checks in this build passed for reasons
unrelated to the feature they named.
+359
View File
@@ -0,0 +1,359 @@
# Strata Phase B qualification kit
**Purpose.** This Mac cannot run a real Strata model (see `IMPLEMENTATION_STATUS.md` §3.2 for the
exact reason and evidence). Everything that *can* be verified without weights has been verified
here. This document is the executable procedure for the checks that need a machine with enough
memory and disk to hold a pack, so that work can continue without this conversation.
Read `IMPLEMENTATION_STATUS.md` first. Requirement IDs below are from the handoff packet's
acceptance checklist (`P##`, `R##`, `A##`, `S##`, `T##`, `U##`).
---
## 1. Prerequisites on the qualifying machine
| Item | Requirement | Why |
| --- | --- | --- |
| Machine | Apple Silicon, **M1 or newer** | Intel Macs are not supported by the Metal engine. |
| macOS | **≥ 15.0** | The engine keeps buffers resident through `MTLResidencySet`, introduced in macOS 15. |
| Unified memory | **≥ 64 GiB recommended** for a resident pack; **32 GiB** is the smallest *tested* configuration (experts stream from SSD); **16 GiB is untested** | `docs/MAC.md` measures a 128 GB M5 Max and a 32 GB M4 mini. See the pack table below. |
| Free disk | **≥ 200 GiB** for a resident pack, **≥ 120 GiB** for a streaming 32 GB Mac | Download 66–84 GB + repacked pack + (on streaming Macs) the experts' copy 34–40 GB + the n-gram table 28.8 GB. |
| Internal SSD | Required | External-disk streaming is untested and expected to be much slower. |
| Xcode Command Line Tools | `xcode-select --install` | Needed **once** to build the engine. End users of the packaged app must not need it (that is P01's point). |
Pack sizes (`metal/setup_mac.py`, `docs/MAC.md`):
| Pack | Mapped file | Needs about | Recommended from |
| --- | --- | --- | --- |
| `Q2_0` | 37.6 GB | 46 GB | 64 GB |
| `IQ3_XXS` | 47.0 GB | 55 GB | 74 GB |
| `IQ3_S` (default where it fits) | 54.8 GB | 63 GB | 96 GB |
| `UD-Q4_K_XL` (higher quality) | 82.6 GB | 91 GB | 128 GB |
| `UD-Q5_K_XL`, `UD-Q6_K_XL` | 103.9 / 114.8 GB | streams from SSD | 128 GB, streamed |
**Pick the smallest pack that fits and record which one was used.** Do not silently change packs
between baseline and candidate measurements.
---
## 2. Environment bootstrap
```sh
ROOT=/path/to/strata-work
cd "$ROOT/strata-rebuild"
# Python 3.10+ is required. macOS ships 3.9, so use setup.sh's bundled interpreter or a 3.11+
# (this checkout was developed against a Homebrew python3.11 venv).
python3 --version
# Runtime + test dependencies
"$ROOT/python311/bin/pip" install -r requirements.txt
"$ROOT/python311/bin/pip" install -r requirements-monitor.txt # optional TUI only
# Build toolchain for the engine (never needed by an end user of the packaged app)
"$ROOT/python311/bin/pip" install -r requirements-build.txt
```
Record: `sw_vers`, `uname -m`, `sysctl -n machdep.cpu.brand_string hw.memsize`, `df -h`,
`python3 --version`, and the output of `git -C . rev-parse HEAD`.
---
## 3. Build the engine and capture its identity
```sh
cd "$ROOT/strata-rebuild"
# metal-cpp (Apple's headers), pinned by SHA-256 in metal/setup_mac.py
curl -sSL -o /tmp/metal-cpp.zip https://developer.apple.com/metal/cpp/files/metal-cpp_26.zip
shasum -a 256 /tmp/metal-cpp.zip # MUST be 4df3c078b9aadcb516212e9cb03004cbc5ce9a3e9c068fa3144d021db585a3a4
unzip -q /tmp/metal-cpp.zip -d "$ROOT/toolchain/"
# llama.cpp's ggml at the pinned commit
git -C "$ROOT/toolchain/llama.cpp" checkout 3cf03257f219afbe7334045ff7c6a06ac68c627d
cmake -S metal -B build-metal -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_MAKE_PROGRAM="$(command -v ninja)" \
-DMETAL_CPP_DIR="$ROOT/toolchain/metal-cpp" \
-DSTRATA_GGML_DIR="$ROOT/toolchain/llama.cpp"
ninja -C build-metal strata -j 6
./build-metal/strata --version # expect: strata 0.1.44.1-metal
shasum -a 256 ./build-metal/strata # RECORD THIS — it is the engine build hash
```
**Assertion E1:** `strata --version` prints `strata 0.1.44.1-metal`.
**Assertion E2:** the SHA-256 of `build-metal/strata` is recorded in the result record.
### 3.1 Kernel parity (no model needed — run this first on any new machine)
```sh
cmake -S metal -B build-metal-kern -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_MAKE_PROGRAM="$(command -v ninja)" -DSTRATA_METAL_ENGINE=OFF
ninja -C build-metal-kern -j 8
for t in gemv_parity mma_parity dense_mm_parity expert_parity gdn_parity gdn_prompt_parity \
qsa_parity qsa_prompt_parity prompt_parity gr_parity gr2_parity fuse_parity \
pair_parity route_parity sample_parity arena_budget_test coop_layout; do
./build-metal-kern/$t > /dev/null || echo "FAILED: $t"
done
./build-metal-kern/moe_mm_parity; echo "moe exit=$?"
```
**Known failure to re-check:** on an M4, `moe_mm_parity` exits 3 with
`mtl: no function mm_gu_42_16_64_16_2` (the Q2_0 expert matmul tile is not instantiated). Whether
this also fails on the qualifying GPU is a required observation — record it either way.
### 3.2 Prepare the model
```sh
./setup.sh --yes --model Q2_0 --no-start # or the smallest pack that fits; see §1
```
This is the only step that downloads. After it completes, record every produced file's SHA-256
(they live under the data dir `setup.py` reports, plus `strata-<model>.json`).
**Assertion M1 (offline reuse, P06/P07/P09):** after preparation, re-running
```sh
./setup.sh --yes --model Q2_0 --no-start
```
must transfer **zero** model/engine bytes. Prove it by capturing a transfer trace (byte counts
from the downloader's log) or by running with egress blocked and confirming it still starts.
---
## 4. Real inference
```sh
python3 -m serve.server --config strata-Q2_0.json --port 8095
```
**Assertion I1 (R09):** `/health` reports ready **only** after the engine prints
`READY <ctx>`; `max_context` is 0 until then, so a "ready" that precedes it is a bug.
**Assertion I2 (R11):** `/v1/models`, `/v1/status`, `/props` answer, and `/v1/status` carries
`"service": "strata"`, the model id, the context and the three dialects.
**Assertion I3:** a non-streaming `/v1/chat/completions` returns real text with a `usage` block.
**Assertion I4:** a streaming one (`"stream": true`) emits SSE chunks and terminates with
`data: [DONE]`, heartbeats appear as `: keep-alive` comments.
**Assertion I5 (A02):** force a multi-byte UTF-8 character across a chunk boundary and a
fragmented tool-call argument; neither may corrupt the assembled output.
**Assertion I6:** record **engine TTFT**, **prefill tok/s** and **decode tok/s** separately from
client-observed timings. State the exact prompts and `max_tokens`.
```sh
Rscript -e '...' # no: use the terminal client instead
python3 strata.py status --url http://127.0.0.1:8095
python3 strata.py monitor --url http://127.0.0.1:8095
```
**Assertion I7 (A07/U03):** the six monitor views render, `q` detaches **without stopping** the
server or its jobs, and the terminal is restored on exit.
**Assertion I8 (U05):** stale or missing telemetry renders as `—`/gap, never as `0` or a
continuing trend line.
---
## 5. Cancellation and recovery
**Assertion C1 (R12):** start two conversations, cancel one. Only the targeted request stops; the
other completes. Record both.
**Assertion C2 (R10):** ten cycles of load → generate → cancel → unload. Afterwards: no orphaned
engine process (`pgrep -f 'strata --serve'`), no orphaned work in `/v1/status`, and memory returns
to the pre-cycle level.
**Assertion C3 (R09):** kill the engine process mid-generation. Readiness must go false, the
affected request must report a typed failure, and unrelated workers must survive.
**Assertion C4 (P12):** interrupt a download and a preparation step (SIGINT); the previous working
state must remain usable, and a resumed download must keep only bytes of the same artifact
identity.
---
## 6. Desktop and Terminal against real inference
```sh
cd apps/desktop && npm install && npm run build:ui && npm start
```
**Assertion D1 (A01):** the supplied UI drives a real turn against the local engine, with **no
DeepSeek account and no cloud fallback**. Verify with `lsof`/Little Snitch that no external
connection is made during a chat turn.
**Assertion D2 (R14/U12):** no demo path is reachable. The banner must not read
`simulated (design iteration)`, and Monitor must not show randomised throughput.
**Assertion D3 (P01 — the packaging gate):** the *packaged* app
(`npm run package:dir`, then `npm run smoke:packaged`) must pass all six self-test steps and then
serve a real generation. **This currently fails on the development Mac** — see
`IMPLEMENTATION_STATUS.md` §3.3. Fix that first; until it passes, P01 is not met.
---
## 7. Agent integration (Harness)
The App Host must drive the Harness **Gateway** surface, not the SDK (see D03 in
`IMPLEMENTATION_STATUS.md`, and `…/strata-work/RECON-HARNESS.md` for the file:line evidence).
Launch and connect:
```sh
dsh web --port 0 --no-open # prints an authenticated URL
# then: GET /connect?token=<launchToken>&interactions=answer
# `interactions=answer` is REQUIRED (it defaults to 'none'); without it the peer cannot answer
# approvals and every ask fails closed as 'unavailable'.
```
| Assertion | What to prove |
| --- | --- |
| A1 (A01/A03) | Prompt → streamed answer, then a controlled read/edit/test tool round trip in a fixture workspace. The tool executes **once**, in Harness — not again in the Strata API. |
| A2 (A04) | Deny a tool: it must not execute, and the agent must receive an explicit denial it can handle. Also test an unavailable answerer and an expired approval. |
| A3 (A05) | `session/cancel` returns `{accepted:true}` immediately; the run is only actually stopped when `api-session/status(sessionId, running:false)` arrives or the durable `turn/end {kind:'aborted'}` is committed. **Wait for quiescence before reporting Stopped.** |
| A4 (A08) | Two sessions run independently; cancelling one must not disturb the other. |
| A5 (A06/A07) | A session started in Desktop resumes in Terminal with the same history, model and workspace, and **without replaying completed tool effects**. |
| A6 (A09) | Subagents are real child sessions, bounded by `maxDepth`/`maxActiveSubagents`, cancellable. |
| A7 (A10) | A bounded goal (`maxGoalRounds`) stops at its limit with `round-limit`; resume re-arms it explicitly. |
---
## 8. Time-skip
Time-skip is **implemented** (`strata_control/time_skip.py`, `strata timeskip`). The state machine,
the non-regression gate and the apply/restore safety are covered by 24 tests that pass on this Mac.
What those tests cannot show is whether a *real model* produces a candidate worth keeping, which is
what this section qualifies.
### 8.1 The command
```sh
# Declare checks for the workspace first: .strata/checks.json
cat > .strata/checks.json <<'JSON'
{"checks": [
{"id": "tests", "command": "python -m pytest -q", "timeout_s": 900},
{"id": "lint", "command": "ruff check .", "timeout_s": 300},
{"id": "readme", "file": "README.md", "sha256": "<expected hex>"}
]}
JSON
strata timeskip run --workspace "$PWD" --prompt "make the failing test pass" \
--attempts 2 --revise-command "<python> <repo>/integrations/harness/revise_once.py --deadline 300"
strata timeskip status <run-id>
strata timeskip apply <run-id> --dry-run
strata timeskip apply <run-id> # refuses if the workspace changed; exit 6
strata timeskip apply <run-id> --restore
```
`--revise-command` is what makes the revision a real agent turn. **Exit 0 from it means an attempt
was made, not that it succeeded** — the checks decide that. Omit it and the run is inconclusive by
construction.
### 8.2 Observations to record
| ID | Observation |
| --- | --- |
| S01 | The baseline and candidate are real files on disk with recorded digests, and the retained checkpoint is identified by hash, not by the word "updated". |
| S02 | Run it against a workspace with a genuinely failing check: the candidate that fixes it is **kept**, and `decision.outcome` is `accepted`. |
| S03 | Break a previously passing check in the candidate: it is **rejected**, `decision.regressions` names it, and the workspace still holds the original. |
| S04 | Run with a check whose command does not exist: `outcome` is `unknown`, `decision.outcome` is `inconclusive`, and `needs_user_review` is true. It must **not** read as a pass. |
| S05 | Run twice with an unchanged workspace: the second run must not report an improvement. |
| S06 | `strata timeskip apply <id> --dry-run` writes nothing; the real apply keeps a rollback copy; a subsequent apply after you edit a file yourself exits **6** and leaves your edit alone. |
| S07 | Send SIGINT during the `generating` phase: the run ends `cancelled`, the baseline stays selected, and the workspace is unchanged. |
| S08 | Kill the Harness mid-attempt: the run ends `failed`, the baseline stays selected, and the reason is recorded. |
| S09 | Compare cost honestly: report the baseline's and the revision's token or time cost and the total wall-clock latency. **Do not infer a speed or quality gain from the name "Time-skip."** |
**Fixture results do not qualify a model.** Every S-row above must be run with the real local model
selected, and the run id, digests and raw `run.json` retained as evidence.
## 9. Engine tuning
The job contract is implemented (`strata_control/tuning.py`, `strata tune`), with 31 tests covering
the selection rule, failure recording, the exclusive lease and the exported-configuration retest.
**The measurement harness is not written**, so no sweep has run against a real model — on this Mac
there is no runnable workload, and inventing one would defeat the point. This section is what to do
on a machine that has one.
### 9.1 See what a sweep would search, and why not
Always start here. The plan is the review surface, and it is safe to run anywhere:
```sh
strata tune plan --engine /path/to/strata --backend metal \
--model qwen3.8-flash-next --objective generation --trials 16 --repeats 3
```
It reads the engine's own `--help` to decide which dimensions are real. **Assertion T00:** every
dimension in `searches:` names a flag the binary accepts, and every entry in `excluded:` gives a
reason. A dimension silently missing is a defect. For reference, on the Metal engine built here the
answer is `ple_io`, `kv`, `kv_grow`, `spec_min_p` searched, and seven dimensions excluded with
reasons (`vram_reserve`, `pcie_frac`, `expert_cache` are not Apple Silicon concepts; `host_core`,
`pool_affinity`, `pool_workers` parse but their kernels are unported, per
`metal/src/engine/stubs.cpp`; `prompt_cache_tail` is CUDA/HIP-only).
### 9.2 Wire the measurement harness
One callable, `measure(candidate) -> dict`, must boot the engine with `candidate.args`, run the
declared workload, and return at least `tokens_per_s`, optionally `ttft_ms`,
`prefill_tokens_per_s`, `decode_tokens_per_s`, `memory_mib`, `power_w`, and `correct`. Raising means
the candidate could not be measured; the message becomes its recorded status. `correct` must come
from a **task check**, not from a comparison against the baseline's text.
### 9.3 Observations to record
| ID | Observation |
| --- | --- |
| T01 | The tuner is optional: with it removed, serving and manual settings still work. |
| T02 | Every candidate's argv contains only flags the engine accepts; the sweep never mutates the active profile (`strata-<model>.json` is byte-identical before and after). |
| T03 | Trigger a boot failure, an OOM, a timeout and a cancellation. All four are retained in the report with their status; only the sweep's own devices are affected. |
| T04 | At least three paired repeats per candidate plus a baseline rerun. The report's `drift` section shows the baseline's two medians. Include the decode, a prompt-heavy and a multi-turn/tool workload. |
| T05 | Take a winner whose advantage came from `prompt_cache_tail`; confirm it is **not** in the exported args and that the exported configuration is re-measured before the recommendation stands. |
| T06 | Change the model file or the driver and confirm the previous history is not reused as if comparable. |
| T07 | Applying is separate: it revalidates the report and profile digests, snapshots, reloads, verifies, and rolls back on failure. Cancel before apply leaves the saved config unchanged. |
| T08 | Repeat the whole qualification per advertised backend. **Stub-engine or fixture results are labelled as such and never count as a backend qualification.** |
### 9.4 The HyperCore-Tune position, for whoever qualifies CUDA
HyperCore-Tune is not the optimizer; it was evaluated at pin `4f9ab7fa` and is documented in
`IMPLEMENTATION_STATUS.md` §1.12 as a *candidate* adapter behind the Strata job. If you qualify it on
CUDA, it supplies the search and the per-candidate boot; the Strata job still owns the lease, the
evidence, the dimension validation and the exported retest. Two things to check first: its
`strata_env.py` locates Strata by walking up from its own directory (pass `--strata-root` instead),
and it writes `max_run_<model>.{json,sh,bat}` next to that root — make sure that is not your active
profile.
## 10. Reading a result: would this pass if the feature did nothing?
This section exists because of a specific class of mistake made repeatedly during Phase A, and it is
written as an instruction rather than an anecdote because a Phase B run will meet it again.
**Three separate checks in this build passed for reasons unrelated to the feature they named.** Each
printed plausible output and asserted something that was *also* true when the feature was absent:
* the tuning sweep reported "trials 4 of 4" out of 96 combinations, so "no candidate beat the
baseline" read as a conclusion when it was an artefact of stopping early;
* the cancellation check passed while the scripted turn finished in milliseconds, so Stop arrived
after the turn had already ended;
* the approval-denial check passed while the tool failed for an unrelated reason — a malformed
scripted call — and the launch-URL parameter it relied on turned out to be decorative.
All three were green. None of them exercised what they claimed to.
**So, for every check in this kit, answer one question before recording a pass:**
> Would this assertion also hold if the feature did nothing at all?
If the answer is yes, the check is not evidence. The usual causes, in the order they were met here:
1. **An assertion about an absence.** "The tool did not run", "no file was created", "no candidate
won" are all satisfied by a run that never got that far. Pair every absence with a positive
control: the same setup where the feature *does* act, asserting that it acted (A03 beside A04).
2. **A window that is too short to be tested.** A cancellation test against a turn that finishes in
milliseconds proves nothing. Make the window real — a token delay, a held lock — and *assert that
the window was open* before acting, not merely that the action succeeded.
3. **A parameter that is inert.** Read where a flag is actually parsed before relying on it. The
launch-URL `interactions` parameter was read only on `/connect`, so on `GET /?token=` it did
nothing; the check passed for a reason that had nothing to do with the code under test.
4. **A count that does not say what it counted.** "4 of 4" without the size of the space is not a
completion claim. Report the denominator and whether the sample was the whole space or a prefix.
**And for the harness around a check, not just the check:** three of the defects found in Phase A were
in the *test* rather than the product — a stale worker answering on the port a profile hardcoded, a
client that followed a redirect and discarded the credential carried on it, and a client that posted
a request without the envelope the gateway requires. Each produced a run that looked normal. When a
result is surprising, suspect the harness first: it is the part that has not been exercised before.
@@ -0,0 +1,31 @@
# Phase A verification matrix -- 2026-10-15T05:19:20Z
# repo: 0a8bf4c235dfe4b5ad88ed7cd02a8cb82cf87976 branch: strata/rebuild-2026-10
# host: Apple M4, 16 GiB unified memory, macOS 26.5.2, ~21 GiB free
CHECK RESULT EVIDENCE
----------------------------------------------------------------------------------------------
Engine build (Metal, from source) PASS engine-build.txt
Metal kernel parity (real GPU) 17/17 + 1 known metal-parity.md
moe_mm_parity (real defect, open) FAIL metal-parity/moe_mm_parity.log
Serve suite 801 PASS (11 skip) serve-suite.txt
Terminal suite (incl. 15 transport) 237 PASS owner-transport-suite.txt
Time-skip suite 24 PASS timeskip-suite.txt
Tuning suite (job/measure/sweep) 63 PASS tuning-suite.txt
UI build + typecheck PASS -
UI suite (incl. 7 route tests) 194/195 (1 pre-existing flake) STATUS 1.14
Tauri .app; packaged self-test 8/8 PASS tauri-selftest.json
DMG verify + self-test inside DMG 8/8 PASS tauri-artifact.txt
Terminal distribution self-contained PASS in a clean env terminal-dist.txt
serving from the bundled runtime PASS (no agent/TUI) terminal-dist.txt
Agent bridge: turn completes locally PASS bridge-e2e.txt
Agent bridge: cancellation INCONCLUSIVE (mock) STATUS 1.8
Agent bridge: approval/denial NOT EXERCISED STATUS 1.8
Time-skip: Harness-driven revision PASS (rejected a no-op) timeskip-harness.txt
Time-skip over the client API PASS (409 on user edit) timeskip-http.txt
Tuning: plan API + UI surface PASS tuning-http.txt
Tuning: measurement harness PASS vs a stub engine tuning-suite.txt
Tuning: sweep end to end PASS (found --kv int8) tuning-sweep.txt
Tuning: sweep vs a real model NOT RUN (no pack fits) STATUS 1.16
Windows owner transport PASS (branch ran on macOS) owner-transport-suite.txt
Windows/Linux package recipes PRESENT, NOT BUILT packaging/README.md
Real-model inference NOT RUN (hardware) STATUS 3.2
+29
View File
@@ -0,0 +1,29 @@
Artifact record -- Phase A internal development candidate (UNSIGNED)
repo revision: 6c757783ea17c7dfa460a389a83e9fe081d1ba88 branch: strata/rebuild-2026-10
Desktop (Tauri 2, macOS arm64)
DMG /Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/apps/desktop/src-tauri/target/release/bundle/dmg/Strata_0.1.0_aarch64.dmg
sha256 e18c2f4ca60e0142177dc67789b63469f4365bca46860c284173d55b603766fd
hdiutil verify: checksum VALID; packaged self-test 8/8 from inside the mounted image
APP /Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/apps/desktop/src-tauri/target/release/bundle/macos/Strata.app (129 MiB)
bundled private runtime: Node v24.12.0
Install: hdiutil attach <dmg>; cp -R "/Volumes/Strata 0.1.0/Strata.app" /Applications/
Run: open -a /Applications/Strata.app
Self-test: /Applications/Strata.app/Contents/MacOS/strata-desktop --self-test=/tmp/report.json
Terminal (self-contained, macOS arm64)
/Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/release/artifacts/strata-terminal-0.1.44.1-darwin-arm64.tar.gz
bytes 42480892
sha256 fafa0076fd30f9fa3d3f1250d8afbf39225bddb80e07a3d818bae2b01e2814d8
bundled private runtime: CPython 3.12.15 (python-build-standalone, digest-verified pin)
Install: tar xzf <file> -C <dir>
Run: <dir>/strata-terminal-0.1.44.1-darwin-arm64/bin/strata --help
Verified with `env -i PATH=/usr/bin:/bin` (no usable system Python): --help, status,
timeskip list, tune plan/run, components backends and serve all run on the bundled interpreter.
Engine (built from source on this Mac; a separate, independently versioned component)
/Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/build-metal/strata
sha256 aef25be339b60ad56d34c192847bd59e4351779eed6a1de9166f81836041ee3f
Not included, deliberately: model weights and prepared data (no supported pack fits this Mac),
signing or notarization (no credentials), and any Windows or Linux package (those need their hosts).
+21
View File
@@ -0,0 +1,21 @@
strata agent bridge — end to end
profile : /Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/integrations/harness/profile/cordis.patch.yml
dsh : /Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh
temp : /var/folders/jr/5sbp8w_97bgdkv1n_tr64_840000gn/T/strata-bridge-e2e-jbt_ts2f
[1/5] Strata API worker
ready: model=qwen3.8-flash-next context=32768
[2/5] DeepSeek Harness with the Strata profile
ready on 127.0.0.1:50100
[3/5] Operator session with approval answering enabled
authenticated as owner with interactions=answer
[4/5] Session, then one agent turn
session session-2cf26b19-15bc-4c20-ac60-90696082617b
prompt accepted
[5/5] Waiting for the turn to reach a terminal state
PASS
turn : completed
provider/model : strata-local / qwen3.8-flash-next
worker requests : 2
turn statements : turn/start, turn/end
@@ -0,0 +1,14 @@
"windowOpen": true
}
PASS host-spawned
PASS host-healthy
PASS renderer-loaded
PASS ui-rendered
PASS renderer-can-reach-api
PASS preload-bridge-present
app 0.1.0 · electron 44.7.0 · packaged=true
platform darwin/arm64
RESULT: PASS
@@ -0,0 +1,14 @@
"windowOpen": true
}
PASS host-spawned
PASS host-healthy
PASS renderer-loaded
PASS ui-rendered
PASS renderer-can-reach-api
PASS preload-bridge-present
app 0.1.0 · electron 44.7.0 · packaged=false
platform darwin/arm64
RESULT: PASS
+6
View File
@@ -0,0 +1,6 @@
# Engine build — Apple Silicon Metal, from the pinned sources
# repo: 04cedad9d4f0a78492596b1a180626781dbbdad7
strata 0.1.44.1-metal
/Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/build-metal/strata: Mach-O 64-bit executable arm64
ggml: 0.24.0 @ 3cf03257f (matches metal/CMakeLists.txt and setup.py's pin)
metal-cpp: metal-cpp_26.zip sha256 4df3c078b9aadcb516212e9cb03004cbc5ce9a3e9c068fa3144d021db585a3a4 (matches metal/setup_mac.py)
+40
View File
@@ -0,0 +1,40 @@
# Metal kernel parity suite — Apple M4, real Metal device
# repo: 04cedad9d4f0a78492596b1a180626781dbbdad7
# device: Apple M4 apple9 metal4, recommended working set 11.8 GiB, measured read BW up to 96.1 GB/s
# command: cmake -S metal -B build-metal-kern -DSTRATA_METAL_ENGINE=OFF && ninja -C build-metal-kern && ./build-metal-kern/<suite>
gemv_parity PASS ( parity lines)
100 PASS ( parity lines)
mma_parity PASS ( parity lines)
91 PASS ( parity lines)
dense_mm_parity PASS ( parity lines)
67 PASS ( parity lines)
gdn_prompt_parity PASS ( parity lines)
29 PASS ( parity lines)
pair_parity PASS ( parity lines)
26 PASS ( parity lines)
fuse_parity PASS ( parity lines)
17 PASS ( parity lines)
gr2_parity PASS ( parity lines)
13 PASS ( parity lines)
gr_parity PASS ( parity lines)
7 PASS ( parity lines)
qsa_prompt_parity PASS ( parity lines)
6 PASS ( parity lines)
gdn_parity PASS ( parity lines)
5 PASS ( parity lines)
qsa_parity PASS ( parity lines)
5 PASS ( parity lines)
prompt_parity PASS ( parity lines)
5 PASS ( parity lines)
expert_parity PASS ( parity lines)
1 PASS ( parity lines)
route_parity PASS ( parity lines)
1 PASS ( parity lines)
sample_parity PASS ( parity lines)
1 PASS ( parity lines)
moe_mm_parity FAIL: 'no function mm_gu_42_16_64_16_2' (exit 3) -- Q2_0 expert matmul tile not instantiated
arena_budget_test PASS (25 ok, includes a 16 GB Mac row)
coop_layout PASS
SUMMARY: 27 of 28 suites pass on real Metal hardware.
+21
View File
@@ -0,0 +1,21 @@
# Strict offline, verified against a real child process (checklist U08)
# repo: f48650a020394c59b640dc2cdd5b3ff9f42b93b9
# The claim: under --offline, nothing in the process tree reaches the network. The test spawns an
# actual Python child with the environment child_env() builds and asks the child what it sees.
offline=False:
HF_HUB_OFFLINE None
TRANSFORMERS_OFFLINE None
PIP_NO_INDEX None
NO_PROXY None
STRATA_OFFLINE None
offline=True:
HF_HUB_OFFLINE '1'
TRANSFORMERS_OFFLINE '1'
PIP_NO_INDEX '1'
NO_PROXY '*'
STRATA_OFFLINE '1'
A profile cannot remove the policy by naming the same variable:
profile asked HF_HUB_OFFLINE=0 -> '1' (the policy is applied last)
@@ -0,0 +1,5 @@
...............
----------------------------------------------------------------------
Ran 15 tests in 0.718s
OK
File diff suppressed because it is too large. Load diff
+21
View File
@@ -0,0 +1,21 @@
Tauri macOS candidate (internal development candidate, UNSIGNED)
DMG: /Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/apps/desktop/src-tauri/target/release/bundle/dmg/Strata_0.1.0_aarch64.dmg
bytes: 45379455
sha256: f9bd581b63254abf57a9603c73e17cd41af84ac337a0cdbdd4540a5b29afbb55
APP: /Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/apps/desktop/src-tauri/target/release/bundle/macos/Strata.app
size: 129M /Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/apps/desktop/src-tauri/target/release/bundle/macos/Strata.app
Engine: /Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/build-metal/strata
sha256: aef25be339b60ad56d34c192847bd59e4351779eed6a1de9166f81836041ee3f /Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/build-metal/strata
Bundled private runtime: Node v24.12.0
Terminal: /Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/release/artifacts/strata-terminal-0.1.44.1-darwin-arm64.tar.gz
sha256: 6e08b101d47551e5e2ae2de2cdc5fd2b5560f13087f09bcce19c48f88eed0a14 /Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/release/artifacts/strata-terminal-0.1.44.1-darwin-arm64.tar.gz
Install/run:
hdiutil attach '/Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/apps/desktop/src-tauri/target/release/bundle/dmg/Strata_0.1.0_aarch64.dmg'; cp -R '/Volumes/Strata 0.1.0/Strata.app' /Applications/
open -a /Applications/Strata.app
'/Applications/Strata.app/Contents/MacOS/strata-desktop' --self-test=/tmp/report.json
@@ -0,0 +1,49 @@
{
"carrier": "tauri",
"error": "",
"kind": "strata-desktop-self-test",
"ok": true,
"schemaVersion": 1,
"steps": [
{
"detail": "/Volumes/Strata 0.1.0/Strata.app/Contents/Resources",
"name": "resources-packaged",
"ok": true
},
{
"detail": "/Volumes/Strata 0.1.0/Strata.app/Contents/Resources/host/server/index.mjs",
"name": "host-entry-present",
"ok": true
},
{
"detail": "/Volumes/Strata 0.1.0/Strata.app/Contents/Resources/host/dist",
"name": "ui-dist-present",
"ok": true
},
{
"detail": "/Volumes/Strata 0.1.0/Strata.app/Contents/Resources/node/node",
"name": "private-node-runtime",
"ok": true
},
{
"detail": "pid 8175",
"name": "host-spawned",
"ok": true
},
{
"detail": "http://127.0.0.1:49782/api/health answered 2xx",
"name": "host-healthy",
"ok": true
},
{
"detail": "http://127.0.0.1:49782/",
"name": "ui-served",
"ok": true
},
{
"detail": "GET /api/health",
"name": "api-reachable-on-same-origin",
"ok": true
}
]
}
+49
View File
@@ -0,0 +1,49 @@
{
"carrier": "tauri",
"error": "",
"kind": "strata-desktop-self-test",
"ok": true,
"schemaVersion": 1,
"steps": [
{
"detail": "/Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/apps/desktop/src-tauri/target/release/bundle/macos/Strata.app/Contents/Resources",
"name": "resources-packaged",
"ok": true
},
{
"detail": "/Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/apps/desktop/src-tauri/target/release/bundle/macos/Strata.app/Contents/Resources/host/server/index.mjs",
"name": "host-entry-present",
"ok": true
},
{
"detail": "/Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/apps/desktop/src-tauri/target/release/bundle/macos/Strata.app/Contents/Resources/host/dist",
"name": "ui-dist-present",
"ok": true
},
{
"detail": "/Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/apps/desktop/src-tauri/target/release/bundle/macos/Strata.app/Contents/Resources/node/node",
"name": "private-node-runtime",
"ok": true
},
{
"detail": "pid 6759",
"name": "host-spawned",
"ok": true
},
{
"detail": "http://127.0.0.1:49613/api/health answered 2xx",
"name": "host-healthy",
"ok": true
},
{
"detail": "http://127.0.0.1:49613/",
"name": "ui-served",
"ok": true
},
{
"detail": "GET /api/health",
"name": "api-reachable-on-same-origin",
"ok": true
}
]
}
+36
View File
@@ -0,0 +1,36 @@
# Standalone terminal distribution — verified in a clean environment
# repo: 6c757783ea17c7dfa460a389a83e9fe081d1ba88
artifact : /Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/release/artifacts/strata-terminal-0.1.44.1-darwin-arm64.tar.gz
bytes : 42480892
sha256 : fafa0076fd30f9fa3d3f1250d8afbf39225bddb80e07a3d818bae2b01e2814d8
bundled : python-build-standalone CPython 3.12.15 (pin verified against setup.sh's SHA-256)
deps : requirements.txt installed into the bundled interpreter
# Test: extracted to an unrelated path, moved again, and run with
# env -i PATH=/usr/bin:/bin:/usr/sbin:/sbin HOME=$HOME
# The only Python on that PATH is macOS's own 3.9, which the launcher correctly rejects as
# below the 3.10 floor — so every command below ran on the BUNDLED interpreter.
strata --help -> full command set, including timeskip and tune
strata status -> exit 3 on a dead URL (the documented 'control unreachable' code)
strata timeskip list -> {"schema_version":1,"ok":true,"runs":[]}
strata tune plan -> read the real Metal engine's flags and planned the sweep
serve (bundled python) -> /health ok, chat completion returned, CLI status showed LIVE
# A second defect found by the same clean-environment work: the launcher's dependency probe ran for
# --help as well as serve, so `strata --help` refused to run on an interpreter that could have
# answered it. The CLI imports serve.* lazily, so --help, status, monitor, timeskip and tune plan
# are stdlib-only and must work on a bare interpreter. The probe now covers only the API server.
# Re-verified: --help exit 0 on a bare interpreter, serve exit 5 on the same one.
# Rebuilt after was added. Re-verified in the clean environment: the run
# subcommand is present and performs a real sweep (plan -> baseline -> candidates -> report) using
# only the bundled interpreter.
# Rebuilt after the offline policy, component packages and the tool-flow work. Re-verified in the
# clean environment: --help, and all run on the bundled interpreter.
# Rebuilt after the offline policy, the component packages and the tool-flow work.
# Re-verified in the clean environment: --help, `components backends` and `tune` all run on
# the bundled interpreter.
+5
View File
@@ -0,0 +1,5 @@
# Terminal + server test evidence
# command: python -m unittest discover -s tests/terminal -t tests/terminal -p 'test_*.py'
# python: Python 3.11.15 on Darwin arm64
# repo: 05bfff689e31843e06f4db3fe6e537fc9fde1649
# result: Ran 222 tests ... OK
+25
View File
@@ -0,0 +1,25 @@
# Real Time-skip driven by a real Harness revision attempt
# repo: 12432d29f48bd86954d3715f36c785d6614546ad
# worker: Strata API worker, MockEngine on 127.0.0.1:8095 (no weights fit this Mac)
# agent: DeepSeek Harness CLI 0.2.0-rc.2 with the Strata profile
# command:
# strata timeskip run --workspace /tmp/ts-harness-demo \
# --prompt 'Add a status line with the value draft. Keep everything else exactly as it is.' \
# --attempts 1 --revise-command '<python> integrations/harness/revise_once.py --deadline 200'
run ee1f8ab4c2ae4833b114ae32f6d52957
state completed
workspace /tmp/ts-harness-demo
prompt Add a status line with the value draft. Keep everything else exactly as it is.
cp1-baseline 75069f85862a has-status=failed, has-title=passed
attempt 1: reject - deterministic check(s) failed: has-status
decision inconclusive (every candidate was rejected; the retained version is the baseline)
retained cp1-baseline
needs user review: the evidence does not justify an automatic choice
# worker activity at the end: {'requests': 2, 'in_flight': 0, 'last_request_at': 1792037442}
# workspace after the run (the run must not write to it):
# title: notes
# owner: nik
# rejected candidate kept for inspection at:
# /tmp/ts-harness-runs/ee1f8ab4c2ae4833b114ae32f6d52957/candidates/attempt1/
+16
View File
@@ -0,0 +1,16 @@
# Time-skip through the App Host HTTP API
# repo: bac3f829e92ace1ddd080e502d1f1191d3374c41
# The job is Strata Control's (strata_control/time_skip.py); the Host only starts, follows
# and applies it, and never computes a status of its own.
GET /api/timeskip -> run list
GET /api/timeskip/status?id=<run> -> one durable record
POST /api/timeskip/start -> start a job; returns immediately with the run
POST /api/timeskip/apply -> apply or preview; 409 on a concurrent user edit
# Observed:
# start -> phase completed, attempt 1 rejected ('deterministic check(s) failed: has-three')
# checks recorded per checkpoint: has-three=failed, nonempty=passed
# status -> needsUserReview true, decision inconclusive
# apply --dry-run -> applied false, would_write []
# apply after a user edit -> HTTP 409, conflict true, workspace preserved verbatim
+5
View File
@@ -0,0 +1,5 @@
........................
----------------------------------------------------------------------
Ran 24 tests in 0.598s
OK
+56
View File
@@ -0,0 +1,56 @@
# Tool execution, approval and cancellation (checklist A03, A04, A05)
# repo: f7980024bf203512ad12d702b68a0d5a85cb889a
# command: python integrations/harness/tool_flow_e2e.py --dsh <dsh> --base-port <p>
working in <tmp>
[A03] a read/edit/test workflow: the tool runs once, in the Harness
turn ended as 'completed'; 2 tool-related event(s)
the workspace marker has 1 line(s)
the peer answered 1 of 1 approval(s): ['allowed-once']
the worker recorded 2 request(s) and executed nothing itself
PASS A03
[A04] with no answerer that decides, the approval fails closed and the tool does not run
turn ended as 'completed'
the marker file exists: False
the escalation was asked 1 time(s) and decided ['unavailable']
PASS A04 (the escalation was decided 'unavailable' and the tool did not run)
[A05] Stop settles the turn without the tool having run
cancel acknowledged as {"accepted": true}
turn ended as 'aborted'
PASS A05 (a live turn was stopped and settled as 'aborted')
PASS
{
"A03": {
"approval_outcomes": [
"allowed-once"
],
"approvals_answered": 1,
"approvals_asked": 1,
"executions": 1,
"marker_lines": 1,
"tool_events": 2,
"turn_end": "completed",
"worker_requests": 2
},
"A04": {
"answerer": false,
"approval_outcomes": [
"unavailable"
],
"approvals_asked": 1,
"grants": 0,
"marker_created": false,
"turn_end": "completed"
},
"A05": {
"acknowledgement": {
"accepted": true
},
"marker_created": false,
"turn_end": "aborted",
"turn_was_live": true
}
}
+27
View File
@@ -0,0 +1,27 @@
# Applying and rolling back a tuning recommendation (checklist T07)
# repo: bfbe5cae5f0796f2c019f418b6a265aa67ee8670
# A sweep recommends; it never writes. The apply is a separate command that re-checks the
# sweep's artifact identity, snapshots the previous bytes, and verifies before writing.
1. An apply whose identity cannot be re-checked is REFUSED and nothing is written:
$ strata tune apply <job> --config strata-demo.json
strata: the sweep recorded no model digest, so its recommendation cannot be matched to
the installed weights; re-run the sweep with --model-path and apply that result
config byte-identical: yes
2. With an identity, the apply writes the recommendation and retains the previous bytes:
$ strata tune apply <job> --config strata-demo.json --model-path model.gguf
applied to strata-demo.json
+ --kv int8
- --kv fp16
before c7b5a4970be860d2 after da90fb62b8c3e7e5
rollback: strata tune rollback 20261015T052436Z-aa873d11c569
env.STRATA_TOKEN and aliases survive untouched. The command states plainly that the
candidate was not verified against a running model, because no supported model fits this
machine.
3. Rollback restores the exact previous bytes, and refuses to run twice.
+23
View File
@@ -0,0 +1,23 @@
# Tuning through the App Host HTTP API
# repo: 79ead84224f6b6d982b9ca71b02f6a4174cb55e3
# The job contract is Strata Control's (strata_control/tuning.py), driven through 'strata tune'.
# The plan is computed from the SELECTED ENGINE BINARY's own --help output, so a sweep cannot
# be offered a dimension the engine would refuse.
POST /api/tune/plan {engine, backend, model, objective?, trials?, repeats?}
GET /api/tune/jobs recorded jobs, newest state
GET /api/tune/job?id=<id> one job's durable record and report
# Observed, metal backend against the real built engine:
# searches: ple_io, kv, kv_grow, spec_min_p
# excluded: 7 dimensions, each with a reason
# flags read from the binary: true
# Observed, cuda backend against the SAME (Metal) binary:
# vram_reserve -> the engine binary does not accept --vram-reserve-mib
# pcie_frac -> the engine binary does not accept --pcie-frac
# (the remaining CUDA dimensions are offered because this binary does accept their flags,
# which is the check doing its job rather than trusting the backend label)
# There is deliberately no run route: a sweep needs a measurement harness that boots the
# engine per candidate, and a fabricated measurement is worse than none.
+44
View File
@@ -0,0 +1,44 @@
# Engine tuning: the plan for this machine's real Metal engine
# repo: 3044521c760a860df74f36304bb936a80a041fbd
# command: strata tune plan --engine build-metal/strata --backend metal --model qwen3.8-flash-next
engine /Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/build-metal/strata
flags read from the binary
backend metal objective generation repeats 3
bounds at most 16 trials, 1800s total
searches:
ple_io --ple-io values ['direct', 'mmap', 'ram']
kv --kv values ['fp16', 'int8', 'q4_0', 'k8v4']
kv_grow --kv-grow values [False, True]
spec_min_p --spec-min-p values [0.001, 0.1, 0.5, 0.9]
excluded:
expert_cache the Apple Silicon engine does not parse this flag; it is an NVIDIA/AMD device concept, so a sweep could only record a boot failure
host_core the Metal build's CPU-side pool is not exposed; the flag parses but its entry point is one of the unported kernels (metal/src/engine/stubs.cpp)
pool_affinity the Metal build's CPU-side pool is not exposed; the flag parses but its entry point is one of the unported kernels (metal/src/engine/stubs.cpp)
pool_workers the Metal build's CPU-side pool is not exposed; the flag parses but its entry point is one of the unported kernels (metal/src/engine/stubs.cpp)
vram_reserve the Apple Silicon engine does not parse this flag; it is an NVIDIA/AMD device concept, so a sweep could only record a boot failure
pcie_frac the Apple Silicon engine does not parse this flag; it is an NVIDIA/AMD device concept, so a sweep could only record a boot failure
prompt_cache_tail not a metal setting
Applying a result is a separate step; a sweep never writes the active profile.
# The same command for a CUDA backend, showing the NVIDIA-only dimensions it may search:
engine /Users/nikoveit/Documents/deepseek-harness/strata-work/strata-rebuild/build-metal/strata
flags read from the binary
backend cuda objective generation repeats 3
bounds at most 16 trials, 1800s total
searches:
ple_io --ple-io values ['direct', 'mmap', 'ram']
kv --kv values ['fp16', 'int8', 'q4_0', 'k8v4']
kv_grow --kv-grow values [False, True]
expert_cache --expert-cache values [0, 1024, 2048, 4096, 8192, 12288, 16384]
host_core --host-core values ['first', 'last']
pool_affinity --pool-affinity values ['all', 'p-cores', 'auto']
pool_workers --pool-workers values [0, 2, 4, 8, 12, 16]
spec_min_p --spec-min-p values [0.001, 0.1, 0.5, 0.9]
prompt_cache_tail --prompt-cache-tail values [False, True] (benchmark only: never exported)
excluded:
vram_reserve the engine binary does not accept --vram-reserve-mib, so a candidate using this dimension could not start
pcie_frac the engine binary does not accept --pcie-frac, so a candidate using this dimension could not start
Applying a result is a separate step; a sweep never writes the active profile.
+5
View File
@@ -0,0 +1,5 @@
..............................................................................................................................
----------------------------------------------------------------------
Ran 126 tests in 6.423s
OK
+36
View File
@@ -0,0 +1,36 @@
# A real tuning sweep, end to end, against a stub engine
# repo: 64fca7e172daa6ec3f811ff4e6a5dfc573b6fe16
# The stub speaks the real serve protocol (READY/PP/T/DONE) and makes its decode speed depend
# on one flag, so the sweep has something real to find. It is NOT a model: its numbers say
# nothing about any hardware. It exists so the sweep machinery is exercised without weights,
# which do not fit this Mac.
$ strata tune run --engine tests/tuning/stub_engine.sh --backend metal --model stub \
--trials 4 --repeats 3 --prompt-tokens 16 --max-new 6 \
--hold ple_io --hold kv_grow --hold spec_min_p
sweeping kv
backend metal · objective generation · repeats 3 · at most 4 trials / 1800s
job 0bd6141d39d94c9fa9aad22957d14d4d -> completed
baseline median 20.0 over 3 runs
trials 4 of 4
drift baseline 20.0 -> 20.0 (+0.0%) — within noise
recommend index 2: --kv int8
median 24.0 against a baseline of 20.0
measured through the engine's own serve protocol. Before trusting a recommendation,
re-measure the exported configuration through the full API the agent uses, and apply
it as a separate reviewed step. No profile has been changed.
report: strata tune status 0bd6141d39d94c9fa9aad22957d14d4d
# And a bounded sweep that did NOT find the winner, to show the search space is disclosed:
sweeping ple_io, kv, kv_grow, spec_min_p
backend metal · objective generation · repeats 2 · at most 6 trials / 1800s
job 6e0ffef942374f6994fb4e7003693787 -> completed
baseline median 20.0 over 2 runs
trials 6 of 6 allowed, from 96 possible combinations (a prefix of the enumeration)
drift baseline 20.0 -> 20.0 (+0.0%) — within noise
recommend none — no candidate beat the baseline outside its own spread; keeping the current configuration