chore: replace 607 em-dashes with double hyphens project-wide

Includes MCP crash-after-init test fix (crash moved from handle() to serve()
entry point so transport sees immediate subprocess death).
This commit is contained in:
sam committed 2026-07-26 09:53:33 +10:00
1 parent 16d6cd62b7
commit f6d51416f0
112 files changed
+587 -582

No files matched your search

+3 -3
View File
@@ -1,6 +1,6 @@
// Package worktree owns archied's git operations: fresh clone per task,
// branch, commit as the bot identity, push, diff stats, cleanup. The
// daemon performs these deterministically — the model's shell tool never
// daemon performs these deterministically -- the model's shell tool never
// drives git.
package worktree
@@ -119,7 +119,7 @@ func (m *Manager) prepare(ctx context.Context, owner, repo, base string, issue i
}
}
if _, err := m.git(ctx, dir, "reset", "--hard", "origin/"+base); err != nil {
_ = err // Non-fatal — the branch may not have been pushed yet.
_ = err // Non-fatal -- the branch may not have been pushed yet.
}
return dir, branch, nil
}
@@ -349,7 +349,7 @@ func (m *Manager) Push(ctx context.Context, dir, branch string) error {
return err
}
// ChangedLines reports lines added+deleted vs the base branch — the
// ChangedLines reports lines added+deleted vs the base branch -- the
// input to the diff-size cap.
func (m *Manager) ChangedLines(ctx context.Context, dir, base string) (int, error) {
out, err := m.git(ctx, dir, "diff", "--shortstat", "origin/"+base+"...HEAD")
+4 -4
View File
@@ -224,7 +224,7 @@ func TestAskpassWrittenOnce(t *testing.T) {
t.Fatalf("paths differ: %q vs %q", p1, p2)
}
// Mod time must be unchanged — file was not rewritten.
// Mod time must be unchanged -- file was not rewritten.
fi2, err := os.Stat(p2)
if err != nil {
t.Fatal(err)
@@ -307,7 +307,7 @@ func TestPrepareResumesAfterInterruptedClone(t *testing.T) {
t.Fatalf("working tree missing README.md after prepare: %v", err)
}
// CommitAll must work — the sentinel is excluded from git tracking.
// CommitAll must work -- the sentinel is excluded from git tracking.
changed, err := m.CommitAll(ctx, dir2, "noop")
if err != nil || changed {
t.Fatalf("clean CommitAll = (%v, %v), want (false, nil)", changed, err)
@@ -318,7 +318,7 @@ func TestPrepareResumesAfterInterruptedClone(t *testing.T) {
t.Fatalf("push: %v", err)
}
// A second Prepare call must short-circuit via the sentinel — no re-clone.
// A second Prepare call must short-circuit via the sentinel -- no re-clone.
dir3, _, err := m.Prepare(ctx, "acme", "interrupt", "main", 1, "feat: interrupted", "", "")
if err != nil {
t.Fatalf("second prepare: %v", err)
@@ -610,7 +610,7 @@ func TestPushRejected(t *testing.T) {
}
// Now the first worktree's branch is behind origin/branch.
// Make a change and try to push — it should be rejected.
// Make a change and try to push -- it should be rejected.
if err := os.WriteFile(filepath.Join(dir, "third.txt"), []byte("third\n"), 0o644); err != nil {
t.Fatal(err)
}