refactor(jobs): Migrate to declarative job scheduler#962
Merged
Conversation
Replaces individual start/stop methods with a declarative configuration pattern for all 12 scheduled background jobs. This reduces boilerplate and makes adding new jobs trivial. Changes: - scheduler.ts: Rewritten with JobConfig interface, register/start/stop methods, and built-in business hours constraint handling - job-definitions.ts: New file with all job configurations including the composite content-curator runner - http.ts: Cleaned up by removing 5 inline job methods (~250 lines) and 8 instance variables for job tracking Closes #716 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
bokelley
added a commit
that referenced
this pull request
Apr 25, 2026
Brings in our get_media_buys request-builder fix (adcp-client#987 closing #983), placeholder-ID enricher audit (#991), schema-aware brand/account injection in the storyboard runner (#943), the a2a_context_continuity validator (#962), A2A wire-shape capture (#904), and triage-bot ergonomics closing adcp#3121 (#992/#993). Two compat fixes: - **Hint type widening.** `StoryboardStepHint` widened from `ContextValueRejectedHint` alone to a five-kind union. `renderAllHintFixPlans` now accepts the broader type and filters to the kind it knows how to render. Other kinds drop silently from the fix-plan section but the runner's per-hint `message` field still surfaces them. - **Strict request-schema validation.** 5.18.0's runner rejects unknown fields. `pagination-integrity-property-lists.yaml`'s `list_type` field isn't in `create-property-list-request.json`'s properties (the schema has `additionalProperties: false`). Drop it — no handler reads the field. Multi-page upgrade for get_media_buys_pagination_integrity deferred — the SDK's convention extractor populates context.media_buy_id from the first-page response, then the request-builder injects that ID and turns page 2 into an ID-lookup. Filed adcp-client#998 with the diagnosis. Storyboard stays at single-step until the extractor fix lands. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces individual start/stop methods with a declarative configuration pattern for all 12 scheduled background jobs. This reduces boilerplate (~250 lines removed) and makes adding new jobs trivial.
JobConfiginterface,register()/start()/stop()methods, and built-in business hours constraint handlingCloses #716
Test plan
npm run typecheckpassesnpm test- 273 tests passdocker compose up --build- server starts correctly🤖 Generated with Claude Code