Skip to content

Commit c6628bb

Browse files
authored
Merge pull request #176 from ActiveMemory/build/go-version-sync
build: bump Go to 1.27 and gate toolchain version drift
2 parents 46bad22 + 6263b42 commit c6628bb

16 files changed

Lines changed: 252 additions & 21 deletions

File tree

‎.clinerules/tech.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
## Primary
77

8-
- **Go 1.26+**, statically linked (`CGO_ENABLED=0`). The `ctx`
8+
- **Go 1.27+**, statically linked (`CGO_ENABLED=0`). The `ctx`
99
binary is the entire deliverable for the core; everything else
1010
ships as embedded bytes inside it.
1111
- **Cobra** for the CLI command surface.

‎.context/steering/tech.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ priority: 10
99

1010
## Primary
1111

12-
- **Go 1.26+**, statically linked (`CGO_ENABLED=0`). The `ctx`
12+
- **Go 1.27+**, statically linked (`CGO_ENABLED=0`). The `ctx`
1313
binary is the entire deliverable for the core; everything else
1414
ships as embedded bytes inside it.
1515
- **Cobra** for the CLI command surface.

‎.cursor/rules/tech.mdc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ alwaysApply: true
88

99
## Primary
1010

11-
- **Go 1.26+**, statically linked (`CGO_ENABLED=0`). The `ctx`
11+
- **Go 1.27+**, statically linked (`CGO_ENABLED=0`). The `ctx`
1212
binary is the entire deliverable for the core; everything else
1313
ships as embedded bytes inside it.
1414
- **Cobra** for the CLI command surface.

‎.github/workflows/ci.yml‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Go
2121
uses: actions/setup-go@v7
2222
with:
23-
go-version: '1.26'
23+
go-version: '1.27'
2424

2525
- name: Build
2626
run: CGO_ENABLED=0 go build ./...
@@ -59,14 +59,20 @@ jobs:
5959
- name: Set up Go
6060
uses: actions/setup-go@v7
6161
with:
62-
go-version: '1.26'
62+
go-version: '1.27'
6363

6464
- name: Run golangci-lint
6565
uses: golangci/golangci-lint-action@v9
6666
with:
67-
version: v2.11.4
67+
version: v2.13.2
6868
args: --timeout=5m
6969

70+
- name: Check Go toolchain version sync
71+
run: make check-go-version
72+
73+
- name: Check steering outputs freshness
74+
run: make check-steering
75+
7076
typecheck-opencode-plugin:
7177
name: Typecheck OpenCode plugin
7278
runs-on: ubuntu-latest

‎.github/workflows/release.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Set up Go
2222
uses: actions/setup-go@v7
2323
with:
24-
go-version: '1.26'
24+
go-version: '1.27'
2525

2626
- name: Run tests
2727
run: CGO_ENABLED=0 go test ./...
@@ -54,7 +54,7 @@ jobs:
5454
- name: Set up Go
5555
uses: actions/setup-go@v7
5656
with:
57-
go-version: '1.26'
57+
go-version: '1.27'
5858

5959
- name: Test
6060
run: CGO_ENABLED=0 go test -v ./...

‎.kiro/steering/tech.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mode: always
88

99
## Primary
1010

11-
- **Go 1.26+**, statically linked (`CGO_ENABLED=0`). The `ctx`
11+
- **Go 1.27+**, statically linked (`CGO_ENABLED=0`). The `ctx`
1212
binary is the entire deliverable for the core; everything else
1313
ships as embedded bytes inside it.
1414
- **Cobra** for the CLI command surface.

‎Makefile‎

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
clean all release build-all help \
77
test-coverage smoke site site-guard site-feed site-serve site-serve-lan site-setup audit check plugin-reload \
88
journal journal-serve journal-serve-lan gpg-fix gpg-test register-mcp reinstall check-tools \
9-
sync-version check-version-sync sync-why check-why sync-copilot-skills check-copilot-skills sync-codex-skills check-codex-skills codex-plugin-install sync-opencode-skills check-opencode-skills sync-pi-skills check-pi-skills sync-steering check-steering gemini-search \
9+
sync-version check-version-sync check-go-version sync-why check-why sync-copilot-skills check-copilot-skills sync-codex-skills check-codex-skills codex-plugin-install sync-opencode-skills check-opencode-skills sync-steering check-steering gemini-search \
1010
gitnexus-version gitnexus-update gitnexus-index gitnexus-mcp strip-gitnexus install-ctxctl reinstall-ctxctl
1111

1212
# Default binary name and output
@@ -175,6 +175,8 @@ audit:
175175
fi
176176
@echo "==> Checking version sync..."
177177
@$(MAKE) --no-print-directory check-version-sync
178+
@echo "==> Checking Go toolchain version sync..."
179+
@$(MAKE) --no-print-directory check-go-version
178180
@echo "==> Checking why docs freshness..."
179181
@$(MAKE) --no-print-directory check-why
180182
@echo "==> Checking Copilot skills freshness..."
@@ -398,6 +400,10 @@ check-version-sync:
398400
fi; \
399401
echo "Version sync OK ($$V)."
400402

403+
## check-go-version: Verify every Go toolchain pin agrees with the go.mod directive
404+
check-go-version:
405+
@./hack/check-go-version.sh
406+
401407
## sync-copilot-skills: Sync Copilot CLI skills from canonical ctx skills
402408
sync-copilot-skills:
403409
@./hack/sync-copilot-skills.sh
@@ -432,14 +438,23 @@ sync-steering:
432438
@CGO_ENABLED=0 go run ./cmd/ctx steering sync --all
433439

434440
## check-steering: Verify tracked steering outputs match .context/steering source
441+
# Snapshot-then-regenerate (same shape as check-copilot-skills): compares
442+
# the working-tree outputs against a fresh sync, not against HEAD, so an
443+
# uncommitted-but-consistent source/output pair passes locally.
435444
check-steering:
436-
@CGO_ENABLED=0 go run ./cmd/ctx steering sync --all > /dev/null
437-
@if ! git diff --quiet -- .cursor .clinerules .kiro/steering; then \
445+
@TMPDIR=$$(mktemp -d) && \
446+
mkdir -p "$$TMPDIR/before" "$$TMPDIR/after" && \
447+
cp -r .cursor/rules .clinerules .kiro/steering "$$TMPDIR/before/" && \
448+
CGO_ENABLED=0 go run ./cmd/ctx steering sync --all > /dev/null && \
449+
cp -r .cursor/rules .clinerules .kiro/steering "$$TMPDIR/after/" && \
450+
if ! diff -rq "$$TMPDIR/before" "$$TMPDIR/after" > /dev/null 2>&1; then \
438451
echo "FAIL: steering outputs are stale — run 'make sync-steering' and commit"; \
439-
git --no-pager diff --stat -- .cursor .clinerules .kiro/steering; \
452+
diff -rq "$$TMPDIR/before" "$$TMPDIR/after" || true; \
453+
rm -rf "$$TMPDIR"; \
440454
exit 1; \
441-
fi
442-
@echo "Steering outputs are in sync."
455+
fi; \
456+
rm -rf "$$TMPDIR"; \
457+
echo "Steering outputs are in sync."
443458

444459
## check-copilot-skills: Verify Copilot CLI skills match ctx source skills
445460
check-copilot-skills:

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/ActiveMemory/ctx
22

3-
go 1.26.3
3+
go 1.27.1
44

55
require (
66
github.com/hashicorp/raft v1.8.0

‎go.work‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
go 1.26.3
1+
go 1.27.1
22

33
// ctx (the shipped user binary) and tools/ctxctl (maintainer-only)
44
// are separate modules. ctx never requires tools/ctxctl, so it can

‎go.work.sum‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj
2424
github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 h1:aBangftG7EVZoUb69Os8IaYg++6uMOdKK83QtkkvJik=
2525
github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2/go.mod h1:qwXFYgsP6T7XnJtbKlf1HP8AjxZZyzxMmc+Lq5GjlU4=
2626
github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0=
27+
github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w=
2728
github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892 h1:qg9VbHo1TlL0KDM0vYvBG9EY0X0Yku5WYIPoFWt8f6o=
2829
github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892/go.mod h1:CTDl0pzVzE5DEzZhPfvhY/9sPFMQIxaJ9VAMs9AagrE=
2930
github.com/envoyproxy/go-control-plane v0.14.0 h1:hbG2kr4RuFj222B6+7T83thSPqLjwBIfQawTkC++2HA=
@@ -74,6 +75,7 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY
7475
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
7576
github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw=
7677
github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0=
78+
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A=
7779
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
7880
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo=
7981
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8=
@@ -91,6 +93,8 @@ github.com/spiffe/go-spiffe/v2 v2.6.0/go.mod h1:gm2SeUoMZEtpnzPNs2Csc0D/gX33k1xI
9193
github.com/spiffe/go-spiffe/v2 v2.7.0 h1:uXe1MflJoHw58wAUvxVlcM7WpKtijWG7I1UidcGh6g4=
9294
github.com/spiffe/go-spiffe/v2 v2.7.0/go.mod h1:47Q0Q9/AqGha8QLHp+kxpH4Wca7X7EnOtlIJy3mxZ3U=
9395
github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
96+
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
97+
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
9498
github.com/tinylib/msgp v1.1.8 h1:FCXC1xanKO4I8plpHGH2P7koL/RzZs12l/+r7vakfm0=
9599
github.com/tinylib/msgp v1.1.8/go.mod h1:qkpG+2ldGg4xRFmx+jfTvZPxfGFhi64BcnL9vkCm/Tw=
96100
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8=
@@ -109,6 +113,8 @@ golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto=
109113
golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio=
110114
golang.org/x/crypto v0.55.0 h1:+KWHjbgOaAQ66dh/YlkZKHlz9ZUlq61AFirAR9ntP8M=
111115
golang.org/x/crypto v0.55.0/go.mod h1:uq0V9dE/fzQuJtbnL+2EhWOE63vo164FY8xqEnV9xis=
116+
golang.org/x/crypto v0.57.0 h1:3ZVCjf8Ggz7zneR/EHRVx68Ctf+2pmIMP2UFhh9cC6M=
117+
golang.org/x/crypto v0.57.0/go.mod h1:Fdz0i5U6CoizGwLda9DttjSk6qlZo25zYNtR+ycvuZA=
112118
golang.org/x/mod v0.37.0 h1:vF1DjpVEshcIqoEaauuHebaLk1O1forxjxBaVn884JQ=
113119
golang.org/x/mod v0.37.0/go.mod h1:m8S8VeM9r4dzDwjrKO0a1sZP3YjeMamRRlD+fmR2Q/0=
114120
golang.org/x/net v0.56.0 h1:Rw8j/hFzGvJUZwNBXnAtf5sVDVt+65SK2C7IxCxZt5o=
@@ -125,12 +131,16 @@ golang.org/x/telemetry v0.0.0-20260625142307-59b4966ccb57 h1:nwGZBCt+FnXUrGsj5vj
125131
golang.org/x/telemetry v0.0.0-20260625142307-59b4966ccb57/go.mod h1:3AWMyWHS+caVoiEXpiq6+tzKA40J4vQT3MYr80ZtQpc=
126132
golang.org/x/telemetry v0.0.0-20260811182544-a038080d80e5 h1:ZUSxONxc981v7AW7QUg+I9WwZzSTTJ019ENBYr5pV/Q=
127133
golang.org/x/telemetry v0.0.0-20260811182544-a038080d80e5/go.mod h1:LVehoXe41cL5SCVQilsV7Gg6BNG+Js6P9PhSbYTIUkQ=
134+
golang.org/x/telemetry v0.0.0-20260908163034-4bcc4b2ee518 h1:F5BWKvW126NXR74uxkxuc1jQHhm/rwm/J3rSiFyuRs4=
135+
golang.org/x/telemetry v0.0.0-20260908163034-4bcc4b2ee518/go.mod h1:i+ivNqjDnTF3WTElsdk5g9V5DTSBYgdNo7xTU9SDwYA=
128136
golang.org/x/term v0.43.0 h1:S4RLU2sB31O/NCl+zFN9Aru9A/Cq2aqKpTZJ6B+DwT4=
129137
golang.org/x/term v0.43.0/go.mod h1:lrhlHNdQJHO+1qVYiHfFKVuVioJIheAc3fBSMFYEIsk=
130138
golang.org/x/term v0.44.0 h1:0rLvDRCtNj0gZkyIXhCyOb2OAzEhLVqc4B+hrsBhrmc=
131139
golang.org/x/term v0.44.0/go.mod h1:7ze4MdzUzLXpSAoFP1H0bOI9aXDqveSvatT5vKcFh2Y=
132140
golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0=
133141
golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w=
142+
golang.org/x/term v0.46.0 h1:3+OXuTbaKDgwk8jTi3aSLHRlmWqHEUDUtxnbFigO4YE=
143+
golang.org/x/term v0.46.0/go.mod h1:+K02xbkittuwc0Am4abfA3Fc+XRGXkvBXNO88NCXPoc=
134144
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
135145
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
136146
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=

0 commit comments

Comments
 (0)