Skip to content

fix(stovepipe): initialize queue state within ingest - #972

Merged
mnoah1 merged 1 commit into
mainfrom
mnoah1/stovepipe-ingest-state-init
Oct 28, 2026
Merged

mnoah1 merged 1 commit into
mainfrom
mnoah1/stovepipe-ingest-state-init

Conversation

@mnoah1

@mnoah1 mnoah1 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Why?

Hosts should not need to construct an internal queue transition controller or register queue state before calling Ingest. A first ingest with explicit enablement currently fails without that registration.

What?

NewIngestController constructs its transition controller from its existing dependencies. Ingest idempotently initializes the queue and its history and summary before applying an optional enablement decision, including when adopting an existing empty queue row. Existing enablement and pipeline fields are preserved.

Remove startup registration from the reference service. Construction performs no storage I/O; GetQueueStatus remains read-only and returns NOT_FOUND before the first ingest initializes state.

Test Plan

  • make fmt, make lint, make check-tidy, make check-gazelle
  • ./tool/bazel test //stovepipe/... //service/stovepipe/server/... --test_tag_filters=-integration --build_tests_only --test_output=errors
  • Queue-status, ingest, list, ping, and issue-tracking DLQ end-to-end scenarios pass: ./tool/bazel test //test/e2e/stovepipe:go_default_test --test_output=errors '--test_arg=-testify.m=Test(Ingest|QueueStatus|IssueTracking_DLQ|List|Ping)'.
  • The full end-to-end suite times out waiting for issue-tracking finalization. The isolated TestIssueTracking_FinalizesAfterAnalysis also times out on unchanged main at 0edea98 with a 120-second Bazel limit.
  • Regression coverage for new and existing empty queues, initial explicit decisions, idempotent retries, preservation of pipeline fields, and recovery from partial history/summary writes.

Revert Plan

Revert this PR to restore the previous constructor and startup registration together.

Issue

No linked issue; this fixes constructor composition and first-ingest initialization.

## Why?
Hosts should not need to construct an internal queue transition controller or register queue state before calling Ingest. A first ingest with explicit enablement currently fails without that registration.

## What?
NewIngestController constructs its transition controller from its existing dependencies. Ingest idempotently initializes the queue and its history and summary before applying an optional enablement decision, including when adopting an existing empty queue row. Existing enablement and pipeline fields are preserved.

Remove startup registration from the reference service. Construction performs no storage I/O; GetQueueStatus remains read-only and returns NOT_FOUND before the first ingest initializes state.

## Test Plan
- make fmt, make lint, make check-tidy, make check-gazelle
- ./tool/bazel test //stovepipe/... //service/stovepipe/server/... --test_tag_filters=-integration --build_tests_only --test_output=errors
- Queue-status, ingest, list, ping, and issue-tracking DLQ end-to-end scenarios pass: `./tool/bazel test //test/e2e/stovepipe:go_default_test --test_output=errors '--test_arg=-testify.m=Test(Ingest|QueueStatus|IssueTracking_DLQ|List|Ping)'`.
- The full end-to-end suite times out waiting for issue-tracking finalization. The isolated `TestIssueTracking_FinalizesAfterAnalysis` also times out on unchanged main at 0edea98 with a 120-second Bazel limit.
- Regression coverage for new and existing empty queues, initial explicit decisions, idempotent retries, preservation of pipeline fields, and recovery from partial history/summary writes.
@mnoah1
mnoah1 marked this pull request as ready for review October 28, 2026 14:53
@mnoah1
mnoah1 requested review from a team, behinddwalls and sbalabanov as code owners October 28, 2026 14:53
@mnoah1
mnoah1 enabled auto-merge October 28, 2026 14:53
@mnoah1
mnoah1 added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 03de261 Oct 28, 2026
38 checks passed
@mnoah1
mnoah1 deleted the mnoah1/stovepipe-ingest-state-init branch October 28, 2026 15:12
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