Skip to content
Agent Workspaces
Agent

reconciliation-models

Research note supporting the workspace state-management decision: the host filesystem is authoritative, the desktop keeps a *registry* (tracking index + desktop-only annotations), sync is level-triggered snapshots converging the record toward the world, and host mutations are

From plugin
emdash
6.2k33 skills33 agents

Agent definition

reconciliation-models.md

Prior Art: Registry/Command vs Desired-State Reconciliation Models

Research note supporting the workspace state-management decision: the host filesystem is authoritative, the desktop keeps a *registry* (tracking index + desktop-only annotations), sync is level-triggered snapshots converging the record toward the world, and host mutations are one-shot durable commands in an outbox โ€” deliberately *not* Kubernetes-style spec/status convergence. All claims below are from primary sources (official docs, specs, man pages), linked inline. Researched 2026-08-03.

> **Update 2026-08-05:** the durable-command outbox described here was itself retired. > Host mutations are now plain fail-fast RPC verbs (ADR 0005) and offline deletion is a > client-side tombstone converged by an entity-generic reconcile sweep (ADR 0006). The > registry/snapshot half of this note stands; read the outbox references as historical.

1. Kubernetes spec/status

Source: [API conventions, "Spec and Status"](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) unless noted.

  • `spec` is "a complete description of the desired state", persisted with the object;

`status` "summarizes the current state of the object in the system" and its fields "should be the most recent observations of actual state".

  • Ownership is enforced structurally: spec and status "can (and usually should) have

distinct authorization scopes" โ€” users get write access to spec, controllers get read-only spec and full write on status. PUT/POST "MUST ignore the `status` values"; a `/status` subresource MUST exist for system components to write status.

  • Direction of reconciliation: "Over time the system will work to bring the `status` into

line with the `spec`" โ€” the world is driven toward the record, the inverse of emdash's registry.

  • Level-based, not edge-based: the system drives toward the most recent spec "regardless

of previous versions", explicitly "not required to 'touch base'" at intermediate values. Restated later: "The system is level-based rather than edge-triggered, and should assume an Open World." Emdash's snapshot sync borrows exactly this property (missed intermediate states don't matter), just pointed the other way.

  • The record is existence-authoritative: "If the specification is deleted, the object will

be purged from the system." Deleting the record deletes the world โ€” again inverted from emdash, where deleting the world updates the record.

  • Controllers are control loops that "watch the state of your cluster, then make or request

changes", each trying "to move the current cluster state closer to the desired state" ([Controllers](https://kubernetes.io/docs/concepts/architecture/controller/)). This is why out-of-band deletion of a controller-managed object (e.g. a ReplicaSet's Pod) is repaired by recreation: the desired state still exists in the record.

  • `observedGeneration` in status lets clients check whether the acting component has seen

the latest spec โ€” a record-side freshness marker emdash doesn't need because it has no standing spec.

Deletion and GC ([Finalizers](https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/), [Garbage Collection](https://kubernetes.io/docs/concepts/architecture/garbage-collection/)):

  • Deletion is itself declarative: DELETE sets `metadata.deletionTimestamp`, returns HTTP

202, and the object "remains in a terminating state" until every key in `metadata.finalizers` is removed by its owning controller; only then is the object actually deleted. Once `deletionTimestamp` is set, finalizers may be removed but not added, and "you can not resurrect this object".

  • `ownerReferences` drive cascading GC: "Kubernetes checks for and deletes objects that no

longer have owner references". Foreground deletion blocks the owner on dependents with `blockOwnerDeletion=true`; background deletion (the default) deletes the owner immediately and GCs dependents later; orphaning is an explicit opt-out.

**Assumptions the model bakes in:** a single writer owns desired state (spec authz scope); controllers are always-on and colocated with the API server holding truth (deletion *cannot complete* until a controller processes finalizers โ€” a crashed controller wedges deletion, per the finalizers doc's "stuck in a deleting state" warning); and the stored record is authoritative for both existence and intent. None of these hold for emdash: users mutate host filesystems directly, hosts are intermittently connected, and the host โ€” not the desktop DB โ€” is truth.

2. Terraform state + config

Sources: [State](https://developer.hashicorp.com/terraform/language/state), [Purpose of State](https://developer.hashicorp.com/terraform/language/state/purpose), [terraform refresh](https://developer.hashicorp.com/terraform/cli/commands/refresh), [Import](https://developer.hashicorp.com/terraform/language/import), [terraform state rm](https://developer.hashicorp.com/terraform/cli/commands/state/rm), [removed block](https://developer.hashicorp.com/terraform/language/block/removed).

  • What state is FOR: "The primary purpose of Terraform state is to store bindings between

objects in a remote system and resource instances declared in your configuration" โ€” a mapping/registry, not the desired state itself. It also stores metadata (e.g. the last known dependency order so deleted config can still be destroyed correctly) and "a cache of the attribute values for all resources โ€ฆ done only as a performance improvement" (Purpose page). Terraform "expects a one-to-one mapping between configured resource instances and remote objects" (State page).

  • Refresh converges state toward reality: "Prior to any operation, Terraform does a refresh

to update the state with the real infrastructure" (State page); `terraform refresh` "reads the current settings from all managed remote objects and updates the Terraf

Read more
@generalaction
Ships withemdash

Emdash is the Open-Source Agentic Development Environment (๐Ÿงก YC W26). Run multiple coding agents in parallel. Use any provider.

Stars on GitHub

Momentum

stars in total
6.2k
Star history of generalaction/emdash on GitHub, a chart by star-history.com

Other agents on emdash.

acp-runtime

acp-runtime

Agent

The ACP runtime is the domain service that serves the ACP API contract. It owns the host-scoped dependencies needed to runโ€ฆ

core-modules

core-modules

Agent

This page defines the target organization of `packages/core/src/`. Core is organized by module type so that shared domain APIsโ€ฆ

git-runtime

git-runtime

Agent

Git is split into a transport contract and a host-scoped runtime. Renderer, desktop, and workspace-server code share the Wireโ€ฆ

main-process

main-process

Agent

The main process is organized into domain modules under `src/main/core/`. Each domain typically has a `controller.ts` (RPCโ€ฆ

path-system

path-system

Agent

`@emdash/core/primitives/path/api` is the source of truth for portable file identity and lexical path operations. The detailedโ€ฆ

More agents from other plugins.

api-builder

api-builder

Agent

Deprecated placeholder. Do not use; follow root AGENTS.md and package instructions instead.

happier2d2.2k
@happier-dev@happier-devInstall Agent

Questions about reconciliation-models.

Which coding agents can use reconciliation-models?
reconciliation-models installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.