PR Factory: Fix #169 Feature: Add Windows setup instructions for root quickstart and setup.sh - #172
Open
mohiitt wants to merge 1 commit into
Open
PR Factory: Fix #169 Feature: Add Windows setup instructions for root quickstart and setup.sh#172mohiitt wants to merge 1 commit into
mohiitt wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Factory Output
Closes #169
Summary
Summary
Fresh ad-hoc verification completed successfully. No new edits were made.
Committed change remains:
e6521c8 Add Windows PowerShell setup helperFiles Changed
setup.ps1tests/test_setup_ps1_static.pyREADME.mdCONTRIBUTING.mdCHANGELOG.mdWhy This Fix
Adds a native Windows PowerShell setup path while preserving the existing Bash helper and macOS/Linux/Git Bash/WSL docs.
Tests Run
Ad-hoc verification only, not a full suite-green claim.
Temporary verifier created:
/var/folders/yf/3mgk15tx2sj0zt3dm420wlb00000gn/T/hermes-verify-jvuyuexq.pyCommand run:
python3 /var/folders/yf/3mgk15tx2sj0zt3dm420wlb00000gn/T/hermes-verify-jvuyuexq.pyVerifier checked:
setup.ps1required fragments and behavior guards:[string]$Example[switch]$Run$PSScriptRootpythonpluspy -3fallback.venvcreationScripts\python.exerequirements.txtinstall path.env.examplecopy only when.envis absentagent.py,main.py,workflow.py,app.py-Runexecution branchpython3 -m py_compile tests/test_setup_ps1_static.pypython3 -m unittest discover -s tests -vgit diff --check HEAD~1..HEADResult:
RESULT: passedCleanup:
CLEANED_UP=/var/folders/yf/3mgk15tx2sj0zt3dm420wlb00000gn/T/hermes-verify-jvuyuexq.pyGit status from verifier:
## pr-factory/169-e58abg72-coder-b...origin/main [ahead 1]Risks
setup.ps1runtime execution in PowerShell.Planner Spec
Problem
Windows users cannot follow the repository’s root quickstart/setup flow without manually translating Unix/Bash commands.
Current root setup docs and helper path are Unix-centric:
README.md:24-48usespython3,source .venv/bin/activate,cp .env.example .env, and./setup.sh.setup.shis explicitly Bash-only and uses Bash syntax plus Unix activation/copy commands.README.md:193-195uses Bash-style inline environment variable assignment for Docker Compose.CONTRIBUTING.md:13only references./setup.sh <example-folder>.The feature should make root setup clearly usable for native Windows PowerShell users, while preserving existing macOS/Linux behavior.
Repo Context
fetchai/innovation-lab-examples#169README.md.setup.sh.setup.shbehavior:./setup.sh <example-folder> [--run]python3orpython..venvinside the selected example folder.requirements.txtif present..env.exampleto.envonly when.envdoes not already exist.agent.py,main.py,workflow.py,app.py.--run.setup.ps1requires rootCHANGELOG.mdto be updated.Relevant Memory
No repository memory was provided.
Repo conventions from current files and researcher context:
bashsnippets.# OR on Windows PowerShell:.\.venv\Scripts\Activate.ps1setup.shbehavior unless necessary.setup.ps1over trying to makesetup.shcross-platform.setup.ps1, updateCHANGELOG.mdunder[Unreleased].Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypasssetup.shworks in native Windows PowerShell; it is Bash-only and should be labeled macOS/Linux/Git Bash/WSL.Acceptance Criteria
README.mdincludes explicit Windows PowerShell setup instructions for:.env.exampleto.env,README.mdclearly distinguishes:setup.ps1, or document a clear manual PowerShell equivalent.setup.ps1matchingsetup.shbehavior.setup.shis documented as Bash/macOS/Linux/Git Bash/WSL only, not as native PowerShell.setup.ps1is added:-Run..venvin the example folder if missing.requirements.txtif present..env.exampleto.envonly if.envis absent..env.CHANGELOG.md.EXAMPLE, or avoid presenting Bash-only syntax as universal.CONTRIBUTING.mdmentions Windows users can use.\setup.ps1 <example-folder>.Suggested Files
README.mdREADME.md:22-50.README.md:64if addingsetup.ps1.README.md:191-195to show PowerShell syntax:EXAMPLE=fetch-hackathon-quickstarter docker compose up$env:EXAMPLE="fetch-hackathon-quickstarter"; docker compose upsetup.ps1setup.shbehavior closely.setup.shCHANGELOG.mdsetup.ps1is added.[Unreleased]entry under### Added, e.g. Windows PowerShell setup helper and README setup instructions.CONTRIBUTING.mdCONTRIBUTING.md:13to mention PowerShell alternative.Implementation Tasks
Inspect current setup docs and script behavior.
README.md,setup.sh,CONTRIBUTING.md,CHANGELOG.md, and.github/workflows/pull_request_ci.yml.Update root quickstart docs.
pythonfor Windows PowerShell..\.venv\Scripts\Activate.ps1.Copy-Item .env.example .env.fetch-hackathon-quickstarter.Add or document Windows automated setup.
setup.ps1..\setup.ps1 fetch-hackathon-quickstarter.\setup.ps1 fetch-hackathon-quickstarter -RunSet-ExecutionPolicy -Scope Process -ExecutionPolicy BypassImplement
setup.ps1if chosen.[string]$Example[switch]$Run$PSScriptRoot.python --versionand/orpy -3 --version..venvwithpython -m venv .venv..\.venv\Scripts\python.exe -m pip install --upgrade pip.\.venv\Scripts\python.exe -m pip install -r requirements.txt.env.exampleto.envonly if.envis missing.setup.sh.-Runis provided, run the entry file with the venv Python.Update repository structure docs if adding
setup.ps1.README.md, addsetup.ps1nearsetup.sh.setup.shis Bash/macOS/Linux andsetup.ps1is Windows PowerShell.Update Docker Compose docs.
EXAMPLE=... docker compose up.Update
CONTRIBUTING.mdif within scope../setup.sh <example-folder>.\setup.ps1 <example-folder>Update
CHANGELOG.mdif addingsetup.ps1.[Unreleased] -> Addedbullet for the Windows PowerShell setup helper and root README instructions.Test Plan
Required configured validation:
git diff --checkIf only Markdown files are changed:
git diff --checkis sufficient for the configured test command.If
setup.ps1is added:git diff --check.pwsh -NoProfile -Command '$null = [System.Management.Automation.Language.Parser]::ParseFile("setup.ps1", [ref]$null, [ref]$errors); if ($errors.Count) { $errors | Format-List; exit 1 }'pwshis not installed:requirements.txt, but avoid requiring real API keys..env.Expected CI implications:
setup.ps1requiresCHANGELOG.md.Coder A Strategy: Minimal Safe Fix
Aim: Resolve the issue with the smallest low-risk documentation change.
Modify
README.mdonly.python -m venv .venv.\.venv\Scripts\Activate.ps1pip install -r requirements.txtCopy-Item .env.example .envpython agents/alice/agent.pyClarify automated script limitation.
./setup.shis for macOS/Linux/Git Bash/WSL.Update Docker Compose command with a PowerShell equivalent.
EXAMPLE=fetch-hackathon-quickstarter docker compose up$env:EXAMPLE="fetch-hackathon-quickstarter"; docker compose upDo not add
setup.ps1.Run:
git diff --checkTradeoff:
Coder B Strategy: Test-First Comprehensive Fix
Aim: Implement full Windows support with a PowerShell helper plus docs.
Add
setup.ps1.setup.shfunctionality.param([Parameter(Mandatory=$true)][string]$Example, [switch]$Run).$PSScriptRootfor repo root.python, fallback topy -3if needed..envsafety behavior.setup.sh.Validate
setup.ps1syntax.pwshexists, parse it using PowerShell parser.Update
README.md../setup.sh fetch-hackathon-quickstarter.\setup.ps1 fetch-hackathon-quickstartersetup.ps1.Update
CONTRIBUTING.md.setup.sh.Update
CHANGELOG.md.[Unreleased] -> Addedbullet forsetup.ps1and Windows setup docs.Run:
git diff --checkTradeoff:
Risks
setup.ps1; docs must avoid recommending permanent/global policy changes.python,py -3,setup.ps1must avoid overwriting.env, matchingsetup.sh.docker-compose.yml, but the provided file tree summary does not show one; avoid unrelated Docker cleanup unless directly needed for Windows command syntax.setup.ps1helper in review.setup.ps1is added butCHANGELOG.mdis not updated, PR CI’schangelog-checkshould fail.Candidate Race
Coder A
Summary
Implemented the minimal safe Windows setup fix and committed it locally.
Commit:
492dcfd docs: add Windows PowerShell quickstartFiles Changed
README.mdfetch-hackathon-quickstarter.venv.env.exampleto.envsetup.shis Bash-only and not intended for native Windows PowerShell.setup.sh.$env:EXAMPLE="fetch-hackathon-quickstarter"; docker compose upCONTRIBUTING.md./setup.sh <example-folder>is for macOS/Linux/Git Bash/WSL.Why This Fix
This follows the requested “Minimal Safe Fix” strategy:
setup.ps1, reducing script/runtime risk.Tests Run
git diff --checkResult: passed.
Also reviewed the relevant rendered Markdown sections in
README.mdandCONTRIBUTING.md.Risks
setup.ps1helper was added, so Windows users use documented manual PowerShell steps rather than an automated script.Coder B
Summary
Fresh ad-hoc verification completed successfully. No new edits were made.
Committed change remains:
e6521c8 Add Windows PowerShell setup helperFiles Changed
setup.ps1tests/test_setup_ps1_static.pyREADME.mdCONTRIBUTING.mdCHANGELOG.mdWhy This Fix
Adds a native Windows PowerShell setup path while preserving the existing Bash helper and macOS/Linux/Git Bash/WSL docs.
Tests Run
Ad-hoc verification only, not a full suite-green claim.
Temporary verifier created:
/var/folders/yf/3mgk15tx2sj0zt3dm420wlb00000gn/T/hermes-verify-jvuyuexq.pyCommand run:
python3 /var/folders/yf/3mgk15tx2sj0zt3dm420wlb00000gn/T/hermes-verify-jvuyuexq.pyVerifier checked:
setup.ps1required fragments and behavior guards:[string]$Example[switch]$Run$PSScriptRootpythonpluspy -3fallback.venvcreationScripts\python.exerequirements.txtinstall path.env.examplecopy only when.envis absentagent.py,main.py,workflow.py,app.py-Runexecution branchpython3 -m py_compile tests/test_setup_ps1_static.pypython3 -m unittest discover -s tests -vgit diff --check HEAD~1..HEADResult:
RESULT: passedCleanup:
CLEANED_UP=/var/folders/yf/3mgk15tx2sj0zt3dm420wlb00000gn/T/hermes-verify-jvuyuexq.pyGit status from verifier:
## pr-factory/169-e58abg72-coder-b...origin/main [ahead 1]Risks
setup.ps1runtime execution in PowerShell.Judge Verdict
Winner: coder-b
Verdict
Winner: coder-b
Scorecard
setup.ps1, docs, changelog, and contributing updates.git diff --check, which is acceptable for docs-only but limited. B rangit diff --check, Python static tests, and unittest discovery, though actual PowerShell parser/runtime validation was unavailable.setup.sh, but the new script/test increase maintenance surface.CHANGELOG.mdas required for adding a non-Markdown file and documents both helper scripts clearly.Why the Winner Won
Coder B is the better candidate for a real PR because it implements the preferred solution from the planner spec: a native Windows PowerShell setup helper.
It covers the key acceptance points:
setup.ps1.-Run.pythonandpy -3fallback..venv.requirements.txtwhen present..env.exampleonly when.envis absent.setup.sh.setup.shvssetup.ps1.CONTRIBUTING.md.CHANGELOG.md, which is required because a non-Markdown file was added.The main limitation is that PowerShell itself was not available locally, so the script was not parsed or executed by
pwsh. Still, relative to the issue, B is substantially more complete and better aligned with the preferred path.Why the Other Candidate Lost
Coder A is a safe and reasonable minimal documentation fix, but it is less complete.
Strengths:
setup.shis Bash-only.Why it loses:
setup.ps1helper.setup.ps1as the preferred implementation.Coder A would be acceptable if the maintainers wanted the smallest possible docs-only fix, but B is stronger for a real PR against the stated issue.
Required QA Checks
Before merging Coder B, run:
git diff --checkpwsh -NoProfile -Command '$null = [System.Management.Automation.Language.Parser]::ParseFile("setup.ps1", [ref]$null, [ref]$errors); if ($errors.Count) { $errors | Format-List; exit 1 }'.\setup.ps1 fetch-hackathon-quickstarter.envand confirm it is not overwritten..\setup.ps1 fetch-hackathon-quickstarter -Runinvokes the detected entry file.CHANGELOG.mdplacement under[Unreleased] -> Addedmatches repo convention.tests/test_setup_ps1_static.pyfits the repository’s test conventions or should be simplified/omitted if the repo does not normally test helper scripts.Memory to Save
No durable repo memory needs to be saved.
QA Result
QA Verdict
APPROVED
Tests
git diff --check: passed.testsPassed: true.Acceptance Criteria Check
.env.example, and running the example.setup.ps1, providing the preferred Windows-friendly automated setup path.setup.shas the Bash/macOS/Linux/Git Bash/WSL helper andsetup.ps1as the Windows PowerShell helper.setup.ps1appears to satisfy the required behavior:-Run,pythonandpy -3fallback,.venv,requirements.txtif present,.env.exampleonly when.envis absent,setup.sh,EXAMPLE.CONTRIBUTING.mdmentions the PowerShell helper.CHANGELOG.mdwas updated under[Unreleased] -> Added, which is required becausesetup.ps1is a new non-Markdown file.Risks
setup.ps1was not validated withpwshin the provided test output, so PowerShell syntax/runtime issues remain possible.tests/test_setup_ps1_static.pyis lightweight static coverage only and was not part of the provided configured test command..envpreservation should ideally be validated on a Windows runner before merge, but this is not a blocker for opening the PR.Final PR Notes
This PR is safe to open. It addresses the planner’s acceptance criteria, includes the preferred PowerShell helper implementation, updates the required docs and changelog, and passes the provided configured validation command.
Tests
Memory Used
(No repo memory used.)
Run Metrics
Decision Trail
Full run trace is available in PR Factory dashboard.