Ephemeral-template (Echo) session creation — REST coverage #19

Closed
opened 2026-07-18 11:52:23 -07:00 by vh · 0 comments
Owner

Gap

create_session could only mint foundational sessions ({"agent_id": <agent>}). Starting an ephemeral template session (agent_id="echo") returned 422 ephemeral_requires_config — ratatoskr had no way to supply the required config block, so Echo was uncreatable. Surfaced as an opaque session_api_failed at the CLI.

Fix (implemented in-session, direct House Code Discipline)

  • create_session(config=…) — verbatim, role/model-agnostic config passthrough (PRE-004/005 guards; config+bifrost mutually exclusive).
  • SessionInfo.kind / .config capture on both create + list.
  • CLI --system-prompt flag (builds config={"system_prompt": …}; validation: non-empty, requires --new+--agent, xor bifrost); _amain surfaces kind=.
  • --whoami renderer fixed to read allowed_roles/default_role (was reading dead allowed_models/default_model).

Grounding

rolemodel drift resolved with worldtree-dev (althing thread 01KXT976NN91DRBZBPXNZ2BVZR): canonical is config.role (never config.model, which now hard-rejects); role cutover commit bb4d551 / ADR-0012. Pinned conversation-api-spec.md re-synced to v1.1 (b4a278c). Verified end-to-end against the live v0.16.2 target.

Coverage

REST ephemeral-template create now covered. Contract: docs/contracts/issues/2.contract.md (Amendment 2026-07-18). Tests: 7 sessions + 6 CLI (TDD). Full suite green.

Tracking record for work already landed; closed by the implementing commit.

## Gap `create_session` could only mint *foundational* sessions (`{"agent_id": <agent>}`). Starting an **ephemeral template** session (`agent_id="echo"`) returned `422 ephemeral_requires_config` — ratatoskr had no way to supply the required `config` block, so Echo was uncreatable. Surfaced as an opaque `session_api_failed` at the CLI. ## Fix (implemented in-session, direct House Code Discipline) - `create_session(config=…)` — verbatim, role/model-agnostic config passthrough (PRE-004/005 guards; config+bifrost mutually exclusive). - `SessionInfo.kind` / `.config` capture on both create + list. - CLI `--system-prompt` flag (builds `config={"system_prompt": …}`; validation: non-empty, requires `--new`+`--agent`, xor bifrost); `_amain` surfaces `kind=`. - `--whoami` renderer fixed to read `allowed_roles`/`default_role` (was reading dead `allowed_models`/`default_model`). ## Grounding `role`↔`model` drift resolved with worldtree-dev (althing thread 01KXT976NN91DRBZBPXNZ2BVZR): canonical is `config.role` (never `config.model`, which now hard-rejects); role cutover commit bb4d551 / ADR-0012. Pinned conversation-api-spec.md re-synced to v1.1 (b4a278c). Verified end-to-end against the live v0.16.2 target. ## Coverage REST ephemeral-template create now covered. Contract: docs/contracts/issues/2.contract.md (Amendment 2026-07-18). Tests: 7 sessions + 6 CLI (TDD). Full suite green. Tracking record for work already landed; closed by the implementing commit.
vh closed this issue 2026-07-18 12:16:45 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vh/ratatoskr#19