Files
ScadaBridge/archreview/plans/PLAN-05-templates-deployment-transport.md.tasks.json
T

32 lines
12 KiB
JSON

{
"planPath": "archreview/plans/PLAN-05-templates-deployment-transport.md",
"tasks": [
{ "id": 1, "subject": "Task 1: Wire template inheritance edges in the import apply path", "status": "completed", "blockedBy": [] },
{ "id": 2, "subject": "Task 2: Import-time acyclicity check over the merged template graph", "status": "completed", "blockedBy": [1] },
{ "id": 3, "subject": "Task 3: Carry MinTimeBetweenRuns/ExecutionTimeoutSeconds through import", "status": "completed", "blockedBy": [2] },
{ "id": 4, "subject": "Task 4: Add LockedInDerived to template child DTOs and apply paths", "status": "completed", "blockedBy": [3] },
{ "id": 5, "subject": "Task 5: Transport template NativeAlarmSources end-to-end", "status": "completed", "blockedBy": [4] },
{ "id": 6, "subject": "Task 6: Single-source per-entity field comparers for diff + sync", "status": "completed", "blockedBy": [5] },
{ "id": 7, "subject": "Task 7: Export real AreaName (finish half-shipped Area transport)", "status": "completed", "blockedBy": [] },
{ "id": 8, "subject": "Task 8: Round-trip export→import equivalence test suite", "status": "completed", "blockedBy": [5, 6, 7] },
{ "id": 9, "subject": "Task 9: Fix repeated-composition member loss in FlatteningService", "status": "completed", "blockedBy": [] },
{ "id": 10, "subject": "Task 10: Fix CollisionDetector blindness under repeated composition", "status": "completed", "blockedBy": [9] },
{ "id": 11, "subject": "Task 11: Add NativeAlarmSources to RevisionHashService (planned hash migration)", "status": "completed", "blockedBy": [13] },
{ "id": 12, "subject": "Task 12: Add NativeAlarmSources to DiffService", "status": "completed", "blockedBy": [13] },
{ "id": 13, "subject": "Task 13: Enforce locks on native alarm source overrides", "status": "completed", "blockedBy": [] },
{ "id": 14, "subject": "Task 14: Script-artifact invalidation contract — Commons seam + Transport publisher (plan-06 handoff)", "status": "completed", "blockedBy": [] },
{ "id": 15, "subject": "Task 15: Cache script compile verdicts by code hash", "status": "completed", "blockedBy": [] },
{ "id": 16, "subject": "Task 16: Skip script compilation on read-only staleness/comparison paths", "status": "completed", "blockedBy": [] },
{ "id": 17, "subject": "Task 17: Isolate the post-success deployment audit write", "status": "completed", "blockedBy": [16] },
{ "id": 18, "subject": "Task 18: Delete NotDeployed instances without a site round-trip", "status": "completed", "blockedBy": [17] },
{ "id": 19, "subject": "Task 19: Import blocker heuristic — local-declaration exclusion, denylist additions, warning severity", "status": "completed", "blockedBy": [6] },
{ "id": 20, "subject": "Task 20: Run the script trust gate on bundle import", "status": "completed", "blockedBy": [19] },
{ "id": 21, "subject": "Task 21: Harden the ScriptTrustPolicy deny-list", "status": "completed", "blockedBy": [] },
{ "id": 22, "subject": "Task 22: Bound LineDiffer input size", "status": "completed", "blockedBy": [] },
{ "id": 23, "subject": "Task 23: Fix ArtifactDiff placeholder-identity comparisons", "status": "completed", "blockedBy": [20] },
{ "id": 24, "subject": "Task 24: Low-severity cleanup batch (session cap, full error lists, semantic-validator warning)", "status": "completed", "blockedBy": [15, 19] },
{ "id": 25, "subject": "Task 25: Design-doc + CLAUDE.md sync sweep and deferred-decision ledger", "status": "completed", "blockedBy": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24] }
],
"lastUpdated": "2026-07-10 (PLAN COMPLETE — 25/25. T25 (docs sweep) done: Component-Transport (scripts/ not-impl, field-completeness list, LineDiffer input cap, rename call-site limitation, preview→apply/session-cap decisions), Component-TemplateEngine (alarm-override granularity corrected), Component-DeploymentManager (OperationLockManager per-node invariant + T17 audit isolation), CLAUDE.md #24 blurb + Transport bullet; Component-ScriptAnalysis fifth-call-site/deny-list already synced in T20/T21; no scadaproj/CLAUDE.md change needed; stale-ref sweep clean. Commit 8e563107. TERMINAL VERIFICATION: full slnx build 0/0; full `dotnet test` sweep — ALL unit+integration suites GREEN (~5900 tests incl. Transport 96 integ/138 unit, TemplateEngine 466, CentralUI 890, Commons 596, SiteRuntime 493, ConfigurationDatabase 337, AuditLog 318, DataConnectionLayer 224, InboundAPI 243, Communication 263, Host 260, IntegrationTests 72, StoreAndForward 141, SiteEventLogging 60, SiteCallAudit 55); direct CLI.Tests 341 GREEN. ONLY residue: 8 CentralUI.PlaywrightTests (Deployment DebugView/Realtime/Action/Topology) fail with `SQLite Error 14: unable to open database file` on `instance deploy` — ENVIRONMENTAL (needs live docker cluster, not running locally; same known residue as PLAN-04; unrelated to this plan's Transport/import changes — my CentralUI change was only TransportImport.razor). NEXT: finishing-a-development-branch (branch worktree-archreview-wave3-plan05 off main dbd3ed2f, unmerged, HEAD after tasks-sync) — presented 4 merge options, awaiting user choice. PREV Wave 7: T19, T20, T23, T24 done — 24/25. All in-worktree serial via BundleImporter/ArtifactDiff. T19 (import blocker severity split): name-resolution findings split by ORIGIN — template-script refs = advisory ConflictKind.Warning + ImportResult.Warnings (deploy gate re-validates); ApiMethod refs = hard SemanticValidationException/Blocker. Roslyn-parsed local-decl exclusion; KnownNonReferenceNames extended (BCL/LINQ/SQL). Rollback/hard-fail tests retargeted to ApiMethods (still-hard-failing vehicle). CentralUI Warning badge/advisory. Commit c60347c5. T20 (script trust gate on import — 5th ScriptTrustValidator call site, security): new Pass 0 in RunSemanticValidationAsync runs FindViolations over every non-Skip template/shared/ApiMethod body BEFORE name resolution — hard error all kinds, short-circuits so never masked. DetectBlockersAsync mirror for preview parity. Transport gains direct ScriptAnalysis projref. Commit 523e6705. CODE-REVIEW (code-reviewer subagent, security-adversarial) → 2 Important findings FIXED in commit 039cf69c: (1) also gate template-script + alarm EXPRESSION-trigger bodies (they compile+execute at site) via EnumerateTrustGatedScripts+ExtractTriggerExpression; (2) per-origin local-decl sets (global set silently defeated the ApiMethod hard-blocker); +fail-closed try/catch per script, +corrected misleading attribute-Value comment. T23 (ArtifactDiff placeholder-identity): CompareTemplate gains folderNameById/templateNameById maps; Folder/Base/CompositionTargetNameOf resolve real names (fallback <id:N> only when map absent/misses) → unchanged structured templates classify Identical; PreviewAsync builds templateNameById from GetAllTemplatesAsync + threads both. Commit 92e713f1. T24 (low-sev batch): TransportOptions.MaxConcurrentImportSessions=8 (BundleSessionStore.Open cap); ScriptCompiler joins ALL violations/errors (not [0]); SemanticValidator advisory warning on leaf-name-only CallScript resolution. Commit 0642d3b9. Combined build 0/0; Transport 96 integ/138 unit, TemplateEngine 466, CentralUI import 14, SiteRuntime validation/deploy 69, Commons transport 45, ManagementActor 110. HEAD after tasks-sync. NEXT = T25 ONLY (docs sweep, blockedBy all): Component-Transport.md (scripts/ dir note, transported-entity list, blocker/warning severity split, LineDiffer cap, rename call-site limitation, preview→apply window) + Component-ScriptAnalysis (done partly in T20) + CLAUDE.md sync + deferred-decision ledger — MUST also record the 5 T8-surfaced fidelity fixes, T14 plan-06 handoff, and the T20-review expression-trigger-gate + deferred items. Then full dotnet build+test sweep + CLI.Tests, then finishing-a-development-branch (branch unmerged off main dbd3ed2f).) PREV: (Wave 6 COMPLETE: T6, T8, T14 done — 20/25. T6 (single-source TemplateChildEquality: new file + ArtifactDiff + 4 BundleImporter sync predicates all route through it, complete field set incl. alarm on-trigger by name) in-worktree. T14 (ScriptArtifactsChanged Commons seam + Host InProcessScriptArtifactChangeBus singleton + BundleImporter optional dep + post-commit publish; consumer=plan06) in-worktree. T8 (round-trip reflection equivalence suite, 10 facts/23 entity types) via off-main isolated agent (reset to plan HEAD 38edfefc, committed e498c6e1) — it SURFACED 5 genuine silent-data-loss holes (3 red tests); per T8's 'fix in importer/exporter not the test' discipline I FIXED all 5 (commit 7c74bbe4): ES MaxRetries/RetryDelay on Add+Overwrite, ES methods on Add (new PersistAddedExternalSystemMethodsAsync post-flush pass — no parent nav), NotificationRecipient export (Include), TemplateFolder.ParentFolderId on Add (new ResolveFolderParentEdgesAsync rewire). Commits: 38edfefc T6, 2c839def T14, e498c6e1 T8-suite, 7c74bbe4 T8-fixes. Combined build 0/0; Transport 135 unit/86 integ, ConfigurationDatabase 337, NotificationService 55, Host bus 5 + CompositionRoot 96, ArtifactDiff 25. HEAD 7c74bbe4 (pre-tasks-sync). Ready set now: {19 (import blocker heuristic — BundleImporter, in-worktree serial after T6✓), 24 (blockedBy 15✓+19 → ready AFTER 19)}. Chain remaining: T19→T20→T23 all in-worktree serial via BundleImporter; T23 fixes ArtifactDiff placeholder-identity; T24 low-sev cleanup batch; T25 docs+ledger sweep LAST (blockedBy all). Only 5 tasks left: 19,20,23,24,25.) PREV: (Wave 5 COMPLETE: T5 done — 17/25. T5 (transport template NativeAlarmSources end-to-end) in-plan-worktree, high-risk: new TemplateNativeAlarmSourceDto + init-only TemplateDto.NativeAlarmSources (empty default, additive) + export/FromBundleContent/BuildTemplate wiring + new SyncTemplateNativeAlarmSourcesAsync Overwrite child-sync + ArtifactDiff.CompareTemplate DiffChildren. Proven by end-to-end flatten test (instance native-alarm-source override that dangled pre-fix now resolves). Code-reviewed (code-reviewer subagent: no substantive defects; folded 2 test-coverage gaps — no-change zero-audit + IsInherited/LockedInDerived fidelity — into a follow-up test commit). Commits: e4136cb9 T5 + 7b6d6bb8 test-hardening. Combined build 0/0; Transport 131 unit / 74 integ. HEAD 7b6d6bb8 (pre-tasks-sync). Ready set now: {6 (single-source TemplateChildEquality — BundleImporter+ArtifactDiff, in-worktree serial after T5✓), 14 (Commons+Host+BundleImporter publish hook)}. Chain remaining: T6→T19→T20→T23 all in-worktree serial via BundleImporter/ArtifactDiff; T8 (round-trip reflection suite, test-only) unblocks after T6 (5,7 already done). T24 needs T19. T25 docs last.) PREV: (Wave 4 COMPLETE: T4, T11, T12 done — 16/25. T4 (LockedInDerived on template child DTOs: EntityDtos+EntitySerializer+BundleImporter, additive trailing bool) done in-plan-worktree (opens the serial BundleImporter chain, high-risk); T11 (RevisionHashService NativeAlarmSources, null-when-empty surgical hash, pinned baseline) + T12 (DiffService+ConfigurationDiff NativeAlarmSources, generic DiffEntry<T>) via off-main isolated agents — BOTH had to cherry-pick T13 (57f7f657) into their off-main base first since ResolvedNativeAlarmSource.IsLocked is absent on main; grafted their fix commits (0cd01772→0302694f, cbc70c4d→d8332199) onto the plan branch which already has T13. Combined build 0/0 + suites green: Transport 130 unit/69 integ, TemplateEngine 463, DeploymentManager 112. HEAD d8332199. Ready set now: {5 (BundleImporter chain, in-worktree serial after T4✓), 14 (Commons+Host+BundleImporter publish hook — serialize w/ T5 chain), 24 (blockedBy 15✓,19-pending → still blocked)}. Chain remaining: T5→T6→T19→T20→T23 all in-plan-worktree serial through BundleImporter.cs; T8 (round-trip test suite) after 5,6,7✓. T14 also edits BundleImporter → serialize with the chain, NOT parallel.)"
}