Skip to content

Fresh catalogs cannot enter the transactional snapshot/apply path #141

Description

@schickling-assistant

A complete prepared declaration plane can replace an existing catalog transactionally, but there is no corresponding operation for an absent catalog. Automation must first create/write the live catalog out of band, exposing partial declarations and bypassing the admission and durability guarantees that catalog snapshot / catalog apply provide later.

Reproduction

At 19d658b1cf2a17e6329e4ad32d58f2cb59aed1c7:

set -eu
root=$(mktemp -d)
trap 'rm -rf "$root"' EXIT
mkdir -p "$root/source/agents/host/worker"
printf '%s\n' 'catalog { pty-root "/tmp/st2-bootstrap-repro-pty" }' >"$root/source/catalog.kdl"
printf '%s\n' 'agent "worker" { host "host"; argv "true" }' >"$root/source/agents/host/worker/agent.kdl"
set -- $(st2 catalog snapshot --catalog "$root/source" --output "$root/prepared")
st2 catalog apply --catalog "$root/target" --prepared "$root/prepared" \
  --expect-sha256 "$2" --json

Actual:

Error: canonicalize catalog .../target
Caused by: No such file or directory (os error 2)

Desired boundary

Provide an explicit create-only bootstrap transaction for a complete prepared projection:

  • old state is absent; new state is the complete admitted catalog;
  • publication is durable, atomic, no-replace, and replay-safe;
  • readers can observe only absence or the complete catalog, never a partial tree;
  • a lost acknowledgement can be retried without weakening create-only semantics;
  • the resulting catalog immediately composes with snapshot, apply, and the persistent authoring/generation fence.

Bootstrap should validate and preserve one explicit external PTY root, but must not inspect, mutate, migrate, or claim transactional custody of that registry. The PTY registry has independent producers that the catalog authoring lock cannot exclude; coordinated PTY-root migration remains a separate protocol.

This is the missing immediate bootstrap seam alongside the longer-term catalog model in #52.

Activity

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:catalogCatalog structure, declarations, transactions, and admission · Set: manualorigin:agentFiled or primarily produced by an AI agent · Set: manualtype:featureNew user-visible or system capability · Set: manual

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions