102 lines
4.6 KiB
Markdown
102 lines
4.6 KiB
Markdown
# 2026-02-02 — Dev Workflow Optimization Day
|
|
|
|
## Forgejo Access Setup
|
|
- Created helper script `~/bin/forgejo` for API access
|
|
- Uses internal DNS: `https://forgejo.containers` (IP 10.42.97.55) for `git.cloonar.com`
|
|
- Token stored in `.credentials/forgejo.env`
|
|
- User: `openclawd` (read-only)
|
|
- Commands: `repos`, `files`, `cat`, `issues`, `prs`, `branches`, `commits`, `search`, `raw`
|
|
|
|
## Repo Analysis (sub-agent)
|
|
Analyzed 42 Forgejo repos. Key findings:
|
|
- 7 TYPO3 projects with inconsistent CI (Drone legacy, Gitea Actions, some both)
|
|
- Only 6/27 active repos have Renovate configured
|
|
- wohnservice-wien-typo3 (main multi-site) has NO tests
|
|
- 11 repos have CLAUDE.md, only 5 have AGENTS.md
|
|
- 9 repos empty/archived — cleanup candidates
|
|
- Full report: `memory/repo-analysis-2026-02-02.md`
|
|
|
|
## CI Templates Draft Created
|
|
User wants to standardize CI across TYPO3 projects. Created drafts in `~/drafts/ci-templates/`:
|
|
|
|
### Structure:
|
|
```
|
|
ci-templates/
|
|
├── .forgejo/workflows/
|
|
│ ├── typo3-deploy.yaml # Simple reusable workflow
|
|
│ └── typo3-staged-deploy.yaml # Staged deploy with E2E tests
|
|
├── deployer/
|
|
│ └── typo3-recipe.php # Shared Deployer config
|
|
├── examples/ # Integration examples
|
|
└── README.md
|
|
```
|
|
|
|
### Key approach:
|
|
- Shared Deployer recipe imported via git raw URL
|
|
- Projects only need: `build/servers.yaml` (hosts) + minimal `build/deploy.php` (imports recipe + cachetool paths)
|
|
- Reusable workflows called via `uses: infrastructure/ci-templates/.forgejo/workflows/...@main`
|
|
|
|
### Cross-repo workflow_call Issues & Solutions (RESOLVED)
|
|
|
|
**Problem 1: Jobs stuck in "waiting" state**
|
|
- Root cause: Forgejo v11 (pre-v14) requires `runs-on` on the CALLING job
|
|
- The Forgejo docs say "omit runs-on for workflow expansion" but that's for v14+
|
|
- PR #10448 (not yet merged) will fix this for v14
|
|
|
|
**Solution:**
|
|
```yaml
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest # ← Required for Forgejo < v14!
|
|
uses: infrastructure/ci-templates/.forgejo/workflows/typo3-staged-deploy.yaml@main
|
|
```
|
|
|
|
**Problem 2: Setup Node.js fails with "lock file not found"**
|
|
- `actions/setup-node@v4` with `cache: 'npm'` requires package-lock.json
|
|
- Fails even if `build_frontend: false` because the step runs before condition is evaluated
|
|
|
|
**Solution:** Remove `cache: 'npm'` or ensure setup-node only runs when `build_frontend: true`
|
|
|
|
**Key Forgejo Actions Learnings:**
|
|
- Forgejo v11.0.10 currently running
|
|
- Cross-repo workflow_call works but with limitations until v14
|
|
- Target repo must be public
|
|
- Format: `owner/repo/.forgejo/workflows/file.yaml@ref`
|
|
- Secrets need `secrets: inherit` or explicit passing
|
|
- Runner labels must match exactly (no automatic ubuntu-latest mapping)
|
|
|
|
## User Dev Stack (confirmed today)
|
|
- Primary: TYPO3, secondary Laravel, occasional Golang/React/SolidJS
|
|
- Environment: DDEV for PHP, Docker for Golang
|
|
- Editor: Neovim + Claude Code (heavy usage)
|
|
- Each project has its own Claude Code session with CLAUDE.md
|
|
- All repos on self-hosted Forgejo at git.cloonar.com
|
|
- Drone CI is legacy — only Forgejo Actions now
|
|
|
|
## Evening Check-in
|
|
- 19:22 Vienna: Still working on ci-templates + testing with gbv-aktuell
|
|
- 19:48 Vienna: Cross-repo workflow_call now running (fixed runs-on issue)
|
|
- 19:52 Vienna: Debugging setup-node cache failure - needs fix in typo3-staged-deploy.yaml
|
|
- Productive work from earlier discussion, not a new late-night rabbit hole
|
|
|
|
## Deployer Issue (21:00)
|
|
- User switching to curl approach for deploy-lib.php from ci-templates
|
|
- Hit issue: `cachetool:clear:opcache` fails because `release_path` no longer exists after `deploy:symlink` moves it to `current`
|
|
- The double-slash (`~//release`) is from `deploy_path: ~/` in servers.yaml (trailing slash)
|
|
- Still debugging the task ordering issue
|
|
|
|
## Wind-Down Feedback (21:06) ⚠️ IMPORTANT
|
|
User called me out: I helped them work from 19:00 to 21:00+ without ONCE suggesting a stopping point. That's exactly wrong.
|
|
|
|
**What I should have done:**
|
|
- After 19:00, when helping with work tasks, actively look for stopping points
|
|
- Don't just passively help — suggest "this might be a good place to pause for tonight"
|
|
- If a task drags on 30+ min, note "this is getting complex, want to pick it up tomorrow?"
|
|
- The goal isn't to refuse help, but to guide toward a natural end
|
|
|
|
**Updated HEARTBEAT.md** with explicit instructions for this.
|
|
|
|
## Status at Session End
|
|
- ci-templates cross-repo workflow_call working (runs-on fix applied)
|
|
- Last blocker: Deployer cachetool task order issue (release_path doesn't exist after symlink)
|
|
- User still working at 21:06 — I failed at wind-down guidance today
|