flower
/

review · segments

Conductor-client: API client + hermetic tests (Envelope, VectorCodec, ResultMess

claude 67 events 1 segments main

segment 1 of 1

Create ConductorApiClient and hermetic tests for the conductor-client package

Done

The build agent read the canonical conductor plan (§2, §4, §5, §6) and the existing scaffold files (composer.json, config, service provider, test case, TaskEnvelope, ResultMessage, migrations), then ported embedding-envelope logic from the lounge app. It created the ConductorApiClient (status + ensureRuntime calls against the control-plane API), and three hermetic test suites: EnvelopeTest (v1 contract fields, task_id prefix, image base64, text inline, overrides, rejection), VectorCodecTest (fp32 round-trip via in-memory SQLite using package migrations), and ResultMessageTest (success/error parsing). All files pass php -l.

outcome

Four files created, all lint-clean: ConductorApiClient.php, EnvelopeTest.php, VectorCodecTest.php, ResultMessageTest.php

next steps

  • Install vendor dependencies via composer install
  • Run phpunit to verify the tests pass against the actual Embedding model (once created by the storage agent)
  • If Embedding or EmbeddingModel FQCNs don't match, adjust imports in VectorCodecTest

key decisions

  • ConductorApiClient constructor accepts optional baseUrl/token overrides for testability with Http::fake
  • Envelope tests are fully hermetic (no DB/Redis) since TaskEnvelope is a pure static builder
  • VectorCodecTest uses testbench in-memory SQLite + package migrations to round-trip vectors through the real Embedding model, kept hermetic by not requiring a network or Redis
  • ResultMessageTest is a pure DTO test — no DB, no Redis

open questions

  • The Embedding model and EmbeddingModel model do not yet exist in the package src tree (storage agent may not have committed); tests reference them by FQCN and will fail until those classes are present

2 weeks ago 2 weeks ago