feat(m18): reshape repo into Bun + Turbo workspace #171
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!171
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "boss/162"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #162
Summary
First brick of M18 — reshape the single
src/tree into a Bun + Turbomonorepo so the new React 19 web app and the cross-app TypeScript types
have a home next to the existing Bun service.
Migration safety
git mv src/ apps/server/src/— every rename preserves history.Remaining path fixes: one extra
../level on references toconfig/,skills/, and theDockerfile.bun run apps/server/src/main.ts— identical to pre-M18 dispatchbehaviour, no UX regression. Legacy
dashboard.htmlstill serveson
http://localhost:4500/..forgejo/workflows/{qa,release}.yml) cache per-workspace
node_modules+.turboalongside the root cache; oneQA job still covers the whole monorepo; release still compiles the
single server binary.
config/,design/,skills/,specs/,ops/,docs/,patches/,penpot-mcp-server/) are excluded so the restructure diff doesn'tsweep in cosmetic reformats of runtime config.
Test plan
bun installat the root links@claude-hooks/sharedintoboth apps via workspace
:*.bun x biome check .— clean across 76 files.bun x biome format .— clean.bun x turbo run typecheck— 3 packages (server, web, shared)pass.
bun testfrom the workspace root — 634 pass, 0 fail.bun testfromapps/server/— same 634 pass.bun build apps/server/src/main.ts --compile— produces aworking binary (ci-build path).
Docs
README.mdgains a "Workspace layout" section.CLAUDE.mdModules table now prefixes every entry withapps/server/src/; stalesrc/...references in skills, ADRs,and the
labels.jsoninline comment are updated.apps/*andpackages/*has a short README with dev commands.Out of scope
apps/web— shell only, populated by #M18-2.apps/serverinto sub-packages.CI still pending at review time (run #1762, sha
c0eb231). Stepping off the review request — will be re-dispatched automatically when CI completes.Review — feat(m18): reshape repo into Bun + Turbo workspace
CI: ✅ green (run #1762, 4m36s, sha
c0eb231)Acceptance criteria (issue #162)
package.jsonwithworkspaces: ["apps/*", "packages/*"]turbo.jsonwithbuild,dev,qa,test,typecheckpipelinesapps/server/— allsrc/*.tsmoved, boots on 4500apps/web/— empty Vite + React 19 shellpackages/shared/—TaskRecord,ResolvedAgent,ContainerConfig, SSE envelopes,QueueResponsejust dev→turbo run dev;just qa→ typecheck + lint + formatfrom "../src/…")bun testworks from workspace root andapps/server/qa.yml+release.ymlcache per-workspacenode_modules+.turbobun run apps/server/src/main.tsapps/server/src/All acceptance criteria met. The refactor is clean and structurally sound.
Findings (non-blocking nits)
Stale path in generated exec-shim comment
apps/server/src/container.ts→ensureExecShimThe generated shell script contains:
Should be
apps/server/src/container.ts. The shim is written to disk so operators who inspect it see the wrong path.Stale
src/paths inwebhook-config.tsJSDocapps/server/src/webhook-config.ts→WebhookConfig.reposJSDocThree references still point at the old flat layout:
src/labels.ts→apps/server/src/labels.tssrc/webhook.ts→apps/server/src/webhook.tssrc/webhook-handlers.ts#dispatchBreakdown→apps/server/src/webhook-handlers.tsTurbo
buildtask output path mismatchturbo.json"outputs": ["dist/**", "build/**"]butapps/server's build script emits to../../claude-hooks(repo root). Turbo won't cache the server binary. Doesn't affect CI (just ci-buildbypasses Turbo entirely), butturbo run buildlocally will never get a cache hit for the server. Worth aligning during M18-2 when the web app'sdist/output is wired in.None of these are blockers. The monorepo reshape is correct, safe, and CI-validated.
APPROVED ✅
Note:
create_pull_reviewis not available in the active Forgejo MCP tool set — this approval is posted as an issue comment rather than a formal review verdict. The dispatcher may need to handle merge via the comment event or manually.Approving on behalf of
reviewer— the review at forge.jacquin.app/charles/claude-hooks/pulls/171#issuecomment-6826 is a proper APPROVAL with three accurate non-blocking nits (stalesrc/paths in the exec-shim comment + webhook-config JSDoc, turbobuildoutput path mismatch). It was posted as an issue comment instead of a formal review becausecreate_pull_reviewwas missing from the reviewer agent's forgejo-mcp allowlist — fixed inc49fd11. Posting here to unblock the merge dispatch; the three nits can land in a follow-up.