Description
Once SQLite-backed correlation state exists, Regression Suite needs a public MCP query surface for bounded inspection of persisted correlation information. This story exposes correlation_state through artifact_management as a query-oriented state surface for lookup by run, key type/value, plan, status, and correlation session.
This story should define the public request/response shape, filtering behavior, paging, sorting, and fail-closed behavior for correlation_state queries.
Scope
In scope:
- Add
correlation_state as a public artifact_management state surface
- Expose
query support for persisted correlation state
- Support bounded filtering by
projectName, planName, runId, status, keyType, keyValue, and correlationSessionId
- Support deterministic paging and sorting for enterprise-scale correlation history
- Keep the public surface query-oriented and read-only for runtime-owned rows
Out of scope:
- Legacy migration/backfill action semantics
- Watcher-specific query semantics
- Storage implementation internals
- Manual mutation of runtime-owned correlation rows
Acceptance Criteria
artifact_management supports public query access for correlation_state
- Query behavior is bounded, deterministic, and fail-closed
- Correlation-specific lookup fields are supported in the public contract
- Paging and sorting are supported for large correlation histories
- Response output is sufficient for agents/users to inspect bounded correlation state without loading full Artifact history by default
Implementation Notes
- Keep correlation-state results focused on stable query fields rather than full raw timeline payload expansion by default.
- Preserve deterministic lookup semantics for key/session-oriented enterprise debugging.
Testing
UT for correlation_state query validation and correlation-specific filter normalization
UT for paging/sorting behavior on correlation histories
IT for key/session/status-based correlation_state queries
IT for fail-closed behavior on invalid or contradictory query inputs
Description
Once SQLite-backed correlation state exists, Regression Suite needs a public MCP query surface for bounded inspection of persisted correlation information. This story exposes
correlation_statethroughartifact_managementas a query-oriented state surface for lookup by run, key type/value, plan, status, and correlation session.This story should define the public request/response shape, filtering behavior, paging, sorting, and fail-closed behavior for
correlation_statequeries.Scope
In scope:
correlation_stateas a publicartifact_managementstate surfacequerysupport for persisted correlation stateprojectName,planName,runId,status,keyType,keyValue, andcorrelationSessionIdOut of scope:
Acceptance Criteria
artifact_managementsupports publicqueryaccess forcorrelation_stateImplementation Notes
Testing
UTforcorrelation_statequery validation and correlation-specific filter normalizationUTfor paging/sorting behavior on correlation historiesITfor key/session/status-basedcorrelation_statequeriesITfor fail-closed behavior on invalid or contradictory query inputs