Skip to content

Add relative scheduler anchors (codex) - #2394

Merged
numnx merged 1 commit into
feature/CODUX-145-micro-improvementsfrom
task/feature-codux-145-micro-improvements-t01-codex-mr9r6upa
Jul 6, 2026
Merged

Add relative scheduler anchors (codex)#2394
numnx merged 1 commit into
feature/CODUX-145-micro-improvementsfrom
task/feature-codux-145-micro-improvements-t01-codex-mr9r6upa

Conversation

@numnx

@numnx numnx commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

🧩 Task: Add relative scheduler anchors

Automated task PR opened by Code UX for T01.

📋 Summary

Sprint: Sprint 145 · Micro Improvements · Task: T01

Deliver SPR-145 micro improvements: Jira import In Work transitions, relative sprint scheduling from scheduler/composer/quicksprints, onboarding menu ordering, task-card quick actions, and sticky settings context controls.

📝 Full Task Prompt
## Objective
Add a first-class scheduler contract for entries that start when another sprint ends, while preserving existing absolute date/time scheduling and recurrence behavior.

## Scope
- `src/contracts/scheduler-types.ts`
- `src/repositories/scheduler-repository.ts`
- `src/services/scheduler-service.ts`
- `src/server/scheduler-routes.ts`
- `src/mcp/management/scheduler-actions.ts`
- `src/contracts/mcp-tool-definitions.ts`
- `tests/backend/mcp/management-scheduler-actions.test.ts`
- Add or update focused scheduler service/repository tests under `tests/backend/services/` or `tests/backend/repositories/`
- `docs/dashboard/scheduler.md`

## Implementation Requirements
1. Extend the scheduler contract with an optional schedule anchor for `after_sprint_end`, including the source sprint id and an optional non-negative offset in minutes; keep the existing absolute `scheduledFor` path as the default.
2. Persist and hydrate the new anchor without breaking existing `scheduler_entries` rows; if no migration is required because the anchor can live in the target payload, document that choice in code/tests.
3. Validate that the anchor sprint exists, belongs to the same project, and is not the same sprint being scheduled when the scheduled target is also a sprint.
4. Make due-entry execution treat anchored entries as due only after the anchor sprint is terminal (`completed`, `failed`, or `cancelled`) and the optional offset has elapsed from the sprint end timestamp (`endDate` or the latest terminal run `finishedAt` when available).
5. Ensure anchored one-time entries execute once and then complete, and reject recurrence for `after_sprint_end` unless the existing scheduler model can support it cleanly without ambiguous repeated runs.
6. Add MCP `manage_scheduler` fields for the anchor mode/source sprint id/offset and map them into `CreateSchedulerEntryInput` and `UpdateSchedulerEntryInput`.
7. Update scheduler documentation with the new backend contract, validation, and runtime semantics.

## Constraints
- Do not change behavior for existing absolute-time scheduler entries, memory-remediation settings schedules, or recurrence expansion.
- Do not require a destructive database migration for existing entries.
- Keep project isolation strict: an entry must not be schedulable from a sprint in another project.
- Avoid polling all historical data in hot paths; use repository helpers or bounded scans for scheduled anchored entries.

## Verification
- Run `pnpm run test:backend -- tests/backend/mcp/management-scheduler-actions.test.ts`.
- Run the new or updated focused scheduler service/repository tests.
- Run `pnpm run lint`.
- Success means absolute schedules still pass existing tests, anchored schedules only become due after the source sprint ends, and invalid cross-project/self-anchor inputs are rejected.

✅ QA Review

⏳ QA review runs after this PR is opened. Check the task card in the dashboard for the outcome once it lands.

🤖 Model & Provider

Provider Codex CLI
Model gpt-5.5

⏱️ Timing

Started 2026-07-06 21:49:56 UTC
Finished 2026-07-06 22:03:02 UTC
Duration 13m 5s

📊 Token Usage

Metric Value
Input tokens 190,877
Cached input tokens 2,772,736
Output tokens 17,986
Total tokens 2,981,599
Invocations 1
Tool calls 62
Active time 8m 40s

Included usage estimate (subscription/local login): $2.88

🌿 Branch Info

Base: feature/CODUX-145-micro-improvements
Head: task/feature-codux-145-micro-improvements-t01-codex-mr9r6upa


🤖 Generated by Code UX

@numnx
numnx merged commit 6a326d7 into feature/CODUX-145-micro-improvements Jul 6, 2026
6 checks passed
@numnx
numnx deleted the task/feature-codux-145-micro-improvements-t01-codex-mr9r6upa branch July 6, 2026 22:05
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