Skip to content

refactor(workflow): S14 ProjectEngine merge queue deletion#1587

Merged
gsxdsm merged 2 commits into
feature/workflow-owned-merge-s08-workflow-owned-merge-processingfrom
feature/workflow-owned-merge-s14-project-engine-merge-queue-deletion
Jun 17, 2026
Merged

refactor(workflow): S14 ProjectEngine merge queue deletion#1587
gsxdsm merged 2 commits into
feature/workflow-owned-merge-s08-workflow-owned-merge-processingfrom
feature/workflow-owned-merge-s14-project-engine-merge-queue-deletion

Conversation

@gsxdsm

@gsxdsm gsxdsm commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Stack Slice

  • Slice: S14
  • Milestone: Deletion
  • Base branch: feature/workflow-owned-merge-s13-scheduler-policy-deletion
  • Full plan: docs/plans/2026-06-09-003-refactor-workflow-owned-merge-full-migration-slices-plan.md

Goal

Remove production ProjectEngine merge queue policy and retain only explicit human/manual event entry points plus substrate helpers.

Dependency

S8 merge processing, S11 branch-group subgraphs, and S13 scheduler deletion.

Expected Scope

packages/engine/src/project-engine.ts; runtimes/in-process runtime; core store; merge lifecycle and deletion tests.

Expected Tests

No startup hidden enqueue, unpause wakes workflow work, manual merge event wakes merge node, stale mergeActive does not block workflow work, old queue APIs compatibility-only.

Exit Gate

No production caller starts merge processing outside workflow runtime.

Status

Draft stack placeholder. This PR reserves ordering and review context; implementation should replace or extend the handoff artifact before this slice is marked ready.

Implementation Added

  • Added merge queue deletion guard test for workflow-work-processor.\n- The guard fails if workflow-owned merge processing depends on mergeQueue, enqueueMergeQueue, or ProjectEngine queue internals.

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 81425159-bd4e-460c-a97a-a662c0b398af

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/workflow-owned-merge-s14-project-engine-merge-queue-deletion

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s13-scheduler-policy-deletion branch from 7143d25 to ffef184 Compare June 9, 2026 20:31
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s14-project-engine-merge-queue-deletion branch from 264d113 to 25f4de6 Compare June 9, 2026 20:31
@gsxdsm gsxdsm marked this pull request as ready for review June 9, 2026 20:35
@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This draft stack-placeholder PR for S14 adds a plan doc and a static guard test asserting that workflow-work-processor.ts stays isolated from legacy ProjectEngine merge queue APIs (mergeQueue, enqueueMerge, ProjectEngine).

  • s14-project-engine-merge-queue-deletion.md is a correctly formatted handoff artifact with accurate dependencies, scope, and exit gate — no issues.
  • workflow-merge-policy-deletion.test.ts introduces a readFileSync-based guard that passes today; all seven assertions (four positive sanity checks + three negative isolation guards) are correct against the current processor source, but they share a single it block, which can obscure whether a future failure is a true regression or a broken sanity check.

Confidence Score: 5/5

Safe to merge as a draft placeholder; the guard test correctly verifies processor isolation today and the plan doc is accurate.

Both changed files are non-production additions. The guard test passes against the current processor source with no logic or data-path changes introduced. The plan doc is informational only.

No files require special attention beyond the single style note on the test's co-located assertion structure.

Important Files Changed

Filename Overview
docs/plans/workflow-owned-merge-stack/s14-project-engine-merge-queue-deletion.md New draft-stack-handoff plan doc for S14; accurately describes scope, dependencies, and exit gate — no issues.
packages/engine/src/tests/workflow-merge-policy-deletion.test.ts New static guard asserting workflow-work-processor.ts is isolated from legacy merge queue APIs; all assertions pass, but positive and negative checks are co-located in a single it block which will produce ambiguous failures if the processor is refactored during S14.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["workflow-merge-policy-deletion.test.ts"] -->|"readFileSync"| B["workflow-work-processor.ts"]
    B -->|"positive: contains"| C["claimDueWorkflowWorkItem\nruntime.runWorkItem\n'merge' / 'manual-hold'"]
    B -->|"negative: not contains"| D["mergeQueue\nenqueueMerge\nProjectEngine"]
    E["project-engine.ts\n(59 legacy merge queue references)"] -.->|"not read by guard"| A
    style E stroke-dasharray: 5 5
Loading

Reviews (9): Last reviewed commit: "test(FN-000): avoid freezing legacy merg..." | Re-trigger Greptile

@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s13-scheduler-policy-deletion branch from ffef184 to 1d5a02b Compare June 9, 2026 20:38
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s14-project-engine-merge-queue-deletion branch from 25f4de6 to 0636a71 Compare June 9, 2026 20:38
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s13-scheduler-policy-deletion branch from 1d5a02b to 1cc7876 Compare June 9, 2026 20:48
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s14-project-engine-merge-queue-deletion branch from 0636a71 to 44b8d22 Compare June 9, 2026 20:48
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s13-scheduler-policy-deletion branch from 1cc7876 to 6dd457a Compare June 9, 2026 23:34
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s14-project-engine-merge-queue-deletion branch from 44b8d22 to 7dbdc6c Compare June 9, 2026 23:35
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s14-project-engine-merge-queue-deletion branch from 7dbdc6c to f3a3eb5 Compare June 10, 2026 00:23
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s13-scheduler-policy-deletion branch from 5736ded to 5db1e17 Compare June 10, 2026 03:48
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s14-project-engine-merge-queue-deletion branch 3 times, most recently from b5661a3 to f06dcb1 Compare June 11, 2026 15:25
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s13-scheduler-policy-deletion branch 2 times, most recently from d47219e to c232b1c Compare June 11, 2026 15:35
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s14-project-engine-merge-queue-deletion branch from f06dcb1 to 68bd7d6 Compare June 11, 2026 15:35
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s13-scheduler-policy-deletion branch from c232b1c to 63b1ee2 Compare June 11, 2026 15:39
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s14-project-engine-merge-queue-deletion branch from 68bd7d6 to 34c9acc Compare June 11, 2026 15:39
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s13-scheduler-policy-deletion branch from 63b1ee2 to e331c28 Compare June 11, 2026 15:44
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s14-project-engine-merge-queue-deletion branch from 34c9acc to 6616caf Compare June 11, 2026 15:44
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s13-scheduler-policy-deletion branch from e331c28 to 21ddf89 Compare June 11, 2026 15:49
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s14-project-engine-merge-queue-deletion branch from 6616caf to 9a85540 Compare June 11, 2026 15:49
@gsxdsm

gsxdsm commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

expect(projectEngineSource).toContain("private mergeQueue") records the pre-deletion state.

Addressed: removed that legacy-state assertion. The guard now focuses on workflow processor isolation from mergeQueue, enqueueMerge, and ProjectEngine instead of freezing the queue field that the deletion slice is meant to remove.

@stage-review

stage-review Bot commented Jun 16, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 2 individual chapters for you:

Title
1 Document the ProjectEngine merge queue deletion plan
2 Enforce isolation from legacy merge queue
Open in Stage

Chapters generated by Stage for commit 91366fd on Jun 16, 2026 9:19am UTC.

Base automatically changed from feature/workflow-owned-merge-s13-scheduler-policy-deletion to feature/workflow-owned-merge-s08-workflow-owned-merge-processing June 17, 2026 21:47
@gsxdsm gsxdsm merged commit a5200a6 into feature/workflow-owned-merge-s08-workflow-owned-merge-processing Jun 17, 2026
2 checks passed
@gsxdsm gsxdsm deleted the feature/workflow-owned-merge-s14-project-engine-merge-queue-deletion branch June 17, 2026 21:47
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.

1 participant