a timed-out founding step blames git add -A — the error names the command that ran next, not the one that consumed the clock, and never says the work already landed #1761

Closed
opened 2026-09-23 13:48:49 +00:00 by ben · 2 comments
Owner

Hit by Ben on the 2026-09-23 cold manual founding. The founding screen said:

founding: bootstrap the operator sops key: clan: git add -A: context deadline exceeded

git add -A is not what ran out of time. The step's context expired during the pinned clan CLI call that preceded it (a cold-Nix-store download — see #1760); ConfigRepo.Mutate then ran git add -A on an already-dead context, and git's instant failure became the whole step's story. The operator is told a git command failed, when git was never slow (git status in that repo: 9 ms) and the actual work had already landed — the commit was in the repo and the tree was clean.

Two defects in one line:

  1. A deadline expiry names the wrong actor. ConfigRepo.git (internal/clan/configrepo.go:208) wraps every failure as clan: git <args>: <err>, including context.DeadlineExceeded that the git command did not cause. When ctx.Err() != nil the error should say the STEP ran out of time and what it was doing when the clock ran out, never blame the first command unlucky enough to be next.
  2. It reads as destructive when it is not. Nothing tells the operator the change may already have landed, so Retry looks like it might duplicate work. It does not — but the screen should say so: this failure's honest wording is closer to "this step ran out of time while fetching your community's tooling. Anything already done is kept — try again."

Wanted

  • ConfigRepo.Mutate / ConfigRepo.git: when the context is already done before or during a git call, return a deadline-shaped error naming the enclosing operation (the mutation's own message is right there) instead of the git argv.
  • The founding fault line for a timed-out step says what timed out, in operator words, and that retrying is safe.
  • A test: a Mutate whose apply function consumes the context returns an error that does NOT name git add -A and DOES name the mutation.
  • Check the same shape wherever else an expired context is reported by the next shell-out rather than the slow one (internal/clan's CLI paths).

ADR 0100's fail-loud rule is satisfied by both wordings; only one of them is true.

**Hit by Ben on the 2026-09-23 cold manual founding.** The founding screen said: ``` founding: bootstrap the operator sops key: clan: git add -A: context deadline exceeded ``` `git add -A` is not what ran out of time. The step's context expired during the **pinned clan CLI** call that preceded it (a cold-Nix-store download — see #1760); `ConfigRepo.Mutate` then ran `git add -A` on an already-dead context, and git's instant failure became the whole step's story. The operator is told a git command failed, when git was never slow (`git status` in that repo: 9 ms) and the actual work had **already landed** — the commit was in the repo and the tree was clean. Two defects in one line: 1. **A deadline expiry names the wrong actor.** `ConfigRepo.git` (`internal/clan/configrepo.go:208`) wraps every failure as `clan: git <args>: <err>`, including `context.DeadlineExceeded` that the git command did not cause. When `ctx.Err() != nil` the error should say the STEP ran out of time and what it was doing when the clock ran out, never blame the first command unlucky enough to be next. 2. **It reads as destructive when it is not.** Nothing tells the operator the change may already have landed, so *Retry* looks like it might duplicate work. It does not — but the screen should say so: this failure's honest wording is closer to *"this step ran out of time while fetching your community's tooling. Anything already done is kept — try again."* ## Wanted - `ConfigRepo.Mutate` / `ConfigRepo.git`: when the context is already done before or during a git call, return a deadline-shaped error naming the enclosing operation (the mutation's own message is right there) instead of the git argv. - The founding fault line for a timed-out step says what timed out, in operator words, and that retrying is safe. - A test: a Mutate whose apply function consumes the context returns an error that does NOT name `git add -A` and DOES name the mutation. - Check the same shape wherever else an expired context is reported by the next shell-out rather than the slow one (`internal/clan`'s CLI paths). ADR 0100's fail-loud rule is satisfied by both wordings; only one of them is true.

swarm-claim host=matou-dev-server-01 run=30948
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=30948 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1761 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1761,
  "status": "success",
  "commits": [
    "c4a854bf094b8994587ad52c8bdfb8acd21180d5"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/clan/configrepo.go",
    "internal/clan/configrepo_deadline_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/clan/ ./internal/founding/",
      "exit_code": 0
    },
    {
      "command": "gofmt -l internal/clan/configrepo.go internal/clan/configrepo_deadline_test.go && go vet ./internal/clan/ && go build ./...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "ConfigRepo.git returns a deadline-shaped error naming the enclosing operation, not the git argv, when the context is done": "configrepo.go: git returns bare ctx.Err() (no argv) when ctx.Err()!=nil; Mutate wraps every commit-sequence git call in timedOut(message, err) which names the mutation message",
    "The founding fault line for a timed-out step says what timed out in operator words and that retrying is safe": "timedOut renders 'config mutation \"<message>\" ran out of time — anything already done is kept, so it is safe to try again'; founding wraps it under 'founding: bootstrap the operator sops key: …'",
    "A test: a Mutate whose apply consumes the context returns an error that does NOT name git add -A and DOES name the mutation": "configrepo_deadline_test.go TestConfigRepo_TimedOutCommitBlamesTheOperationNotGitAddDashA — asserts !contains 'git add -A', contains the mutation message, contains 'try again', and errors.Is DeadlineExceeded",
    "Check the same shape wherever else an expired context is reported by the next shell-out (internal/clan CLI paths)": "Checked cli.go ExecCLI.Run — a timed-out clan call surfaces as a signal-kill exit (128+signal) that Classify marks FailInterrupted; it never blames a next command, so ConfigRepo.git was the sole offender"
  },
  "summary": "A timed-out config-repo mutation now names the operation and a safe retry instead of blaming git add -A; ConfigRepo.git no longer reports a context deadline as a git-argv failure.",
  "blockers": []
}
**close-report** for #1761 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1761, "status": "success", "commits": [ "c4a854bf094b8994587ad52c8bdfb8acd21180d5" ], "changed_files": [ "STATUS.md", "internal/clan/configrepo.go", "internal/clan/configrepo_deadline_test.go" ], "tests": [ { "command": "go test ./internal/clan/ ./internal/founding/", "exit_code": 0 }, { "command": "gofmt -l internal/clan/configrepo.go internal/clan/configrepo_deadline_test.go && go vet ./internal/clan/ && go build ./...", "exit_code": 0 } ], "criteria": { "ConfigRepo.git returns a deadline-shaped error naming the enclosing operation, not the git argv, when the context is done": "configrepo.go: git returns bare ctx.Err() (no argv) when ctx.Err()!=nil; Mutate wraps every commit-sequence git call in timedOut(message, err) which names the mutation message", "The founding fault line for a timed-out step says what timed out in operator words and that retrying is safe": "timedOut renders 'config mutation \"<message>\" ran out of time — anything already done is kept, so it is safe to try again'; founding wraps it under 'founding: bootstrap the operator sops key: …'", "A test: a Mutate whose apply consumes the context returns an error that does NOT name git add -A and DOES name the mutation": "configrepo_deadline_test.go TestConfigRepo_TimedOutCommitBlamesTheOperationNotGitAddDashA — asserts !contains 'git add -A', contains the mutation message, contains 'try again', and errors.Is DeadlineExceeded", "Check the same shape wherever else an expired context is reported by the next shell-out (internal/clan CLI paths)": "Checked cli.go ExecCLI.Run — a timed-out clan call surfaces as a signal-kill exit (128+signal) that Classify marks FailInterrupted; it never blames a next command, so ConfigRepo.git was the sole offender" }, "summary": "A timed-out config-repo mutation now names the operation and a safe retry instead of blaming git add -A; ConfigRepo.git no longer reports a context deadline as a git-argv failure.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1761
No description provided.