feat: devcontainer Go + sandbox csdd; hooks/pre-push opt-in (+ Java)#49
Merged
Conversation
- .devcontainer/: enable the Go devcontainer feature pinned to the CI toolchain (1.25) plus golangci-lint, allow Go's module proxy / checksum / vuln domains through the default-deny egress firewall, format-on-save, and warm the module cache at create time. - sandbox init template: preinstall @protonspy/csdd via npm alongside Claude Code so `csdd` is on PATH in every scaffolded sandbox. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WvEqtUfoV8q1E5UbwCugqm
…ava tests `csdd init` no longer scaffolds .claude/hooks/ or .githooks/pre-push by default. Opt in with `--include hooks,pre-push` (alias `prepush`) or the `--hooks` / `--prepush` convenience flags. - settings.json ships permissions-only by default; the hook wiring moved to settings-hooks.json.tmpl and is merged in only when hooks are opted into, so a default workspace never references hook scripts it didn't scaffold. - `csdd update` only refreshes hooks when the workspace already has them, so it never re-adds hooks a project deliberately omitted. - pre-push test gate now detects Maven (pom.xml) and Gradle (build.gradle/.kts), preferring the checked-in wrapper. - Docs (README, CLAUDE.md template) and tests updated for the new defaults. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WvEqtUfoV8q1E5UbwCugqm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related developer-experience changes, split into one commit each.
1. Go in the devcontainer + csdd in scaffolded sandboxes
.devcontainer/now provisions Go: thego:1devcontainer feature pinned to the CI toolchain (1.25) +golangci-lint 2.12.2, the Go module proxy / checksum / vuln domains added to the default-deny egress allow-list,gofmt/organize-imports on save, and apostCreateCommandthat warms the module cache (+govulncheck) while egress is still open.csdd sandbox inittemplate now preinstalls@protonspy/csddvia npm alongside Claude Code, socsddis onPATHin every scaffolded sandbox (Go itself is still added on demand with--feature go).2. Hooks & pre-push are now opt-in; pre-push gained Java
csdd initno longer scaffolds.claude/hooks/or.githooks/pre-pushby default. Opt in with--include hooks,pre-push(aliasprepush) or the--hooks/--prepushconvenience flags.settings.jsonships permissions-only by default; the hook wiring moved tosettings-hooks.json.tmpland is merged in only when hooks are opted into — a default workspace never references hook scripts it didn't scaffold.csdd updateonly refreshes hooks when the workspace already has them, so it never re-adds hooks a project deliberately omitted.pre-pushtest gate now detects Maven (pom.xml) and Gradle (build.gradle/.kts), preferring the checked-in wrapper.Test plan
go build ./...,go vet ./...,gofmt -l .clean.go test ./...), including new tests: default omits both opt-in components (+settings.jsonhas no hook wiring);--include hooks,prepushand--hooksscaffold + wire correctly;--exclude hooks|pre-pushis now rejected.csdd init→ no hooks/pre-push, permissions-only settings;--hooks --prepush→ 3 executable hook scripts + executable pre-push,settings.json={hooks, permissions}.csdd sandbox init --feature gorenders valid JSONC with the npm csdd install and the Go firewall domains.🤖 Generated with Claude Code
https://claude.ai/code/session_01WvEqtUfoV8q1E5UbwCugqm