|
Download README.md from EnergyVenom/patchwise-agent-studio: direct link, hf CLI and curl.
- Browser
- Download file 6.93 kB
-
https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/README.md
- Command line
-
hf download hf://spaces/EnergyVenom/patchwise-agent-studio/README.md
-
curl -L -o README.md https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/README.md
6.93 kB
| title: Patchwise Agent Studio | |
| emoji: "馃И" | |
| colorFrom: indigo | |
| colorTo: gray | |
| sdk: docker | |
| app_port: 8800 | |
| pinned: false | |
| <p><picture><source media="(prefers-color-scheme: dark)" srcset="docs/design/brand/wordmark-horizontal-dark.svg"><img src="docs/design/brand/wordmark-horizontal-light.svg" alt="Patchwise" height="40"></picture></p> | |
| # Patchwise | |
| A digital co-worker that tests Oracle Fusion Cloud business processes after the monthly and quarterly patches. | |
| AI agents read what the patch changes and what the test environment has, choose test scenarios, run them in a real | |
| browser against an Oracle Fusion **test** pod, classify the failures and write a Ready / Not ready report. People stay | |
| in charge: a consultant approves the scenarios, a QA approver judges real defects and signs off the report. | |
| It also ships a practice pod (a mock of the Fusion screens) for training and demos; every screen and report says | |
| which one a run used. Production pods are refused. | |
| ## Features | |
| - **Test runs** on an Oracle Fusion test pod (Payables today) or the practice pod: a quick simulation, or a full | |
| browser run you can watch live. Monthly and quarterly schedules. | |
| - **Approvals**: scenario approval before anything runs; failure review by a QA approver; report sign-off. | |
| - **Go / no-go** by a fixed QA rule (`reports/generate_report.py`, criteria C1 to C6), with PDF, HTML and Excel output. | |
| - **Test data clean-up** on Fusion: invoices a run creates are recorded and cancelled, also after a stopped run. | |
| - **AI**: an external model (NVIDIA or any OpenAI-compatible API) researches the patch, designs tests and drafts | |
| extra scenarios, which are dry-run and approved by a person first. Optional Hermes assistant for questions. | |
| - **Accounts**: sign-in with lockout, roles (viewer, consultant, QA approver, admin), password reset through | |
| Supabase, "keep me signed in", your-account page with sessions; admin user management. | |
| - **Operations**: append-only, hash-chained audit log; emergency stop; feature switches; encrypted off-site backup | |
| of all data; CSV export; health and readiness checks. | |
| ## Architecture | |
| FastAPI backend and LangGraph workflow (`coworker/`), React web app (`web/`), Playwright executor (`automation/`), | |
| practice pod (`mock-app/`), QA rule and triage (`reports/`, `qa/`, `triage/`). One container runs all of it. See | |
| [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the diagram and data flow. | |
| ## Quick start (local) | |
| Needs Python 3.13, Node 22 and Git. | |
| ```sh | |
| python -m venv architecture/.venv | |
| architecture/.venv/Scripts/pip install -r coworker/requirements.txt # bin/pip on macOS and Linux | |
| npm --prefix web ci && npm --prefix web run build | |
| (cd automation && npm ci && npx playwright install chromium) | |
| npm --prefix mock-app ci | |
| cp .env.example .env # then set FPT_BOOTSTRAP_ADMIN_USER / _PASSWORD | |
| node mock-app/server.js & # the practice pod on :3100 | |
| architecture/.venv/Scripts/python -m coworker setup | |
| architecture/.venv/Scripts/python -m coworker api # http://127.0.0.1:8800 | |
| ``` | |
| On Windows, `fpt.cmd setup`, `fpt.cmd create-user --username admin --role admin` and `fpt.cmd up` do the same. | |
| With Docker: `docker build -t trio-coworker . && docker run -p 8800:8800 -e FPT_BOOTSTRAP_ADMIN_USER=admin -e FPT_BOOTSTRAP_ADMIN_PASSWORD=change-me-now-12 trio-coworker`. | |
| ## Scripts | |
| | What | Command | | |
| |---|---| | |
| | Backend tests | `architecture/.venv/Scripts/python -m pytest coworker/tests triage/tests` | | |
| | Backend lint | `ruff check coworker triage reports qa` | | |
| | Web type-check, lint, build | `npm --prefix web run build` | | |
| | Web unit tests | `npm --prefix web test` | | |
| | Web end-to-end (Playwright) | `npm --prefix web run e2e` | | |
| | Regenerate the typed API client | `npm --prefix web run gen:api` | | |
| | Scenario scripts against the practice pod | `npm --prefix automation test` | | |
| | Pre-commit hooks | `pre-commit install` | | |
| ## Configuration | |
| All settings are environment variables, validated at start. [.env.example](.env.example) lists the important ones | |
| with comments; `coworker/config.py` is the complete list. The ones you must set for a real deployment: | |
| | Variable | Purpose | | |
| |---|---| | |
| | `FPT_BOOTSTRAP_ADMIN_USER`, `FPT_BOOTSTRAP_ADMIN_PASSWORD` | First administrator (created once) | | |
| | `FPT_PUBLIC_URL` | The address people use (links in e-mails) | | |
| | `FPT_COOKIE_SECURE=always`, `FPT_TRUST_PROXY=1` | Behind an https reverse proxy | | |
| | `FPT_CORS_ORIGINS=[]`, `FPT_API_DOCS=0` | Production hardening | | |
| | `FPT_FUSION_BASE_URL`, `FPT_SECRET_FUSION_USERNAME`, `FPT_SECRET_FUSION_PASSWORD` | The Oracle Fusion test pod and its test user | | |
| | `FRONTIER_BASE_URL`, `FRONTIER_MODEL`, `FPT_SECRET_FRONTIER_API_KEY` | The external AI model (optional) | | |
| | `SUPABASE_URL`, `SUPABASE_ANON_KEY`, `SUPABASE_SERVICE_KEY`, `FPT_STATE_KEY` | Sign-in provider and encrypted backup (optional) | | |
| Secrets go in the platform's secret store, never in files in this repository. | |
| ## Deployment | |
| - **Customer cloud (Docker Compose, HTTPS, Temporal)**: [deploy/DEPLOY.md](deploy/DEPLOY.md). | |
| - **Hugging Face Space / any host without a disk**: [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md). | |
| - Operating it day to day, backups, restore and incidents: [docs/RUNBOOK.md](docs/RUNBOOK.md). | |
| ## Documentation | |
| [ARCHITECTURE](docs/ARCHITECTURE.md) 路 [SECURITY](docs/SECURITY.md) 路 [DEPLOYMENT](docs/DEPLOYMENT.md) 路 | |
| [RUNBOOK](docs/RUNBOOK.md) 路 [AUDIT](docs/AUDIT.md) 路 [CONTRIBUTING](CONTRIBUTING.md) 路 [CHANGELOG](CHANGELOG.md). | |
| The API is described by OpenAPI at `/api/docs` when `FPT_API_DOCS=1` (default in development) and in | |
| `web/src/api/openapi.json`. | |
| ## Troubleshooting | |
| | Symptom | Cause and fix | | |
| |---|---| | |
| | The app does not start, "error parsing value for field" | A setting has a malformed value; the message names it. List settings take `AP`, `AP,P2P` or `["AP"]`. | | |
| | "Test connection" on a Fusion pod fails at "Address" | The pod URL is mistyped; use the address you open Fusion with, e.g. `https://name.fa.us6.oraclecloud.com`. | | |
| | ... fails at "Sign-in" with HTTP 401 | Wrong user name or password, or the account is locked or must change its password in Fusion first. | | |
| | A full browser run is refused | The server has less than 2 GB of memory, or browser runs are switched off in Settings > Features. | | |
| | Sign-in says "paused for a few minutes" | Five wrong passwords in five minutes; wait, or reset the password. | | |
| | A yellow "saving paused" banner | The backup could not be restored at start; see RUNBOOK "Backups". | | |
| | Windows: `pip install` ends with "No such file or directory ... temporalio ..." | The clone is in a folder with a long path (Windows' 260-character limit). Clone to a short path such as `C:\src\trio`, or enable long paths in Windows. | | |