Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions tests/25_try_demo.bats
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,18 @@ done
cp "$FAKE_INSTALL" "$out"
EOF

# Fake orbit runtime: clone/new/done all no-op.
printf '#!/usr/bin/env bash\nexit 0\n' > "$MOCK_BIN/orbit"
# Fake orbit runtime: new/done are no-ops; clone materializes a real repo,
# because try.sh writes a repo-local demo identity into each pool clone's
# config (zero-config git support) right after cloning.
cat > "$MOCK_BIN/orbit" <<'EOF'
#!/usr/bin/env bash
if [ "$1" = "clone" ]; then
name="$(basename "${2%.git}")"
mkdir -p "$ORBIT_TRY_DIR/.repos"
git init -q "$ORBIT_TRY_DIR/.repos/$name"
fi
exit 0
EOF
chmod +x "$MOCK_BIN/curl" "$MOCK_BIN/orbit" "$FAKE_INSTALL"
}

Expand Down
12 changes: 11 additions & 1 deletion try.sh
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ build_bare() {
git init -q "$work"
git -C "$work" -c core.hooksPath=/dev/null add .
git -C "$work" -c core.hooksPath=/dev/null \
-c user.email=pilot@orbit.dev -c user.name=Pilot commit -qm "$msg"
-c user.email=pilot@localhost -c user.name=Pilot commit -qm "$msg"
git clone -q --bare "$work" "$UPSTREAM/$name.git"
rm -rf "$work"
}
Expand All @@ -372,6 +372,16 @@ say "⚙ Adding both repos to the Orbit pool ..."
orbit clone "$UPSTREAM/navigator.git" >/dev/null
orbit clone "$UPSTREAM/mission-control.git" >/dev/null

# Repo-local identity for the demo pool clones: the agent commits from inside
# the workspace worktrees, and worktrees read the repo's common config — so a
# zero-config git (fresh VM/container: no global user.name/user.email) would
# otherwise fail every demo commit with "Author identity unknown" (exit 128).
# Everything lives under $TRY_DIR, so this never touches the user's real repos.
for r in "$TRY_DIR/.repos/navigator" "$TRY_DIR/.repos/mission-control"; do
git -C "$r" config user.name "Pilot"
git -C "$r" config user.email "pilot@localhost"
done

GOAL="Downlink a fuel-reserve field in the telemetry frame so mission-control can watch the tank burn — keep the encoder (navigator) and decoder (mission-control) in lockstep"
say "⚙ Creating a workspace for the mission ..."
orbit new "$GOAL" --name mission >/dev/null
Expand Down
Loading