Repository navigation
spec: OVOS-READY-1, a boot-readiness signal gates the utterance lifecycle #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
goldyfruit
wants to merge
11
commits into
OpenVoiceOS:dev
Choose a base branch
from
goldyfruit:spec/ready-1
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
5e247eb
spec(ready-1): a boot-readiness signal gates the utterance lifecycle
goldyfruit 5c28db0
spec(ready-1): define ready as pipelines warm, not process status; fi…
goldyfruit 7577efd
spec(ready-1): prescriptive rewrite, no code/issue references or meta…
goldyfruit 1c3f41b
spec(ready-1): allow an error sound when no localized dialog exists; …
goldyfruit cfd82e6
spec(ready-1): trim the per-plugin section, exact dialog-language rul…
goldyfruit bdf582e
spec(ready-1): readiness also requires the skills the orchestrator ro…
goldyfruit e2fa5ed
spec(ready-1): a plugin may report loss of readiness; name the respon…
goldyfruit 7604b9e
spec(ready-1): ready is the orchestrator's ProcessState.READY; pipeli…
goldyfruit 292bf57
spec(ready-1): keep the text prescriptive
goldyfruit 72fd6a6
spec(ready-1): describe the abstract system only; pipelines are loade…
goldyfruit f2e082e
spec(ready-1): the skills condition covers all initial skills, not th…
goldyfruit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| # Boot Readiness and the Utterance Lifecycle | ||
|
|
||
| **Spec ID:** OVOS-READY-1 · **Version:** 1 · **Status:** Draft | ||
|
|
||
| This document defines when the orchestrator is ready, and the one | ||
| requirement it places on the utterance lifecycle (OVOS-PIPELINE-1 | ||
| §6/§9.1): an utterance that arrives before the orchestrator can answer | ||
| **MUST NOT** enter the pipeline loop at all. | ||
|
|
||
| It builds on OVOS-PIPELINE-1 (the utterance lifecycle and pipeline | ||
| plugin abstraction this spec gates). | ||
|
|
||
| The key words **MUST**, **MUST NOT**, **SHOULD**, **SHOULD NOT**, | ||
| **RECOMMENDED** and **MAY** are used as in RFC 2119. | ||
|
|
||
| ## 1. Scope | ||
|
|
||
| This specification defines: | ||
|
|
||
| - when the orchestrator is **ready** (§2): every configured pipeline | ||
| is able to match intents, and the skills have been registered; | ||
| - the **lifecycle gate** (§3): what the orchestrator does with an | ||
| utterance until it is ready. | ||
|
|
||
| ## 2. Ready | ||
|
|
||
| A pipeline is either **loading** or **loaded**. It is loaded when it | ||
| is able to match intents against what is registered with it: its | ||
| models, indexes and any other state it needs to answer a `match` | ||
| (OVOS-PIPELINE-1 §4) call are in place. It does not stop being loaded | ||
| because more intents are registered later; it keeps serving what it | ||
| had and gains the new intents when it has absorbed them. | ||
|
|
||
| The orchestrator is **ready** once every configured pipeline is | ||
| loaded and the skills it routes to have been registered (§2.2). | ||
| Readiness is reached once and is not lost: a pipeline gaining intents | ||
| or a skill being installed later does not make the orchestrator | ||
| unready. | ||
|
|
||
| A pipeline that fails to load does not hold readiness back for ever. | ||
| It cannot match, so the orchestrator treats it as not configured and | ||
| reports the failure the way it reports any other error; nothing more | ||
| needs to be specified here, and no further signal is defined. | ||
|
|
||
| An implementation **MAY** consider itself not ready until other | ||
| subsystems it depends on to serve a request correctly (audio output, | ||
| a listener, a GUI surface) are ready too. | ||
|
|
||
| ### 2.1 Skills | ||
|
|
||
| An utterance that belongs to a skill that has not registered yet is | ||
| matched to whatever else is registered, or to nothing. The orchestrator | ||
| therefore **MUST NOT** be ready until every skill the component that | ||
| loads skills started with has finished loading. How the orchestrator | ||
| learns this is implementation-defined, but it **MUST** be able to | ||
| learn it when it starts after that load already finished, rather than | ||
| wait for a notification sent before it was listening. | ||
|
|
||
| This applies to the initial set of skills only. A skill installed, | ||
| upgraded or reloaded afterwards **MUST NOT** make the orchestrator | ||
| unready. | ||
|
|
||
| A deployment with no component that loads skills has nothing to wait | ||
| for here. | ||
|
|
||
| ## 3. Gating the utterance lifecycle | ||
|
|
||
| Until the orchestrator is ready (§2), it **MUST NOT** run the pipeline | ||
| loop (OVOS-PIPELINE-1 §6) for an incoming `ovos.utterance.handle` | ||
| (§9.1). It **MUST** instead: | ||
|
|
||
| 1. respond with either a short "still starting" dialog on | ||
| `ovos.utterance.speak` (§9.6) or a non-verbal error sound; the | ||
| choice is implementation-defined. A spoken dialog **MUST** be | ||
| rendered in the language OVOS-SESSION-1 §3.2.3 gives for | ||
| responses: `output_lang` when the session sets it, otherwise the | ||
| utterance language resolved at intake (§3.2.7). An implementation | ||
| with no localization for that language **MUST** play the error | ||
| sound instead, never a dialog in some other language; | ||
| 2. carry the error identifier `ovos.ready.not_ready` in | ||
| `context.error` of whichever response step 1 sent, so a listener | ||
| can tell this reply apart from an ordinary one and knows why it was | ||
| declined; | ||
| 3. emit `ovos.utterance.handled` as it would for a normal utterance, | ||
| so a caller does not wait on a terminal event that never arrives; | ||
| 4. produce none of the pipeline-loop side effects (§8's | ||
| handler-lifecycle trio, `ovos.intent.matched` / `.unmatched`): none | ||
| of them ran. | ||
|
|
||
| A caller gets a prompt response either way, and it says why, rather | ||
| than guessing from silence or risking a wrong match. | ||
|
|
||
| ## 4. Conformance | ||
|
|
||
| A conforming orchestrator: | ||
|
|
||
| - is not ready while a configured pipeline is loading or while any | ||
| of the initial skills is still loading (§2, §2.1); | ||
| - once ready, stays ready (§2); | ||
| - never runs the pipeline loop while not ready, substituting the | ||
| decline of §3; | ||
| - resumes ordinary matching as soon as it is ready. | ||
|
|
||
| A conforming pipeline does not answer a `match` call with partial | ||
| state while it is loading. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.