Skip to content

fountain: Tier 1 for the ops surface — steward, runtime and acp docs pages, chant-fountain-ops skill, the steward init template, examples/fountain-steward #2129

Closed

Description

@lex00

Sub-issue 7 of #2115.

Tier 1 completeness for the new surface (docs/src/content/docs/lexicon-authoring/completeness-checklist.mdx, enforced by scripts/check-lexicons.ts), plus the pieces a person needs to pick this up without reading the epic.

  • Docs pages under lexicons/fountain/docs/pages/: steward.mdx (the mesh table from epic: fountain lexicon — an op is a teammate, its thread is the environment's history #2115, the composite, what lands on which store), runtime.mdx (chant run --on fountain, profiles, status/log/approve/cancel, conversation_busy), acp.mdx (chant acp, the command-line-as-prompt convention, cancel, gates, the --durable-requests flag and which fountain version it needs). The generated resources.mdx, ops.mdx, lint-rules.mdx pick up the new kinds and rules from sub-issue 1. Sidebar entries in docs/astro.config.mjs under the fountain lexicon.
  • A skill chant-fountain-ops.md under src/skills/ registered in plugin.ts's createSkillsLoader: how to declare a steward, apply it, run an op on it, read its thread, approve a gate, and what to do when the steward is busy. Triggers on "steward", "run on fountain", "teammate", "schedule an op".
  • chant init --lexicon fountain --template steward in src/init-templates.ts: src/fountain.ts with a toolchain Environment (repo url as a param, setup script installing chant), a Vault placeholder, one WatchOp and one ConvergeOp with schedules, and a Steward binding them; chant.config.ts with a fountain.profiles block reading FOUNTAIN_TOKEN.
  • examples/fountain-steward/: the template as a runnable example with a README that walks build, apply, chant run prod-watch --on fountain, reading the thread, approving a gated apply. Register it in docs/src/content/docs/contributing/examples.mdx and add a tutorial page. The example is the one that replaces examples/temporal-stack for the "here is the hosted runtime" story in epic: remove Temporal from chant — lexicon, core, examples, docs, CI, npm #2116.
  • chant dev onboard fountain output and the trusted-publisher record if the lexicon's npm publish needs it (see epic: terraform lexicon — ops and lint around Terraform you already run #2081's sub-issue 7 for the precedent).

Waits on sub-issues 3, 4, 5 and 6.

Acceptance

  • chant dev check-lexicon fountain Tier 1 is green with the three new pages, the skill, and the template.
  • chant init --lexicon fountain --template steward produces a project that builds, lints clean, and whose manifest fountainApply accepts against the injected FountainHttp.
  • examples/fountain-steward builds in CI, and its README's live walkthrough was run once by hand with the run linked in the PR.
  • The three docs pages pass the diataxis check and the prose ratchet; the sidebar links resolve.
  • The chant-fountain-ops skill loads through the plugin and is listed by chant skills.
  • npm test -w lexicons/fountain passes.

Activity

  1. added
    enhancement
    area:fountain
    area:docs
    on Sep 6, 2026
  2. lex00 commented on Sep 6, 2026

    @lex00
    ContributorAuthor

    Live walkthrough of examples/fountain-steward against a real fountain

    Ran the README's walkthrough end to end against a fountain v0.16.0 instance from
    fountain-ops (k3d, spritzer emulator data plane, http://localhost:4000). Branch
    feat/2132-examples @ d98a08d3. Full apply/drift evidence is on #2127; this comment is
    the parts that belong to the example and its README.

    What held up

    npx chant build src --lexicon fountain -o dist/fountain.yaml and npx chant lint src
    (✓ No problems found) both behave as the README says. The manifest is six documents in
    dependency order, the ACP agent block matches the README's snippet exactly, steward-apply
    correctly gets no Schedule, and the two schedules carry chant run prod-watch /
    chant run prod-converge with their crons. Applied against the live instance, all six
    documents land and GET /api/team/:agent_id/schedules reads them back verbatim.

    1. "Six kinds" is really five kinds / six documents

    The task I was verifying against listed the six as Environment, Vault, Agent, Teammate,
    Schedule, Webhook
    . The example declares no Webhook — its six are Environment, Vault, Agent,
    Teammate and two Schedules. The README's own table is right ("Six documents come out"),
    but the ambiguity is easy to inherit. Since Steward supports webhook: and fountainApply
    reconciles it, and the example is the one place the whole surface is meant to be visible,
    adding a webhook to src/fountain.ts would make the example cover all six kinds. I applied
    one by hand alongside the example's five to confirm the path works live:

    "created": [... "Webhook/prod-steward-hook"]
    

    2. §2's idempotency claim is not true against v0.16.0

    fountainApply … A second apply of an unchanged manifest makes no writes.

    A second apply of a byte-identical manifest:

    "updated":   ["Environment/prod-toolchain", "Vault/prod-creds", "Agent/prod-steward"],
    "unchanged": ["Teammate/prod-steward", "Schedule/prod-steward-prod-watch",
                  "Schedule/prod-steward-prod-converge", "Webhook/prod-steward-hook"]
    

    The routed kinds are genuinely unchanged. The three that go through POST /api/apply are
    reported updated because fountain v0.16.0's ApplyResult.action enum is
    created | updated | error — it has no unchanged to return. chant already handles an
    unchanged action if one ever arrives, so this is a wording problem, not a code one: the
    sentence should say the routed kinds report unchanged and that Environment/Vault/Agent will
    too once fountain grows the action (worth a footnote next to the existing #1636 note).

    3. §3's failure mode is not the one the README shows

    The README's §3 shows the single-writer refusal as the thing that goes wrong. What actually
    happens on a fountain that cannot start the sandbox is that chant run prod-watch --on fountain
    prints nothing at all and sits there. I killed the first attempt at 240s assuming it had
    hung. It had not — the default FOUNTAIN_STREAM_IDLE_TIMEOUT is 1800s, so it was going to wait
    half an hour. With the timeout shortened:

    $ FOUNTAIN_STREAM_IDLE_TIMEOUT=45 npx chant run prod-watch --on fountain
    error: fountain runtime: nothing arrived on conversation e87abbd4-… for 45s.
           The turn is not reported as finished. Widen the wait with
           FOUNTAIN_STREAM_IDLE_TIMEOUT, in seconds.
    

    The layer it fails at is the turn, not the agent create or the conversation create. Both of
    those succeed:

    GET  /api/agents                              200
    POST /api/team/:agent_id/messages             202   ← the single-writer path works
    GET  /api/conversations/:id/stream            200 (chunked)
    

    and then fountain marks the conversation terminal roughly one second later:

    {"id":"e87abbd4-…","status":"failed","turn_count":0,"acp":true,"sandbox":{"status":"failed"}}
    

    chant keeps tailing the stream for the full idle timeout even though the conversation is
    already failed with zero turns. It only settles on a stage: turn event with a non-started
    state, and a conversation that dies during provision never emits one. A poll of
    GET /api/conversations/:id (which chant already calls elsewhere) when the stream goes quiet
    or ends would let it fail in a second with fountain's real reason instead of a 30-minute
    silence and a timeout message that suggests widening the wait — the one thing that will not
    help here.

    Secondary, same cause: npx chant run status prod-watch --on fountain answers
    No run of Op "prod-watch" is recorded on the "fountain" runtime. for a conversation that
    exists and failed, because the status path keys off turns and there are none.

    4. The acp note in §2 is right, and understates it slightly

    runtime: "acp" with runtime_command is fountain#1634 and is not in v0.16.0. An instance
    without that PR rejects the pair here.

    Confirmed. The exact rejection, at the Agent create inside the bulk call:

    ERROR: fountainApply: 1 failure(s):
      Agent/prod-steward: {"runtime":["is invalid"],"model":["can't be blank"]}
    

    Two fields, not one — model is required and format-checked by v0.16.0, and the Steward
    deliberately emits none. Detail on #2127. Worth naming model in this README paragraph too,
    since a reader who sees only "rejects the pair" will be surprised by the second error.

    Environment caveat

    On a laptop fountain-ops deployment the data plane is the spritzer emulator (v0.5.0), which
    cannot complete any turn — it echoes the exec back instead of speaking ACP
    (initialize is not supported), and chant's networking_type: limited Environment fails
    provision at {:network_policy, {:invalid, {:http, 200, %{"rules" => …}}}}. So §3–§5 of the
    README (a real turn, the thread, the gated apply) remain unverified live; they need a real
    sprites data plane and #1634. Everything up to and including the apply and the drift check
    is verified.

    Also worth a line in §2: fountain-ops still defaults its image to v0.7.0, which predates
    most of this. Anyone following this README against a laptop instance wants
    --param image=ghcr.io/binarybourbon/fountain:v0.16.0 to match the spec the lexicon pins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:docsarea:fountainenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions