From 1d6940090c4f56d207b094db0d52cc9c79bc41f3 Mon Sep 17 00:00:00 2001 From: takeshi yamashita <220619+takecy@users.noreply.github.com> Date: Wed, 7 Oct 2026 13:15:38 +0900 Subject: [PATCH 1/2] docs(agents): document syncer exit-code invariant, test seams, and release tagging Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GvvjLc6XrTE5wQpcMiGYiu --- AGENTS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 2272ce1..e16984a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,12 +6,16 @@ Before opening a PR, run `make build && make test && make lint` (`make lint` mat ## Coding Style & Naming Conventions Prefer the standard library over new dependencies when possible. Keep tests in the same package unless black-box coverage is required. Repositories are processed in parallel, so every public `printer.Printer` method must hold `p.mu` while writing; cover new ones with a `*_ConcurrentSafe` test. +Inside `syncer.execute`, `eg.Go` callbacks must always `return nil`: record per-repo failures in `runStats` (→ exit 2) and return `error` from `Run` only for setup failures (→ exit 1). +This repo does not vendor dependencies; `make tidy` runs `go mod tidy` only — do not run `go mod vendor`. ## Testing Guidelines This repository uses Go’s `testing` package plus `github.com/matryer/is`. Write focused tests with `t.Run(...)`; avoid table-driven tests here. Use `t.Parallel()` whenever the case is safe to parallelize. Name receiver-related tests as `Test{Struct}_Xxx`, for example `TestSync_Execute`. +Test `syncer` logic with `newSyncWithFake` (fake `Executor`) instead of spawning git. Real-git tests must be hermetic (bare repo under `t.TempDir()`, no network). Tests that swap `os.Stdout` cannot use `t.Parallel()`. ## Commit & Pull Request Guidelines Follow Conventional Commits with English titles, scoped by package when helpful, for example `feat(gih): ...`, `refactor(syncer): ...`, and `fix(printer): ...`. PRs should follow `.github/PULL_REQUEST_TEMPLATE.md` with `## Issue` and `## Overview`, link the related issue, and describe behavioral changes briefly in Japanese. Include tests for functional changes and update `README.md` when CLI behavior changes. +Every push to `master` auto-tags a release (`.github/workflows/tagging.yml`). PRs are merge-committed, so each branch commit's type sets the bump: `fix` → patch, `feat` → minor, `BREAKING CHANGE:` footer → major, anything else → patch. ## Worktree Workflow Do not work directly on the default branch (currently `master`). Start each non-trivial change from a dedicated branch and worktree under `.worktrees/`, for example `git worktree add .worktrees/feat-x -b feat/x`. From 2093a80f5786e50c824b609a3ea429a0ebf8d69b Mon Sep 17 00:00:00 2001 From: takeshi yamashita <220619+takecy@users.noreply.github.com> Date: Wed, 7 Oct 2026 13:16:57 +0900 Subject: [PATCH 2/2] chore(deps): bump mattn/go-colorable to v0.1.16 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GvvjLc6XrTE5wQpcMiGYiu --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4a78235..d55247c 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( ) require ( - github.com/mattn/go-colorable v0.1.15 // indirect + github.com/mattn/go-colorable v0.1.16 // indirect github.com/mattn/go-isatty v0.0.24 // indirect golang.org/x/sys v0.48.0 // indirect ) diff --git a/go.sum b/go.sum index 7fac81a..83bf934 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w= github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= -github.com/mattn/go-colorable v0.1.15 h1:+u9SLTRGnXv73cEsnsmoZBom+dMU88B2M0aDcWy0/jY= -github.com/mattn/go-colorable v0.1.15/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= +github.com/mattn/go-colorable v0.1.16 h1:+2YjeAe7xP1OQbZW1jERPWWCDLlNqFNCvjiqGiAt84A= +github.com/mattn/go-colorable v0.1.16/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI= github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=