Skip to content

refactor(scheduler): remove the process-schedule remnant (#3432) - #3440

Draft
vybe wants to merge 7 commits into
devfrom
feature/3432-scheduler-process-schedule-removal
Draft

vybe wants to merge 7 commits into
devfrom
feature/3432-scheduler-process-schedule-removal

Conversation

@vybe

@vybe vybe commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Fixes #3432. One of five independent stale-code PRs off dev; sibling #3433's branch (dead symbols) touches the same scheduler files and test-merges clean against this one. Draft: the issue asks for this to land after the 1.0 release is cut, and before #3433's PR.

What

Rulings carried (orchestrator, on the operator's behalf — plan file)

Review + security

/review (reading review, report-only): MERGEABLE, no critical findings. Completeness, schema, workflow YAML and doc renumbering checks all hold; the test_1896 parity assertion was proven to fail when either side gains an extra flag. /cso --diff: no findings, net surface reduction (one header-less outbound POST removed). Fixed after review: the two stale STRATEGY.md rows and the claim_token fixture column.

Tests

  • tests/scheduler_tests: 241 passed, 0 failed (70 failed on dev before the fixture commits).
  • 19 unit files that import or pin the scheduler, shuffled (seed 12345), one per process: all green.
  • Mutation check: with dev's scheduler source, both new guard tests fail on their own assertions.
  • git merge-tree against dev and against refactor: remove about 50 backend and scheduler symbols that no production code references #3433's branch: clean.
  • Not run here: the full unit island (CI) and anything needing a live stack.

Before merge

Handoffs

🤖 Generated with Claude Code

Trinity Agent (trinity) and others added 6 commits October 9, 2026 10:22
…#3432)

The hand-written fixture DDL lacked the chain_depth column that #3120 added
to SchedulerDatabase.create_execution, so every agent-path INSERT in the
scheduler tier raised OperationalError (70 failed / 173 passed). With the
column: 3 failed / 240 passed; the remaining three are a separate drift
(claim_token), left out of this fixture-only commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eduler source (#3432)

The scheduler still created process_schedules / process_schedule_executions
at boot, re-read them every sync tick, and executed rows by POSTing to
/api/processes/{id}/execute, a route the backend lost in #430. Nothing can
create a row. Removed: the boot DDL, the snapshot + sync, the job
add/remove/execute path, the skipped-execution recorder and its
max-instances branch, the database section, the two models, the stranded
_INTEGRITY_ERRORS import. The two tables are left in place on existing
installs (no migration).

The agent-schedule path, its lock-denial audit (#1969/#1808) and reminder
machinery (#1296) are unchanged; the _on_job_max_instances unknown-prefix
warning stays (reminder jobs share the listener).

Red-first tests: test_legacy_process_schedule_tables_are_ignored (an enabled
legacy row registered process_schedule_ps-legacy at HEAD) and
test_on_job_max_instances_legacy_process_prefix_is_unknown (the legacy id
reached _record_skipped_process_schedule at HEAD). Tests that exercised the
removed identifiers are deleted or re-pinned in this commit: test_1994
deleted, process cases cut from test_skipped_executions / test_1474 /
test_sync_loop, test_1296's ensure_process_schedules_table call dropped,
test_1969's slice end re-anchored on `async def _execute_schedule(`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…schedule writer (#3432)

test_1832 narrated three duration writers (one was the deleted
process_schedule_executions finalizer); test_1823 pointed at the deleted
test_1994 as its structural model, now test_1969. Docstrings only; the
scanner logic is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… process-schedule remnant (#3432)

- tests/run-core.sh and both nightly workflows drop --ignore=process_engine
  (the directory no longer exists); the workflow comments stop citing a
  run-core.sh line number.
- test_1896's literal --ignore=process_engine assertion becomes a parity
  check: the workflow's --ignore set must equal run-core.sh's (red with
  run-core.sh edited alone, green once both sides match).
- scheduler-service.md: Flow 3 (process execution) removed and Flows 4-10
  renumbered 3-9; process sync, events, max-instances branch, DB operations
  and method rows removed; revision history entry added.
- requirements/scheduling.md, architecture/execution.md: the scheduler has
  one duration finalizer, not two.
- architecture/database.md: the two tables are recorded as orphans left on
  upgraded installs (no migration).
- architecture.md Invariant #16: "+ process-schedule variants" removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#3433)

The hand-written fixture DDL lacked the claim_token column (TEXT, as in
db/schema.py) that SchedulerDatabase's require_unclaimed guard (#2514)
reads, leaving three scheduler tests red:
test_1472::test_a2_dispatch_exception_advances_next_run and two in
test_async_dispatch. With the column: 243 passed, 0 failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…exclusion (#3432)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vybe

vybe commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Two additions to Before merge since this PR opened:

…-process-schedule-removal

# Conflicts:
#	tests/scheduler_tests/conftest.py

This branch has not been deployed

No deployments
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