Skip to content

ci: harden checks before Blacksmith migration - #11

Merged
ironystock merged 2 commits into
mainfrom
chore/ci-hardening
Apr 28, 2026
Merged

ironystock merged 2 commits into
mainfrom
chore/ci-hardening

Conversation

@ironystock

@ironystock ironystock commented Apr 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Four additions worth bundling now so the YAML migration to Blacksmith.sh runners is a single pass:

  1. Tests now run on all 3 platforms (was: ubuntu only). Pair flow touches `os.UserHomeDir` / `filepath.Join` — Windows-specific path bugs would have slipped past the prior config. Combined the old `test` and `build-matrix` jobs into one matrix that does vet + test + build per platform.

  2. New `mod-tidy` job catches `go.mod`/`go.sum` drift. Today's cellbuf/ansi version skew (between charmbracelet/log v1 and fang v1) was exactly the failure mode this guards.

  3. New `goreleaser-check` job validates `.goreleaser.yml` syntax on every PR. Cheap (~15s) insurance against shipping a tag that immediately breaks the release pipeline.

  4. New `.github/dependabot.yml`: weekly bumps for `gomod` (with `charmbracelet/` + `charm.land/` grouped into one PR per week to avoid noise) + `github-actions` ecosystems. Public CLI; dep hygiene matters before strangers start installing.

What didn't change

  • `lint` job (still golangci-lint v2.11.4, ubuntu-only).
  • CodeQL (still repo-settings-only — not duplicated in YAML).
  • Release workflow (untouched; goreleaser flow stays as-is).

Check naming (relevant for branch protection)

After this PR, the required-check candidates are:

  • `Test (ubuntu-latest)`
  • `Test (macos-latest)`
  • `Test (windows-latest)`
  • `Mod Tidy Drift`
  • `GoReleaser Config`
  • `Lint`

Plus `Analyze (go)` from CodeQL. Pinning all 7 as required is solo-dev-friendly: they're all fast and you'd want them green anyway before merging.

Verification

  • Workflow YAML is syntactically clean (will validate on push).
  • Local: `go mod tidy && git diff --exit-code go.mod go.sum` passes.
  • Local: tests pass on Windows (this dev box).

Test plan

  • CI green on this PR's own changes.
  • All 6 jobs (3 `Test`, `Mod Tidy Drift`, `GoReleaser Config`, `Lint`) appear in the checks UI.
  • After merge, dependabot opens its first PR within a week.

Sequencing note

Open simultaneously with #10 (logger + fang re-merge). They touch disjoint paths and won't conflict regardless of merge order.

🤖 Generated with Claude Code


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

ironystock and others added 2 commits April 28, 2026 07:33
Four additions worth bundling now so the YAML migration to
Blacksmith.sh runners is a single pass:

1. Tests now run on all 3 platforms (was: ubuntu only). Pair flow
   touches os.UserHomeDir/filepath.Join — Windows-specific path
   bugs would have slipped past the prior config. Combined the old
   `test` and `build-matrix` jobs into a single matrix that does
   vet + test + build per platform.

2. New `mod-tidy` job catches go.mod/go.sum drift. Today's cellbuf/
   ansi version skew (between charmbracelet/log v1 and fang v1) was
   exactly the failure mode this guards.

3. New `goreleaser-check` job validates .goreleaser.yml syntax on
   every PR. Cheap (~15s) insurance against shipping a tag that
   immediately breaks the release pipeline.

4. New .github/dependabot.yml: weekly bumps for gomod (grouped
   charmbracelet pkgs into one PR to avoid noise) + github-actions
   ecosystems. Public CLI; dep hygiene matters before strangers
   start installing.

Lint job unchanged. CodeQL stays repo-settings-only.

Naming: "Test (ubuntu-latest)" / "Test (macos-latest)" /
"Test (windows-latest)" / "Mod Tidy Drift" / "GoReleaser Config" /
"Lint" — explicit names so branch protection rulesets can require
them by exact match.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Reference JSON for the GitHub Rulesets API. Solo-dev friendly:

- Require PR before merge (0 required reviewers — Brad self-approves)
- Require all 7 status checks pass (3 platform tests + mod tidy +
  goreleaser check + lint + CodeQL)
- strict policy: branches must be up to date before merge
- Block force-push + deletion (absolute safety, no bypass)
- Allow merge + squash methods (rebase off; preserves clear history
  trail in `git log --merges`)
- No bypass actors — rules apply uniformly. If anything ever needs
  to bypass (hotfix scenario), edit via UI.

Apply with:

  gh api --method PUT \
    repos/captured-ventures/rememberize-cli/rulesets \
    --input .github/rulesets/main-protection.json

Or POST to /rulesets to create new (the above PUT-by-name doesn't
exist; use POST then capture the returned ID for future updates).
Dashboard alternative: Settings → Rules → Rulesets → Import.

Lives in the repo as version-controlled reference. Editing the file
does NOT automatically reapply — re-run the API call after edits.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@ironystock
ironystock merged commit 708c2f3 into main Apr 28, 2026
7 checks passed
@ironystock
ironystock deleted the chore/ci-hardening branch April 28, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant