feat: support simple projects and root Git repositories
Allow registering a single Git repository at the engineering project root with --path . while retaining path safety checks. Document Git-optional projects first and cover plain folders, root repositories, and multiple repositories in process tests and native smoke scenarios. Validated with 23 passing tests and macOS ARM64 native smoke checks for all three layouts.
This commit is contained in:
@@ -17,6 +17,48 @@ else
|
||||
test "$?" -eq 2
|
||||
fi
|
||||
|
||||
aie_without_git() {
|
||||
PATH="$aie_fixture/no-installed-tools" "$aie_binary" "$@"
|
||||
}
|
||||
|
||||
# A source folder is a complete engineering project, even with no Git installed.
|
||||
mkdir plain
|
||||
cd plain
|
||||
printf 'Existing source\n' > main.txt
|
||||
aie_without_git init --name 'Simple Project' > init.yaml
|
||||
aie_without_git work create 'Continue application' --goal 'Preserve local context' > work.yaml
|
||||
aie_without_git discussion add WRK-0001 --text 'No repository is required' > discussion.yaml
|
||||
aie_without_git artifact add WRK-0001 --file main.txt --purpose 'Initial source evidence' > artifact.yaml
|
||||
aie_without_git decision draft WRK-0001 --title 'Pilot the protocol' --evidence ART-0001 > decision.yaml
|
||||
aie_without_git work context WRK-0001 --format json > before.json
|
||||
mkdir src
|
||||
cd src
|
||||
aie_without_git work context WRK-0001 --format json > ../after.json
|
||||
cd ..
|
||||
cmp before.json after.json
|
||||
aie_without_git project validate --format json > validation.json
|
||||
grep -q '"valid" : true' validation.json
|
||||
test ! -e .git
|
||||
cd "$aie_fixture"
|
||||
|
||||
# A single Git repository can contain both the source and protocol workspace.
|
||||
git init -q single
|
||||
cd single
|
||||
"$aie_binary" init --name 'Single Repository' > init.yaml
|
||||
"$aie_binary" repo add app --path . > repo.yaml
|
||||
"$aie_binary" work create 'Inspect application' --repo app > work.yaml
|
||||
"$aie_binary" work context WRK-0001 --format json > before.json
|
||||
mkdir src
|
||||
cd src
|
||||
"$aie_binary" work context WRK-0001 --format json > ../after.json
|
||||
cd ..
|
||||
cmp before.json after.json
|
||||
grep -q '"repositoryId" : "app"' after.json
|
||||
"$aie_binary" project validate --format json > validation.json
|
||||
grep -q '"valid" : true' validation.json
|
||||
cd "$aie_fixture"
|
||||
echo 'Native simple-project continuity smoke passed (without Git and with one root repository).'
|
||||
|
||||
# Git initialization is fixture setup, never an implicit CLI operation.
|
||||
git init -q runtime
|
||||
git init -q studio
|
||||
|
||||
Reference in New Issue
Block a user