You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> *"If I change this foundation object, how many positions will break - and which ones?"*
70
74
71
-
Before making a foundation change, know exactly what downstream impact it will have. The tool will let you simulate a proposed change and surface every affected Position and Job Information record - giving your team a remediation list before the change is applied, not after.
75
+
Before making a foundation change, know exactly what downstream impact it will have. Simulate a proposed change against the locally cached extract and get a full impact report - newly failing positions, newly passing positions, and a per-check breakdown - before anything is touched in the live tenant.
72
76
73
-
**Real-world scenarios this will handle:**
77
+
**Real-world scenarios:**
74
78
75
79
| Foundation Change | Impact Question |
76
80
|---|---|
@@ -80,7 +84,39 @@ Before making a foundation change, know exactly what downstream impact it will h
80
84
| Job Code Career Path updated | How many positions have a mismatched Career Path after the change? |
81
85
| Division relinked to a different Business Unit | Which positions will fail the Division → BU alignment check? |
82
86
83
-
This replaces what is currently a manual process - running multiple SF reports, cross-referencing in Excel, and hoping nothing was missed - with a single command that produces a structured impact report.
|`reparent`| Updates a navigation link on a foundation record (e.g. move a Department to a different Division). Affects CHK-01 to CHK-05. |
117
+
|`field_change`| Updates a scalar field on a foundation record (e.g. change a Job Code's grade). Affects CHK-06 to CHK-09. |
118
+
119
+
Zero OData calls are made. The simulation runs entirely against the local SQLite cache.
84
120
85
121
---
86
122
@@ -100,6 +136,44 @@ This replaces what is currently a manual process - running multiple SF reports,
100
136
101
137
Rules are defined in `config/rules.yaml`. Each rule has an `enabled` flag and a `visible` flag - see [Customising rules](#customising-rules) for details.
102
138
139
+
### Auto-Remediation Payload Generation
140
+
141
+
For issues on CHK-01 to CHK-09, the tool can derive the correct value from the locally cached foundation data and generate an OData PATCH payload ready to apply back to the tenant.
142
+
143
+
```python
144
+
from remediation import build_remediation_pack, apply_remediation
145
+
146
+
# Build payloads from an existing issues list + cached lookups + positions
Tests cover: SQLite schema structure, CHECK constraints, date normalisation, junction table population, all integrity checks (CHK-01 to CHK-09 pass + fail cases), validation result persistence, audit SQL views, and pipe-separated junction saving.
494
+
| Test file | Coverage |
495
+
|-----------|---------|
496
+
| `test_schema.py` | SQLite schema structure, CHECK constraints, date normalisation, junction table population, all integrity checks (CHK-01 to CHK-09 pass + fail cases), validation result persistence, audit SQL views. |
497
+
| `test_simulator.py` | Mode 2 simulation: reparent causes new failures, reparent fixes existing failures, field_change breaks matching positions, zero impact on orphan entity, junction update, result structure, invalid entity/change type errors. |
498
+
| `test_remediation.py` | All 9 check types generate correct payloads, HIGH vs MEDIUM confidence, skipped cases (position not found, blank source value), dry-run JSON + Excel output, apply result structure. |
421
499
422
500
---
423
501
424
502
## Roadmap
425
503
426
-
- **Mode 2: Pre-Change Impact Analysis** - simulate a proposed foundation change (e.g. deactivate a Cost Centre, move a Sub Department) and surface every affected Position and Job Info record before the change is applied
504
+
- **Mode 2 web UI** - expose the simulation engine and remediation pack builder via the Flask web interface (currently Python API only)
427
505
- **Additional check types** - `not_null` rule type and custom expression checks via `rules.yaml`
428
506
- **Multi-country parallel runs** - fan out across all active countries in a single execution
507
+
- **Live apply** - `dry_run=False` path wired to the web UI with an explicit confirmation step
0 commit comments