Skip to content

[Testing] Extend v1→v2 migration test for multi-project workspace + conflict-skip edge cases #320

@atlas-apex

Description

@atlas-apex

Driver

test_split_portfolio_v2_migration.sh Case 1 uses a SINGLE workspace project (demo). The migration spec already handles multi-project edge cases — specifically the "project already exists in sibling — skip with warning, don't overwrite" path documented in the SKILL.md:

if [ -e "$SIBLING_ROOT/workspace/$name" ]; then
  echo "WARNING: workspace/$name exists in BOTH locations — skipped."
  continue
fi

That conflict-skip path is not exercised by any test today. If a future change to the loop or the conflict-check breaks the skip-and-warn behaviour (e.g. removes the continue, swallows the warning, accidentally overwrites the sibling copy), nothing catches it until an adopter hits the real-world case.

Also unexercised: the workspace/README.md skip — the framework artefact must stay in the public fork during the move, per AgDR-0021 § G. Currently relies on operator reading the spec; not test-pinned.

The 4-gap audit (2026-05-20) identified this as Gap 4 of 4 (lowest priority).

Scope

  • Extend .claude/hooks/tests/test_split_portfolio_v2_migration.sh with a new case (Case 4 — or fold into Case 1 if cleaner):
    • Multi-project workspace — sandbox has 3+ projects in workspace/<name>/ (e.g. alpha, beta, gamma)
    • Mixed presence — pre-create workspace/beta in the sibling private repo before running migration (the conflict-skip path)
    • README.md framework artefactworkspace/README.md exists in the public fork (it's the framework's docs file for the convention)
  • Assertions:
    • All 3 projects end up in the sibling's workspace/ (alpha + beta + gamma)
    • beta is NOT overwritten (sibling pre-existing content preserved)
    • Conflict-skip warning prints to stderr (grep "WARNING.*beta.*BOTH locations" stderr)
    • Migration doesn't abort on the conflict — it continues to gamma
    • workspace/README.md stays in the public fork (framework artefact preserved)
    • All other v2 assertions from Case 1 still hold (marker, gitignore, config keys)
  • All existing 3 cases still pass (no regression)

Acceptance Criteria

  • Additional Case 4 (or expanded Case 1) merged into test_split_portfolio_v2_migration.sh
  • Total assertion count increases by ≥5
  • Multi-project moves work end-to-end (3+ projects in one run)
  • Conflict-skip path produces the expected warning, doesn't abort, doesn't overwrite
  • workspace/README.md stays in the public fork (framework artefact)
  • All existing cases (1, 2, 3) still pass (no regression)

Cross-reference with T1: T1 changes onboarding.yaml from mv to cp. The workspace/ migration STAYS mv (size constraint). The Case 4 assertions only touch workspace/ semantics so T1's changes don't conflict.

Refs #312 (audit findings — Gap 4 of 4 from /update + /setup audit on 2026-05-20)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — ergonomics, nice-to-haveenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions