Doc system test

Create, end to end

What happens across the CLI, registry, coordinator and template containers from cyanprint create to files on disk.

Meta block front matter of this doc
namespaces
  • durian.cloud/cyanprint/project-lifecycle
  • durian.cloud/cyanprint/composition
  • durian.cloud/cyanprint/prompting
  • durian.cloud/cyanprint/coordinator
  • durian.cloud/cyanprint/registry
type
flow

cyanprint create atomi/web ./shop touches every context. This page is the map: each step names the context that owns it and links its doc. Read it first, then go down into the step you care about.

The steps

sequenceDiagram
  participant CLI
  participant Registry
  participant Coord as Coordinator
  participant T as Template container
  CLI->>Registry: get atomi/web (latest version)
  CLI->>CLI: read .cyan_state.yaml, make specs
  loop every spec, base then incoming
    CLI->>Registry: fetch each dependency by version id
    loop every node in run order
      CLI->>Coord: template warm + session warm
      CLI->>Coord: bootstrap session
      loop until final reply
        CLI->>Coord: proxy init (answers, deterministic state)
        Coord->>T: init
        T-->>CLI: question or Cyan
      end
      CLI->>Coord: build phase (Cyan)
      Coord-->>CLI: tar.gz of files
    end
    CLI->>CLI: dependency layering
  end
  CLI->>CLI: stack, three-way merge, write, save state, run commands
  CLI->>Coord: clean sessions
#StepOwnerDoc
1Find the template version; references were pinned at pushregistryreference pinning
2Read the state file; decide add, upgrade or rerun; make previous and current specsproject lifecyclecreate, template stacking
3Flatten each spec's dependency tree into a run ordercompositiondependency flattening
4For each node: warm-up and bootstrapcoordinatortemplate run, warm-up
5Ask the questions through the proxyprompting, coordinatorstateless replay, proxy routing
6Build phase: processors, processor output merge, plugins, tar.gzcoordinatorbuild phase
7Lay the nodes' outputs into one file setcompositiondependency layering
8Stack the specsproject lifecycletemplate stacking
9Three-way merge with the folder; delete dropped files; writeproject lifecyclethree-way merge
10Save state; run post-template commands; clean sessionsproject lifecycle, compositionstate file, post-template commands, session release

Where a conflict resolver can run

Twice per template version tree: in step 6 between processors, and in step 7 (and step 8) between template versions. The rules differ; see conflict resolvers.

Why so many runs

A folder with two stacked templates of three nodes each makes 12 template runs on one update: 2 specs × 3 nodes × (base + incoming). The node cache serves repeats. Inferred: this is the price of never storing the base.