Commit Graph

11 Commits

Author SHA1 Message Date
vh 95f24573e4 catalog: status: down for the 6 unreachable services; StatusT extended
Per althing thread 01KRCNSF0V5NDCKB34H663MXHS — the catalog declared
14 services but 6 of them aren't running on irv-ml1 (chatterbox,
index-tts, qwen3-tts, cosyvoice, voxtral, kyutai-tts; missing from
docker ps entirely). Without action, the asset-engine UI would
declare them as available and consumers would hit unreachable
endpoints.

asset-engine consumer chose option (1) of three I sketched: extend
StatusT with `down` and treat it identically to `catalog-deferred`
in the picker (greyed, non-clickable). Lightweight, declarative, no
runtime health-check machinery, easy to revert when services
return.

Changes:

- StatusT enum (in asset_engine/catalog.py — committed there
  separately) extended from
    Literal["ready", "catalog-deferred", "experimental"]
  to
    Literal["ready", "catalog-deferred", "experimental", "down"]
- 6 services flipped to status: down.
- CATALOG-CONTRACT.md: replaced the bare-enum status row with a
  four-row sub-table that names each value's meaning AND its picker
  behavior. `down` and `catalog-deferred` get the same UI treatment
  but the tooltip text differentiates ("Catalog-deferred" vs
  "Service down — temporarily unreachable on irv-ml1") so the
  semantic distinction (design state vs fleet-ops state) is
  preserved.
- CATALOG-CONTRACT.md versioning policy table: new row codifying
  "extending an existing enum (StatusT, FieldTypeT, ResponseTypeT,
  CategoryT) with a non-conflicting value, with the consumer
  updated in the same coordinated change" → no catalog_version
  bump. Explicit rule for future enum extensions.
- JSON Schema regenerated.

catalog_version stays at 1.

Operational note (not catalog-side): the down services likely got
reaped 13+ days ago per the docker timestamps when other unrelated
work was done on irv-ml1. Bringing them back is a deploy task
outside this commit's scope. Flip status: down → ready in this file
once each one's confirmed running.
2026-05-11 16:31:53 -07:00
vh a0d09edc42 catalog: vibevoice v1 -> v2 — fix model options, voice list, response_format enum
Sweep round caught vibevoice catalog drift in three dimensions; all
verified against the live OpenAPI + endpoint exercise, NOT against
documentation (which is what produced the bad values originally).

model:
  was: options=[vibevoice], default=vibevoice
  now: options=[tts-1, tts-1-hd, vibevoice], default=tts-1
  why: the wrapper accepts all three (OpenAI-compat aliases all map
  to VibeVoice internally per upstream README); wire default is tts-1
  per /openapi.json. Catalog over-constrained users to a single value.

voice:
  was: default=Carter; description listed [Carter, Davis, Emma, Frank,
       Grace, Mike, Samuel] as built-ins
  now: default=en-Carter_man; options enumerated:
       OpenAI: alloy, echo, fable, onyx, nova, shimmer
       VibeVoice: en-Alice_woman, en-Carter_man, en-Frank_man,
                  en-Mary_woman_bgm, en-Maya_woman, in-Samuel_man,
                  zh-Anchen_man_bgm, zh-Bowen_man, zh-Xinran_woman
  why: discovered by hitting the endpoint with the catalog's claimed
  "Carter" — wrapper returned 400 with the actual valid list inline
  in the error body. The previous catalog values were fabrications,
  not derived from any real source.

response_format:
  was: options=[wav, mp3]
  now: options=[wav, mp3, opus, flac, pcm]; default mp3 (was wav)
  why: probed all 7 plausible formats; 5 return audio (200), aac and
  m4a return 500. Catalog was over-restrictive; an earlier sweep
  draft over-claimed [wav, mp3, opus, aac, flac, pcm, m4a] from
  documentation that I refused to apply unverified. Now matches the
  empirically-confirmed set.

Bumped vibevoice version 1 -> 2. catalog_version stays at 1.

Lesson reinforced: the only source-of-truth for catalog values is
the live wire. /openapi.json doesn't enumerate enums (returns bare
"string"); error responses from the endpoint with bad inputs are
the most reliable enum-discovery mechanism.
2026-05-11 16:25:37 -07:00
vh f020049769 catalog: ace-step v5 — defaults audit against upstream Gradio UI
asset_engine consumer audited the entire ace-step entry's defaults
and slider ranges against acestep/ui/components.py (althing thread
01KRCN0SHP9YJGQD58EE95DC5P). The catalog had been authored from
documentation rather than from source; ten defaults were wrong and
several slider ranges were either too narrow or impractically wide.

Defaults changed (catalog -> upstream-authoritative):
  infer_step                 20    -> 60
  guidance_scale             7.5   -> 15.0
  cfg_type                   cfg   -> apg
  omega_scale                0.5   -> 10.0
  guidance_interval          0.0   -> 0.5
  guidance_interval_decay    1.0   -> 0.0
  min_guidance_scale         1.0   -> 3.0
  use_erg_tag                false -> true
  use_erg_diffusion          false -> true
  actual_seeds               [42]  -> []   (random per call)

Slider ranges adopted from upstream where reasonable; bounded
locally where upstream's range is so wide it's unusable as a UI
slider:
  guidance_scale         [1.0, 15.0]   -> [0.0, 30.0]   (upstream)
  guidance_scale_text    [0.0, 15.0]   -> [0.0, 10.0]   (upstream)
  guidance_scale_lyric   [0.0, 15.0]   -> [0.0, 10.0]   (upstream)
  lora_weight            [0.0, 2.0]    -> [-3.0, 3.0]   (upstream)
  audio_duration         [5.0, 600.0]  -> [5.0, 240.0]  (upstream max)
  omega_scale            [0.0, 1.0]    -> [-10.0, 30.0] (UI bound; upstream is [-100, 100])
  min_guidance_scale     [0.0, 10.0]   -> [0.0, 20.0]   (UI bound; upstream is [0, 200])

Verified empty-string actual_seeds path against the live pipeline
source: pipeline_ace_step.py:set_seeds() falls through to
torch.randint when manual_seeds is "" (string, no comma, not all
digits). Smoked end-to-end: HTTP 200 in 11s, real WAV bytes back.

Reproducibility gap honestly documented in the entry's
reproducibility.notes and the actual_seeds field description: with
the new default `actual_seeds: []`, the wrapper rolls a random seed
inside the pipeline but doesn't capture or surface the chosen seed
back through the response. Default-defaulted assets cannot be
regenerated bit-exact; users requiring reproducibility must set
actual_seeds explicitly. Wrapper enhancement to surface the chosen
seed via X-Actual-Seeds header + a CatalogResponse.header_accessories
schema field is the planned fix.

ace-step bumped version 4 -> 5. catalog_version stays at 1 (no
schema changes).

Also added a "source-of-truth precedence" subsection to
CATALOG-CONTRACT.md's service-authoring notes, codifying the
read-order (Pydantic model > handler/pipeline code > Gradio UI >
README). Three ace-step bugs in three rounds (missing field, wrong
enums, stranded bytes, wrong defaults — really four) all share the
same root cause: catalog authored from doc surfaces that lie by
omission.
2026-05-11 16:17:25 -07:00
vh f8ecc6c047 ace-step: stream audio bytes inline; catalog v3 → v4
The pre-fix wrapper at stacks/ace-step/infer-api.py returned a JSON
{output_path: "..."} reference to a file written inside the
container at /app/outputs/. That path was unreachable from outside
the container — every consumer got 134 bytes of JSON-pretending-to-
be-WAV instead of audio. Surfaced by the asset_engine consumer's
end-to-end smoke (althing thread 01KRCJF7NGMXYE9F62Q1A6KFD4 msg 5);
my own earlier smoke missed it because I checked HTTP=200 and stopped
reading instead of inspecting the response body.

Wrapper now reads back the file the pipeline writes and streams the
bytes via fastapi.responses.Response with media_type set from the
audio_format request field (audio/wav | audio/mpeg | audio/flac).
The in-container path is exposed via X-Output-Path header for log
correlation but is no longer load-bearing.

Verified end-to-end against live ace-step on irv-ml1:
  POST /generate  ->  HTTP 200 in 80s
  content-type: audio/wav
  content-length: 945226
  x-output-path: /app/outputs/output_cfe87d1d....wav
  $ file response.wav
  RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit,
    stereo 48000 Hz

Catalog: ace-step bumped version 3 -> 4. Dropped
response.output_field (no longer applicable). reproducibility.notes
expanded to record both the v2 18-arg-tuple fix and this v4
inline-streaming change so the history is auditable from the
catalog itself.

Stale ACEStepOutput Pydantic model left in infer-api.py for now —
unused but small; future cleanup.
2026-05-11 15:48:33 -07:00
vh 7d0a9fa09b catalog: ace-step v3 — fix scheduler_type and cfg_type enum values
Smoke testing in the asset_engine consumer surfaced an
UnboundLocalError 500 from ace-step (althing thread
01KRCJF7NGMXYE9F62Q1A6KFD4 msg 3). Root cause: this catalog had
invented enum values for scheduler_type and cfg_type that don't
exist in the upstream pipeline.

Read pipeline_ace_step.py inside the running container:

  scheduler_type dispatch:
    if  == "euler":    scheduler = FlowMatchEulerDiscreteScheduler(...)
    elif== "heun":     scheduler = FlowMatchHeunDiscreteScheduler(...)
    elif== "pingpong": scheduler = FlowMatchPingPongScheduler(...)
    # no else  -> "linear" / "squared" / "sqrt" leave scheduler unbound

  cfg_type dispatch:
    accepts: apg | cfg | cfg_star

Catalog had:
  scheduler_type: [linear, squared, sqrt] / default linear   <- all invalid
  cfg_type:       [none, cfg, cfg_rw]     / default cfg       <- only cfg works

Fixed:
  scheduler_type: [euler, heun, pingpong] / default euler
  cfg_type:       [apg, cfg, cfg_star]    / default cfg

Bumped ace-step version 2 -> 3. Existing assets generated under v2
with scheduler_type=linear cannot reproduce (the value is now invalid);
v2 assets with the accidentally-valid cfg_type=cfg + a corrected
scheduler can be regenerated under v3 by mapping linear -> euler.

catalog_version stays at 1 (no schema change).

Verified end-to-end against live ace-step on irv-ml1:
  POST /generate { scheduler_type: euler, cfg_type: cfg, ... }
  -> 200, output_path returned, ~8s wall time

Lesson: OpenAPI introspection isn't enough for accurate catalog
authoring. Upstream OpenAPI returns bare `string` for both fields.
Reading the actual dispatch code is the only way to capture the
allowed values. Will sweep the other 11 service entries against
their implementations before P2 (scale to all services) lands.
2026-05-11 15:41:03 -07:00
vh 52803d87f8 catalog-contract: section_groups + Field.section for progressive disclosure; ace-step v2
asset_engine consumer (althing thread 01KRCJF7NGMXYE9F62Q1A6KFD4)
needed structure for ace-step's 27-field form. Two additive Pydantic
changes — backward-compatible, no catalog_version bump per the
policy table:

  - CatalogField.section: str | None = None
  - CatalogService.section_groups: list[CatalogSectionGroup] = []
  - new CatalogSectionGroup model: {id, label, hint?}

Validator: every Field.section value must reference a declared
section_groups[].id within the same service; section_groups[].id
values are unique. CATALOG-CONTRACT.md updated with both the new
service-fields row and a versioning-policy row covering
"add optional Field/Service keys -> no bump."

ace-step entry rewritten to use the new schema:
  - bumped version 1 -> 2
  - declared 6 section groups (basic / generation / conditioning /
    a2a / lora / output) with hints
  - tagged every field with a section
  - added previously-missing checkpoint_path (required: true,
    default: "/app/checkpoints" — the container's mount path).
    Wrapper-side cleanup (default in infer-api.py) queued as
    follow-up.
  - changed lyrics from optional: true -> required: true with
    default "" to match upstream's `lyrics: str` shape (empty
    string satisfies it).

JSON Schema regenerated.

Pydantic-model side of this change lives in asset_engine at
src/asset_engine/catalog.py — committed there separately.
2026-05-11 15:33:08 -07:00
vh 4089990c17 docs/asset-engine: kokoro-captioned status experimental → ready
Consumer-side renderer for the JSON-envelope + timestamps shape
shipped (althing thread 01KRCF4W66X3, msg 5). Smoke + regression
clean. Per the contract on the entry's notes block, flipping to
ready now that the renderer is in place.
2026-05-11 15:01:15 -07:00
vh d3faeb0314 catalog-contract: add response-decomposition fields (audio_field, timestamps_field, audio_format_field)
asset_engine consumer needed to render kokoro-captioned, whose wire
shape is a JSON envelope carrying base64-encoded audio plus a
structured timestamps array. Modeling it as response.type=json
would force either a per-service-id renderer (forbidden by
brief §1.7) or extending the closed response-type vocabulary
(forbidden by brief §2.2 without a coordinated bump).

Resolution (per althing thread 01KRCF4W66X3): keep response.type
closed at the existing six values and decompose at the response
*field* level instead — the same flexibility seam already used by
mime / mime_from_field / output_field. Adds three optional keys:

  - audio_field: JSON key holding base64-encoded audio bytes
  - audio_format_field: JSON key holding the decoded audio MIME
  - timestamps_field: JSON key holding a structured timestamps array
    (independent of type, declared by any service emitting time-
    aligned markers)

Validators in CatalogResponse enforce sane combinations:
  - audio_field requires response.type=audio
  - audio_field forbids mime_from_field
  - audio_format_field requires audio_field

This is additive and backward-compatible — no catalog_version bump,
existing services parse unchanged. CATALOG-CONTRACT.md updated with
the new rows in the response-field table and a versioning-policy
row codifying that adding optional keys to response: doesn't bump.

kokoro-captioned re-shaped to use the new schema:
  response:
    type: audio
    audio_field: audio
    audio_format_field: audio_format
    timestamps_field: timestamps
And marked status: experimental until the asset_engine consumer's
audio-with-timestamps renderer ships.

JSON Schema regenerated to reflect the new Pydantic shape.

Pydantic-model side of this change lives in the asset_engine repo
at src/asset_engine/catalog.py — committed there separately.
2026-05-11 14:55:15 -07:00
vh 44c565ac77 docs/asset-engine: kokoro v2 + new kokoro-captioned entry
Per a request from the asset_engine consumer (althing thread
01KRCF4W66X3N24B01FF2Y7V3D), and verified against the live kokoro
OpenAPI + exercised endpoints:

* kokoro: version 1 → 2; adds three fields surfaced by the upstream
  schema but not previously declared:
    - speed (slider 0.25–4.0, default 1.0)
    - volume_multiplier (slider 0.5–2.0, default 1.0; UI-bounded
      since upstream is unbounded — noted in description)
    - lang_code (text, optional override of the voice-name-derived
      language hint)

* kokoro-captioned: new service entry wrapping
  /dev/captioned_speech. Same model + image as kokoro proper but
  separate catalog entry because the response shape is structured
  JSON (audio inline as base64 + word-level timestamps), not raw
  audio bytes. Verified shape captured in reproducibility.notes
  so future consumers don't have to re-discover it. response.type
  = json (consumer renders custom: player + subtitle overlay).

* reproducibility_audit: row added for kokoro-captioned.

Deferred (separate from this commit):
- kokoro-blend-voice. /v1/audio/voices/combine returns 403 on the
  default config (allow_local_voice_saving=False); even with the
  flag flipped it writes to a temp dir, not /worktank/kokoro/user_voices.
  The persistent blend mechanism in this fleet is
  playbooks/blend-kokoro-voice.yaml. Ad-hoc blending already works
  through /v1/audio/speech via the inline syntax voice="a(w)+b(w)";
  consumer can surface that as a UI affordance without any
  catalog change.

catalog_version stays at 1 (no field-type vocabulary changes).
JSON Schema regeneration produced byte-identical output.
2026-05-11 14:38:05 -07:00
vh 0157066d6e docs/asset-engine: promote services.yaml to first-class contract
Adds the supporting infra around the service catalog now that it
has external consumers (the asset_engine UI being the first; CLIs,
monitoring, other services may follow):

- CATALOG-CONTRACT.md: the consumer-facing contract. Defines
  versioning policy (catalog_version vs per-service version),
  closed field-type and response-type vocabularies, recommended
  vendor+drift-check sync workflow, known-consumers list, service
  authoring notes.
- services.schema.json: JSON Schema (draft 2020-12) for the
  catalog. Generated from the Pydantic model in
  ~/development/asset_engine/src/asset_engine/catalog.py via
  `uv run scripts/dump_schema.py --publish`. Lets non-Python
  consumers validate against the same shape.
- services.yaml: adds catalog_version: 1 at the root and reframes
  the file's header to call out its first-class-contract status.
  Quotes a vibevoice label that contained an unescaped colon
  (caught by the asset_engine's strict YAML parser on first sync).
2026-05-11 08:57:35 -07:00
vh 8d8d45b7ca docs/asset-engine: catalog + UI design brief
services.yaml: form-generator contract for the forthcoming
asset-generation UI. 13 inference services on irv-ml1 (TTS, ASR,
SFX, music) catalogued with field schemas extracted from Pydantic
models, response types, reproducibility audit, and license
warnings. ComfyUI flagged catalog-deferred (workflow-DAG API
doesn't fit a form-based UI without a per-asset-type wrapper).

design-brief.md: the prompt to give a frontend-design agent before
any pixels. Locks in the data-model decisions whose later cost is
asymmetric (asset-as-first-class entity, content-addressed output
storage, reproducibility hard requirement, job table, auth as a
no-op DI seam, API surface ≠ UI surface, schema versioning,
tags/collections plumbed in v1 with no UI). Defines a closed
field-type vocabulary (8 types) and response-renderer vocabulary
(6 types) — agent isn't allowed to extend them. Pre-decides the
required UI surfaces; leaves IA, library-nav pattern, long-job
UX, and big-form ergonomics open for the agent to opine on.
2026-05-10 19:20:58 -07:00