spec: OVOS-TRANSFORM-1 — audio/intent IO contracts, error-handling state model, pre-entry cancellation - #143
spec: OVOS-TRANSFORM-1 — audio/intent IO contracts, error-handling state model, pre-entry cancellation#143JarbasAl wants to merge 1 commit into
Conversation
…ate model, pre-entry cancellation
Audit fixes to the Transformer Plugins specification.
IO contracts
- §3.1 audio IO becomes a 4-tuple (chunk, lang, metadata, context);
audio metadata and Message.context named as distinct surfaces.
- §3.0 exempts the audio chain from data.lang writeback; its output
lang goes to session.detected_lang for AUDIO-IN-1 §5.1.
- §3.4 intent IO gains Message.context — the cancellation carrier and
the live session.intent_context as of post-engine mutation.
Error handling and cancellation
- §7 defines "returned its input unchanged" as control flow, not
state; partial in-place mutation survives a raise; snapshotting is
an optional stronger guarantee.
- §7 drops the "list shrunk to empty" shape violation (defers to §3.2).
- §8.2.1 (new) pre-entry audio-chain cancellation suppresses
ovos.utterance.handle; no handled, no unmatched, MAY emit a
standalone cancelled.
- §8.1 scopes the no-strip rule to valid signals and requires the
orchestrator to clear a malformed canceled key.
Composition and introspection
- §3.3 grounds the same-utterance session.pipeline effect in
PIPELINE-1 §6.1 compose-after-metadata; §5.3 governs the six chain
fields ("for this utterance" struck).
- §5.3 availability = loaded AND eligible at this hook.
- §5.3 nested lifecycles compose own chains and fresh stamp lists.
- §6 adds the OPTIONAL order array; §1.3 example repointed.
- §9 gains the §5.2 denylist MUST bullet and the new rules above.
Editorial: §1.1 MUST NOT appear more than once; charset cited to
MSG-1 §2.1.1; session.lang to SESSION-1 §3.2.1; §4 renumbering
paragraph removed; §2 diagram splits decay per CONTEXT-1 §4; §5
preamble counts twelve fields; "any subset" deduped to §9.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 41 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Audit fixes to
transformer.md(OVOS-TRANSFORM-1 v2). Within-v2 refinement — no compatibility-class change, with one caveat noted below.Critical — contracts that could not be satisfied as written
(chunk, lang, metadata, context). The chain had no context surface, yet §3.0 (langthreaded "alongside the artifact andMessage.context"), §5 (per-session overrides live onsession), §7.1 (audio transformers writesession.detected_lang), §8.1 (cancellation keys are set in the returned context) and OVOS-AUDIO-IN-1 §4 all assumed one. The audio metadata object (per chunk) andMessage.context(per capture) are now named as distinct surfaces with distinct lifetimes.Message.context. §8.2 legislated intent-transformer cancellation but no channel existed to signal it — theMatchcarries no context keys. The context object is the carrier, and §3.4 now says so explicitly.Error handling — what "returned its input unchanged" means
Every §3 artifact type permits in-place mutation, so the old wording was unimplementable: a transformer that raises half-way through has already changed the object the orchestrator holds.
skill_id/intent_nameare the only fields the orchestrator must restore.Cancellation
ovos.utterance.handle. The §8.2 terminal pair is unsatisfiable there, and under a split orchestrator the emitting process is a different one. Pre-entry cancellation now suppresses the entry event, emits neitherovos.utterance.handlednorovos.intent.unmatched, and MAY emit a standaloneovos.utterance.cancelled. The OVOS-PIPELINE-1 §9.5 invariant binds lifecycles that start; this one does not start.canceled: truewould survive into the next call and be attributed to the wrong transformer. No-strip is now scoped to valid signals, and the orchestrator MUST clear a malformedcanceled/cancel_reasonbefore continuing.Composition, ordering, introspection
session.pipelineclaim and now grounds it: OVOS-PIPELINE-1 §6.1 composes the effective pipeline after the metadata chain, so the composition reads what this chain leaves behind. The asymmetry with the six §5 transformer-chain fields (composed at utterance start, effective next utterance) is stated explicitly, and "for this utterance" is struck from that bullet — §5.3 governs it.<type>_transformer_idsstamp lists; nothing is deduplicated against the outer lifecycle.orderarray so a response can report an explicit deployer order — previously inexpressible. §1.3's example of a payload-subjecttransformer_idrepointed to fields that actually exist (cancel_by,loaded/priorities/order).order.Editorial
transformer_idcharset stated directly and cited to OVOS-MSG-1 §2.1.1;session.langrepointed to OVOS-SESSION-1 §3.2.1.Cross-PR dependency
§3.3 is written as the intended contract and depends on the pipeline-1 PR. OVOS-PIPELINE-1 §6.1 currently composes the effective pipeline before the utterance and metadata chains, which would make §3.3's same-utterance
session.pipelineclaim false. The pipeline-1 PR moves the compose step to after the metadata chain. Per-utterance routing is the touted feature of the metadata hook and OVOS-CONVERSE-1 §3.3 relies on it, so the claim is kept here and the ordering is fixed there. Merge the pipeline-1 PR first, or this citation is forward-looking.Versioning
Within-v2 refinement; no
Versionbump. The one judgement call is C1: addingMessage.contextto the audio IO tuple is arguably class-relevant, since a host passing the legacy 3-tuple cannot satisfy the new contract. It is recorded as a SHOULD-migrate in the CHANGELOG rather than a version bump, because a 3-tuple host was already unable to satisfy §7.1, §8.1 and OVOS-AUDIO-IN-1 §4 — the tuple change documents an obligation that already existed rather than creating a new one.Not in scope here
GLOSSARY transformer entries, the session-1 owner-column asymmetry, and the converse.md §6 miscitation are fixed in their own PRs.