config editor

This commit is contained in:
2026-08-21 01:18:19 -04:00
parent c30ef6ec24
commit 01d08e635c
15 changed files with 1501 additions and 16 deletions
+34 -8
View File
@@ -28,16 +28,21 @@ pass offline Pester tests before any Graph integration exists.
Single PowerShell module at repository root: `src/`, `tests/`, `config/`, `docs/`, `pipelines/`,
per the Project Structure section of [plan.md](plan.md).
## Implementation status — 2026-08-20
## Implementation status — 2026-08-21
**109 of 121 tasks complete.** All twelve remaining tasks require something this workstation does not
**117 of 129 tasks complete.** All twelve remaining tasks require something this workstation does not
have: a tenant connection (T055, T056, T101T103) or an Azure Automation account (Phase 13,
T115T121). Nothing offline-implementable is outstanding.
T122T129 (interactive add/edit/delete for rules, FR-027FR-030) landed after the initial Phase 6
build, which had shipped with toggle/priority editing only. 400 offline Pester tests now pass (up
from 354); see [traceability.md](traceability.md) for FR-027FR-030's implementation and test
mapping.
```
354 offline Pester tests PASS
400 offline Pester tests PASS
Engine purity (Principle IV) PASS
Sanitization (SC-013) PASS 156 files
Sanitization (SC-013) PASS
Graph module loaded during tests False (SC-008 holds)
```
@@ -235,7 +240,28 @@ documented finding code, severity, and location.
- [X] T069 [US5] Implement the timestamped backup and Save-As path in Edit-PersonaEngineConfig.ps1 (FR-026)
- [X] T070 [US5] Implement synthetic rule testing via `-TestDataPath` in Edit-PersonaEngineConfig.ps1, reusing the rule engine with no tenant connectivity (FR-025)
**Checkpoint**: invalid configurations cannot reach the engine or overwrite a good file.
### Rule CRUD in the interactive editor (US5 addition — FR-027FR-030)
Added after the initial Phase 6 build. The editor originally shipped deliberately scoped to
toggle/priority only (see the `Invoke-InteractiveEditor` comment header); spec.md now requires
add/edit/delete, including full condition-tree editing, so that scope is reversed here rather than
worked around.
#### Tests for rule CRUD
- [X] T122 [P] [US5] Add-rule tests in tests/Configuration/EditorAddRule.Tests.ps1 covering the full field/condition-tree prompt sequence and rejection of a duplicate `id` or `priority` before the rule is added (FR-027)
- [X] T123 [P] [US5] Edit-rule tests in tests/Configuration/EditorEditRule.Tests.ps1 covering top-level field changes and condition-tree add/edit/remove/renest operations within `MaxConditionDepth` (FR-028)
- [X] T124 [P] [US5] Delete-rule tests in tests/Configuration/EditorDeleteRule.Tests.ps1 covering the `id`/`name`/`priority` confirmation prompt and removal, including a declined confirmation leaving the rule in place (FR-029)
- [X] T125 [P] [US5] Structural-edit validation tests in tests/Configuration/EditorStructuralEdits.Tests.ps1 asserting add/edit/delete changes stay in memory until save, re-validate through all four layers on `[V]`/`[S]`, and that a depth-limit violation is reported immediately at edit time rather than deferred (FR-030)
#### Implementation for rule CRUD
- [X] T126 [US5] Implement rule addition (prompt for every RE-001 field plus the condition tree, reject a colliding `id`/`priority`) in Edit-PersonaEngineConfig.ps1 and wire the `[A]` command into the interactive loop (FR-027)
- [X] T127 [US5] Implement rule editing (top-level fields plus add/edit/remove/renest on the condition tree) in Edit-PersonaEngineConfig.ps1 and wire the `[E]` command into the interactive loop (FR-028)
- [X] T128 [US5] Implement rule deletion with an `id`/`name`/`priority` confirmation prompt in Edit-PersonaEngineConfig.ps1 and wire the `[D]` command into the interactive loop (FR-029)
- [X] T129 [US5] Route add/edit/delete through the existing `$dirty` tracking and `Invoke-ConfigurationValidation` re-validation path in Edit-PersonaEngineConfig.ps1, and surface a depth-limit finding at edit time using the same check the runtime validator uses (FR-030)
**Checkpoint**: invalid configurations cannot reach the engine or overwrite a good file, and rules can be added, edited, and deleted entirely from the editor.
---
@@ -430,7 +456,7 @@ reads the audit shape US7 defines.
| 3 | T016T020 (all tests, separate files) |
| 4 | T027, T028, T029 |
| 5 | T034T038 (tests); then T039, T040 |
| 6 | T057T060 |
| 6 | T057T060; then T122T125 |
| 7 | T071, T072 |
| 8 | T077, T078 |
| 9 | T083, T084, T085 |
@@ -470,7 +496,7 @@ Automation PowerShell 7 run.
| 3 | US2 (P1) | T016T026 | 11 |
| 4 | US3 (P1) | T027T033 | 7 |
| 5 | US1 (P1) 🎯 | T034T056 | 23 |
| 6 | US5 (P2) | T057T070 | 14 |
| 6 | US5 (P2) | T057T070, T122T129 | 22 |
| 7 | US6 (P2) | T071T076 | 6 |
| 8 | US4 (P2) | T077T082 | 6 |
| 9 | US7 (P2) | T083T090 | 8 |
@@ -478,4 +504,4 @@ Automation PowerShell 7 run.
| 11 | US8 (P3) 🔒 | T095T103 | 9 |
| 12 Polish | — | T104T114 | 11 |
| 13 Stage B | — | T115T121 | 7 (deferred) |
| **Total** | | | **121** |
| **Total** | | | **129** |