mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-28 17:18:49 -04:00
* feat(addons): add the add-on runtime, navigation and first-party add-ons Add the add-on runtime to LocalAI: manifests, the host operation broker, admin gating by account role, the add-on UI bundle builder and the SDK for add-on pages. Move the navigation to Chat, Models, Add-ons and Settings, with pinned add-ons in the sidebar and an Add-ons drawer. Ship the first-party add-ons (voice, face, fine-tuning, quantization) as packages for linux/amd64, linux/arm64 and darwin/arm64. Intel macOS (darwin/amd64) is enabled in the platform files. Squashed from the review branch. The tree is unchanged; the pre-squash history is kept on a local backup branch. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(gosec): tighten file modes and annotate false positives Write job state, configs and imported models with mode 0600, clean the paths that are read from disk, and mark the route tables, the header name and the retry jitter as reviewed false positives. Assisted-by: Claude Code:claude-sonnet-5-5 gosec Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(addons): keep API keys off recovery mutations and same-site cookies POST /api/addons/dispatch forwarded the recovery and update mutations to the owner for any administrator key, which skipped the browser-session rule of their own routes. Refuse those actions there. Also apply the same-origin rule to the legacy token cookie, not only the session cookie, because the global CSRF check lets same-site requests through. Do not fail the start of LocalAI when an add-on library cannot be refreshed; log it and keep the installed add-ons up. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(addons): refuse a reinstall that would migrate retained data unbacked An upgrade takes a verified backup before the new package migrates the data. A reinstall over retained data has no running generation to stop, so the new package would migrate it without one. Refuse a reinstall whose data format differs from the retained one. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(addons): release the manager lock while a release is fetched Submit held the state lock across the catalog lookup and the package download, so the apps list and status reads stalled for the whole install. Serialize Submit and Reconcile with their own lock and drop the state lock around the fetch only. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(addons): kill an add-on only after three missed health probes One slow 100 ms probe killed a busy add-on and dropped the work it was serving. Require three misses in a row. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(ui): move settings under the operate hub The Operate hub already has Settings as a tab, so the sidebar no longer shows a separate Settings entry. The /app/settings route stays, and the hub tab still reaches it. The navigation test now expects Chat, Models and Add-ons as the primary items. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(addons): accept same-host browser requests that carry no fetch metadata Browsers do not send Sec-Fetch-* headers over plain HTTP on an address that is not localhost, so every add-on request from a LAN address was refused as cross-site. Keep refusing a Sec-Fetch-Site value other than same-origin. When the header is absent, accept the request only if its Origin, or failing that its Referer, names the same host and port as the request. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(ui): show the server's reason when an add-on request is refused A 403 or 400 answer showed a generic message and hid the reason in the response body, so a refusal by the browser guard could not be told from a missing permission. Show error.message from the body as the server sent it, and keep the generic text when the body has none. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(addons): run the add-on owner in the normal binary The owner was only enabled when an embedding host set the add-on config, so a normal run answered every add-on request as unavailable. Add --addons-enabled (default true) and --addons-ownership-mode (default named-user, or local-owner; anything else stops startup). The node is its own owner: state lives under the data path, and the carrier uses loopback keys made at each start and kept in memory. --addons-enabled=false turns the owner off completely. Named-user mode needs the account database. With authentication off the owner stays off and a warning says how to use local-owner. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(addons): keep the loopback owner address stable across restarts The single-node loopback transport took a new ephemeral port at each start. The owner stores its address in its identity file and refuses to start when the address differs, so every start after the first failed with "invalid addon owner configuration". Choose the port once, keep it in the add-on state root (loopback-port, mode 0600) and reuse it. If the port is taken at a later start, stop with an error that names the port and --addons-enabled=false, because another port would break the identity check. The keys and certificate stay in memory. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(addons): let add-on pages keep the host modules they were written against A page written for the web UI imports React, the router, i18next and a few shared components. The add-on builder refuses a bundle that holds a host file, so moving such a page into an add-on meant rewriting it. Add a compat mode to the shared builder. It answers those imports from a directory of stand-ins that read the SDK, bundles the dynamic import of the page code into the one output file, and collects the style sheets the page imports. A relative import that is not in the add-on's own source resolves to the file at the same path under the compat directory. Widen the SDK for these pages, without a version change: more host components (spinner, modal, lightbox, model picker) and hooks (models, resources, voice profiles, operations, MCP client), a style on icons, the icon names the pages draw, sdk.navigation.openApp to open a page of the app (only addresses under /app, and the way back as the only state) and sdk.portal. The shell passes the query string to the page. The stand-ins cover the router (the tab in the path, the model in the query), the translator over the host locale files, the core API calls through sdk.core.fetch, and byte copies of the pure helpers, with tests that keep the copies equal to the originals. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(addons): ship Studio and Talk as add-ons instead of built-in pages Studio and Talk were compiled into the web bundle and always listed in the Add-ons drawer. They are add-ons now, like Voice, Face, fine-tuning and quantization: a person installs and removes them, the drawer lists them only while they are installed, and they are packaged the same way. Move the pages, their components, hooks and helpers into addons/studio and addons/talk. Each has a manifest, a UI bundle, a release platform matrix and a catalog template, and is built by the compat mode of the shared builder. The core API stays where it is: the pages call it with the signed-in person's session. The history keeps its browser storage keys. The unit tests of the moved helpers move with them. In the core, drop the two pages, the Create group of the sidebar (Chat joins Home and Models in the old layout), the built-in catalog entries (the catalog is empty) and the talk locale namespace. The old addresses (/app/studio, /app/talk and the generator links) redirect to the add-on pages, with the model as ?model=. The Home /studio command is offered only while the Studio add-on is installed and opens it. The release workflow and its tests now list seven add-ons. Assisted-by: Claude Code:claude-sonnet-5-5 go node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): run the Studio and Talk specs against the add-on bundles The pages are add-ons now, so a spec that draws one installs the real built bundle first: the apps list names it and its module and style sheet are served from the build output, the way the add-on owner serves them. studio-addon.js holds that helper, and the Studio and Talk fixtures call it. Update the specs for the new addresses (/app/addons/studio/studio, the model as ?model=), the session permission the add-on route needs, the legacy redirects, the Home /studio command that appears only while the add-on is installed, and the sidebar without a Create group. Add specs for the add-ons themselves: every tab draws with no script error, the shell titles the page once, the old addresses say so when the add-on is not installed, a button of the page reaches a core page with the way back, and the drawer lists both only after they are installed. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(ui): centre the icon of a built-in tile in its icon box The drawer drew the icon of a built-in tile (Studio's palette was one) in a bare 40px box. Only the placeholder box was laid out as a centred grid with the 20px size, so the real icon sat in the top-left corner at the size of the page text. Give the built-in tile the same classes as the placeholder box, and check in a browser that the icon is centred. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * docs(addons): describe Studio and Talk as add-ons Replace the built-in list (now empty) with the Studio and Talk add-on sections, the new targets of the old links, the Home command, and the seven packaged add-ons. Describe the SDK additions the pages use: components, hooks, icons, openApp and portal. Say on the Studio page that it is installed from the drawer. Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): click the shell title in the Studio slash-key spec The add-on shell titles the page, and the Studio overview no longer draws a second title, but the generator tabs keep theirs, so a bare h1 locator matched two elements. Click the first, which is the shell's. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(addons): read the loopback port file through os.Root The persisted port file was read with a path built from the add-on root, which gosec reports as a file inclusion through a variable. Open it through os.Root so the name cannot leave the root, even by a symbolic link, and require a regular file with no group or other access. A looser file now fails closed instead of being trusted. Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): expect Settings under the Operate hub, not the sidebar Settings moved out of the sidebar into the Operate hub. The navigation spec still expected a sidebar link. Assert that the sidebar has no Settings entry, and that the Operate hub opens Settings as a tab. Assisted-by: Claude Code:claude-sonnet-5-5 playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): drop Settings from the 404 places Settings is a tab of the Operate hub and not a destination of its own, so the 404 page does not list it. Assert that it is absent. Assisted-by: Claude Code:claude-sonnet-5-5 playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): drive the media history and TTS specs through the Studio add-on The image, video, sound and speech generators are pages of the Studio add-on now, and the old addresses redirect to it. Install the add-on with the Studio fixtures, open its pages and use its compose card, so the specs run against the page that exists. Assisted-by: Claude Code:claude-sonnet-5-5 playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): count the first-run steps, not every list item The recommended models are a list inside the second step, so counting all list items read 3 only while the models were still loading. Count the step elements, which does not depend on the load order. Assisted-by: Claude Code:claude-sonnet-5-5 playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): fail the node refresh by state, not by call count The spec served the list to the first request and failed the rest. The first request is not always the one from the page, so the page could get the failure first and show no list. Serve the list until the page shows it, then fail the refreshes. Assisted-by: Claude Code:claude-sonnet-5-5 playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(addons): default to local-owner when auth is off A server without authentication has no accounts, so named-user left the add-on owner off. Resolve the unset mode in one place: local-owner when authentication is off, named-user when it is on. A flag or environment value still wins, and an unknown value is still refused. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(addons): register an official add-on library by default Add gallery/addons/index.yaml, a YAML index of the four first-party add-ons (fine-tuning, quantization, voice, face) in the library format. The entries come from addonpkg catalog over locally built linux/amd64 packages, so the digests pin those images. On the first start, when the owner has no sources.json, register the raw GitHub URL of that index on master as the "official" library and write the file. The file is then the record: a library the admin removes stays removed, and an existing file is never changed. --addons-official-library=false skips the default. Assisted-by: Claude Code:claude-sonnet-5-5 go node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * docs(addons): document the ownership default and the official library Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(addons): list Studio and Talk in the first-party index Add the Studio and Talk entries to gallery/addons/index.yaml next to the four existing ones. They come from addonpkg catalog over locally built linux/amd64 packages, so the digests pin those images. Assisted-by: Claude Code:claude-sonnet-5-5 go node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(addons): expect Studio and Talk in the official index The official index now lists six add-ons. Update the test that decodes it so it accepts Studio and Talk. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(addons): add a real icon to each first-party add-on Each icon is a 256 by 256 PNG: a rounded square in one colour of the UI kit palette with a white outline glyph from the kit sprite. Fine-tuning uses sliders, quantization layers, voice waveform, face user, studio palette, talk phone and tables database. They were rendered with headless Chrome from the sprite paths. Assisted-by: Claude Code:claude-sonnet-5-5 chrome Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(addons): ship a committed icon.png instead of the generated square The shared UI builder and the Tables builder copy ui/icon.png from the add-on source tree to the package unchanged when the file exists. They write the generated placeholder only when it does not. Add a fixture with an icon and a test for both cases. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(addons): list the tables add-on in the first-party index Add the Tables entry to gallery/addons/index.yaml next to the six existing ones. It comes from addonpkg catalog over a locally built linux/amd64 package, so the digest pins that image. The official index test now expects seven add-ons. Assisted-by: Claude Code:claude-sonnet-5-5 go node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(addons): make the Voice add-on one page with tabs The Voice add-on had four pages: recognition, library, create and speech, and the drawer listed two of them. It now has one page, "voice", and one drawer entry. Recognition, Library, Text to speech and From a recording are tabs of that page, drawn with the same tab strip the recognition page already used. The tab is the first path segment (voice/library), as in the Studio add-on, and the form that adds a voice is a view of the Library tab (voice/library/new). The old page names stay declared in the manifest. Each one redirects to its tab and keeps the query string, so saved links still open. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(ui): send the old voice routes to the Voice tabs /app/voice, /app/voice-library and /app/voice-library/new now open the matching tab of the Voice add-on page while the add-on is installed and running, and the core pages otherwise. The moved-page helper compares the first segment of the target with the declared pages, so a target can name a tab. The docs and the navigation spec list the new addresses. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(addons): cover the Voice tabs and the old page redirects The add-on unit tests render the tabs instead of the four pages. The Playwright spec checks the tab strip, the address of each tab, the missing Library tab for a member, and that the old page addresses of the add-on redirect to their tab with the query string kept. The migration table test follows the new targets. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(studio): keep the model menu inside a narrow screen The Home model picker sizes its menu from the viewport, and assumes the picker sits at the page gutter. In the Studio composer card the field is further in, so on a 390px screen the menu of the Sound expansion picker ended 7px past the right edge. Size the menu from the field it opens under instead. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): build the add-on bundles once for the whole run Each worker built the Studio and Talk bundles into the same dist directory, and the build empties that directory first. A worker that started, or restarted after a failure, removed the files another worker was serving, so a Studio spec saw "the style sheet of the add-on could not be loaded". Build once in a global setup before the workers start. A run without the setup still builds per worker. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): register the worker when the add-node spec says so The mocked roster added the worker on the third read of /api/nodes. The shell and the page both read it, and which one asks first depends on load, so the page could take the new worker as part of the roster it opened with and never show it as found. The worker now joins after the page shows it is listening. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): hold the gallery answer until the skeleton is seen The spec delayed the answer by a fixed 800 ms and then looked for the skeleton. The assertion polls at growing intervals, so on a slow machine it could step over that window. The answer now waits until the skeleton has been seen, and the spec then checks that the skeleton goes away. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): give the PDF tag the time the other PDF specs have pdf.js and its worker load on first use. The other specs in this file wait up to ten seconds for the result of that load. The first one waited five, and missed the tag on a busy machine. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): build the Face and Fine-tuning bundles in the global setup The navigation spec serves the built Fine-tuning bundle, but nothing built it, so two specs failed on a fresh checkout when the dist folder was missing. The spec also built the Face bundle in a hook that every worker runs, and a build rewrites the folder the other workers serve. The global setup now builds Studio, Talk, Face and Fine-tuning once, before the workers start. The spec builds the two bundles itself only when it runs without the global setup. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): fix the Home answers in the stale pin spec The spec asserts that the page shows no alert. The Home page raises its own alert when the model list fails or a staging operation has failed, and both answers come from the shared test server. A slow reply or a failed install left there counted as an alert about the pin. The spec now fixes both answers, so the alert count tells only about the pin. The assertions are unchanged. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): read the server address in the add-node spec from the page The spec expected the register address to carry port 8089, so it failed on any other port. It now expects the origin the page was opened from. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(addons): give the navigation routes spec its own catalog No page is built in today, so the catalog is empty and the three specs that expect the studio and talk entries failed on the list and on the pin seed. They passed only while Studio and Talk were built in. The spec now sets a catalog of two ungated entries for each example and restores the old one afterwards. The assertions are unchanged. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(cli): report a failed write of the MLX hostfile The tunnel callback ignored the error of os.WriteFile and set the hostfile variable even when the file was not written. It now logs the error and leaves the variable alone. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(addons): discard the close error of the held listener errcheck flags the deferred Close of the listener that keeps the port busy. The test has no use for that error, so the defer drops it explicitly. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(addons): move the add-on tool tests to Ginkgo The fine-tuning, quantization and add-on host library tests used t.Errorf, t.Fatal and t.Run, which the forbidigo rule rejects. They now use Describe, It and Gomega, with a suite bootstrap in each package. The cases and the assertions are the same. The tables in the host client and the tool schema tests keep one entry per case. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(addons): move the host operation tests to Ginkgo The hostops tests used the testing package calls that forbidigo rejects. They now run as Ginkgo specs under one suite bootstrap. Every check and every per-operation case is kept. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(addons): move the pin store tests to Ginkgo The pin service, file store, sweep and shared store contract tests used the testing package calls that forbidigo rejects. The store contract is now a function that registers its specs for each store, so the file store, the memory-only store and the database store run the same cases. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(addons): move the remaining add-on tests to Ginkgo The built-in catalog, tool arguments, loopback carrier, host operation contract, packaging, application, config, CLI and endpoint tests used the testing package calls that forbidigo rejects. They now run as Ginkgo specs. The endpoint tests also drop the unchecked Close errors that errcheck reports when the auth tag is on. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): wait for the targeted Reinstall button before the install click The "generic deletion blocks targeted install at confirmation" spec dispatches a popstate to set the target node, then clicks Reinstall with a script click. The click can run before the targeted page has rendered or while the button is still disabled, so no install request is sent and the poll on the install count times out. It failed 1 run in 10 with two workers and on every retry in CI. The spec now waits for the button to be enabled first. The assertions are unchanged. Assisted-by: Claude Code:claude-sonnet-5-5 playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * chore(addons): refresh the voice package digest in the first-party index The Voice add-on became one page with tabs and got a new icon, so the digest in gallery/addons/index.yaml no longer matched the build. Render the entry again with addonpkg catalog over a locally built linux/amd64 package; the main page is now voice. The other entries are unchanged. Assisted-by: Claude Code:claude-sonnet-5-5 go node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): wait for the target node's Reinstall button after the popstate The "generic deletion blocks targeted install at confirmation" spec dispatches a popstate to set the target node, then waits for a button named Reinstall and clicks it. Until React renders the targeted page, the page still draws the generic Reinstall button. It is enabled and has the same name, so the wait passed on it, the click started a global install, and no node install request was sent. The poll on the install count timed out with the confirm dialog still open. With the CPU throttled to 8x, the spec failed on 20 of 20 runs, and the button it clicked had the title "Reinstall". The spec now waits for the button titled "Reinstall on <node>". With the throttle it passes 30 of 30 runs. The assertions are unchanged. Assisted-by: Claude Code:claude-sonnet-5-5 playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): give the Studio hand-off spec a budget for the cold bundle load The "a result made through a hand-off records which result it came from" spec opens the Studio add-on straight from an address, twice. Each is a cold load: the page shows "Loading" until the add-on module has run, and the next assertion had the default five seconds. The load takes about two seconds on an idle run and seven to ten under CPU load, so the spec failed on a loaded machine with the hand-off note not yet drawn. With the CPU throttled to 6x and eight busy loops running, it failed on 21 of 30 runs. The first assertion after each load now waits up to 20 seconds, and the spec then passed 30 of 30 under the same load. The assertions are unchanged. Assisted-by: Claude Code:claude-sonnet-5-5 playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(addons): carry the identity page styles in the Face add-on The Face page is drawn with the shared identity views, but its style sheet held only the clip and error rules. The page, card, model list, known-faces table, enrol sheet and distance scale classes had no rules. They looked right only when the host had already loaded the style sheet of its own Faces page, which a visit through the add-on drawer does not do. Opened that way, the cards had no gap, the model list showed bullets, and the install buttons ran into the names. The Face sheet now holds the same identity rules as the core sheet, so the page looks the same whichever way it is opened. Assisted-by: Claude Code:claude-sonnet-5-5 playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(addons): scope the narrow-screen identity rules of the Voice add-on The rules for narrow screens (single-column pairs, smaller tool padding, compact rank rows) were copied into the Voice style sheet without their media query, so they applied at every width. They now sit in a max-width 720px query, and the reduced-motion rule in its own query, as in the core sheet. Assisted-by: Claude Code:claude-sonnet-5-5 playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(addons): drop the repeated title from the Voice and Face pages The add-on shell already titles the page, so the recognition pages showed the name twice: "Voice" above "Voices", "Face" above "Faces". Keep the supporting line and the model picker, as the Studio page does, and remove the unused title strings. Assisted-by: Claude Code:claude-sonnet-5-5 node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(ui): replace the Pinned sidebar section with an Apps entry The sidebar no longer lists pinned add-ons. It shows one Apps entry that opens the add-ons drawer, with a Show all link below it that opens the same drawer. Pins are used from the drawer, where a pinned tile keeps its pin and move buttons. The server pins API is unchanged. Remove the PinnedNav component and its locale title, rename the items.addons label to Apps, and update the e2e specs and the add-ons documentation to match. Assisted-by: Claude Code:claude-sonnet-5-5 playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(addons): assert the single shell title on the Voice and Face pages The add-on shell now shows the one title, "Voice" or "Face", and the page no longer repeats it. The tests still looked for the h1 "Voices" and "Faces". Assert that the add-on page has exactly one h1 and that it is the shell title. The core pages keep their own "Voices" and "Faces" titles. Assisted-by: Claude Code:claude-sonnet-5-5 playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(addons): drop the repeated title from the Voice Library and Text to speech pages The add-on shell already titles the page "Voice", so these two tabs showed a second heading below it ("Speech voices", "Speak text"). Keep the supporting line, as the Studio and recognition pages do, and remove the unused title strings. The e2e spec now checks that each tab has exactly one h1, the shell title. Assisted-by: Claude Code:claude-sonnet-5-5 node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(ui): list pinned apps under Apps in the sidebar A pinned app now shows as an indented child of the Apps entry, with its icon and title, in pin order. Show all stays the last child. The pins come from GET /api/addons/pins through the navigation context, and the apps from the add-on registry, which the drawer feeds on every list read, so the links follow the drawer. A pin without an installed app is not drawn, nothing extra shows when no app is pinned, and the children are hidden when the sidebar is collapsed to the rail. Assisted-by: Claude Code:claude-sonnet-5-5 node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * docs(addons): say that pinned apps are listed under Apps in the sidebar The sidebar lists the pinned apps between Apps and Show all, in pin order. The pins section and the navigation section said that pins do not appear in the sidebar. Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(ui): remove the Show all link under Apps in the sidebar The link repeated the Apps entry, which opens the same drawer, and looked redundant when no app was pinned. Apps is now the only add-on entry; pinned apps still list under it in pin order. The link, its locale key and the style comment are gone, and the e2e spec and the add-ons docs now say that Apps is the only entry. Assisted-by: Claude Code:claude-sonnet-5-5 node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(ui): show a first-run card on Apps when nothing is installed An administrator who opens Apps with no add-on installed now sees a short card with three steps: choose a library, browse and install, start the add-on. Its button opens the Browse tab. The card is hidden once an add-on is installed and for anyone who cannot install. Assisted-by: Claude Code:claude-sonnet-5-5 node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(ui): hide the pinned apps in the icon rail When the window is narrower than 1024 px the sidebar shrinks to the icon rail by CSS alone, without the collapsed class. The pinned app links were still drawn there, with the indent meant for the full sidebar, so their icons sat to the right of the rail and were cut off. Hide the pinned app links in both rail states. The Apps entry keeps its centred icon. The e2e spec checks that the rail shows no pinned app and that every icon is centred at 1280 px collapsed and at 1000 px. Assisted-by: Claude Code:claude-sonnet-5-5 node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): stop the backend redirect test racing the installed list The test reads the redirected URL right after the path changes. The Backends page then loads the installed list and drops a selected backend that is not installed, so the backend parameter was sometimes already gone when the test read it. The mock server has no llama-cpp, and about 15 of 40 repeated runs failed on the backend assertion. The redirect itself was correct, including show_all. Serve the selected backend in the installed list, so the page keeps the selection and the assertions stay as strict as before. Assisted-by: Claude Code:claude-sonnet-5-5 node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(addons): accept a same-host Referer or Origin for human confirmation Browsers send no Sec-Fetch-* headers over plain HTTP on an address that is not localhost, so creating a resource from a LAN address failed with "Creating a resource requires your own browser session". When Sec-Fetch-Site is present it must still be same-origin with an empty destination, as before. When it is absent, Origin or, failing that, Referer must name the request host and port. A destination or mode that is present must still be the expected one. This matches the rule in BrowserProtection. The credential, token cookie, API key and tool-context checks are unchanged. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(ui): keep hub entries off the Apps route in the sidebar The Build hub still owned /app/addons through its legacy Add-ons tab, so the sidebar lit both Apps and Build on the Apps page. A tab whose gate is closed now owns no route when the sidebar asks, so only the Apps entry is active there. The hubs keep their own routes, and the legacy navigation still gives /app/addons to the Build hub. Assisted-by: Claude Code:claude-sonnet-5-5 node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(ui): label the pin control on app tiles and in the detail view The pin was a small icon-only button and hard to find. Each app tile now shows a button reading Pin, or Pinned with a filled pin, and the detail view has the same control in its header. Both toggle the same stored pin. The Apps grid lists pinned apps first, in pin order, then the others. The sidebar list and the server pins API are unchanged. Assisted-by: Claude Code:claude-sonnet-5-5 node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(addons): check the Voice From a recording tab has one title The Library and Text to speech tabs already assert that the add-on shell title is the only h1. Do the same for the From a recording tab, so a heading added there later fails the navigation spec. Assisted-by: Claude Code:claude-sonnet-5-5 node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(ui): stop the add-on shell drawing a title over add-on pages The app decides what its page shows. The shell drew the add-on name as a header above every add-on page, so an add-on could not choose its own title. The shell now draws no header on a live, loading or frozen add-on page; each add-on titles its own pages. The unavailable and missing-page states keep the name, because no add-on page is drawn there. The runtime and shell specs now check that the shell adds no page title. Assisted-by: Claude Code:claude-sonnet-5-5 node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(addons): let each add-on draw its own page title The shell no longer titles add-on pages, so each add-on draws one h1 per page. Voice titles its tabs "Voices" (Recognition and From a recording), "Speech voices" (Library) and "Speak text" (Text to speech); "Add a speech voice" already had its own. Face draws "Faces", Studio "Studio" and Talk "Talk". Tables promotes the database list and database name from h2 to h1. Fine-tuning and Quantization already drew a title. The add-on unit tests and the navigation and Studio specs now assert exactly one h1 per page, with the page's own title. Assisted-by: Claude Code:claude-sonnet-5-5 node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(addons): add a kind to library entries and read unknown kinds tolerantly A library entry now has an optional kind: addon (the default when it is absent), backend or model. Every index written before kinds existed stays valid and its entries are add-ons. A reader keeps the entries of the kinds it knows and skips the others without reading their fields, so a newer kind never makes an older host refuse the whole index. The refresh result and the library state report how many entries were skipped and of which kinds, and the refresh logs a warning. A kind that is not a plain kind name still makes the index malformed. Search lists add-ons unless the caller asks for a kind, and Resolve returns add-ons only, so an add-on install cannot be pointed at a backend image. A library policy may name the signer with an anchored identityRegex instead of an exact identity, so builds from master and from tags both verify. An add-on install refuses a policy that carries one. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(backends): install a backend from a library entry A library can now list backends. An entry of kind backend names the image of the backend gallery by digest, and POST /backends/library/install installs it on the local node. The gallery stays the source of truth and its install path is the one used: the library resolves the entry, takes the signature policy from the library, pins the image by digest and calls the same install as the gallery. Installing a name that came from a gallery, another library or by hand is refused and changes nothing. The signature policy of a backend library names the signer with an anchored identityRegex, so images signed by the merge workflow on master and on tags both verify. A pattern that is not anchored is refused. An install is bounded by a size limit per kind: add-ons keep 512 MiB and a backend image defaults to 8 GiB, set with --addons-backend-max-bytes. The limit reads the manifest after the signature check and before any layer is fetched. The metadata of an installed backend records the library it came from. scripts/backends/cmd/backendcatalog renders entries from backend/index.yaml and pins them against the registry. The pilot is the CPU build of local-store, in gallery/backends/index.yaml. The library is registered on the first start only with --addons-backend-library, which is off by default. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(ui): show the kind of library entries and install backends from them The Browse tab lists the entries of every kind this host reads and marks each one as an add-on or a backend. A backend installs through the backend route and not through the add-on lifecycle: the confirmation says that the backend gallery is not changed and that a backend runs native code, and a refusal of the host, such as a name installed from another origin, is shown with its own reason. The details give the kind, the alias and the signer pattern. The library editor can name the signer with a pattern. Without this a save would drop the pattern of a backend library. The Libraries tab reports the entries a refresh skipped because their kind is not read. Assisted-by: Claude Code:claude-sonnet-5-5 node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * docs(addons): describe backends in the library Document the entry kinds, how a reader skips a kind it does not know, the backend entry format, the signer identity pattern, the install route, the size limit of each kind, the pilot library and the command that renders it. The backend page links to it. Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(mcp): install a backend from a library entry The backend library route installs a backend from an add-on library entry, and the admin REST surface and the MCP catalog must stay in step. Add the install_library_backend tool with an in-process and an HTTP client, the route map entry, the safety-rule listing and a skill recipe. Listing library entries stays on the add-on routes, which the assistant does not expose, so no list tool is added. Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(ui): carry the add-on library keys in every locale The add-on library and backend library strings existed only in English, so the other locales had no value for them. Add the missing keys of the addons namespace to de, es, id, it, ko, pt-BR and zh-CN. The values are the English text until a translation is contributed. Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * Revert "feat(mcp): install a backend from a library entry" This reverts commit7493cff727. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * Revert "docs(addons): describe backends in the library" This reverts commit57816ed7e6. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * Revert "feat(ui): show the kind of library entries and install backends from them" This reverts commit49b2b151b7. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * Revert "feat(backends): install a backend from a library entry" This reverts commit1d8d3e3421. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * Revert "feat(addons): add a kind to library entries and read unknown kinds tolerantly" This reverts commit484813f856. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(ui): drop the backend library keys from the locales Revert the part of39f77ae29that added strings for backend libraries: the kind labels, the backend install texts, the signer identity pattern and the skipped entries notice. The add-on library keys stay. Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(ui): add an add-ons control to the chat header Add-on tools were on or off only through the /addons command, with a toast and no state a person could see. The chat header now has an Add-ons button in the style of the MCP dropdown. It lists each running add-on that ships tools with a switch, and a badge shows how many are on. The chat keeps the ids that are on (addonToolIds) next to the older boolean, and both are saved with the chat. A chat that has only the boolean means every add-on. The request sends addon_tools alone when every add-on is on, and adds addon_tool_ids when only some are. /addons turns all on or all off and uses the same state. Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(addons): let a chat request name the add-ons whose tools it uses addon_tools=true still offers the tools of every add-on the caller may use. A new addon_tool_ids metadata key, a comma-separated list of add-on ids, narrows that to some add-ons. The list counts only with the opt-in, and a list that names nothing offers no tool rather than all of them. The executor drops the tools of add-ons that are not listed and refuses a call to one as an unknown tool, so a model cannot reach a tool the person turned off. Both keys are consumed so they do not reach the backend. Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(addons): cover the per-add-on tool list and the chat header control Go tests cover the list form (the list filters the tools offered and the calls allowed) and the unchanged boolean form. Unit tests cover the chat add-on rules. Playwright specs cover the header control: listing only add-ons that ship tools, toggling each one, the count, /addons in step with the switches, and the request metadata. Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): check each add-on page has one title when not enabled The shell names an add-on only where the add-on page cannot mount (not enabled, failed, no UI, bundle not loaded, no such page). Once the page mounts it draws its own title, including when it says it is not enabled on this server, and the shell draws none. The shell code already works this way; this change states the rule beside the unavailable state and pins it in the specs. The shell spec now expects exactly one title in the unavailable states. The navigation spec checks the Face page without a face model (the add-on title only) and the Face page of a stopped add-on (the shell title only). Assisted-by: Claude Code:claude-sonnet-5-5 node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(addons): upgrade add-ons on their own when the setting is on A new auto_upgrade_addons setting (flag LOCALAI_AUTO_UPGRADE_ADDONS, default off) lets the owner upgrade an installed add-on when its library lists a newer version. It follows the backend setting: a startup flag, a runtime setting, and the same schedule as the backend update check (a first pass shortly after start, then every six hours). Each pass fetches the library of every installed add-on, and for each available update builds the same pinned upgrade command an administrator sends and runs it through the same lifecycle path. The channel rules, the signer identity, the digest checks, the SDK compatibility check and the backup before the upgrade all apply unchanged. The only difference is the gate: the owner acts on its own setting, so no administrator is asked. A refused or failed upgrade changes nothing and is logged; a candidate that failed is not retried until the library lists another digest. With the setting off, nothing runs and upgrades stay manual. Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(ui): add the Upgrade add-ons automatically toggle to Settings The toggle sits beside Upgrade backends automatically and is off by default. It saves the auto_upgrade_addons runtime setting. The English locale gets the label key, and the Settings test fixture lists the new field. Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(addons): cover the automatic upgrade setting and document it The setting defaults to off in the config, the runtime settings and the flag, and is read back from the saved settings file. With it on, a real owner upgrades an installed add-on through the manager; with it off, nothing changes, and a change of the setting at run time takes effect on the next pass. The manager specs show the upgrade goes through the same pinned path as the manual one, and that a corrupted package, a failed signature policy, an incompatible release, a missing update checker and a caller who is not an administrator each leave the installed version in place. The new specs are added to the lifecycle case inventory. The add-ons page describes the setting, its schedule and its default. Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * refactor(addons): name the library entry identifier id The library entry of an add-on used addonId while the shared envelope and the model entries use id. Release now has the field ID, written as id, and every writer emits it: the index encoder, the package workflow templates, the catalog generator and gallery/addons/index.yaml. The digests in the index did not change. DecodeIndex still reads addonId as a legacy alias for one release, so an existing library and a library served by an older tool keep working. An entry that holds both names is refused. The Apps UI reads id and falls back to addonId. Assisted-by: Claude Code:claude-sonnet-5-5 go node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(addons): use the id field in the auto-upgrade test release The auto-upgrade test arrived after the identifier rename and still named the release field AddonID, so the application tests did not build. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(addons): annotate the auto-upgrade actor label for gosec The actor label looks like a credential to gosec G101. It is a fixed name for upgrades the owner starts itself. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(schema): persist the per-chat add-on tool fields The chat header persists addonTools and addonToolIds, but Conversation had no fields for them, so the server dropped them on save. Add both and update the generated swagger files by hand because swag is not installed here. Assisted-by: Claude Code:claude-sonnet-5-5 go Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): count the add-ons auto-upgrade setting in the settings groups The setting sits in the Backends and galleries group, once. The page now lists 54 settings plus the three branding images, so the spec expects 57. Assisted-by: Claude Code:claude-sonnet-5-5 node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): pause the fake clock ahead of now in the clear-all spec The fake clock runs from install, so pausing at the current time failed with 'Cannot fast-forward to the past' on a slow runner. The save itself is synchronous and was not lost. Assisted-by: Claude Code:claude-sonnet-5-5 node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): hold the Studio capabilities reply longer in the skeleton spec 800 ms was shorter than a slow runner needs to render the page, so the skeleton was gone before the check. The product shows it. Assisted-by: Claude Code:claude-sonnet-5-5 node playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(i18n): add the French add-ons locale Master added the fr locale after this branch forked. The add-ons unit test requires every locale to carry the add-ons namespace, so fr needs its own addons.json. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
100 lines
122 KiB
HTML
100 lines
122 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Add-on proposal flow model</title>
|
|
<style>
|
|
:root{--pf-bg:#fbfaf7;--pf-fg:#1d1c1a;--pf-mute:#6b6862;--pf-line:#dcd8cf;--pf-card:#fff;--pf-acc:#1f5f8b;--pf-ok:#2b7a3d;--pf-bad:#b3261e;--pf-warn:#8a5a00;--pf-hi:#e8f1f8}
|
|
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--pf-bg:#161614;--pf-fg:#ecebe6;--pf-mute:#a09d95;--pf-line:#34332f;--pf-card:#1e1e1b;--pf-acc:#7cb7e0;--pf-ok:#7fd08f;--pf-bad:#f2958e;--pf-warn:#e0b25a;--pf-hi:#22313c}}
|
|
body{margin:0;background:var(--pf-bg);color:var(--pf-fg);font:15px/1.5 system-ui,sans-serif}
|
|
.pf-wrap{max-width:1100px;margin:0 auto;padding:16px}
|
|
h1{font-size:20px;margin:4px 0 2px}
|
|
.pf-sub{color:var(--pf-mute);margin:0 0 12px}
|
|
.pf-grid{display:grid;grid-template-columns:260px 1fr;gap:16px}
|
|
@media (max-width:760px){.pf-grid{grid-template-columns:1fr}}
|
|
.pf-list{list-style:none;margin:0;padding:0;border:1px solid var(--pf-line);border-radius:8px;background:var(--pf-card);max-height:70vh;overflow:auto}
|
|
.pf-list button{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid var(--pf-line);background:none;color:inherit;padding:8px 10px;font:inherit;cursor:pointer}
|
|
.pf-list button[aria-current="true"]{background:var(--pf-hi);font-weight:600}
|
|
.pf-list li:last-child button{border-bottom:0}
|
|
.pf-card{border:1px solid var(--pf-line);border-radius:8px;background:var(--pf-card);padding:12px;margin-bottom:12px}
|
|
.pf-ctl{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0}
|
|
.pf-ctl button{font:inherit;padding:4px 12px;border:1px solid var(--pf-line);border-radius:6px;background:var(--pf-card);color:inherit;cursor:pointer}
|
|
.pf-ctl button:disabled{opacity:.4;cursor:default}
|
|
table{border-collapse:collapse;width:100%;font-size:13px}
|
|
th,td{border-bottom:1px solid var(--pf-line);padding:5px 6px;text-align:left;vertical-align:top}
|
|
tr.pf-cur{background:var(--pf-hi)}
|
|
tr.pf-row{cursor:pointer}
|
|
code,.pf-mono{font:12px/1.4 ui-monospace,monospace;overflow-wrap:anywhere}
|
|
td.pf-fx{white-space:nowrap}
|
|
.pf-rule{font-weight:700;color:var(--pf-acc)}
|
|
.pf-rule[data-kind="ignored"]{color:var(--pf-mute)}
|
|
.pf-rule[data-kind="violation"]{color:var(--pf-bad)}
|
|
.pf-state{font-weight:600}
|
|
.pf-why{border-left:3px solid var(--pf-acc);padding:4px 10px;margin:8px 0;background:var(--pf-hi)}
|
|
.pf-pass{color:var(--pf-ok)}.pf-fail{color:var(--pf-bad)}
|
|
.pf-tag{display:inline-block;border:1px solid var(--pf-line);border-radius:10px;padding:0 7px;margin:0 4px 2px 0;font-size:12px}
|
|
details{margin-top:8px}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="pf-wrap">
|
|
<h1>Add-on proposal flow model</h1>
|
|
<p class="pf-sub">Generated by running the real reducer (<code>reduce.go</code>) over the traces. Regenerate with <code>go generate ./pkg/addons/model/proposalflow</code>.</p>
|
|
<div class="pf-card" id="pf-explore"></div>
|
|
<div class="pf-grid">
|
|
<ul class="pf-list" id="pf-traces"></ul>
|
|
<div>
|
|
<div class="pf-card">
|
|
<h2 id="pf-title" style="font-size:17px;margin:0"></h2>
|
|
<p id="pf-about" class="pf-sub" style="margin:4px 0"></p>
|
|
<div class="pf-ctl"><button id="pf-prev">Previous</button><button id="pf-next">Next</button><button id="pf-all">Show all</button><span id="pf-pos" class="pf-sub"></span></div>
|
|
<div id="pf-why" class="pf-why"></div>
|
|
<table><thead><tr><th>#</th><th>Event</th><th>Rule</th><th>Before</th><th>After</th><th>Effects</th></tr></thead><tbody id="pf-steps"></tbody></table>
|
|
<p id="pf-final" class="pf-sub"></p>
|
|
</div>
|
|
<details class="pf-card"><summary>Rule table</summary><table id="pf-rules"></table></details>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
const DATA = {"traces":[{"name":"happy-path","about":"propose, confirm, admit, send, committed: Applied","final":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"SendStarted{}","type":"SendStarted","rule":"R33","ruleKind":"transition","ruleText":"SendStarted: ExecSent. From here an error is not proof of anything","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":[]},{"event":"ApplyResult{Outcome:committed}","type":"ApplyResult","rule":"R37","ruleKind":"transition","ruleText":"Apply answered committed: Applied","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"effects":["persist:applied","reply:applied"]}]},{"name":"retry-after-not-sent","about":"finding (a): the client refuses before the send (no free slot); the proposal returns to Pending and is retried, never OutcomeUnknown","final":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"NotSent{Cause:no-free-slot}","type":"NotSent","rule":"R34","ruleKind":"transition","ruleText":"NotSent for a retryable cause (no slot, invalid envelope, withdrawn): back to Pending. The add-on never saw it","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:unavailable"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"SendStarted{}","type":"SendStarted","rule":"R33","ruleKind":"transition","ruleText":"SendStarted: ExecSent. From here an error is not proof of anything","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":[]},{"event":"ApplyResult{Outcome:committed}","type":"ApplyResult","rule":"R37","ruleKind":"transition","ruleText":"Apply answered committed: Applied","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"effects":["persist:applied","reply:applied"]}]},{"name":"retry-after-admission-refused","about":"finding (a): the admission says held; nothing was persisted or sent, so the proposal stays retryable","final":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitRefused{Cause:held}","type":"AdmitRefused","rule":"R29","ruleKind":"transition","ruleText":"Admission refused (held, forbidden, unavailable, blocked, caller gone): back to Pending, retryable. Nothing was persisted or sent","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["reply:unavailable"]},{"event":"HoldReleased{}","type":"HoldReleased","rule":"I4","ruleKind":"ignored","ruleText":"environment fact with no effect on this situation (hold released, lifted hold, nothing to retry)","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":[]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitRefused{Cause:blocked}","type":"AdmitRefused","rule":"R29","ruleKind":"transition","ruleText":"Admission refused (held, forbidden, unavailable, blocked, caller gone): back to Pending, retryable. Nothing was persisted or sent","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["reply:blocked"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"SendStarted{}","type":"SendStarted","rule":"R33","ruleKind":"transition","ruleText":"SendStarted: ExecSent. From here an error is not proof of anything","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":[]},{"event":"ApplyResult{Outcome:committed}","type":"ApplyResult","rule":"R37","ruleKind":"transition","ruleText":"Apply answered committed: Applied","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"effects":["persist:applied","reply:applied"]}]},{"name":"withdrawn-then-generation-moved","about":"finding (a): the client is withdrawn before the send (add-on replaced); retryable, then the generation check makes it Stale instead of unknown","final":{"name":"Stale","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"rejected"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"NotSent{Cause:withdrawn}","type":"NotSent","rule":"R34","ruleKind":"transition","ruleText":"NotSent for a retryable cause (no slot, invalid envelope, withdrawn): back to Pending. The add-on never saw it","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:unavailable"]},{"event":"GenerationChanged{New:2}","type":"GenerationChanged","rule":"R57","ruleKind":"transition","ruleText":"Generation changed under a Pending or Admitting proposal: Stale","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Stale","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"rejected"},"effects":["persist:rejected"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R19","ruleKind":"transition","ruleText":"Confirm of a Rejected, NotApplied or Stale proposal: the stored answer, nothing runs","before":{"name":"Stale","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"rejected"},"after":{"name":"Stale","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"rejected"},"effects":["reply:rejected"]}]},{"name":"timeout-unknown-then-receipt-committed","about":"finding (c): the apply times out after the send; lookups run; the receipt says committed","final":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"SendStarted{}","type":"SendStarted","rule":"R33","ruleKind":"transition","ruleText":"SendStarted: ExecSent. From here an error is not proof of anything","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":[]},{"event":"ApplyResult{Outcome:timeout}","type":"ApplyResult","rule":"R39","ruleKind":"transition","ruleText":"Apply ended with no evidence (unsettled, transport error, timeout) after a send: OutcomeUnknown","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"effects":["persist:outcome-unknown","reply:outcome-unknown"]},{"event":"LookupDue{}","type":"LookupDue","rule":"R45","ruleKind":"transition","ruleText":"Lookup timer fired for an unresolved or abandoned outcome: look the receipt up","before":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"after":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"effects":["lookup-receipt"]},{"event":"ReceiptResult{Answer:unsettled}","type":"ReceiptResult","rule":"R43","ruleKind":"transition","ruleText":"Receipt lookup unsettled with lookups left: stay OutcomeUnknown, count it","before":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"after":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:1","durable":"outcome-unknown"},"effects":["persist:outcome-unknown"]},{"event":"LookupDue{}","type":"LookupDue","rule":"R45","ruleKind":"transition","ruleText":"Lookup timer fired for an unresolved or abandoned outcome: look the receipt up","before":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:1","durable":"outcome-unknown"},"after":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:1","durable":"outcome-unknown"},"effects":["lookup-receipt"]},{"event":"ReceiptResult{Answer:committed}","type":"ReceiptResult","rule":"R40","ruleKind":"transition","ruleText":"Receipt lookup says committed: Applied","before":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:1","durable":"outcome-unknown"},"after":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"effects":["persist:applied"]}]},{"name":"unknown-bounded-then-manual-resolution","about":"finding (c): lookups stay unsettled up to the bound; UnknownManual; owner resolution abandons it; retention drops it. No state is stuck","final":{"name":"Dropped","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":""},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"SendStarted{}","type":"SendStarted","rule":"R33","ruleKind":"transition","ruleText":"SendStarted: ExecSent. From here an error is not proof of anything","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":[]},{"event":"ApplyResult{Outcome:transport-error}","type":"ApplyResult","rule":"R39","ruleKind":"transition","ruleText":"Apply ended with no evidence (unsettled, transport error, timeout) after a send: OutcomeUnknown","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"effects":["persist:outcome-unknown","reply:outcome-unknown"]},{"event":"ReceiptResult{Answer:unsettled}","type":"ReceiptResult","rule":"R43","ruleKind":"transition","ruleText":"Receipt lookup unsettled with lookups left: stay OutcomeUnknown, count it","before":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"after":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:1","durable":"outcome-unknown"},"effects":["persist:outcome-unknown"]},{"event":"ReceiptResult{Answer:unsettled}","type":"ReceiptResult","rule":"R44","ruleKind":"transition","ruleText":"Receipt lookup unsettled and the bound reached: UnknownManual","before":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:1","durable":"outcome-unknown"},"after":{"name":"UnknownManual","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"outcome-unknown"},"effects":["persist:outcome-unknown"]},{"event":"LookupDue{}","type":"LookupDue","rule":"I7","ruleKind":"ignored","ruleText":"the automatic lookups are over or not due; only an explicit lookup or resolution remains","before":{"name":"UnknownManual","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"outcome-unknown"},"after":{"name":"UnknownManual","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"outcome-unknown"},"effects":[]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R17","ruleKind":"transition","ruleText":"Confirm of an executing or unresolved proposal: look the receipt up, never apply again","before":{"name":"UnknownManual","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"outcome-unknown"},"after":{"name":"UnknownManual","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"outcome-unknown"},"effects":["lookup-receipt","reply:outcome-unknown"]},{"event":"OwnerResolve{Role:editor Human:true Reason:true Held:false}","type":"OwnerResolve","rule":"R46","ruleKind":"transition","ruleText":"Owner resolution from a non-owner, a non-human credential or without a reason: forbidden","before":{"name":"UnknownManual","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"outcome-unknown"},"after":{"name":"UnknownManual","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"outcome-unknown"},"effects":["reply:forbidden"]},{"event":"OwnerResolve{Role:owner Human:true Reason:true Held:true}","type":"OwnerResolve","rule":"R47","ruleKind":"transition","ruleText":"Owner resolution while the add-on is held: unavailable, no change","before":{"name":"UnknownManual","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"outcome-unknown"},"after":{"name":"UnknownManual","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"outcome-unknown"},"effects":["reply:unavailable"]},{"event":"OwnerResolve{Role:owner Human:true Reason:true Held:false}","type":"OwnerResolve","rule":"R48","ruleKind":"transition","ruleText":"Owner resolution of an unresolved outcome: Abandoned, one last lookup","before":{"name":"UnknownManual","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"outcome-unknown"},"after":{"name":"Abandoned","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"abandoned-unknown"},"effects":["persist:abandoned-unknown","lookup-receipt","reply:resolved"]},{"event":"LookupDue{}","type":"LookupDue","rule":"R45","ruleKind":"transition","ruleText":"Lookup timer fired for an unresolved or abandoned outcome: look the receipt up","before":{"name":"Abandoned","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"abandoned-unknown"},"after":{"name":"Abandoned","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"abandoned-unknown"},"effects":["lookup-receipt"]},{"event":"RetentionElapsed{}","type":"RetentionElapsed","rule":"R61","ruleKind":"transition","ruleText":"Retention elapsed for an abandoned outcome: Dropped","before":{"name":"Abandoned","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"abandoned-unknown"},"after":{"name":"Dropped","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":""},"effects":[]}]},{"name":"late-receipt-after-abandon","about":"an abandoned outcome that later turns out committed is recorded as Applied, not hidden","final":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"SendStarted{}","type":"SendStarted","rule":"R33","ruleKind":"transition","ruleText":"SendStarted: ExecSent. From here an error is not proof of anything","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":[]},{"event":"ApplyResult{Outcome:timeout}","type":"ApplyResult","rule":"R39","ruleKind":"transition","ruleText":"Apply ended with no evidence (unsettled, transport error, timeout) after a send: OutcomeUnknown","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"effects":["persist:outcome-unknown","reply:outcome-unknown"]},{"event":"OwnerResolve{Role:owner Human:true Reason:true Held:false}","type":"OwnerResolve","rule":"R48","ruleKind":"transition","ruleText":"Owner resolution of an unresolved outcome: Abandoned, one last lookup","before":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"after":{"name":"Abandoned","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"abandoned-unknown"},"effects":["persist:abandoned-unknown","lookup-receipt","reply:resolved"]},{"event":"ReceiptResult{Answer:committed}","type":"ReceiptResult","rule":"R40","ruleKind":"transition","ruleText":"Receipt lookup says committed: Applied","before":{"name":"Abandoned","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"abandoned-unknown"},"after":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"effects":["persist:applied"]}]},{"name":"two-actors-racing-confirm","about":"another user's confirm is forbidden; a second confirm by the proposer while admission runs is busy; a repeat during execution looks the receipt up and never applies twice","final":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:bob Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R10","ruleKind":"transition","ruleText":"Confirm by another user than the proposer: forbidden, no change","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["reply:forbidden"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R16","ruleKind":"transition","ruleText":"Confirm while a confirmation is being admitted: busy, no change","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["reply:busy"]},{"event":"Cancel{Actor:bob}","type":"Cancel","rule":"R23","ruleKind":"transition","ruleText":"Cancel by another user than the proposer: forbidden, no change","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["reply:forbidden"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R17","ruleKind":"transition","ruleText":"Confirm of an executing or unresolved proposal: look the receipt up, never apply again","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["lookup-receipt","reply:outcome-unknown"]},{"event":"Cancel{Actor:alice}","type":"Cancel","rule":"R26","ruleKind":"transition","ruleText":"Cancel of a proposal that is not pending: closed, no change","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["reply:closed"]},{"event":"SendStarted{}","type":"SendStarted","rule":"R33","ruleKind":"transition","ruleText":"SendStarted: ExecSent. From here an error is not proof of anything","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":[]},{"event":"ApplyResult{Outcome:committed}","type":"ApplyResult","rule":"R37","ruleKind":"transition","ruleText":"Apply answered committed: Applied","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"effects":["persist:applied","reply:applied"]}]},{"name":"cancel-races-confirm","about":"cancel wins while the confirmation waits for admission; the late admission answer finds the proposal closed and nothing runs","final":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:proposer","durable":"cancelled"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"Cancel{Actor:alice}","type":"Cancel","rule":"R25","ruleKind":"transition","ruleText":"Cancel while a confirmation is in admission: Cancelled, the late admission answer finds it closed","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:proposer","durable":"cancelled"},"effects":["persist:cancelled","reply:cancelled"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"I3","ruleKind":"ignored","ruleText":"late or out-of-order reply for an operation that is not executing: no new information, no change","before":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:proposer","durable":"cancelled"},"after":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:proposer","durable":"cancelled"},"effects":[]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R20","ruleKind":"transition","ruleText":"Confirm of a Cancelled or Dropped proposal: closed, nothing runs","before":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:proposer","durable":"cancelled"},"after":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:proposer","durable":"cancelled"},"effects":["reply:closed"]}]},{"name":"hold-during-prepared-dispatch","about":"a hold arrives after executing is persisted but before the send: the dispatch is cancelled, nothing was sent, Cancelled","final":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:hold","durable":"cancelled"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"HoldAcquired{}","type":"HoldAcquired","rule":"R52","ruleKind":"transition","ruleText":"Hold on a prepared dispatch: ask the shell to cancel it, wait for NotSent or SendStarted","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["cancel-dispatch:hold"]},{"event":"NotSent{Cause:hold}","type":"NotSent","rule":"R35","ruleKind":"transition","ruleText":"NotSent because a hold or lowered authority cancelled the dispatch: Cancelled","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:hold","durable":"cancelled"},"effects":["persist:cancelled","reply:cancelled"]},{"event":"HoldReleased{}","type":"HoldReleased","rule":"I2","ruleKind":"ignored","ruleText":"the proposal is closed (terminal): the event changes nothing","before":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:hold","durable":"cancelled"},"after":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:hold","durable":"cancelled"},"effects":[]}]},{"name":"hold-too-late-to-cancel","about":"the hold races the send and loses: the request is on the wire, so the proposal waits for the result instead of claiming it was cancelled","final":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"HoldAcquired{}","type":"HoldAcquired","rule":"R52","ruleKind":"transition","ruleText":"Hold on a prepared dispatch: ask the shell to cancel it, wait for NotSent or SendStarted","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["cancel-dispatch:hold"]},{"event":"SendStarted{}","type":"SendStarted","rule":"R33","ruleKind":"transition","ruleText":"SendStarted: ExecSent. From here an error is not proof of anything","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":[]},{"event":"HoldAcquired{}","type":"HoldAcquired","rule":"R53","ruleKind":"transition","ruleText":"Hold on a sent request: abort its context and wait for the apply result","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["cancel-send"]},{"event":"HoldReleased{}","type":"HoldReleased","rule":"I4","ruleKind":"ignored","ruleText":"environment fact with no effect on this situation (hold released, lifted hold, nothing to retry)","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":[]},{"event":"ApplyResult{Outcome:committed}","type":"ApplyResult","rule":"R37","ruleKind":"transition","ruleText":"Apply answered committed: Applied","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"effects":["persist:applied","reply:applied"]}]},{"name":"hold-during-sent-request","about":"a hold aborts the request in flight; the aborted call is OutcomeUnknown, and a not-committed answer settles it","final":{"name":"NotApplied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"rejected"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"SendStarted{}","type":"SendStarted","rule":"R33","ruleKind":"transition","ruleText":"SendStarted: ExecSent. From here an error is not proof of anything","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":[]},{"event":"HoldAcquired{}","type":"HoldAcquired","rule":"R53","ruleKind":"transition","ruleText":"Hold on a sent request: abort its context and wait for the apply result","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["cancel-send"]},{"event":"ApplyResult{Outcome:transport-error}","type":"ApplyResult","rule":"R39","ruleKind":"transition","ruleText":"Apply ended with no evidence (unsettled, transport error, timeout) after a send: OutcomeUnknown","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"effects":["persist:outcome-unknown","reply:outcome-unknown"]},{"event":"LookupDue{}","type":"LookupDue","rule":"R45","ruleKind":"transition","ruleText":"Lookup timer fired for an unresolved or abandoned outcome: look the receipt up","before":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"after":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"effects":["lookup-receipt"]},{"event":"ReceiptResult{Answer:not-committed}","type":"ReceiptResult","rule":"R42","ruleKind":"transition","ruleText":"Receipt lookup says not-committed: NotApplied","before":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"after":{"name":"NotApplied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"rejected"},"effects":["persist:rejected"]}]},{"name":"hold-on-pending","about":"a hold invalidates a pending proposal; a later confirm gets closed","final":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:hold","durable":"cancelled"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"HoldAcquired{}","type":"HoldAcquired","rule":"R51","ruleKind":"transition","ruleText":"Hold on a Pending or Admitting proposal: Cancelled","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:hold","durable":"cancelled"},"effects":["persist:cancelled"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R20","ruleKind":"transition","ruleText":"Confirm of a Cancelled or Dropped proposal: closed, nothing runs","before":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:hold","durable":"cancelled"},"after":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:hold","durable":"cancelled"},"effects":["reply:closed"]}]},{"name":"generation-change-while-pending","about":"the add-on moves to a new generation: the pending proposal is Stale and never executes","final":{"name":"Stale","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"rejected"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"GenerationChanged{New:2}","type":"GenerationChanged","rule":"R57","ruleKind":"transition","ruleText":"Generation changed under a Pending or Admitting proposal: Stale","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Stale","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"rejected"},"effects":["persist:rejected"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R19","ruleKind":"transition","ruleText":"Confirm of a Rejected, NotApplied or Stale proposal: the stored answer, nothing runs","before":{"name":"Stale","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"rejected"},"after":{"name":"Stale","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"rejected"},"effects":["reply:rejected"]},{"event":"Tick{Now:20}","type":"Tick","rule":"I2","ruleKind":"ignored","ruleText":"the proposal is closed (terminal): the event changes nothing","before":{"name":"Stale","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"rejected"},"after":{"name":"Stale","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"rejected"},"effects":[]}]},{"name":"generation-seen-at-admission","about":"the generation moved before the change event arrived: the admission check finds a runtime of another generation and the proposal is Stale","final":{"name":"Stale","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"rejected"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:2}","type":"AdmitGranted","rule":"R31","ruleKind":"transition","ruleText":"Admission granted for another generation than the proposal's: Stale","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"Stale","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"rejected"},"effects":["persist:rejected","reply:stale"]}]},{"name":"generation-change-while-prepared","about":"the generation moves after executing is persisted: the dispatch is cancelled and the not-sent answer makes it Stale","final":{"name":"Stale","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"rejected"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"GenerationChanged{New:2}","type":"GenerationChanged","rule":"R58","ruleKind":"transition","ruleText":"Generation changed under a prepared dispatch: ask the shell to cancel it","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["cancel-dispatch:superseded"]},{"event":"NotSent{Cause:superseded}","type":"NotSent","rule":"R36","ruleKind":"transition","ruleText":"NotSent because the generation moved: Stale","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"Stale","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"rejected"},"effects":["persist:rejected","reply:stale"]}]},{"name":"duplicate-confirm-after-applied","about":"a repeated confirm, propose or cancel after Applied returns the stored answer and runs nothing","final":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"SendStarted{}","type":"SendStarted","rule":"R33","ruleKind":"transition","ruleText":"SendStarted: ExecSent. From here an error is not proof of anything","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":[]},{"event":"ApplyResult{Outcome:committed}","type":"ApplyResult","rule":"R37","ruleKind":"transition","ruleText":"Apply answered committed: Applied","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"effects":["persist:applied","reply:applied"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R18","ruleKind":"transition","ruleText":"Confirm of an Applied proposal: the stored answer, nothing runs","before":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"after":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"effects":["reply:applied"]},{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R9","ruleKind":"transition","ruleText":"Propose repeated for a stored proposal: the stored proposal is returned, nothing changes","before":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"after":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"effects":["reply:existing"]},{"event":"Cancel{Actor:alice}","type":"Cancel","rule":"R26","ruleKind":"transition","ruleText":"Cancel of a proposal that is not pending: closed, no change","before":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"after":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"effects":["reply:closed"]}]},{"name":"duplicate-confirm-while-unknown","about":"a repeated confirm of an unknown outcome looks the receipt up and never applies again","final":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"SendStarted{}","type":"SendStarted","rule":"R33","ruleKind":"transition","ruleText":"SendStarted: ExecSent. From here an error is not proof of anything","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":[]},{"event":"ApplyResult{Outcome:timeout}","type":"ApplyResult","rule":"R39","ruleKind":"transition","ruleText":"Apply ended with no evidence (unsettled, transport error, timeout) after a send: OutcomeUnknown","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"effects":["persist:outcome-unknown","reply:outcome-unknown"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R17","ruleKind":"transition","ruleText":"Confirm of an executing or unresolved proposal: look the receipt up, never apply again","before":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"after":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"effects":["lookup-receipt","reply:outcome-unknown"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R17","ruleKind":"transition","ruleText":"Confirm of an executing or unresolved proposal: look the receipt up, never apply again","before":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"after":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"effects":["lookup-receipt","reply:outcome-unknown"]}]},{"name":"editor-schema-propose-refused","about":"finding (b): an editor proposes a schema-kind tool while claiming the write action; the action comes from the tool kind, so it is Refused","final":{"name":"Refused","detail":"Why:insufficient-role","durable":""},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:editor Tool:schema Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R4","ruleKind":"transition","ruleText":"Propose where the actor's role is below what the derived action needs: Refused (an editor cannot propose a schema tool)","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Refused","detail":"Why:insufficient-role","durable":""},"effects":["reply:forbidden"]},{"event":"Confirm{Actor:alice Role:editor Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R22","ruleKind":"transition","ruleText":"Any caller request for a proposal that was never stored: forbidden","before":{"name":"Refused","detail":"Why:insufficient-role","durable":""},"after":{"name":"Refused","detail":"Why:insufficient-role","durable":""},"effects":["reply:forbidden"]}]},{"name":"editor-confirm-of-schema-after-demotion","about":"finding (b): an owner proposes a schema change, is lowered to editor, and the confirm is forbidden; the proposal stays Pending","final":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:schema Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:schema Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:schema Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:editor Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R14","ruleKind":"transition","ruleText":"Confirm whose live role no longer covers the derived action: forbidden, stays Pending","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:schema Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:schema Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["reply:forbidden"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:schema Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:schema Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:schema"]}]},{"name":"out-of-order-receipt","about":"a receipt reply for a proposal not yet sent is ignored; a committed receipt that beats the apply reply settles it, and the late apply error changes nothing","final":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"ReceiptResult{Answer:committed}","type":"ReceiptResult","rule":"I3","ruleKind":"ignored","ruleText":"late or out-of-order reply for an operation that is not executing: no new information, no change","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":[]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"SendStarted{}","type":"SendStarted","rule":"R33","ruleKind":"transition","ruleText":"SendStarted: ExecSent. From here an error is not proof of anything","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":[]},{"event":"ReceiptResult{Answer:unsettled}","type":"ReceiptResult","rule":"I5","ruleKind":"ignored","ruleText":"the answer carries no new evidence: the outcome stays as it is","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":[]},{"event":"ReceiptResult{Answer:committed}","type":"ReceiptResult","rule":"R40","ruleKind":"transition","ruleText":"Receipt lookup says committed: Applied","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"effects":["persist:applied"]},{"event":"ApplyResult{Outcome:transport-error}","type":"ApplyResult","rule":"I3","ruleKind":"ignored","ruleText":"late or out-of-order reply for an operation that is not executing: no new information, no change","before":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"after":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"effects":[]}]},{"name":"late-apply-reply-after-timeout","about":"the apply reply arrives after the timeout was recorded: the committed answer still settles it","final":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"SendStarted{}","type":"SendStarted","rule":"R33","ruleKind":"transition","ruleText":"SendStarted: ExecSent. From here an error is not proof of anything","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":[]},{"event":"ApplyResult{Outcome:timeout}","type":"ApplyResult","rule":"R39","ruleKind":"transition","ruleText":"Apply ended with no evidence (unsettled, transport error, timeout) after a send: OutcomeUnknown","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"effects":["persist:outcome-unknown","reply:outcome-unknown"]},{"event":"ApplyResult{Outcome:committed}","type":"ApplyResult","rule":"R37","ruleKind":"transition","ruleText":"Apply answered committed: Applied","before":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"after":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"effects":["persist:applied","reply:applied"]},{"event":"ApplyResult{Outcome:timeout}","type":"ApplyResult","rule":"I3","ruleKind":"ignored","ruleText":"late or out-of-order reply for an operation that is not executing: no new information, no change","before":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"after":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"effects":[]}]},{"name":"restart-recovery","about":"a restart in admission returns to Pending; a restart with an executing proposal is OutcomeUnknown and a lookup settles it","final":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"Restart{}","type":"Restart","rule":"R59","ruleKind":"transition","ruleText":"Restart while a confirmation is in admission: Pending, admission is volatile","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":[]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"Restart{}","type":"Restart","rule":"R60","ruleKind":"transition","ruleText":"Restart with an executing proposal: OutcomeUnknown, a crash may have followed the send","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"effects":["persist:outcome-unknown"]},{"event":"LookupDue{}","type":"LookupDue","rule":"R45","ruleKind":"transition","ruleText":"Lookup timer fired for an unresolved or abandoned outcome: look the receipt up","before":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"after":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"effects":["lookup-receipt"]},{"event":"ReceiptResult{Answer:committed}","type":"ReceiptResult","rule":"R40","ruleKind":"transition","ruleText":"Receipt lookup says committed: Applied","before":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"after":{"name":"Applied","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"applied"},"effects":["persist:applied"]}]},{"name":"addon-conflict-is-rejected","about":"a 409 answer is the add-on's definite answer, so Rejected, not OutcomeUnknown","final":{"name":"Rejected","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:revision-conflict","durable":"rejected"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"SendStarted{}","type":"SendStarted","rule":"R33","ruleKind":"transition","ruleText":"SendStarted: ExecSent. From here an error is not proof of anything","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":[]},{"event":"ApplyResult{Outcome:conflict}","type":"ApplyResult","rule":"R38","ruleKind":"transition","ruleText":"Apply answered rejected, refused or conflict: Rejected, the add-on definitely did not apply","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"Rejected","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:revision-conflict","durable":"rejected"},"effects":["persist:rejected","reply:rejected"]}]},{"name":"expiry","about":"a tick before expiry changes nothing; a tick at expiry expires it; a confirm then gets expired","final":{"name":"Expired","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"expired"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Tick{Now:5}","type":"Tick","rule":"I8","ruleKind":"ignored","ruleText":"the time has not reached expiry","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":[]},{"event":"Tick{Now:10}","type":"Tick","rule":"R28","ruleKind":"transition","ruleText":"Tick past expiry of a Pending or Admitting proposal: Expired","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Expired","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"expired"},"effects":["persist:expired"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R21","ruleKind":"transition","ruleText":"Confirm of an Expired proposal: expired, nothing runs","before":{"name":"Expired","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"expired"},"after":{"name":"Expired","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"expired"},"effects":["reply:expired"]}]},{"name":"propose-while-held-then-retry","about":"a propose during a hold stores nothing and is retried after it","final":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:true Blocked:false}","type":"Propose","rule":"R1","ruleKind":"transition","ruleText":"Propose while the add-on is held: nothing stored, reply unavailable, retryable","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Unproposed","detail":"","durable":""},"effects":["reply:unavailable"]},{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:true}","type":"Propose","rule":"R6","ruleKind":"transition","ruleText":"Propose while another outcome on the resource is unresolved: nothing stored, reply blocked","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Unproposed","detail":"","durable":""},"effects":["reply:blocked"]},{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:0 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R7","ruleKind":"transition","ruleText":"Propose with no usable expiry: nothing stored, reply unavailable","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Unproposed","detail":"","durable":""},"effects":["reply:unavailable"]},{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]}]},{"name":"propose-undeclared-tool","about":"a tool the add-on did not declare is refused and nothing is stored","final":{"name":"Refused","detail":"Why:undeclared-tool","durable":""},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:undeclared Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R2","ruleKind":"transition","ruleText":"Propose with a tool the add-on did not declare: Refused","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Refused","detail":"Why:undeclared-tool","durable":""},"effects":["reply:refused"]}]},{"name":"propose-read-tool","about":"a read tool is never a proposal","final":{"name":"Refused","detail":"Why:not-a-mutation","durable":""},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:read Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R3","ruleKind":"transition","ruleText":"Propose with a read tool: Refused, a read is never a proposal","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Refused","detail":"Why:not-a-mutation","durable":""},"effects":["reply:refused"]}]},{"name":"propose-stale-generation","about":"a preview made against another generation than the runtime's is refused","final":{"name":"Refused","detail":"Why:stale-generation","durable":""},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:2 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R5","ruleKind":"transition","ruleText":"Propose against a generation that is not the runtime's: Refused","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Refused","detail":"Why:stale-generation","durable":""},"effects":["reply:stale"]}]},{"name":"confirm-guards","about":"a confirm from a non-human credential or with a changed digest is refused and changes nothing; a confirm after expiry expires the proposal","final":{"name":"Expired","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"expired"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:false DigestOK:true Now:1}","type":"Confirm","rule":"R11","ruleKind":"transition","ruleText":"Confirm from a credential that is not a human surface: forbidden, no change","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["reply:forbidden"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:false Now:1}","type":"Confirm","rule":"R12","ruleKind":"transition","ruleText":"Confirm whose digest is not the stored one: changed, no change","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["reply:changed"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:10}","type":"Confirm","rule":"R13","ruleKind":"transition","ruleText":"Confirm after expiry: Expired","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Expired","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"expired"},"effects":["persist:expired","reply:expired"]}]},{"name":"expiry-seen-at-admission","about":"the clock passes expiry while the confirmation waits for admission: Expired, nothing runs","final":{"name":"Expired","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"expired"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:10 RuntimeGen:1}","type":"AdmitGranted","rule":"R30","ruleKind":"transition","ruleText":"Admission granted after expiry: Expired","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"Expired","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"expired"},"effects":["persist:expired","reply:expired"]}]},{"name":"cancel-pending","about":"the proposer cancels a pending proposal; an owner resolution and a confirm of it are closed","final":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:proposer","durable":"cancelled"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"OwnerResolve{Role:owner Human:true Reason:true Held:false}","type":"OwnerResolve","rule":"R49","ruleKind":"transition","ruleText":"Owner resolution of a proposal that is not unresolved: closed, no change","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["reply:closed"]},{"event":"Cancel{Actor:alice}","type":"Cancel","rule":"R24","ruleKind":"transition","ruleText":"Cancel of a Pending proposal: Cancelled","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:proposer","durable":"cancelled"},"effects":["persist:cancelled","reply:cancelled"]},{"event":"Cancel{Actor:alice}","type":"Cancel","rule":"R27","ruleKind":"transition","ruleText":"Cancel of a Cancelled proposal: the same answer again","before":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:proposer","durable":"cancelled"},"after":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:proposer","durable":"cancelled"},"effects":["reply:cancelled"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R20","ruleKind":"transition","ruleText":"Confirm of a Cancelled or Dropped proposal: closed, nothing runs","before":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:proposer","durable":"cancelled"},"after":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:proposer","durable":"cancelled"},"effects":["reply:closed"]}]},{"name":"authority-lowered-while-pending","about":"the proposer loses authority: the pending proposal is cancelled","final":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:authority-lowered","durable":"cancelled"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"AuthorityLowered{}","type":"AuthorityLowered","rule":"R54","ruleKind":"transition","ruleText":"Proposer's authority lowered on a Pending or Admitting proposal: Cancelled","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:authority-lowered","durable":"cancelled"},"effects":["persist:cancelled"]}]},{"name":"authority-lowered-before-send","about":"authority is lowered after executing is persisted but before the send: the dispatch is cancelled, nothing was sent","final":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:authority-lowered","durable":"cancelled"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"AuthorityLowered{}","type":"AuthorityLowered","rule":"R55","ruleKind":"transition","ruleText":"Proposer's authority lowered on a prepared dispatch: ask the shell to cancel it","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["cancel-dispatch:authority-lowered"]},{"event":"NotSent{Cause:authority-lowered}","type":"NotSent","rule":"R35","ruleKind":"transition","ruleText":"NotSent because a hold or lowered authority cancelled the dispatch: Cancelled","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"Cancelled","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:authority-lowered","durable":"cancelled"},"effects":["persist:cancelled","reply:cancelled"]}]},{"name":"authority-lowered-after-send","about":"authority is lowered while the request is on the wire: the call is aborted, the outcome is unknown, and a rejected receipt settles it","final":{"name":"Rejected","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:rejected-receipt","durable":"rejected"},"ok":true,"bad":[],"steps":[{"event":"Propose{ID:op1 Actor:alice Role:owner Tool:write Claimed:write Gen:1 RuntimeGen:1 ExpiresAt:10 Now:0 Held:false Blocked:false}","type":"Propose","rule":"R8","ruleKind":"transition","ruleText":"Propose stored: Pending. The action comes from the tool kind","before":{"name":"Unproposed","detail":"","durable":""},"after":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"effects":["persist:pending","reply:created"]},{"event":"Confirm{Actor:alice Role:owner Human:true DigestOK:true Now:1}","type":"Confirm","rule":"R15","ruleKind":"transition","ruleText":"Confirm accepted: Admitting, ask for the admission decision","before":{"name":"Pending","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"pending"},"after":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"effects":["admit:write"]},{"event":"AdmitGranted{Now:1 RuntimeGen:1}","type":"AdmitGranted","rule":"R32","ruleKind":"transition","ruleText":"Admission granted: ExecPrepared, persist executing, then dispatch once","before":{"name":"Admitting","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} By:alice","durable":"pending"},"after":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["persist:executing","dispatch"]},{"event":"SendStarted{}","type":"SendStarted","rule":"R33","ruleKind":"transition","ruleText":"SendStarted: ExecSent. From here an error is not proof of anything","before":{"name":"ExecPrepared","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":[]},{"event":"AuthorityLowered{}","type":"AuthorityLowered","rule":"R56","ruleKind":"transition","ruleText":"Proposer's authority lowered on a sent request: abort its context and wait","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"effects":["cancel-send"]},{"event":"ApplyResult{Outcome:transport-error}","type":"ApplyResult","rule":"R39","ruleKind":"transition","ruleText":"Apply ended with no evidence (unsettled, transport error, timeout) after a send: OutcomeUnknown","before":{"name":"ExecSent","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10}","durable":"executing"},"after":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"effects":["persist:outcome-unknown","reply:outcome-unknown"]},{"event":"ReceiptResult{Answer:rejected}","type":"ReceiptResult","rule":"R41","ruleKind":"transition","ruleText":"Receipt lookup says rejected: Rejected","before":{"name":"OutcomeUnknown","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Lookups:0","durable":"outcome-unknown"},"after":{"name":"Rejected","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:rejected-receipt","durable":"rejected"},"effects":["persist:rejected"]},{"event":"OwnerResolve{Role:owner Human:true Reason:true Held:false}","type":"OwnerResolve","rule":"R50","ruleKind":"transition","ruleText":"Owner resolution of a settled or abandoned proposal: the stored answer","before":{"name":"Rejected","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:rejected-receipt","durable":"rejected"},"after":{"name":"Rejected","detail":"P:{ID:op1 Proposer:alice ProposerRole:owner Kind:write Gen:1 ExpiresAt:10} Why:rejected-receipt","durable":"rejected"},"effects":["reply:resolved"]}]}],"rules":[{"id":"R1","kind":"transition","text":"Propose while the add-on is held: nothing stored, reply unavailable, retryable"},{"id":"R2","kind":"transition","text":"Propose with a tool the add-on did not declare: Refused"},{"id":"R3","kind":"transition","text":"Propose with a read tool: Refused, a read is never a proposal"},{"id":"R4","kind":"transition","text":"Propose where the actor's role is below what the derived action needs: Refused (an editor cannot propose a schema tool)"},{"id":"R5","kind":"transition","text":"Propose against a generation that is not the runtime's: Refused"},{"id":"R6","kind":"transition","text":"Propose while another outcome on the resource is unresolved: nothing stored, reply blocked"},{"id":"R7","kind":"transition","text":"Propose with no usable expiry: nothing stored, reply unavailable"},{"id":"R8","kind":"transition","text":"Propose stored: Pending. The action comes from the tool kind"},{"id":"R9","kind":"transition","text":"Propose repeated for a stored proposal: the stored proposal is returned, nothing changes"},{"id":"R10","kind":"transition","text":"Confirm by another user than the proposer: forbidden, no change"},{"id":"R11","kind":"transition","text":"Confirm from a credential that is not a human surface: forbidden, no change"},{"id":"R12","kind":"transition","text":"Confirm whose digest is not the stored one: changed, no change"},{"id":"R13","kind":"transition","text":"Confirm after expiry: Expired"},{"id":"R14","kind":"transition","text":"Confirm whose live role no longer covers the derived action: forbidden, stays Pending"},{"id":"R15","kind":"transition","text":"Confirm accepted: Admitting, ask for the admission decision"},{"id":"R16","kind":"transition","text":"Confirm while a confirmation is being admitted: busy, no change"},{"id":"R17","kind":"transition","text":"Confirm of an executing or unresolved proposal: look the receipt up, never apply again"},{"id":"R18","kind":"transition","text":"Confirm of an Applied proposal: the stored answer, nothing runs"},{"id":"R19","kind":"transition","text":"Confirm of a Rejected, NotApplied or Stale proposal: the stored answer, nothing runs"},{"id":"R20","kind":"transition","text":"Confirm of a Cancelled or Dropped proposal: closed, nothing runs"},{"id":"R21","kind":"transition","text":"Confirm of an Expired proposal: expired, nothing runs"},{"id":"R22","kind":"transition","text":"Any caller request for a proposal that was never stored: forbidden"},{"id":"R23","kind":"transition","text":"Cancel by another user than the proposer: forbidden, no change"},{"id":"R24","kind":"transition","text":"Cancel of a Pending proposal: Cancelled"},{"id":"R25","kind":"transition","text":"Cancel while a confirmation is in admission: Cancelled, the late admission answer finds it closed"},{"id":"R26","kind":"transition","text":"Cancel of a proposal that is not pending: closed, no change"},{"id":"R27","kind":"transition","text":"Cancel of a Cancelled proposal: the same answer again"},{"id":"R28","kind":"transition","text":"Tick past expiry of a Pending or Admitting proposal: Expired"},{"id":"R29","kind":"transition","text":"Admission refused (held, forbidden, unavailable, blocked, caller gone): back to Pending, retryable. Nothing was persisted or sent"},{"id":"R30","kind":"transition","text":"Admission granted after expiry: Expired"},{"id":"R31","kind":"transition","text":"Admission granted for another generation than the proposal's: Stale"},{"id":"R32","kind":"transition","text":"Admission granted: ExecPrepared, persist executing, then dispatch once"},{"id":"R33","kind":"transition","text":"SendStarted: ExecSent. From here an error is not proof of anything"},{"id":"R34","kind":"transition","text":"NotSent for a retryable cause (no slot, invalid envelope, withdrawn): back to Pending. The add-on never saw it"},{"id":"R35","kind":"transition","text":"NotSent because a hold or lowered authority cancelled the dispatch: Cancelled"},{"id":"R36","kind":"transition","text":"NotSent because the generation moved: Stale"},{"id":"R37","kind":"transition","text":"Apply answered committed: Applied"},{"id":"R38","kind":"transition","text":"Apply answered rejected, refused or conflict: Rejected, the add-on definitely did not apply"},{"id":"R39","kind":"transition","text":"Apply ended with no evidence (unsettled, transport error, timeout) after a send: OutcomeUnknown"},{"id":"R40","kind":"transition","text":"Receipt lookup says committed: Applied"},{"id":"R41","kind":"transition","text":"Receipt lookup says rejected: Rejected"},{"id":"R42","kind":"transition","text":"Receipt lookup says not-committed: NotApplied"},{"id":"R43","kind":"transition","text":"Receipt lookup unsettled with lookups left: stay OutcomeUnknown, count it"},{"id":"R44","kind":"transition","text":"Receipt lookup unsettled and the bound reached: UnknownManual"},{"id":"R45","kind":"transition","text":"Lookup timer fired for an unresolved or abandoned outcome: look the receipt up"},{"id":"R46","kind":"transition","text":"Owner resolution from a non-owner, a non-human credential or without a reason: forbidden"},{"id":"R47","kind":"transition","text":"Owner resolution while the add-on is held: unavailable, no change"},{"id":"R48","kind":"transition","text":"Owner resolution of an unresolved outcome: Abandoned, one last lookup"},{"id":"R49","kind":"transition","text":"Owner resolution of a proposal that is not unresolved: closed, no change"},{"id":"R50","kind":"transition","text":"Owner resolution of a settled or abandoned proposal: the stored answer"},{"id":"R51","kind":"transition","text":"Hold on a Pending or Admitting proposal: Cancelled"},{"id":"R52","kind":"transition","text":"Hold on a prepared dispatch: ask the shell to cancel it, wait for NotSent or SendStarted"},{"id":"R53","kind":"transition","text":"Hold on a sent request: abort its context and wait for the apply result"},{"id":"R54","kind":"transition","text":"Proposer's authority lowered on a Pending or Admitting proposal: Cancelled"},{"id":"R55","kind":"transition","text":"Proposer's authority lowered on a prepared dispatch: ask the shell to cancel it"},{"id":"R56","kind":"transition","text":"Proposer's authority lowered on a sent request: abort its context and wait"},{"id":"R57","kind":"transition","text":"Generation changed under a Pending or Admitting proposal: Stale"},{"id":"R58","kind":"transition","text":"Generation changed under a prepared dispatch: ask the shell to cancel it"},{"id":"R59","kind":"transition","text":"Restart while a confirmation is in admission: Pending, admission is volatile"},{"id":"R60","kind":"transition","text":"Restart with an executing proposal: OutcomeUnknown, a crash may have followed the send"},{"id":"R61","kind":"transition","text":"Retention elapsed for an abandoned outcome: Dropped"},{"id":"I1","kind":"ignored","text":"no proposal is stored yet, so the event has nothing to act on"},{"id":"I2","kind":"ignored","text":"the proposal is closed (terminal): the event changes nothing"},{"id":"I3","kind":"ignored","text":"late or out-of-order reply for an operation that is not executing: no new information, no change"},{"id":"I4","kind":"ignored","text":"environment fact with no effect on this situation (hold released, lifted hold, nothing to retry)"},{"id":"I5","kind":"ignored","text":"the answer carries no new evidence: the outcome stays as it is"},{"id":"I6","kind":"ignored","text":"the live call decides: its own result moves the proposal"},{"id":"I7","kind":"ignored","text":"the automatic lookups are over or not due; only an explicit lookup or resolution remains"},{"id":"I8","kind":"ignored","text":"the time has not reached expiry"},{"id":"I9","kind":"ignored","text":"the stored state already is what the event would make it"},{"id":"I10","kind":"ignored","text":"the generation moved but this situation is decided by the result of its own call or lookup"},{"id":"V1","kind":"violation","text":"SendStarted with no prepared dispatch: the shell broke its contract, raise an alarm and change nothing"}],"explore":{"states":62,"edges":4154,"terminals":37,"deadEnds":[],"violations":[],"byName":{"Abandoned":3,"Admitting":3,"Applied":3,"Cancelled":9,"Dropped":3,"ExecPrepared":3,"ExecSent":3,"Expired":3,"NotApplied":3,"OutcomeUnknown":6,"Pending":3,"Refused":4,"Rejected":9,"Stale":3,"UnknownManual":3,"Unproposed":1}}};
|
|
const $ = id => document.getElementById(id);
|
|
let cur = 0, pos = 0, showAll = false;
|
|
function esc(s){return String(s).replace(/[&<>"]/g,c=>({'&':'&','<':'<','>':'>','"':'"'}[c]));}
|
|
function stateHtml(s){return '<span class="pf-state">'+esc(s.name)+'</span><div class="pf-mono">'+esc(s.detail)+'</div>';}
|
|
function renderExplore(){
|
|
const e = DATA.explore, bad = e.violations.length + e.deadEnds.length;
|
|
const names = Object.keys(e.byName).sort().map(n=>'<span class="pf-tag">'+esc(n)+' '+e.byName[n]+'</span>').join('');
|
|
$('pf-explore').innerHTML = '<b>Invariant search</b>: '+e.states+' states, '+e.edges+' steps, '+e.terminals+' terminal states, '+
|
|
e.deadEnds.length+' dead ends, '+e.violations.length+' violations. <span class="'+(bad?'pf-fail':'pf-pass')+'">'+(bad?'FAILED':'passed')+'</span><div>'+names+'</div>';
|
|
}
|
|
function renderList(){
|
|
$('pf-traces').innerHTML = DATA.traces.map((t,i)=>'<li><button data-i="'+i+'" '+(i===cur?'aria-current="true"':'')+'>'+esc(t.name)+' <span class="'+(t.ok?'pf-pass':'pf-fail')+'">'+(t.ok?'ok':'FAIL')+'</span></button></li>').join('');
|
|
$('pf-traces').querySelectorAll('button').forEach(b=>b.onclick=()=>{cur=+b.dataset.i;pos=0;showAll=false;render();});
|
|
}
|
|
function render(){
|
|
renderList();
|
|
const t = DATA.traces[cur];
|
|
$('pf-title').textContent = t.name;
|
|
$('pf-about').textContent = t.about;
|
|
const upto = showAll ? t.steps.length : pos + 1;
|
|
$('pf-steps').innerHTML = t.steps.slice(0, upto).map((s,i)=>
|
|
'<tr class="pf-row '+(i===pos&&!showAll?'pf-cur':'')+'" data-i="'+i+'"><td>'+(i+1)+'</td><td class="pf-mono">'+esc(s.event)+'</td><td><span class="pf-rule" data-kind="'+esc(s.ruleKind)+'">'+esc(s.rule)+'</span></td><td>'+stateHtml(s.before)+'</td><td>'+stateHtml(s.after)+'</td><td class="pf-mono pf-fx">'+(s.effects.length?s.effects.map(esc).join('<br>'):'none')+'</td></tr>').join('');
|
|
$('pf-steps').querySelectorAll('tr').forEach(r=>r.onclick=()=>{pos=+r.dataset.i;showAll=false;render();});
|
|
const s = t.steps[pos];
|
|
$('pf-why').innerHTML = 'Step '+(pos+1)+' of '+t.steps.length+' went to <b>'+esc(s.after.name)+'</b>. Rule <b>'+esc(s.rule)+'</b> ('+esc(s.ruleKind)+'): '+esc(s.ruleText)+'. Event: <code>'+esc(s.event)+'</code>.';
|
|
$('pf-pos').textContent = (pos+1)+' / '+t.steps.length;
|
|
$('pf-prev').disabled = pos===0; $('pf-next').disabled = pos===t.steps.length-1;
|
|
$('pf-final').innerHTML = 'Expected final state: <b>'+esc(t.final.name)+'</b> <span class="pf-mono">'+esc(t.final.detail)+'</span>. '+(t.ok?'<span class="pf-pass">The reducer matches the expected rules, effects and final state.</span>':'<span class="pf-fail">'+t.bad.map(esc).join('; ')+'</span>');
|
|
}
|
|
$('pf-prev').onclick=()=>{if(pos>0){pos--;showAll=false;render();}};
|
|
$('pf-next').onclick=()=>{const t=DATA.traces[cur];if(pos<t.steps.length-1){pos++;showAll=false;render();}};
|
|
$('pf-all').onclick=()=>{showAll=!showAll;render();};
|
|
document.addEventListener('keydown',e=>{if(e.key==='ArrowRight')$('pf-next').click();if(e.key==='ArrowLeft')$('pf-prev').click();});
|
|
$('pf-rules').innerHTML = '<tr><th>Id</th><th>Kind</th><th>Meaning</th></tr>'+DATA.rules.map(r=>'<tr><td><span class="pf-rule" data-kind="'+esc(r.kind)+'">'+esc(r.id)+'</span></td><td>'+esc(r.kind)+'</td><td>'+esc(r.text)+'</td></tr>').join('');
|
|
renderExplore(); render();
|
|
</script>
|
|
</body>
|
|
</html>
|