Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 35ac37a The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
View your CI Pipeline Execution ↗ for commit 35ac37a
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
jumski
force-pushed
the
689-terminalize-stalled
branch
from
November 3, 2026 18:43
daa1753 to
3668bbf
Compare
Contributor
🔍 Preview Deployment: Website✅ Deployment successful! 🔗 Preview URL: https://pr-713.pgflow.pages.dev 📝 Details:
_Last updated: _ |
jumski
force-pushed
the
689-terminalize-stalled
branch
from
November 3, 2026 18:58
3668bbf to
c0fa0d1
Compare
Add focused coverage for private step queues, archived messages, counters, realtime events, and late callbacks after escalation. Add a deterministic dblink race covering recovery, escalation, and a late completion callback competing for parent locks. Keep the cron comment accurate when both jobs overlap, and refresh the generated migration checksum.
jumski
force-pushed
the
689-terminalize-stalled
branch
from
November 4, 2026 00:15
c0fa0d1 to
35ac37a
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Fixes #689. Independent of the worker startup handshake in #711.
The existing recovery setup configures both cron jobs with one interval. Upgrade wiring preserves installed schedules and inactive/absent recovery choices. Historical marked queued leftovers are included; unmarked queued and terminal tasks stay unchanged.
Upgrade and deployment guidance restores recorded activation values instead of enabling everything. Saved cron values must be JSON booleans; unknown or malformed state never enables a job. Includes a core changeset, generated migration/types, pgTAP coverage, and upgrade fixtures.
Evidence
max_attempts.c0fa0d14e): 300 pgTAP files, all tests successful, plus every upgrade fixture: 0.15.0, 0.16.0 backfill/runtime, all conflict rollbacks, and the new escalation cron states (active/paused/absent). Core prepush gate (sqruff, eslint, build, strict and vitest type checks), unit tests, and generated-types/migration verification. Edge-worker: 279 unit tests, 70 integration tests, 13 Edge Function E2E tests, 14 portable-runtime E2E tests, and the fullprepushgate. Website build, lint, and typecheck.dslandclibuilds. The final force-push went through the normal pre-push hooks.20261102104928_pgflow_worker_startup_handshake.sqlas its baseline — a migration that exists only on fix(worker): coordinate pending starts with invocation handshakes #711's branch. It now stops at20261001194538_pgflow_telemetry_endpoint_fix.sql, the last migration before the escalation one on this base. The fixture container readiness wait also moved frompg_isreadyto waiting for the seconddatabase system is ready to accept connectionslog line: the pinned image initializes PGDATA on every start, andpg_isreadycan pass against the short-lived initdb temp server whose socket then disappears (observed on theleading_stepfixture).requeued_countinstead of a hardcoded3that could drift fromrequeue_stalled_tasks()'smax_requeuesconstant. The migration was regenerated with the documented atlas flow as20261103185005_pgflow_escalate_permanently_stalled.sql, keeping the hand-authored cron-state preservation block Atlas cannot express. That regeneration'sfix-sqlstep also reformats four pre-existing schema files (0100_function_add_step,0100_function_compare_flow_shapes,0110_function_set_vt_batch,0120_function_start_tasks) to sqruff 0.39.0's LT01 spacing (text[]→text []) — whitespace only, unblockscore:lint:sqruffand the pre-pushnx-affected-checkshook, which fail identically onmain. One environmental stop occurred during validation: thestopped_atCPU-clock-limit E2E test timed out once under load and passed unchanged after a fresh test environment.Merge Danger
Door: one-way for data effects after escalation runs. Code can be reverted; completed transitions and downstream side effects cannot be undone automatically.
Blast Radius: recovery
Historical marked tasks follow the existing exhaustion policy after upgrade. In particular,
skipcan enqueue dependent business work. Inspect the documented backlog before upgrade. Pause both cron jobs and the relevant workers/callbacks when downstream execution must stop, then restore each recorded state exactly. Inactive cron jobs alone do not prevent marker-aware failure callbacks. No production migration or deployment is part of this PR submission.