Skip to content

Add SchedulerService to boost AGENTS.md Backstage-native services list #4281

Description

@fullsend-ai-retro

What happened

On PR #4250, the code agent implemented daily retention cleanup for boost_sync_attempts using raw setInterval + unref() in plugin.ts. The human reviewer (mareklibra) replaced this with Backstage's SchedulerService (scheduler.scheduleTask()) in commit d7d9b274, which provides proper lifecycle management, distributed scheduling, and dead-letter handling. The review agent did not flag the raw setInterval usage in either review pass (run 31496436596, run 31603888382).

What could go better

The boost AGENTS.md Architecture rules > Backstage-native services only section lists specific services: cacheService, permissions, httpAuth, configApi, and catalogApi. It does not mention scheduler/SchedulerService (coreServices.scheduler). The code agent pattern-matched against the listed services but had no guidance that scheduled/periodic tasks should use SchedulerService instead of raw timers. Confidence is high — the AGENTS.md gap is clear, and the Backstage SchedulerService is the established pattern for all scheduled work in this codebase (the human fix confirms this).

Proposed change

In workspaces/boost/AGENTS.md, update the Backstage-native services only section to include scheduler in the enumerated services list. Add a sentence: "Scheduled or periodic tasks must use coreServices.scheduler (SchedulerService) — never raw setInterval, setTimeout, or cron libraries. SchedulerService provides distributed scheduling, lifecycle management, and proper shutdown handling." The updated line should read something like: "Use Backstage cacheService, permissions, httpAuth, configApi, catalogApi, and scheduler. Never build custom equivalents."

Validation criteria

The next code agent run in the boost workspace that implements a scheduled or periodic task should use coreServices.scheduler / SchedulerService instead of raw setInterval or setTimeout. Verify over the next 3 PRs that touch plugin.ts or introduce scheduled work.


Generated by retro agent from #4250

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions