Skip to content

MCPJVM-363: Watcher state persistence on SQLite #363

Description

@nimbly-dev

Description

Watcher-based completion verification introduces a new class of execution state that must survive long-running and cross-service regression activity. Watcher status, bounded waiting progress, timeout outcomes, and final verification results should be persisted in a structured form so later reporting and query behavior can be deterministic.

This story adds SQLite-backed persistence for watcher execution state in Regression Suite.

Scope

In scope:

  • Persist watcher execution state into the SQLite-backed store
  • Persist watcher identity, status, timeout/bounded-wait metadata, and final outcome summary
  • Persist deterministic linkage back to canonical watcher-related execution evidence or run Artifacts
  • Support long-running watcher-backed completion verification without relying on transient in-memory state alone
  • Ensure persisted watcher state can reflect bounded polling behavior driven by project-level defaults

Out of scope:

  • Public MCP query/read contract design
  • Full watcher contract design
  • External verification persistence beyond watcher-owned state
  • Replacing canonical execution evidence files

Acceptance Criteria

  • Regression Suite persists watcher execution state into the SQLite-backed store
  • Persisted watcher state captures bounded waiting outcome information deterministically
  • Persisted watcher state links back to canonical execution evidence where applicable
  • Watcher persistence behaves fail-closed when required storage writes cannot complete
  • The persisted model is sufficient to support later watcher-state MCP query/read stories

Implementation Notes

  • Persist enough watcher progress to support resumable or multi-pass observation if tooling timeout limits prevent one long synchronous call from covering the full wait window.
  • Keep watcher state aligned with project-level default wait configuration rather than hardcoded sleep/attempt behavior.

Testing

  • UT for watcher-state row mapping and status transition persistence
  • UT for timeout/attempt counter persistence semantics
  • IT for long-running watcher flows persisting intermediate and terminal state deterministically
  • IT for timeout/fail-closed watcher outcomes being reflected in persisted state

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions