Commit graph

25 commits

Author SHA1 Message Date
ace-pm
9d739dfa5d Rename GSD→SF: complete rebrand from fork origin
- All gsdDir/gsdRoot/gsdHome → sfDir/sfRootDir/sfHome
- GSDWorkspace* → SFWorkspace* interfaces
- bootstrapGsdProject → bootstrapProject
- runGSDDoctor → runSFDoctor
- GsdClient → SfClient, gsd-client.ts → sf-client.ts
- .gsd/ → .sf/ in all tests, docs, docker, native, vscode
- Auto-migration: headless detects .gsd/ → renames to .sf/
- Deleted gsd-phase-state.ts backward-compat re-export
- Renamed bin/gsd-from-source → bin/sf-from-source
- Updated mintlify docs, github workflows, docker configs
2026-04-15 18:33:47 +02:00
ace-pm
35dc87ef53 chore: sync workspace state after rebrand
- Rebrand commits already in history (gsd → forge)
- Sync pre-existing doc, docker, and CI config updates
- All rebrand artifacts verified in place:
  * Native crates: forge-engine, forge-ast, forge-grep
  * Log prefixes: [forge] across 22+ files
  * Binary: ~/bin/sf-run
  * Workspace scopes: @sf-run/*, @singularity-forge/*
  * Nix flake: Rust toolchain ready

System ready for: nix develop && bun run build:native

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 14:54:20 +02:00
ace-pm
e5d655bdb3 chore: checkpoint workspace changes 2026-04-15 13:38:15 +02:00
Jeremy
68649754f5 fix(ci): remove unsound tsbuildinfo cache causing TS2307 on fresh runners
The 'Cache TypeScript incremental state' steps persisted *.tsbuildinfo
without always pairing it with dist/. On a fresh runner, tsc restored
the tsbuildinfo, saw no input changes, and skipped emit — leaving
packages/native/dist/{fd,image,text}/index.d.ts missing. pi-tui's
Node16 resolution then failed on @gsd/native/fd, /image, /text.

ci.yml's variant did cache dist/ but shared the tsbuild-${{ runner.os }}-
restore-keys prefix with the broken pipeline.yml/build-native.yml
caches, so it could fall back to a dist-less snapshot. Removing all
six steps eliminates the shared namespace entirely.
2026-04-14 20:28:53 -05:00
Jeremy
fa28171380 fix(ci): install web host deps in dev-publish job
The dev-publish job splits build into build:core + build:web-host, but
web/ has its own lockfile and is not an npm workspace. The old 'npm run
build' step self-healed via build-web-if-stale.cjs; the direct
build:web-host call does not, causing 'next: not found'.

Matches the pattern already used in ci.yml.
2026-04-14 18:59:55 -05:00
Jeremy
b03c9401c4 ci: optimize build workflows and caching 2026-04-14 11:16:47 -05:00
Tom Boucher
a75167fab2 fix(ci): address 5 pipeline integrity issues from release audit (#4119)
- version-stamp.mjs: regenerate package-lock.json after dev version stamp
  (mirrors the same fix applied to bump-version.mjs in #4116)

- bump-version.mjs: regenerate root and web/package-lock.json after version
  bump so both lockfiles are always in sync at release time

- pipeline.yml: add post-bump validation step that verifies all package.json
  files parse as valid JSON before the release commit is made

- pipeline.yml: split "Commit, tag, and push" — commit+tag+rebase happen
  before build, but git push is deferred until after build and npm publish
  both succeed, preventing a broken tag from landing on main

- pipeline.yml: emit a :⚠️: annotation when live LLM tests fail so
  failures are visible in the Actions UI instead of silently swallowed

Closes #4118

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 08:56:12 -04:00
Jeremy
bdcf2c5c24 perf(ci): cache Next.js build artifacts with Blacksmith cache
Add useblacksmith/cache@v5 to persist web/.next/cache across CI runs,
eliminating redundant Webpack recompilation of unchanged pages. Applied
to ci.yml build job and pipeline.yml dev-publish/prod-release jobs.
2026-04-12 22:38:30 -05:00
Lex Christopherson
c6328a229f fix(ci): prevent pipeline race condition on release push
Serialize pipeline runs with a fixed concurrency group (pipeline-main)
instead of per-SHA groups that allowed parallel races. Pull --rebase
before pushing the release commit so intervening main commits don't
cause non-fast-forward failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 10:47:48 -06:00
TÂCHES
d2f677b268 fix(ci): retry npm install in pipeline to handle registry propagation delay (#2462)
Dev Publish can succeed but Test & Verify fails immediately after because
npm's CDN hasn't propagated the new version yet. Adds a retry loop (6
attempts, 10s apart) so the install survives propagation latency.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 08:44:40 -06:00
blacksmith-sh[bot]
c523d49590 Migrate workflows to Blacksmith (#2414)
Co-authored-by: blacksmith-sh[bot] <157653362+blacksmith-sh[bot]@users.noreply.github.com>
2026-03-24 15:58:30 -06:00
Tom Boucher
c1c7f8b6b0 perf(ci): reduce pipeline minutes with shallow clones, npm caching, and exponential backoff (#1700)
CI workflow:
- Replace fetch-depth: 0 with shallow clones (depth 1-2) in lint and
  build jobs — saves ~30-60s per job
- Remove fetch-depth: 0 from build and windows-portability (default
  depth 1 is sufficient for build/test)

Pipeline workflow:
- Add cache: 'npm' to dev-publish, test-verify, and prod-release
  setup-node steps — saves ~1-2 min per job on npm ci
- Move ${{ }} expressions from run: blocks to env: variables in
  prod-release and update-builder to prevent command injection vectors
- Use fetch-depth: 2 in update-builder (only needs parent diff)

Build-native workflow:
- Replace hardcoded sleep 30 + single verification with exponential
  backoff polling (5s → 10s → 20s → 30s cap, max 5 attempts)
- Replace fixed 15s retry intervals in post-publish smoke test with
  exponential backoff (5s → 10s → 20s → 30s cap, 8 attempts)
- Replace fixed 15s dist-tag verification loop with exponential
  backoff (6 attempts vs 10 × 15s)

Estimated savings: ~5-10 min per full CI+pipeline run, ~1-3 min per
native build publish.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: TÂCHES <afromanguy@me.com>
2026-03-21 08:43:56 -06:00
Tom Boucher
469d2e1e77 ci: upgrade docker/login-action v3 → v4 for Node 24 runtime (#1331) 2026-03-19 07:36:10 -06:00
Tom Boucher
6b61b75f3d feat: add live regression test harness for post-build pipeline validation (#1316)
10 tests that run against the installed gsd binary after npm publish:

1. headless query returns valid JSON
2. Empty project → pre-planning phase
3. Milestone with roadmap → planning phase
4. All tasks done → summarizing phase
5. Complete milestone → complete phase
6. Stale auto.lock doesn't block --version
7. Crash recovery query works with stale lock
8. Non-TTY exits quickly with clean error
9. Version skew detected before TTY check
10. --help works (native addon loads or falls back)

Wired into pipeline.yml test-verify job after fixture tests
and before @next promotion.

These catch the state machine / infrastructure bugs from #1308
that unit tests can't reach — they exercise deriveState through
the real gsd binary with real .gsd/ directory structures.

Part of #1308
2026-03-18 20:22:54 -06:00
Tom Boucher
e45bff419d fix(ci): add npm publish to prod-release and prevent mid-deploy cancellation (#1208)
Two issues in the pipeline:

1. cancel-in-progress: true could cancel a running deployment when a
   new push arrives. Deployments should never be interrupted mid-flight.
   Changed back to false.

2. The prod-release job bumps the version, commits, and tags — but never
   publishes the release version to npm. The dev-publish step publishes
   @dev, test-verify promotes to @next, but @latest was never updated.
   Users running 'npm install -g gsd-pi' would get stale versions.

Added 'Build release' and 'Publish release to npm @latest' steps after
the git tag push, with idempotent guard for already-published versions.
2026-03-18 11:31:42 -06:00
Lex Christopherson
a0a341e3d3 fix(ci): use env var for Discord webhook secret in if-condition
GitHub Actions doesn't allow secrets context in if expressions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 11:26:51 -06:00
TÂCHES
45247b7dd2 feat(ci): automate prod-release with version bump, changelog, and tag push (#1194)
When the prod environment gate is approved, the pipeline now automatically
determines the semver bump from conventional commits, generates a changelog
entry, bumps all package versions, commits + tags + pushes (triggering
build-native.yml for npm @latest), creates a GitHub Release, and posts
to Discord.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 11:17:43 -06:00
Lex Christopherson
5b36754a19 fix(ci): remove @latest npm promotion from pipeline
Dev-stamped versions (2.28.0-dev.xxx) should never be promoted to
@latest on npm. Stable releases are handled by the publish-version
workflow. The pipeline promotes @dev → @next only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 10:45:39 -06:00
Lex Christopherson
119c8d74b4 fix(ci): skip GitHub release creation when tag already exists
Multiple pipeline runs for the same base version produce identical
release tags, causing E422. Check if release exists before creating.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 10:27:48 -06:00
Tom Boucher
6bf15b44f3 feat: upgrade to Node.js 24 LTS across CI, Docker, and package config (#1165)
Node.js 24.11.0 entered LTS (Krypton) with support through April 2028.
This upgrades all CI pipelines, Docker images, and package metadata
from Node 22 to Node 24.

Changes:
- ci.yml: node-version 22 → 24 (build + windows-portability jobs)
- pipeline.yml: node-version 22 → 24 (dev-publish, test-verify, prod-release)
- build-native.yml: node-version 22 → 24, actions/checkout@v4 → v6,
  actions/setup-node@v4 → v6
- cleanup-dev-versions.yml: node-version 22 → 24
- Dockerfile: node:22-bookworm → node:24-bookworm,
  node:22-slim → node:24-slim
- package.json: engines.node >=20.6.0 → >=22.0.0 (supports both 22 and 24)
- @types/node: ^22.0.0 → ^24.0.0

Verified: tsc --noEmit passes, 1729 unit tests pass on Node 24.14.0.
2026-03-18 09:28:49 -06:00
TÂCHES
6eccae3b4b fix(ci): skip publish when version already exists on npm (#1166)
Multiple CI completions on the same commit trigger duplicate Pipeline
runs. The second run fails with E403 because the version was already
published. Fix by checking npm registry before attempting publish, and
enable cancel-in-progress to avoid redundant runs.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 09:26:38 -06:00
TÂCHES
fb350c270d fix(ci): use local binary for pipeline smoke test (#1163)
The local smoke test runs npx gsd-pi which fails in the container
because the gsd bin isn't on PATH. Point GSD_SMOKE_BINARY at the
built dist/loader.js directly with an absolute path so smoke tests
work from any cwd.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 09:11:26 -06:00
Tom Boucher
ea42db9a1f fix(ci): fix dev-publish version stamp and platform sync (#1145)
Two bugs in the Dev Publish job:

1. node -p with escaped double-quotes broke on Node 22's eval mode
   (SyntaxError: Invalid or unexpected token). Switched to node -e
   with process.stdout.write and unescaped inner quotes.

2. version-stamp updated root package.json but not platform packages.
   When npm publish triggered prepublishOnly, sync-platform-versions
   dirtied 5 platform package.json files and git diff --exit-code
   failed. Added sync-platform-versions to the stamp step so
   prepublishOnly finds everything already in sync.

Fixes: https://github.com/gsd-build/gsd-2/actions/runs/23233857718
2026-03-18 08:32:03 -06:00
TÂCHES
920f1bed9a fix(ci): add safe.directory for containerized pipeline job (#1108)
* feat(S01/T01): Scaffolded the `studio` Electron workspace with a workin…

- package.json
- studio/package.json
- studio/electron.vite.config.ts
- studio/src/main/index.ts
- studio/src/preload/index.ts
- studio/src/renderer/src/styles/index.css
- studio/src/renderer/src/App.tsx

* chore: init gsd

* fix(ci): add safe.directory for containerized pipeline job

The Dev Publish job runs inside a Docker container where the checkout
user differs from the container user (root), causing git's dubious
ownership check to reject git operations in version-stamp.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(ci): remove .gsd/.gitignore from tracking

The no-gsd-dir CI check fails when .gsd/ exists as a directory, even
if only .gitignore is tracked inside it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 01:11:52 -06:00
TÂCHES
6f410a0041 feat(ci): implement three-stage promotion pipeline (Dev → Test → Prod) (#1098)
* feat(ci): add version stamp script for dev publishes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(ci): add CLI smoke tests for pipeline test stage

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(ci): add FixtureProvider for LLM conversation recording and replay

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(ci): add fixture test runner and sample recordings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(ci): add live test stubs and pipeline npm scripts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(ci): add three-stage promotion pipeline workflow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(ci): add weekly cleanup workflow for stale dev versions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(ci): add fixture recording helper stub

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 00:40:06 -06:00