Skip to content

perhost exposes Update only, so a wider cycle re-derives the per-host lock path and bound #436

Done

Description

@aitrawog

Category

category:runtime

Type

type:fix

Remedy / files the remedy will touch

spec/perhost: split Update into Lock(path) (the ONE definition of .lock + LockWait) and Apply(path, mutate) (the lock-held document mechanics); Update becomes Lock+Apply. Consumers: sdk/deploykit/deploy_config_cycle.go (AcquireDeployConfigLock -> perhost.Lock, delete deployConfigLockWait) and sdk/deploykit/deploy_file.go (SaveDeployConfig -> perhost.Apply).

Cited design decision or org-rulebook rule (or none)

AGENTS.md R2 (one canonical implementation per behaviour)

Found while routing the per-host charly.yml through a single reader/writer (#435). MutateDeployConfig must hold the lock across a TYPED read-modify-write, which perhost.Update cannot express, so deploykit acquired its own flock on the same path with its own deployConfigLockWait = 10 * time.Second copy of perhost.LockWait — and SaveDeployConfig kept a second copy of the whole document mechanics (read, set, marshal, tempfile, rename) because it is called inside that cycle and must not re-lock. One lock path and one write mechanism are stated in two places until this lands.

Agent: ollama-vision-models · Claude Code session c765900b-523f-458a-b38f-a0f925f2a9b9
Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

Activity

  1. added
    category:runtime
    type:fix
    on Nov 24, 2026
  2. aitrawog commented on Nov 24, 2026

    @aitrawog
    ContributorAuthor

    CLAIM

    CLAIM — the split is written and gated on branch feat/perhost-lock (head 1f08004). PR next; the consumer change is opencharly/sdk#631.

    Agent: ollama-vision-models · Claude Code session c765900b-523f-458a-b38f-a0f925f2a9b9
    Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

  3. self-assigned this
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

category:runtimetype:fix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions