Deploy 4673339: approve before the pod, switch values never redacted, Fusion summary
8af8281 verified |
Download docs/DISCOVERY.md from EnergyVenom/patch-testing-coworker: direct link, hf CLI and curl.
- Browser
- Download file 12.4 kB
-
https://huggingface.co/spaces/EnergyVenom/patch-testing-coworker/resolve/main/docs/DISCOVERY.md
- Command line
-
hf download hf://spaces/EnergyVenom/patch-testing-coworker/docs/DISCOVERY.md
-
curl -L -o DISCOVERY.md https://huggingface.co/spaces/EnergyVenom/patch-testing-coworker/resolve/main/docs/DISCOVERY.md
12.4 kB
| # Pod discovery: what the scout reads from any Oracle Fusion pod | |
| Every Oracle Fusion pod registered in Patchwise is read the same way. Nothing about one particular pod is built in. | |
| ## When it runs | |
| - **At the start of every run** on a Fusion pod (the scout step). The result is saved on the pod. | |
| - **On demand** with **Discover business areas** on the Test environments page (anyone who may start runs), for | |
| example right after adding a pod and its sign-in details. | |
| Discovery is read-only: GET requests to the pod's REST services through the egress gate, with the pod's test user. | |
| ## What it finds | |
| **Business areas.** For each area of the catalog (`coworker/platform/fusion_catalog.py`), the record counts of a few | |
| standard REST resources give its status: | |
| | Status | Meaning | What to do | | |
| |---|---|---| | |
| | In use | At least one resource has records | Runs can test it | | |
| | Set up, no records yet | The services answer but hold no records | Runs can test it if you ask for it | | |
| | The test user cannot read it | HTTP 403 | Give the test user the area's roles, then discover again | | |
| | Not on this pod | HTTP 404 for every resource | Nothing | | |
| | Did not answer | Timeout or server error | Discover again | | |
| A refused sign-in (HTTP 401) stops discovery and says so. | |
| A run may target the areas found **in use** or **set up**. With no business area chosen, a run tests the areas in use. | |
| Before the first discovery, any catalog area may be chosen; the run's scout discovers first and stops with a clear | |
| message if none of the chosen areas is on the pod. | |
| **Test data.** For each area in use, the most frequent values in its latest records (for Payables: business unit, | |
| supplier, supplier site, currency, payment terms, invoice type and the distribution account of recent invoice lines). | |
| Test steps use them as `{{pod.<area>.<key>}}`, for example `{{pod.ap.supplier}}`. | |
| - The values are the client's data. They are stored on the pod, passed only to the test runner (`FUSION_TESTDATA`), | |
| added to the redaction list, and never sent to an AI model or written to the audit log (it records only the keys). | |
| - An admin can set their own value for any key (**Set test data**); it wins over the discovered one. An empty value | |
| goes back to the discovered one. | |
| - **Values from the screens' lists.** While the screens are read, the scout opens up to 8 list fields per screen | |
| (required ones first) and keeps up to 5 choices each: what THIS test user is offered (a ledger, an accounting | |
| period, a journal source, a business unit the user may work in). Each list's label becomes a key ("Journal Source" | |
| -> `journal_source`), and so does each catalog key it names ("Procurement BU" is also `business_unit`). They are | |
| kept apart from the screen inventories (the AI sees labels only), and the AI may use every key the pod has. | |
| - **Several values per key, tried in order.** A step whose value is one pod placeholder tries the pod's values in | |
| turn until Fusion accepts one: the admin's own, the one Fusion last accepted, then what this user is offered (the | |
| records' values its screens' lists also offer, most used first, then the lists' other choices), and last the other | |
| records' values, often other users' business units (`FUSION_TESTDATA_CANDIDATES`, at most 6 per key). Fusion refuses a value by marking the field in error, opening | |
| its search window, or an error message (a business unit whose ledger has no open period); the next value is typed | |
| over it. The value that worked is used for the rest of the test and remembered for the pod | |
| (`FPT_TESTDATA_USED` -> `test_data_learned`), so the next run starts with it. | |
| - If no value is accepted, the step fails naming the key, the values tried and where to set one. An empty list for | |
| this user (no business unit to choose as a buyer) fails saying the user's access is missing. There are no built-in | |
| fallback values. | |
| ## The release, and what it changes | |
| Oracle Fusion's REST services do not say which quarterly update a pod runs, so the release (for example `26C`) is | |
| recorded on the pod: chosen when adding it, or changed on its card. A release typed when starting a run wins. | |
| The research step then reads Oracle's **What's New** for that release from docs.oracle.com | |
| (`coworker/platform/release_notes.py`), for each business area being tested: | |
| - Each area names its guide in the catalog (`readiness`: for example Payables reads Financials, `erp/26c/fins26c`; | |
| Purchasing reads Procurement, `scm/26c/proc26c`). | |
| - The guide's **Feature Summary** table (Module, Feature, Tags, Impact to Existing Processes, Action to Enable) is read | |
| as data, no model involved. A guide shared by several areas is split by its Module column; a feature in a shared | |
| module (Local Compliance & Reporting) goes to the area its title names. | |
| - Features with **Action to Enable: None** are switched on by the update itself, so they are listed first. The opening | |
| text of up to 30 features per area is read from their own pages. | |
| - Every change keeps its link to Oracle's page. Guides are cached per release, so each is read once. | |
| - A release Oracle has not published (yet) is said plainly on the run, as is a pod without a release: the run goes on | |
| without release changes rather than with invented ones. | |
| This is public content. It goes through the egress gate, which allows only docs.oracle.com for research. | |
| ## Screens | |
| The AI test designer writes steps only with labels it has seen on the pod's own screens. **Read screens** on the pod's | |
| card (admins, after Discover) collects them: | |
| - For each area in use, a real browser signs in once with the test user and opens the area's work areas (the catalog's | |
| `navigator`, for example `Payables > Invoices`), lists the tasks in their Tasks panel, and picks up to 4 to read: | |
| Create first, then Manage, then Enter/Submit/Review. Imports, spreadsheets, reports and batch processes are skipped. | |
| - Each chosen task's screen is recorded: field labels and kinds, buttons, menus, sections and table columns | |
| (`automation/scripts/explore-fusion.ts`, `automation/src/fusion/capture.ts`). Never a value, list option, user or | |
| address; a file that breaks this rule is deleted. Every page is left with Cancel: nothing is saved on the pod. | |
| - It runs in the background (several minutes per area); the card shows the latest step, then per area how many screens | |
| were read, which tasks could not be read and which work areas were not found (a name to correct in the catalog). | |
| - Screens are kept per pod (`FPT_HOME/screens/<pod id>/`), because pods differ by release and setup. A run's test | |
| designer uses that pod's screens for every area it tests; the screens kept with the library are a fallback. They are | |
| part of the saved state, so a restart keeps them. | |
| - **They are read when the pod is set up, not during a run.** As soon as Discover finds the areas in use (or the pod's | |
| release changes), the screens of those areas are read in the background (`FPT_FUSION_SCREENS_ON_SETUP`, default on). | |
| A run that starts meanwhile waits for that read instead of repeating it. | |
| - **Several browsers read at once** (`FPT_FUSION_WORKERS`, default 3): one sign-in, whose session the others share, | |
| and each browser takes the next area. Fusion's own server is the slow part, so a small server handles 3 well. | |
| - **An area the user cannot open costs little:** its reading stops after 3 failed tasks in a row or | |
| `FPT_FUSION_SCREENS_AREA_MINUTES` (default 20), and an area read on this release is not read again at every run | |
| even when it showed nothing: a new release, or Read screens on the card, reads it again. | |
| ## From the release's changes to test scenarios | |
| On a Fusion pod, the run's coverage view is the release's own changes, not the practice app's coverage maps: | |
| - **One row per change** of each area tested, ranked (`research.change_score`): a change the update switches on by | |
| itself and that Oracle says affects existing processes first, then other switched-on changes, then opt-in, then | |
| those that need setup; scaled by how much the pod uses the area (discovery record counts). | |
| - **The AI test designer** gets, per area, the pod's screens, the area's processes and the ranked changes with Oracle's | |
| facts (switched on or not, impact, action to enable; never links or pod data). It covers the changes its screens can | |
| show first, adds at least one regression scenario of the core process, and names the change each scenario covers. | |
| It asks for `FPT_FUSION_AI_SCENARIOS` scenarios per area plus one per switched-on change, at most | |
| `FPT_FUSION_AI_SCENARIOS_MAX` (default 8) and two per screen read. | |
| - Each scenario is still written as steps checked against the screen and approved by a person before the run. | |
| **Nothing runs on the pod before that approval:** the test run is the first time a scenario runs there (so its data | |
| is created once), and shows where each one stops. `FPT_FUSION_AI_DRY_RUN=1` dry-runs them on the pod before the | |
| approval instead (offering only those that pass; they save on the pod then too). A change covered by a scenario of | |
| the run stops being a gap; the rest are listed as not covered yet. | |
| - The practice-app proposals ("generated smoke" drafts from coverage maps) are not made on a real pod. | |
| - **A full browser run is autonomous:** before designing, it reads the screens of the areas it tests that have none | |
| on the pod yet, or were read on another release (usually none: they were read when the pod was set up). A quick | |
| simulation never opens the pod. The run says per area how many scenarios were written and offered (or, with the dry | |
| run on, how many passed it) and which changes they cover. | |
| - **Areas are designed side by side** (`FPT_FUSION_WORKERS` at a time): the model's answers are the slow part. | |
| - **Tests run side by side and sign in once.** A test run (or dry run) on a Fusion pod signs the test user in once | |
| (`automation/src/fusion/session.ts`); every test starts from that session (the file holds session cookies, never the | |
| password, and is deleted when the run ends), and `FPT_FUSION_WORKERS` tests run at once. The Live tab follows the | |
| first browser. Tasks of the work area already open are opened from its Tasks list without going home first. | |
| ## Test steps for any screen | |
| The step runner (`automation/src/fusion/steps.ts`, `ui.ts`) runs the same actions on every Fusion screen; the step | |
| writer accepts them only with the screen's own labels, tables, columns and menus: | |
| | Action | What it does | | |
| |---|---| | |
| | `enter` | Types in a field, or chooses in a drop-down list, then leaves it so Fusion runs its defaults | | |
| | `add_row`, `enter_in_row` | Adds a row to a section's table and fills the new row's columns | | |
| | `menu_action` | Chooses an entry of any of the page's menus | | |
| | `click`, `save`, `confirm_if_asked`, `cancel_without_saving` | Buttons, Save, confirmations, leaving without saving | | |
| | `expect_filled`, `expect_value`, `expect_status` | Fields Fusion filled, a field's value, the document's status | | |
| | `expect_no_error`, `expect_message` | No error message; a message containing given words | | |
| | `expect_results` | A search found at least one result | | |
| The Payables actions (`add_line`, `invoice_action`) stay for the Payables library scenarios. | |
| ## Adding or changing business areas | |
| A deployment can add areas, or change the built-in ones, without a code change: put a JSON list in | |
| `FPT_HOME/fusion_areas.json`, each entry in the catalog's shape. An entry whose `code` matches a built-in area | |
| replaces the fields it gives; new codes are added. | |
| ```json | |
| [ | |
| {"code": "HCM", "id": "hcm", "name": "Human Capital", "probes": ["workers"], | |
| "processes": ["Hire", "Transfer", "Terminate"], | |
| "test_data": [{"resource": "workers", "fields": {"legal_employer": "LegalEmployerName"}}]} | |
| ] | |
| ``` | |
| Entries without a code, a name and plain resource names are ignored, with a warning in the log. | |
| ## API | |
| | Call | Who | What | | |
| |---|---|---| | |
| | `POST /api/pods/{id}/discover` | may start runs | Discover now; returns the pod with `discovery`, `test_data`, `run_areas` | | |
| | `PUT /api/pods/{id}/test-data` | admin | `{"overrides": {"AP": {"supplier": "..."}}}`; an empty value removes one | | |
| | `PATCH /api/pods/{id}` | admin | `{"release": "26C"}` | | |