Skip to content

Commit abe9866

Browse files
committed
chore(project): update assessment and task plan for final polish
1 parent b3066b4 commit abe9866

File tree

3 files changed

+39
-22
lines changed

3 files changed

+39
-22
lines changed

ASSESSMENT.md

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,38 @@
44
## Assessor: Orchestrator
55

66
### Status Summary
7-
The project is in **Epic 43: Final Polish & Debt Paydown**. Most core functionality for Phase 1-15 is complete. Reporting (M43.1) is verified complete.
7+
The project is in **Epic 43: Final Polish & Debt Paydown**. Most core functionality for Phase 1-15 is complete. Reporting (M43.1) is verified complete. However, a deep code scan has revealed several TODOs and potential gaps that need addressing before 1.0.
88

9-
### Missing Features / Gaps
9+
### Critical Gaps (Must Fix for 1.0)
1010
1. **Event-Sourced Policy Updates (M43.2)**:
11-
* `PolicyUpdated` event is not defined in `pkg/store`.
12-
* `pkg/graph/projection.go` has a TODO to handle this event.
13-
* Currently, policy updates are applied directly to the graph via `PolicyEngine.syncGraph`, bypassing the event log. This violates strict event sourcing.
11+
* `pkg/graph/projection.go`: `PolicyUpdated` event handling is stubbed.
12+
* `pkg/graph/projection.go`: `ProviderObserved` event handling is stubbed.
13+
* Currently, policy updates bypass the event log, violating the core "Event Sourcing" non-negotiable.
1414
2. **Hardcoded Forecast Parameters (M43.3)**:
15-
* `pkg/engine/forecast/service.go` has a hardcoded `resetAt` (24 hours).
16-
* It should be derived from pool configuration.
17-
3. **Missing Tests (M43.3)**:
18-
* `pkg/mcp` has no tests.
19-
* `pkg/blob` has no tests.
20-
4. **Graph Optimization (M43.2)**:
21-
* `pkg/graph/projection.go` uses O(E) linear search for constraints. Needs adjacency list or index.
15+
* `pkg/engine/forecast/service.go`: `resetAt` is hardcoded to 24 hours. Needs to be derived from pool config.
16+
3. **Graph Performance (M43.2)**:
17+
* `pkg/graph/projection.go`: Uses O(E) linear search. Needs adjacency list index for performance.
18+
4. **Pool Identification Bug (M43.3)**:
19+
* `pkg/api/server.go`: TODO "Use the correct pool ID". This suggests the API might be logging the wrong pool ID in events.
2220

23-
### Recommendations for Improvements
24-
1. **Formalize Policy Events**: Define `EventTypePolicyUpdated` and ensure policy changes are recorded in the event log.
25-
2. **Configuration-driven Forecasts**: Inject pool configuration into the forecaster to determine correct reset windows.
26-
3. **Test Coverage**: Add unit tests for the missing packages.
27-
4. **Graph Indexing**: Implement the adjacency list in `GraphProjection`.
21+
### Moderate Gaps (Should Fix)
22+
1. **Federation Logic**:
23+
* `pkg/api/federation.go`: `RemainingGlobal` is hardcoded to 0. This might break federation decisions.
24+
2. **Poller Improvements**:
25+
* `pkg/engine/poller.go`: Missing `provider_error` event emission.
26+
* `pkg/engine/poller.go`: Units are not configurable (hardcoded "requests").
27+
3. **Provider Metadata**:
28+
* `pkg/provider/federated/provider.go`: Version hardcoded to "1.0.0".
29+
30+
### Missing Tests (M43.3)
31+
1. `pkg/mcp`: No tests.
32+
2. `pkg/blob`: No tests.
33+
34+
### Recommendations
35+
1. **Prioritize M43.2**: Finish the Graph Projection work to ensure Event Sourcing compliance.
36+
2. **Prioritize M43.3**: Fix the hardcoded `resetAt` and the API pool ID TODO.
37+
3. **New Task M43.4**: Address Federation and Poller TODOs (RemainingGlobal, configurable units).
38+
4. **Tests**: Ensure `pkg/mcp` and `pkg/blob` get at least basic coverage.
2839

2940
### Next Actions
30-
Execute `M43.2` and `M43.3` as planned in `TASKS.md`.
41+
Execute `M43.2` immediately.

NEXT_STEPS.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
- [x] **M42.5+**: Refined Policy Guide (Shared vs Isolated) and Configuration Guide (Defaults).
1515
- [x] **MCP Guide**: Created `docs/guides/mcp.md` and linked from index.
1616
- [x] **Docs Polish**: Added Financial Governance to Policy Guide and Cluster Federation to Deployment Guide.
17-
- [x] **Project Assessment**: Verified test coverage and identified missing features (Reports stub, Graph updates, hardcoded forecast). See `ASSESSMENT.md`.
17+
- [x] **Project Assessment**: Verified test coverage and identified missing features. See `ASSESSMENT.md`.
1818
- [x] **M43.1 (Reports)**: Implement real CSV generation in `pkg/reports/csv.go` and add tests.
19-
- [ ] **M43.2 (Graph)**: Implement `PolicyUpdated` handling in `pkg/graph/projection.go`.
20-
- [ ] **M43.3 (Hardening)**: Fix hardcoded `resetAt` and add tests for `pkg/mcp` and `pkg/blob`.
19+
- [ ] **M43.2 (Graph)**: Implement `PolicyUpdated` handling in `pkg/graph/projection.go` and add adjacency index.
20+
- [ ] **M43.3 (Hardening)**: Fix hardcoded `resetAt`, fix API pool ID, and add tests for `pkg/mcp` and `pkg/blob`.
21+
- [ ] **M43.4 (Cleanup)**: Address TODOs in Federation, Poller, and Provider packages (from Assessment).
2122
- [ ] **Phase 16 Continues**: Final pre-release validation and debt paydown.
2223

2324
## Phase History

TASKS.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,9 +623,14 @@ Focus: Address technical debt, stubbed features, and missing tests identified du
623623
- [ ] **M43.2: Complete Graph Projection**
624624
- [ ] Handle `PolicyUpdated` events in `pkg/graph/projection.go`.
625625
- [ ] Optimize graph traversal (Index for O(1) lookup).
626-
- [ ] **M43.3: Hardening & Configuration**
626+
- [ ] **M43.3: Hardening & Configuration**
627627
- [ ] Remove hardcoded `resetAt` in `pkg/engine/forecast/service.go`.
628+
- [ ] Fix `pkg/api/server.go` correct pool ID usage.
628629
- [ ] Add unit tests for `pkg/mcp` (Server and Handlers).
629630
- [ ] Add unit tests for `pkg/blob` (Local Store).
631+
- [ ] **M43.4: Codebase Cleanup (Assessment Findings)**
632+
- [ ] `pkg/api/federation.go`: Implement real `RemainingGlobal` lookup.
633+
- [ ] `pkg/engine/poller.go`: Make units configurable and emit error events.
634+
- [ ] `pkg/provider/federated/provider.go`: Fix hardcoded version and error details.
630635

631636

0 commit comments

Comments
 (0)