This commit is contained in:
Oleg Maslov
2026-09-02 10:14:22 +02:00
parent 0c3e2ead3b
commit b20b138fe4
771 changed files with 161561 additions and 9027 deletions

View File

@@ -1,6 +1,16 @@
# E-4 — OSS Subtree-Split Extraction Verified (2026-05-20)
## Status: ✅ Verified-working, ready for Day 0 push
## Status: ⛔ SUPERSEDED — DO NOT FOLLOW
This is a historical verification record. Its former publication instructions
were invalidated by the 2026-06-12 drift analysis: raw subtree branches have the
wrong public-repository layout and can contain Waggle-only files plus interleaved
`install_audit` logic. They are inspection inputs only, never publication sources.
The current authoritative process is in `AGENTS.md` §7.5 and
`packages/hive-mind-core/CONTRIBUTING.md`: prepare a maintainer-curated
forward-port in the OSS checkout, strip every documented exclusion, adapt layout
and imports, review the complete diff, then run `scripts/oss-drift-check.sh`.
`scripts/oss-subtree-split.sh` was previously listed as "scaffold done, code copy TODO" (CR-6 in `BACKLOG-CONSOLIDATED-2026-04-17.md`). This session ran the script locally against all 12 `packages/hive-mind-*` packages and confirmed:
@@ -25,11 +35,13 @@ oss-hive-mind-shim-core-export
oss-hive-mind-wiki-compiler-export
```
All 12 are local-only refs **NOT pushed to any remote** (per the script's design: `git push` is a manual step).
All 12 were local-only refs and were not published. Their existence did not make
them safe publication artifacts.
## Regression guards added
`tests/oss-subtree-split.test.ts` — 44 static-analysis tests that lock down:
`tests/oss-subtree-split.test.ts` now includes static guards plus an executable
temporary-repository rollback test. It locks down:
- Script exists with bash shebang + `set -euo pipefail`
- Dynamic `packages/hive-mind-*` discovery (Wave 2/3 auto-inclusion)
@@ -39,29 +51,15 @@ All 12 are local-only refs — **NOT pushed to any remote** (per the script's de
The first run flagged a stale forbidden entry (`cowork/` — listed in the script but no longer at the repo root). Removed; commit landed in this same change.
## What "Day 0 push" means
## Invalidated publication guidance
For each export branch, the maintainer (Marko) pushes to a remote:
```bash
# Either per-package, to dedicated OSS mirror repos:
git push <oss-mirror-remote> oss-hive-mind-core-export:main
# Or to a consolidated repo as a subdirectory:
git push origin-hive-mind oss-hive-mind-core-export:packages/hive-mind-core
```
Per `packages/hive-mind-core/CONTRIBUTING.md`, the consolidated-repo model is at `github.com/marolinik/hive-mind`. Adding a remote for that:
```bash
git remote add origin-hive-mind https://github.com/marolinik/hive-mind.git
git push origin-hive-mind oss-hive-mind-core-export:main
# ... repeat per package, mapping to its directory in the consolidated repo
```
The former “Day 0” raw-branch publication commands were removed because they
could expose proprietary content and cannot produce the curated mirror layout.
Do not reconstruct or use them from repository history.
## What's NOT done (deliberate)
- **No remote pushes.** The script + this verification produce export branches; pushing is manual + Day-0-gated per the OSS launch playbook.
- **No remote publication.** The script produces local inspection branches only.
- **No CI workflow that runs splits.** Each split processes hundreds-to-thousands of commits and takes minutes per package; running this on every PR would be wasteful. The static-guard test (`oss-subtree-split.test.ts`) catches the regressions that matter (forbidden list drift, script syntax, package-shape) without paying the split cost.
- **No automatic reverse-sync.** OSS upstream changes don't flow back automatically; that's a manual cherry-pick following `.github/sync.md`.
@@ -71,7 +69,7 @@ git push origin-hive-mind oss-hive-mind-core-export:main
# Run the static guards (fast):
npx vitest run tests/oss-subtree-split.test.ts
# Re-split + verify all 12 packages (slow — 5-10 minutes total):
# Re-split all packages for local inspection only (slow — 5-10 minutes total):
bash scripts/oss-subtree-split.sh
# Single-package re-split (fastest spot-check):
@@ -82,6 +80,7 @@ git checkout oss-hive-mind-core-export && ls
git checkout - # return
```
## CR-6 ✅ CLOSED
## CR-6 historical disposition
The original CR-6 was "hive-mind actual source extraction — scaffold done, code copy TODO." The scaffold + the working extraction mechanism + a regression guard now all exist. The remaining "code copy" step is the manual Day-0 `git push` to the OSS mirror, which is correctly out of session scope.
The original CR-6 proved isolated-history extraction, not a safe OSS release
mechanism. Any future mirror release remains a separate curated-forward-port task.

View File

@@ -5,14 +5,12 @@ HTML `placeholder="..."` attributes).
Grep pattern: `// (MOCK|TODO|FIXME|XXX):` or the `/* … */` equivalent.
Current count: **6** lines (revision history below). All 6 are intentional
subtree-split STUB markers in the `hive-mind-hooks-*` packages introduced
by the Phase 2 consolidation merge of `feature/hive-mind-monorepo-migration`
(2026-05-10). They flag hook implementations awaiting Wave 2/3 work; they
are load-bearing for both waggle-os main and the public hive-mind repo
subtree-split. Zero new production code may introduce a marker without
updating `tests/placeholder-audit.test.ts` and this document in the same
commit.
Current count: **0** production-path marker lines. The prior hook stub markers
were removed as the Wave 2/3 implementations landed. Zero new production code
may introduce a marker without updating `tests/placeholder-audit.test.ts` and
this document in the same commit.
Revision 2026-07-16: 6 -> 0 after the hook implementations were completed.
**Revision history:**
- 2026-04-19: 14 → 10 (initial L-17 audit + C2/C3/C4/C5 cleanup)

View File

@@ -1,5 +1,11 @@
# Monorepo Migration Progress Log
> [!CAUTION]
> **HISTORICAL RECORD — publication guidance superseded.** Completion facts
> below describe the April 2026 migration. Any “ready to push” statement about
> raw subtree/export branches is invalid. Current OSS publication authority is
> `AGENTS.md` §7.5 and `packages/hive-mind-core/CONTRIBUTING.md`.
**Brief:** `D:/Projects/PM-Waggle-OS/briefs/2026-04-30-cc-sesija-B-hive-mind-monorepo-migration.md`
**Authority chain:**
- `decisions/2026-04-30-pre-launch-sprint-consolidation-LOCKED.md`
@@ -385,8 +391,16 @@ Closing batch authorized as a single sprint per brief Tasks B16-B27.
### §2.6 OSS subtree split prep (Tasks B20-B22)
> **CORRECTION (2026-08-22):** These tasks proved isolated-history inspection,
> not safe publication. Raw export refs have the wrong mirror layout and can
> contain private files plus interleaved `install_audit`; never publish them.
> Use a reviewed maintainer-curated forward-port.
- **B20** — `scripts/oss-subtree-split.sh` (NEW): auto-discovers `packages/hive-mind-*`, runs `git subtree split` for each, sentinel-checks for monorepo-level leaks. Idempotent (drops + recreates branches each run).
- **B21** — Local test run produced clean `oss-<package>-export` branches for all 12 hive-mind-* packages. Sentinel passes (no proprietary leak). Manual `git push` gate preserved per OSS launch playbook.
- **B21** — Historical receipt: the local run produced 12
`oss-<package>-export` branches and the then-current monorepo-level sentinel
passed. This proved branch shape only; the former manual raw-publication gate
was invalidated by the 2026-06-12 proprietary/interleaved-content analysis.
- **B22** — `.github/workflows/sync-mind.yml` + `mind-parity-check.yml`: deprecation comments added at file headers. Workflows preserved as audit-trail anchors — trigger paths invalid post-migration so workflows do not fire.
### §2.7 Tests + import paths + smoke + final acceptance (Tasks B23-B27)
@@ -426,7 +440,8 @@ All four documented in commit `9cf43b8`.
- **`feature/hive-mind-monorepo-migration` HEAD on origin:** `9cf43b8` (closing trio commit) + this progress doc commit
- **CC Sesija B sprint cumulative commits:** ~19+ commits since §2.1 close `4859b67`
- **Test count post-§2.7:** 5949 / 31 / 145 (6125 total) — 99.5% pass rate, IDENTICAL to §2.3 baseline (zero regression)
- **OSS subtree-split branches (LOCAL ONLY, ready for Day 0 manual push):** `oss-hive-mind-{core,shim-core,cli,mcp-server,wiki-compiler,hooks-claude-code}-export` + 6× `oss-hive-mind-hooks-{cursor,hermes,openclaw,codex,claude-desktop,codex-desktop}-export`
- **OSS subtree-split branches (historical local inspection refs only; never
publish raw):** `oss-hive-mind-{core,shim-core,cli,mcp-server,wiki-compiler,hooks-claude-code}-export` + 6× `oss-hive-mind-hooks-{cursor,hermes,openclaw,codex,claude-desktop,codex-desktop}-export`
**§2.5+§2.6+§2.7 STATUS:** COMPLETE.