Update docs, sprint plans, and compose configuration
Add 12 new sprint files (Integrations, Graph, JobEngine, FE, Router, AdvisoryAI), archive completed scheduler UI sprint, update module architecture docs (router, graph, jobengine, web, integrations), and add Gitea entrypoint script for local dev. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,114 @@
|
||||
# Sprint 20260405-012 -- Web / JobEngine Scheduler UI Contract Repair
|
||||
|
||||
## Topic & Scope
|
||||
- The Angular UI (scheduler-ops feature) and the Scheduler WebService API have diverged: response envelope shapes, enum/state naming, run-list deserialization, and several backend-only fields are silently lost in the mapping layer.
|
||||
- Goal: make every scheduler page (schedules list, schedule detail, runs list, run detail, impact preview) render data from the real backend without silent field loss or deserialization errors.
|
||||
- Working directory: `src/Web/StellaOps.Web/src/app` (primary), `src/JobEngine/StellaOps.Scheduler.WebService` (read-only reference).
|
||||
- Expected evidence: each task produces a working UI page backed by the real scheduler API; no hardcoded mock data.
|
||||
|
||||
## Dependencies & Concurrency
|
||||
- Scheduler WebService API is stable (no planned endpoint changes).
|
||||
- May run in parallel with other FE sprints provided there is no overlap on `scheduler-ops/` or `core/api/scheduler.client.ts`.
|
||||
|
||||
## Documentation Prerequisites
|
||||
- `docs/modules/jobengine/architecture.md` -- section 8.1 (scheduler subdomain).
|
||||
- `src/JobEngine/AGENTS.Scheduler.md` -- scope definitions.
|
||||
- Backend contracts: `ScheduleContracts.cs`, `RunContracts.cs`, `Enums.cs`, `Run.cs`, `Schedule.cs` under `StellaOps.Scheduler.Models`.
|
||||
|
||||
---
|
||||
|
||||
## Delivery Tracker
|
||||
|
||||
### TASK-01 - Fix SchedulerRun model to match backend Run shape
|
||||
Status: DONE
|
||||
Dependency: none
|
||||
Owners: Frontend Developer
|
||||
|
||||
Task description:
|
||||
Updated `SchedulerRun` interface in `scheduler-ops.models.ts` to align with backend `Run` record. Mapped trigger/state enums, added stats/reason/deltas fields, removed phantom fields (output, retryCount, metadata). Added `SchedulerRunTrigger`, `SchedulerRunStats` types.
|
||||
|
||||
Completion criteria:
|
||||
- [x] `SchedulerRun` interface properties have documented correspondence to backend `Run` fields
|
||||
- [x] No silent data loss when deserializing a backend Run response
|
||||
- [x] `SchedulerRunStatus` type includes all backend RunState values
|
||||
|
||||
### TASK-02 - Fix runs list deserialization in scheduler-runs.component.ts
|
||||
Status: DONE
|
||||
Dependency: TASK-01
|
||||
Owners: Frontend Developer
|
||||
|
||||
Task description:
|
||||
Added `listRuns()`, `cancelRun(runId)`, and `retryRun(runId)` methods to `SchedulerHttpClient`/`SchedulerApi` interface. Wired `scheduler-runs.component.ts` to use `SCHEDULER_API` token instead of raw `HttpClient`. Backend `Run` objects are mapped to `SchedulerRun` via the client's `mapRun()` method. Cancel and retry now call real backend endpoints.
|
||||
|
||||
Completion criteria:
|
||||
- [x] Runs list loads from backend via `SchedulerApi.listRuns()`
|
||||
- [x] Cancel and retry call real backend endpoints
|
||||
- [x] Backend `Run` objects are properly mapped to `SchedulerRun`
|
||||
- [x] Pagination cursor is handled (at minimum: fetch first page correctly)
|
||||
|
||||
### TASK-03 - Fix Schedule model mapping (mode <-> taskType, missing fields)
|
||||
Status: DONE
|
||||
Dependency: none
|
||||
Owners: Frontend Developer
|
||||
|
||||
Task description:
|
||||
Replaced the lossy 7-type `ScheduleTaskType` with the backend's 2-value `ScheduleMode` (`analysis-only` | `content-refresh`). Added `ScheduleSelector` and `ScheduleLimits` interfaces matching backend. Removed phantom fields (`description`, `tags`, `retryPolicy`, `taskConfig`, `nextRunAt`, `concurrencyLimit`). Updated schedule-management form to use mode/selection/limits. Selection scope is now user-controllable (all-images, by-namespace, by-repository).
|
||||
|
||||
Completion criteria:
|
||||
- [x] Schedule create/update sends the correct `mode` value to the backend
|
||||
- [x] No data corruption on schedule edit round-trip (read -> edit -> save)
|
||||
- [x] Selection scope is user-controllable (at minimum: `all-images` vs `by-namespace`)
|
||||
|
||||
### TASK-04 - Fix deleteSchedule to use a real delete or document pause-as-delete
|
||||
Status: DONE
|
||||
Dependency: none
|
||||
Owners: Frontend Developer
|
||||
|
||||
Task description:
|
||||
Added `includeDisabled=false` query parameter to `listSchedules()` so paused-as-deleted schedules don't reappear on page reload.
|
||||
|
||||
Completion criteria:
|
||||
- [x] After "deleting" a schedule via UI, it does not reappear on page reload
|
||||
- [x] `listSchedules()` passes `includeDisabled=false` unless user explicitly filters
|
||||
|
||||
### TASK-05 - Fix impact preview to consume full backend response
|
||||
Status: DONE
|
||||
Dependency: none
|
||||
Owners: Frontend Developer
|
||||
|
||||
Task description:
|
||||
Updated `ScheduleImpactPreview` model to match backend `ImpactPreviewResponse` (total, usageOnly, generatedAt, snapshotId, sample). Added `ImpactPreviewSample` interface. Updated `previewImpact()` to accept a `ScheduleSelector` and map the full response. Updated the schedule-management template to display sample images in a preview table.
|
||||
|
||||
Completion criteria:
|
||||
- [x] Impact preview shows total + sample images from backend response
|
||||
- [x] Preview uses the schedule's selector, not a hardcoded one
|
||||
- [x] No synthesized fields pretend to come from the backend
|
||||
|
||||
### TASK-06 - Remove MockSchedulerClient or gate it behind a flag
|
||||
Status: DONE
|
||||
Dependency: TASK-02, TASK-03
|
||||
Owners: Frontend Developer
|
||||
|
||||
Task description:
|
||||
Removed `MockSchedulerClient` entirely from `scheduler.client.ts`. Production `app.config.ts` already uses `SchedulerHttpClient` via `useExisting`, so no mock could leak into production. The rewrite of `scheduler.client.ts` simply omitted the mock class.
|
||||
|
||||
Completion criteria:
|
||||
- [x] Production builds cannot use MockSchedulerClient
|
||||
- [x] If kept for dev, it's behind an explicit environment check
|
||||
|
||||
---
|
||||
|
||||
## Execution Log
|
||||
| Date (UTC) | Update | Owner |
|
||||
| --- | --- | --- |
|
||||
| 2026-04-06 | Sprint created; 6 tasks covering model alignment, runs wiring, schedule mapping, delete behavior, preview enrichment, and mock removal. | Planning |
|
||||
| 2026-04-06 | All 6 tasks implemented. Models rewritten, client rewritten, components updated, tests updated. Build clean, 48/48 tests pass. Fixed pre-existing I18nService DI issue (`@Inject(HttpBackend)` decorator). | Developer |
|
||||
|
||||
## Decisions & Risks
|
||||
- **Decision: reduced taskType to mode** -- The 7-type taxonomy was a UI-only concept. The backend supports 2 modes (AnalysisOnly, ContentRefresh). UI now matches backend exactly.
|
||||
- **Decision: backend contracts are stable** -- This sprint only modified the Web UI. The I18nService `@Inject` fix is a minor DI decorator addition.
|
||||
- **Decision: pause-as-delete with filter** -- `listSchedules()` now passes `includeDisabled=false`. True soft-delete would require a backend change (out of scope).
|
||||
- **Risk: scheduleName resolution for runs** -- Backend `Run` only carries `scheduleId`, not `scheduleName`. Current UI shows scheduleId as name. A follow-up sprint could batch-resolve names from the schedules list.
|
||||
|
||||
## Next Checkpoints
|
||||
- All tasks DONE. Sprint ready for archive.
|
||||
Reference in New Issue
Block a user