Use OpenWorkflow SDK APIs and guard publish/audit admission #108

Merged
eleith merged 2 commits from fix/publish-admission-guard into main 2026-10-06 03:33:22 +00:00
Owner

Summary

  • Upgrade OpenWorkflow to 0.9.2 and serialize Publish/PublishAudit check-and-enqueue requests within one web process.
  • Check the latest five runs per workflow through SDK queries, retaining conflict run IDs, audit freshness/consumption checks, and enqueue-failure release.
  • Replace existing workflow metadata SQL reads with async SDK APIs across dashboard, connectivity, publish/preview loaders and SSE. Preserve DTOs, JSON/ISO formats and step-attempt ordering; remove the unused numeric job-ID lookup and raw web queue connection.

Two reviewed commits

  1. a29898c1 — library upgrade and publish admission guard.
  2. 13cfc5e1 — SDK metadata-read cleanup and callers.

Accepted scope

  • Single-web-process admission only; no distributed lock or independent-producer guarantee.
  • Lookup deliberately examines only the newest five runs per workflow. An active sixth-or-older run can be missed; this edge case was explicitly accepted and is covered by boundary tests. No pagination or counts shortcut for admission.
  • Retention cleanup SQL is unchanged because OpenWorkflow has no purge/delete API. Step-attempt reads still follow SDK pagination to preserve existing all-attempts behavior.

Verification

  • pnpm lint, pnpm check, pnpm test pass.
  • 435 web tests and 20 shared-helper tests pass, including admission races, slow request bodies, enqueue failures, retry transitions, SDK-backed metadata reads and SSE disconnects.
  • Rebuilt only the shared jobs TypeScript package to refresh editor declarations; no web/root builds, CSS generation or Docker operations.

Refs #101.

## Summary - Upgrade OpenWorkflow to 0.9.2 and serialize Publish/PublishAudit check-and-enqueue requests within one web process. - Check the latest five runs per workflow through SDK queries, retaining conflict run IDs, audit freshness/consumption checks, and enqueue-failure release. - Replace existing workflow metadata SQL reads with async SDK APIs across dashboard, connectivity, publish/preview loaders and SSE. Preserve DTOs, JSON/ISO formats and step-attempt ordering; remove the unused numeric job-ID lookup and raw web queue connection. ## Two reviewed commits 1. `a29898c1` — library upgrade and publish admission guard. 2. `13cfc5e1` — SDK metadata-read cleanup and callers. ## Accepted scope - Single-web-process admission only; no distributed lock or independent-producer guarantee. - Lookup deliberately examines only the newest five runs per workflow. An active sixth-or-older run can be missed; this edge case was explicitly accepted and is covered by boundary tests. No pagination or counts shortcut for admission. - Retention cleanup SQL is unchanged because OpenWorkflow has no purge/delete API. Step-attempt reads still follow SDK pagination to preserve existing all-attempts behavior. ## Verification - `pnpm lint`, `pnpm check`, `pnpm test` pass. - 435 web tests and 20 shared-helper tests pass, including admission races, slow request bodies, enqueue failures, retry transitions, SDK-backed metadata reads and SSE disconnects. - Rebuilt only the shared jobs TypeScript package to refresh editor declarations; no web/root builds, CSS generation or Docker operations. Refs #101.
eleith added 2 commits 2026-10-06 03:31:01 +00:00
[web] replace workflow metadata SQL reads with SDK APIs
ci/woodpecker/pr/web-jobs Pipeline was successful
ci/woodpecker/pr/web-worker Pipeline was successful
ci/woodpecker/pr/web Pipeline was successful
ci/woodpecker/push/web-jobs Pipeline was successful
ci/woodpecker/push/web-worker Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
13cfc5e1aa
eleith merged commit 13cfc5e1aa into main 2026-10-06 03:33:22 +00:00
eleith deleted branch fix/publish-admission-guard 2026-10-06 03:33:22 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eleith/luzzle#108