Skip to content

feat(fox-overlay): scaffold packages/fox-overlay/ for v0.6.0 migration (Phase 1) - #219

Merged
roadhero merged 4 commits into
mainfrom
feat/v0.6.0-p1-scaffold-fox-overlay
May 16, 2026
Merged

roadhero merged 4 commits into
mainfrom
feat/v0.6.0-p1-scaffold-fox-overlay

Conversation

@roadhero

@roadhero roadhero commented May 16, 2026 •

Copy link
Copy Markdown
Contributor

Phase 1 of the v0.6.0 upstream-separation migration (epic #155). Closes #165 (sub-issue of phase tracker #164).

What this does

Introduces packages/fox-overlay/ — a sibling overlay package that will hold all Fox-in-the-Box-specific code so the forks/hermes-{agent,webui} submodules can pin virgin upstream tags (Phase 8). Phase 1 ships only the scaffold; subsequent phases (2-10) populate it.

packages/fox-overlay/
├── pyproject.toml          # entry-point commented until Phase 3
├── MANIFEST.toml           # empty inventory (Phases 2-7 fill)
├── README.md
├── .fox-removals           # empty manifest with consumer-convention header
├── .gitignore              # *.egg-info/
├── fox_overlay/
│   ├── bootstrap.py        # FOX_OVERLAY_AUTOINSTALL-gated install()
│   ├── webui_modules/      # Phase 5 target
│   ├── webui_patches/      # Phase 6 target
│   └── agent_plugins/      # Phase 3 target
├── webui_static/.gitkeep   # Phase 2 target
├── patches/{webui,agent}/series  # Phase 4 target
├── scripts/check-overlay-basis.sh  # bash stub; Phase 8 makes real
└── tests/test_bootstrap.py # 3 idempotency / autoinstall regression tests

Plus a one-line AGENTS.md Repository-Layout addition and a pnpm-workspace.yaml narrowing.

No behavior change — Dockerfile is untouched, the overlay isn't pip installed in the image yet, no entry-points wired, no patches populated. The container builds bit-identically to today.

Validation gates (per plan §Phase 1)

  • ✅ pip install -e packages/fox-overlay/ from a fresh venv: clean editable wheel
  • ✅ python -c "import fox_overlay.bootstrap": prints [fox-overlay] bootstrap installed (no-op skeleton)
  • ✅ FOX_OVERLAY_AUTOINSTALL=0 opt-out: leaves _INSTALLED=False until manual install() call
  • ✅ Container smoke A1-A4 against :8788 (existing v0.5.4 baseline image): all green
  • ✅ git diff main...HEAD: only adds files under packages/fox-overlay/ plus 1-line AGENTS.md + 5-line pnpm-workspace.yaml narrowing
  • ✅ pytest: 3/3 pass
  • ✅ pnpm install --frozen-lockfile: clean

5-hat process

Hat Result
Architect 6-line brief approved by Dennis 2026-05-16
Engineer (orchestrating Claude) 4 commits on this branch
Reviewer #1 — Senior Backend Engineer APPROVE; 1 MEDIUM, 2 LOW
Reviewer #2 — DevOps APPROVE-WITH-CHANGES; 1 BLOCKER-ish (auto-install)
Reviewer #3 — Adversarial APPROVE-WITH-CHANGES; 2 HIGH, 2 MEDIUM, 4 LOW
QA PASS — 4/4 validation gates clean

Reviewer findings — ALL actioned (per Dennis "don't leave anything behind" 2026-05-16)

Finding Severity Resolution Where
bootstrap.install() auto-fires at import — load-bearing footgun for Phase 4-6 (DevOps + Adversarial) HIGH × 2 FOX_OVERLAY_AUTOINSTALL env gate (default on; set =0 to opt out) + module docstring warning C1
Anti-regression Rule 4 (feature flags) — auto-install ungated HIGH Same env gate satisfies Rule 4 C1
pnpm-workspace.yaml globs packages/* (Backend + Adversarial) MEDIUM × 2 Narrowed to packages/electron explicitly C3
Anti-regression Rule 3 — no tests added FAIL tests/test_bootstrap.py with 3 cases C4
pyproject.toml [tool.setuptools.packages.find] missing where (Backend) LOW Added where = ["."] C1
check-overlay-basis.sh shebang /bin/sh (Adversarial) LOW Switched to /bin/bash for Phase 8 future bash features C1
.fox-removals comment-safety — risk of # lines being treated as filenames (Adversarial) LOW Added consumer-convention header documenting required grep -v '^\s*$|^\s*#' strip pattern C1
AGENTS.md "phases 2-7" (Adversarial) LOW "phases 2-10" — plan goes through Phase 10 C2
Squash commits 1+2 to clean up egg-info history (Adversarial) MEDIUM Branch rebuilt as 4 clean commits via soft-reset; force-pushed; egg-info trace eliminated entirely (history)

Zero open reviewer comments. All 9 findings either resolved in code or rebuilt out of history.

Out of scope (deferred to subsequent phases)

  • Dockerfile edits (Phases 2, 3, 8)
  • Entry-point activation (Phase 3)
  • pip install -e of overlay in the image (Phase 3)
  • Patches/series content (Phase 4)
  • Submodule re-point (Phase 8)
  • CHANGELOG.md ## [0.6.0] entry (Phase 10)

Authorship invariant

All 4 commits authored by roadhero per the migration policy. No Co-authored-by or Generated with Claude Code lines.


Closes #165 (Phase 1 sub-issue under #164).

@roadhero roadhero mentioned this pull request May 16, 2026
11 of 23 tasks
@roadhero roadhero self-assigned this May 16, 2026
@roadhero
roadhero requested a review from xenia15 May 16, 2026 10:20
roadhero added 4 commits May 16, 2026 11:23
Sibling overlay package that will hold all Fox-in-the-Box-specific code
so the forks/hermes-{agent,webui} submodules can pin virgin upstream tags
(Phase 8). This commit ships only the scaffold; subsequent phases (2-10)
populate it.

Tree shape:
  packages/fox-overlay/
  ├── pyproject.toml          entry-point commented until Phase 3
  ├── MANIFEST.toml           empty inventory placeholder
  ├── README.md
  ├── .fox-removals           empty manifest (Phase 2/7 fill)
  ├── .gitignore              *.egg-info/
  ├── fox_overlay/
  │   ├── bootstrap.py        FOX_OVERLAY_AUTOINSTALL-gated install()
  │   ├── webui_modules/      Phase 5 target
  │   ├── webui_patches/      Phase 6 target
  │   └── agent_plugins/      Phase 3 target
  ├── webui_static/.gitkeep   Phase 2 target
  ├── patches/{webui,agent}/series  Phase 4 target
  └── scripts/check-overlay-basis.sh  no-op stub; Phase 8 makes it real

Anti-regression Rule 4 honored: bootstrap.install() is gated by
FOX_OVERLAY_AUTOINSTALL (default on; set =0 to opt out for tests, REPL,
hot-reloaders, IDE indexers). Without the gate, any Phase 4-6 monkey-patch
that install() registers would fire from any unintended import path.

No behavior change in this commit: Dockerfile is untouched, the overlay
isn't pip install'd in the image yet, no entry-points wired, no patches
populated.

Validated locally:
- pip install -e packages/fox-overlay/ from a fresh venv builds an
  editable wheel cleanly
- python -c "import fox_overlay.bootstrap" prints the install log line
- FOX_OVERLAY_AUTOINSTALL=0 leaves _INSTALLED=False until install() is
  called explicitly

Refs #165 (sub-issue of #164 — Phase 1 of v0.6.0 epic #155).
Phase 1 introduces packages/fox-overlay/. Updating AGENTS.md (the
repo-tracked agent-facing layout doc — CLAUDE.md is gitignored per
repo policy "keep CLAUDE.md local only") so the on-disk tree and the
doc stay aligned.

Refs #165.
Plan §Phase 1 risk #1: "verify pnpm-workspace.yaml only enumerates JS
packages." packages/* glob tolerates Python-only sibling directories
today (pnpm ignores dirs without package.json) but explicit enumeration
is the recommended mitigation, and prevents future contributors who add
a package.json under a Python package directory from accidentally
joining the JS workspace.

packages/integration/ and packages/scripts/ never had package.json so
this change does not affect today's pnpm graph; verified with
`pnpm install --frozen-lockfile` (clean).

Refs #165.
… tests

Three pytest cases covering the bootstrap.install() contract:
- test_install_is_idempotent — second install() returns cleanly
- test_autoinstall_default_on — without env var, import triggers install
- test_autoinstall_opt_out — FOX_OVERLAY_AUTOINSTALL=0 leaves _INSTALLED
  False until install() is called explicitly

Seeds packages/fox-overlay/tests/ for Phases 3-6 to extend per
anti-regression Rule 3 ("regression test suite grows with every phase").

Refs #165.
@roadhero
roadhero force-pushed the feat/v0.6.0-p1-scaffold-fox-overlay branch from 65a2f55 to 3927caa Compare May 16, 2026 10:24
@roadhero
roadhero merged commit d87db8e into main May 16, 2026
5 checks passed
@roadhero
roadhero deleted the feat/v0.6.0-p1-scaffold-fox-overlay branch June 1, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v0.6.0 P1] PR: scaffold packages/fox-overlay/ (no behavior change)

2 participants