Skip to content

refactor(stovepipe): decouple issue tracking DLQ recovery - #1029

Merged
prathshenoy merged 1 commit into
mainfrom
mnoah1/stovepipe-issuetrack-recovery
Nov 6, 2026
Merged

prathshenoy merged 1 commit into
mainfrom
mnoah1/stovepipe-issuetrack-recovery

Conversation

@mnoah1

@mnoah1 mnoah1 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Issue-tracking recovery constructs the normal controller with an empty topic registry just to reuse history persistence. Give the DLQ controller its own dependencies and extract shared issue-history persistence into a helper, so recovery has no normal controller or publishing dependency. Keep recovery behavior, constructor arguments, logger names, and metric scopes unchanged.

Test Plan

The issue-tracking suite exercises cursor fencing, retained openings and closings, history repair, abandonment retries, and delayed deliveries. Ran that suite and the reference server suite, plus formatting, lint, module-tidy, and Gazelle checks.

Revert Plan

Revert this PR.

Stack

  1. @ refactor(stovepipe): decouple issue tracking DLQ recovery #1029
  2. feat(stovepipe): publish issue-opening hooks and retain issue metadata #1030

Summary:
Issue-tracking recovery constructs the normal controller with an empty topic registry just to reuse history persistence. Give the DLQ controller its own dependencies and extract shared issue-history persistence into a helper, so recovery has no normal controller or publishing dependency. Keep recovery behavior, constructor arguments, logger names, and metric scopes unchanged.

Test Plan:
The issue-tracking suite exercises cursor fencing, retained openings and closings, history repair, abandonment retries, and delayed deliveries. Ran that suite and the reference server suite, plus formatting, lint, module-tidy, and Gazelle checks.

Revert Plan:
Revert this PR.
mnoah1 added a commit that referenced this pull request Nov 6, 2026
Summary:
Publish an issue.opened hook after an opening's history and projections are durable, including reopenings. Retries retain the event ID and transition timestamp. Pass the queue already available during reconciliation, and keep hook publication in normal processing so DLQ recovery only repairs state and abandons failed work.

Add generic namespaced issue metadata that survives observations, closure, and reopening through version-guarded snapshot updates. Append its nullable JSON column at the end of issue_state; provision that column before deploying code that uses it. Hook implementations can use the metadata to retain external references and delivery state.

Builds on #1029, which separates DLQ recovery from the normal controller.

Test Plan:
TestIssueOpeningHookLifecycle covers openings and reopenings; TestIssueOpeningHookRetriesAfterDurableHistory covers stable retry identity and persistence ordering; TestIssueOpeningHookSkippedByDLQ verifies abandonment with a failing hook publisher. Storage unit and MySQL integration tests cover metadata round trips and version guards. Ran the hook-event, issue-tracking, entity, MySQL storage, and reference server suites, the issue-state MySQL integration cases, and formatting, lint, module-tidy, and Gazelle checks.

Revert Plan:
Revert this PR. The nullable metadata column can remain in place.
@mnoah1
mnoah1 added this pull request to stack #1031 November 6, 2026 20:44
@mnoah1
mnoah1 marked this pull request as ready for review November 6, 2026 20:44
@mnoah1
mnoah1 requested review from a team, behinddwalls and sbalabanov as code owners November 6, 2026 20:44
@prathshenoy
prathshenoy added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit 4fec4c0 Nov 6, 2026
38 checks passed
@prathshenoy
prathshenoy deleted the mnoah1/stovepipe-issuetrack-recovery branch November 6, 2026 21:18
prathshenoy pushed a commit that referenced this pull request Nov 6, 2026
Summary:
Publish an issue.opened hook after an opening's history and projections are durable, including reopenings. Retries retain the event ID and transition timestamp. Pass the queue already available during reconciliation, and keep hook publication in normal processing so DLQ recovery only repairs state and abandons failed work.

Add generic namespaced issue metadata that survives observations, closure, and reopening through version-guarded snapshot updates. Append its nullable JSON column at the end of issue_state; provision that column before deploying code that uses it. Hook implementations can use the metadata to retain external references and delivery state.

Builds on #1029, which separates DLQ recovery from the normal controller.

Test Plan:
TestIssueOpeningHookLifecycle covers openings and reopenings; TestIssueOpeningHookRetriesAfterDurableHistory covers stable retry identity and persistence ordering; TestIssueOpeningHookSkippedByDLQ verifies abandonment with a failing hook publisher. Storage unit and MySQL integration tests cover metadata round trips and version guards. Ran the hook-event, issue-tracking, entity, MySQL storage, and reference server suites, the issue-state MySQL integration cases, and formatting, lint, module-tidy, and Gazelle checks.

Revert Plan:
Revert this PR. The nullable metadata column can remain in place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants