Skip to content

refactor(workflow): S13 scheduler policy deletion#1586

Open
gsxdsm wants to merge 2 commits into
feature/workflow-owned-merge-s12-workflow-projectionsfrom
feature/workflow-owned-merge-s13-scheduler-policy-deletion
Open

refactor(workflow): S13 scheduler policy deletion#1586
gsxdsm wants to merge 2 commits into
feature/workflow-owned-merge-s12-workflow-projectionsfrom
feature/workflow-owned-merge-s13-scheduler-policy-deletion

Conversation

@gsxdsm

@gsxdsm gsxdsm commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Stack Slice

  • Slice: S13
  • Milestone: Deletion
  • Base branch: feature/workflow-owned-merge-s12-workflow-projections
  • Full plan: docs/plans/2026-06-09-003-refactor-workflow-owned-merge-full-migration-slices-plan.md

Goal

Delete scheduler branches that infer lifecycle, merge eligibility, retry routing, or in-review dependency behavior from task columns.

Dependency

S3 scheduler claim path, S7 handoff, S8 merge processing, and S12 projections.

Expected Scope

packages/engine/src/scheduler.ts; packages/core/src/task-merge.ts; scheduler deletion tests.

Expected Tests

Dependency satisfaction cannot rely on in-review alone, retry due time from work item, overlap leases from workflow work, PR monitor remains substrate.

Exit Gate

Search/structure tests fail if scheduler reintroduces task-column merge/retry policy.

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 scheduler policy deletion guard test for workflow-work-scheduler.\n- The guard fails if generic workflow work claiming starts reading task columns, merge retries, or moveTask.

Summary by CodeRabbit

  • Documentation

    • Added workflow plan documentation for S13 scheduler policy deletion slice, including scope, milestone, dependencies, and exit criteria.
  • Tests

    • Added automated validation tests to verify scheduler policy deletion requirements are implemented correctly.

@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: 1a0889ff-ffbd-4cbb-a69f-301a1f7ea51a

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-s13-scheduler-policy-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-s12-workflow-projections branch from cc3566e to 5de2ea1 Compare June 9, 2026 20:31
@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 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 PR reserves the S13 slice in the workflow-owned merge migration stack by adding a planning document and a structural guard test for workflow-work-scheduler.ts. No production code changes are included — the implementation (deletions in scheduler.ts and task-merge.ts) is deferred to a follow-up.

  • s13-scheduler-policy-deletion.md: A handoff artifact documenting the slice goal (removing task-column policy from the scheduler), dependencies (S3/S7/S8/S12), expected file scope, and exit criteria.
  • workflow-scheduler-policy-deletion.test.ts: Adds a source-scanning guard that reads workflow-work-scheduler.ts at test time and asserts both the presence of the workflow-first API (listDueWorkflowWorkItems, acquireWorkflowWorkItemLease) and the absence of forbidden task-column patterns (getTask, moveTask, \"in-review\", mergeRetries, retryAfter).

Confidence Score: 5/5

Safe to merge as a draft placeholder — no production code is changed and the new guard test correctly passes against the current state of workflow-work-scheduler.ts.

The two files added are a planning document and a source-scanning guard test. The guard test reads the correct file, all assertions hold against the current implementation, and no existing behavior is altered. The two findings are forward-looking quality concerns about the guard's future enforcement strength, not defects in the code shipped by this PR.

packages/engine/src/tests/workflow-scheduler-policy-deletion.test.ts — consider enrolling in the engine-core gate allow-list and documenting the raw-text scanning limitation before the S13 implementation lands.

Important Files Changed

Filename Overview
packages/engine/src/tests/workflow-scheduler-policy-deletion.test.ts Adds a source-scanning guard test for workflow-work-scheduler.ts; not enrolled in the engine-core gate allow-list so regressions won't block CI merges, and raw-text negative assertions are sensitive to comments.
docs/plans/workflow-owned-merge-stack/s13-scheduler-policy-deletion.md Draft handoff planning document; referenced origin plan file exists; well-formed frontmatter.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["pnpm test:gate\n(CI merge gate)"] --> B["engine-core allow-list\n(vitest.config.ts)"]
    B --> C["workflow-policy-ownership-map.test.ts ✓"]
    B --> D["scheduler.test.ts ✓"]
    B -.->|"NOT enrolled"| E["workflow-scheduler-policy-deletion.test.ts ✗"]

    F["pnpm test / full-suite.yml\n(non-blocking)"] --> G["engine-default\nsrc/**/*.test.ts"]
    G --> E

    E --> H{{"readFileSync\nworkflow-work-scheduler.ts"}}
    H --> I["Positive assertions\n- contains listDueWorkflowWorkItems\n- contains acquireWorkflowWorkItemLease"]
    H --> J["Negative assertions\n- not getTask\n- not moveTask\n- not in-review\n- not mergeRetries\n- not retryAfter"]

    style E fill:#ffe4b5,stroke:#f90
    style A fill:#d4f4d4,stroke:#090
Loading

Reviews (7): Last reviewed commit: "test(FN-000): harden workflow scheduler ..." | Re-trigger Greptile

@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s12-workflow-projections branch from 5de2ea1 to 84b5065 Compare June 9, 2026 20:38
@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-s12-workflow-projections branch from 84b5065 to b98d27d Compare June 9, 2026 20:48
@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-s12-workflow-projections branch from b98d27d to b82bea7 Compare June 9, 2026 23:33
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s13-scheduler-policy-deletion branch 2 times, most recently from 6dd457a to 5736ded Compare June 10, 2026 00:23
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s12-workflow-projections branch from b82bea7 to 3e77551 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-s12-workflow-projections branch from 3e77551 to 05ae169 Compare June 10, 2026 03:48
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s13-scheduler-policy-deletion branch from 5db1e17 to d47219e Compare June 11, 2026 15:25
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s12-workflow-projections branch 2 times, most recently from 84619cb to f284530 Compare June 11, 2026 15:35
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s13-scheduler-policy-deletion branch from d47219e to c232b1c Compare June 11, 2026 15:35
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s12-workflow-projections branch from f284530 to 80c1d22 Compare June 11, 2026 15:39
@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-s12-workflow-projections branch from 80c1d22 to 9b7c73a Compare June 11, 2026 15:44
@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 added 2 commits June 11, 2026 08:48
Address PR #1586 feedback by replacing brittle substring checks with literal and identifier regex guards.
@gsxdsm gsxdsm force-pushed the feature/workflow-owned-merge-s12-workflow-projections branch from 9b7c73a to dd47771 Compare June 11, 2026 15:49
@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 commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

Three of the guard's negative assertions use plain substring matching rather than word-boundary regexes.

Addressed: the scheduler deletion guard now uses regex-based negative assertions for the legacy task-column patterns, reducing false positives from explanatory comments.

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