feat(ci): add auto-publish job for @bytelyst/* packages + update migration doc

- Add publish-packages job to CI workflow (runs after build-and-test)
- Publish 13 remaining packages to Gitea (56 total, up from 43)
- Update act_runner token to read+write scope
- Fix package counts throughout migration doc (43 → 56)
- Update CI status: all 10/10 repos now have CI workflows
- Add package inventory section (§15.1)
This commit is contained in:
saravanakumardb1 2026-03-26 23:18:05 -07:00
parent 409144a2ef
commit aa139d5021
2 changed files with 69 additions and 34 deletions

View File

@ -28,3 +28,23 @@ jobs:
- name: Test - name: Test
run: pnpm test run: pnpm test
publish-packages:
name: Publish @bytelyst/* to Gitea npm registry
runs-on: ubuntu-latest
needs: [build-and-test]
timeout-minutes: 10
defaults:
run:
working-directory: /Users/sd9235/code/mygh/learning_ai_common_plat
steps:
- name: Pull latest
run: git pull --ff-only origin main || true
- name: Build all packages
run: pnpm -r --filter './packages/**' build
- name: Publish to local Gitea registry
env:
GITEA_NPM_TOKEN: ${{ secrets.GITEA_NPM_TOKEN }}
run: bash ./scripts/publish-local-gitea-packages.sh

View File

@ -132,15 +132,15 @@ That is enough to treat this Mac as the single-VM rehearsal environment.
- shared packages build cleanly in `learning_ai_common_plat` - shared packages build cleanly in `learning_ai_common_plat`
- a local-only Gitea package token was created and used successfully for local package publishing - a local-only Gitea package token was created and used successfully for local package publishing
- **49 `@bytelyst/*` packages** published to local Gitea npm registry - **56 `@bytelyst/*` packages** published to local Gitea npm registry
- a clean scratch `pnpm install` from the local Gitea registry works on all migrated repos - a clean scratch `pnpm install` from the local Gitea registry works on all migrated repos
- **all 10 product repos migrated** from `file:` refs + `docker-prep.sh` to semver `^0.1.0` + registry-backed Dockerfiles - **all 10 product repos migrated** from `file:` refs + `docker-prep.sh` to semver `^0.1.0` + registry-backed Dockerfiles
- all migrated repos pass host-side `pnpm install` and backend typecheck - all migrated repos pass host-side `pnpm install` and backend typecheck
- Docker builds (backend + web) verified for all repos with Dockerfiles - Docker builds (backend + web) verified for all repos with Dockerfiles
- local Gitea CI green for 8/8 repos with CI workflows (FlowMonk, NoteLett, ActionTrail, LocalMemGPT, NomGap, ChronoMind, JarvisJr, PeakPulse) - local Gitea CI green for 10/10 repos with CI workflows (FlowMonk, NoteLett, ActionTrail, LocalMemGPT, NomGap, ChronoMind, JarvisJr, PeakPulse, MindLyst, LysnrAI)
- `docker-prep.sh` removed from all 10 repos - `docker-prep.sh` removed from all 10 repos
- `GITEA_NPM_TOKEN` added to act_runner config for CI registry access - `GITEA_NPM_TOKEN` added to act_runner config for CI registry access
- stale "Build @bytelyst/* packages" step removed from all CI workflows - stale "Build @bytelyst/\* packages" step removed from all CI workflows
### Important implementation finding ### Important implementation finding
@ -170,9 +170,9 @@ Host-side installs, Docker builds, and local CI are all validated.
| Topology | `NETWORK=` | Gitea host | Docker reaches Gitea via | `--add-host` needed? | | Topology | `NETWORK=` | Gitea host | Docker reaches Gitea via | `--add-host` needed? |
| ------------------- | ---------- | ------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------- | | ------------------- | ---------- | ------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------- |
| **Local dev (Mac)** | `corp` | `localhost:3300` (GITEA_NPM_HOST=localhost) | `host.docker.internal` + `--add-host localhost:host-gateway` | **Yes** — expected | | **Local dev (Mac)** | `corp` | `localhost:3300` (GITEA_NPM_HOST=localhost) | `host.docker.internal` + `--add-host localhost:host-gateway` | **Yes** — expected |
| **Local dev (Mac)** | `home` | `<vm-host>:3300` (from `~/.gitea_vm_host`) | Direct internet (no proxy) | **No** — direct connection | | **Local dev (Mac)** | `home` | `<vm-host>:3300` (from `~/.gitea_vm_host`) | Direct internet (no proxy) | **No** — direct connection |
| **VM deployment** | N/A | `localhost:3300` or compose service `gitea:3300` | Native Docker networking | **No**`ROOT_URL` resolves natively | | **VM deployment** | N/A | `localhost:3300` or compose service `gitea:3300` | Native Docker networking | **No**`ROOT_URL` resolves natively |
The `--add-host localhost:host-gateway` workaround is the **correct local-dev pattern** when `NETWORK=corp`, not a generic blocker. On a VM, Gitea's `ROOT_URL` will be set to the real hostname or compose service name, so tarball URLs resolve without any host-mapping workaround. The `--add-host localhost:host-gateway` workaround is the **correct local-dev pattern** when `NETWORK=corp`, not a generic blocker. On a VM, Gitea's `ROOT_URL` will be set to the real hostname or compose service name, so tarball URLs resolve without any host-mapping workaround.
@ -180,8 +180,8 @@ At the time of writing (2026-03-24):
- host-side registry usage is validated across all 10 migrated repos - host-side registry usage is validated across all 10 migrated repos
- Docker builds verified for all repos with Dockerfiles - Docker builds verified for all repos with Dockerfiles
- local Gitea CI green for all 8 repos with CI workflows - local Gitea CI green for all 10 repos with CI workflows
- 49 `@bytelyst/*` packages published to local Gitea - 56 `@bytelyst/*` packages published to local Gitea
- `docker-prep.sh` retired from all repos - `docker-prep.sh` retired from all repos
Verified local FlowMonk Docker recipe (`NETWORK=corp`): Verified local FlowMonk Docker recipe (`NETWORK=corp`):
@ -208,16 +208,16 @@ On the target VM, the recipe simplifies to just `--build-arg GITEA_NPM_HOST=<git
## 5.2 Remaining Gaps From Local Mac Validation ## 5.2 Remaining Gaps From Local Mac Validation
The local rehearsal on this Mac has validated the **host-side** registry model, **Docker builds** (backend + web), and **local Gitea CI** across 8 product repos. The local rehearsal on this Mac has validated the **host-side** registry model, **Docker builds** (backend + web), and **local Gitea CI** across all 10 product repos.
### Validated ✅ ### Validated ✅
- Host-side `pnpm install` against local Gitea registry (all 10 repos) - Host-side `pnpm install` against local Gitea registry (all 10 repos)
- Backend + web Docker builds with BuildKit secret + `--add-host` (all repos with Dockerfiles) - Backend + web Docker builds with BuildKit secret + `--add-host` (all repos with Dockerfiles)
- Local Gitea CI green for all 8 repos with CI workflows - Local Gitea CI green for all 10 repos with CI workflows
- Runner re-registered against `127.0.0.1` (avoids IPv6 `[::1]` declaration failure) - Runner re-registered against `127.0.0.1` (avoids IPv6 `[::1]` declaration failure)
- `GITEA_NPM_TOKEN` added to act_runner config for CI registry access - `GITEA_NPM_TOKEN` added to act_runner config for CI registry access
- 49 `@bytelyst/*` packages published and consumed successfully - 56 `@bytelyst/*` packages published and consumed successfully
- Backend typecheck passes for all 10 migrated repos - Backend typecheck passes for all 10 migrated repos
- `docker-prep.sh` removed from all 10 repos - `docker-prep.sh` removed from all 10 repos
@ -230,8 +230,7 @@ The local rehearsal on this Mac has validated the **host-side** registry model,
### Remaining minor items ### Remaining minor items
- Mobile workspace members remain on `file:` refs where present (NomGap, NoteLett) — acceptable for now - Mobile workspace members remain on `file:` refs where present (NomGap, NoteLett) — acceptable for now
- Local Gitea Actions has not yet been validated for the package build → publish → consumer flow (CI runs typecheck/test, not publish) - `@bytelyst/create-app` is marked `private: true` and cannot be published (scaffolding CLI tool, not consumed by product repos)
- MindLyst and LysnrAI have no Gitea CI workflows yet (lower priority)
### Why this matters for Azure ### Why this matters for Azure
@ -582,10 +581,10 @@ All package-distribution concerns are resolved:
This migration plan is locally validated only when all are true: This migration plan is locally validated only when all are true:
- [x] local Gitea package publish auth verified - [x] local Gitea package publish auth verified
- [x] local package publish path verified — 49 packages published - [x] local package publish path verified — 56 packages published
- [x] local consumer install path verified on the host — all 10 repos - [x] local consumer install path verified on the host — all 10 repos
- [x] Docker build path verified without `docker-prep.sh` — all repos with Dockerfiles - [x] Docker build path verified without `docker-prep.sh` — all repos with Dockerfiles
- [x] local Gitea CI verified — 8/8 repos with CI workflows green - [x] local Gitea CI verified — 10/10 repos with CI workflows green
- [x] pilot repo migrated successfully end-to-end including Docker (FlowMonk) - [x] pilot repo migrated successfully end-to-end including Docker (FlowMonk)
- [x] 7 standard repos migrated and verified (NoteLett, ActionTrail, LocalMemGPT, NomGap, ChronoMind, JarvisJr, PeakPulse) - [x] 7 standard repos migrated and verified (NoteLett, ActionTrail, LocalMemGPT, NomGap, ChronoMind, JarvisJr, PeakPulse)
- [x] remaining 2 non-standard repos migrated (MindLyst, LysnrAI) - [x] remaining 2 non-standard repos migrated (MindLyst, LysnrAI)
@ -597,10 +596,10 @@ This migration plan is locally validated only when all are true:
## 15. Migration Complete — Summary ## 15. Migration Complete — Summary
1. ~~create or verify a local-only Gitea package token~~ 1. ~~create or verify a local-only Gitea package token~~
2. ~~publish `@bytelyst/*` packages to local Gitea~~ ✅ (49 packages) 2. ~~publish `@bytelyst/*` packages to local Gitea~~ ✅ (56 packages)
3. ~~migrate pilot repo (FlowMonk) end-to-end~~ 3. ~~migrate pilot repo (FlowMonk) end-to-end~~
4. ~~expand to remaining standard-layout repos~~ ✅ (7 repos) 4. ~~expand to remaining standard-layout repos~~ ✅ (7 repos)
5. ~~confirm Gitea CI green for all repos~~ ✅ (8/8 with CI workflows) 5. ~~confirm Gitea CI green for all repos~~ ✅ (10/10 with CI workflows)
6. ~~migrate remaining 2 non-standard repos (MindLyst, LysnrAI)~~ 6. ~~migrate remaining 2 non-standard repos (MindLyst, LysnrAI)~~
7. ~~document rollback path~~ ✅ (§12) 7. ~~document rollback path~~ ✅ (§12)
8. ~~document Azure single-VM reproduction steps~~ ✅ (§13) 8. ~~document Azure single-VM reproduction steps~~ ✅ (§13)
@ -612,17 +611,33 @@ This migration plan is locally validated only when all are true:
--- ---
## 15.1 Package Inventory (verified 2026-03-26)
58 package directories exist in `packages/`. Of those:
- **2 are native SDKs** (not npm): `kotlin-platform-sdk`, `swift-platform-sdk`
- **56 are published** to Gitea npm registry (55 at `0.1.0`, `react-auth` also at `0.1.1`)
- **1 is private** (`@bytelyst/create-app`) — scaffolding CLI tool, not publishable
### Not published (1 package)
```
@bytelyst/create-app # private: true in package.json — scaffolding CLI, not consumed by product repos
```
---
## 16. Post-Migration Audit (2026-03-24) ## 16. Post-Migration Audit (2026-03-24)
After the initial migration was marked complete, a systematic audit was run across all 10 repos. 5 bugs/gaps were found and fixed: After the initial migration was marked complete, a systematic audit was run across all 10 repos. 5 bugs/gaps were found and fixed:
| # | Finding | Severity | Fix | Repo | | # | Finding | Severity | Fix | Repo |
|---|---------|----------|-----|------| | --- | -------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------- | ----------------------------------- |
| 1 | FlowMonk `mobile/package.json` had 6 stale `file:` refs | **BUG** | Converted to `^0.1.0` + regenerated lockfile | `learning_ai_flowmonk` | | 1 | FlowMonk `mobile/package.json` had 6 stale `file:` refs | **BUG** | Converted to `^0.1.0` + regenerated lockfile | `learning_ai_flowmonk` |
| 2 | MindLyst had 3 stale `package-lock.json` files (npm artifact, pnpm doesn't use them) | **BUG** | Deleted all 3 | `learning_multimodal_memory_agents` | | 2 | MindLyst had 3 stale `package-lock.json` files (npm artifact, pnpm doesn't use them) | **BUG** | Deleted all 3 | `learning_multimodal_memory_agents` |
| 3 | MindLyst missing `.dockerignore` | **GAP** | Created with proper exclusions (node_modules, .next, dist, KMP build dirs) | `learning_multimodal_memory_agents` | | 3 | MindLyst missing `.dockerignore` | **GAP** | Created with proper exclusions (node_modules, .next, dist, KMP build dirs) | `learning_multimodal_memory_agents` |
| 4 | MindLyst CI workflow had stale "Build @bytelyst/* packages" step + used npm instead of pnpm | **BUG** | Removed step, added `pnpm install`, switched to `pnpm --filter` | `learning_multimodal_memory_agents` | | 4 | MindLyst CI workflow had stale "Build @bytelyst/\* packages" step + used npm instead of pnpm | **BUG** | Removed step, added `pnpm install`, switched to `pnpm --filter` | `learning_multimodal_memory_agents` |
| 5 | LysnrAI CI workflow had stale "Build @bytelyst/* packages" step | **BUG** | Removed step, added `pnpm install` | `learning_voice_ai_agent` | | 5 | LysnrAI CI workflow had stale "Build @bytelyst/\* packages" step | **BUG** | Removed step, added `pnpm install` | `learning_voice_ai_agent` |
### Dead file sweep — confirmed clean ### Dead file sweep — confirmed clean
@ -644,20 +659,20 @@ After completing the migration and audit, all Dockerfiles were tested with actua
### Bugs found and fixed during Docker verification ### Bugs found and fixed during Docker verification
| # | Finding | Severity | Fix | Repo | | # | Finding | Severity | Fix | Repo |
|---|---------|----------|-----|------| | --- | ----------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------- | ----------------------------------- |
| 6 | MindLyst + LysnrAI Dockerfiles used shell syntax (`2>/dev/null \|\| true`) in COPY instructions | **BUG** | Removed — Docker COPY doesn't support shell redirects | both | | 6 | MindLyst + LysnrAI Dockerfiles used shell syntax (`2>/dev/null \|\| true`) in COPY instructions | **BUG** | Removed — Docker COPY doesn't support shell redirects | both |
| 7 | MindLyst web Dockerfile used `pnpm run build -- --webpack` — pnpm passes `--webpack` as directory arg | **BUG** | Changed to `npx next build --webpack` | `learning_multimodal_memory_agents` | | 7 | MindLyst web Dockerfile used `pnpm run build -- --webpack` — pnpm passes `--webpack` as directory arg | **BUG** | Changed to `npx next build --webpack` | `learning_multimodal_memory_agents` |
| 8 | `@bytelyst/extraction` was missing from Gitea registry | **GAP** | Published (now 49 packages total) | common-plat | | 8 | `@bytelyst/extraction` was missing from Gitea registry | **GAP** | Published | common-plat |
### Docker build results — all PASS ### Docker build results — all PASS
| Repo | Image | Status | | Repo | Image | Status |
|------|-------|--------| | -------- | ------------------------ | ------ |
| MindLyst | `mindlyst-backend:test` | ✅ | | MindLyst | `mindlyst-backend:test` | ✅ |
| MindLyst | `mindlyst-web:test` | ✅ | | MindLyst | `mindlyst-web:test` | ✅ |
| LysnrAI | `lysnrai-backend:test` | ✅ | | LysnrAI | `lysnrai-backend:test` | ✅ |
| LysnrAI | `lysnrai-dashboard:test` | ✅ | | LysnrAI | `lysnrai-dashboard:test` | ✅ |
(Standard repos were already Docker-verified during the initial migration.) (Standard repos were already Docker-verified during the initial migration.)