Skip to content

feat(workers): typed job manifests (closes #2261) - #2322

Merged
github-actions[bot] merged 1 commit into
Smartdevs17:mainfrom
IVANLI2412:fix/issue-2261-manifests
Nov 24, 2026
Merged

github-actions[bot] merged 1 commit into
Smartdevs17:mainfrom
IVANLI2412:fix/issue-2261-manifests

Conversation

@IVANLI2412

Copy link
Copy Markdown
Contributor

Closes #2261

Summary

  • Adds workers/src/manifest.ts: a zero-dependency, pure-TypeScript typed job-manifest system. One declarative manifest is the single source of truth for a job's name, schedule, input/output schemas, handler reference, retries and timeout.
  • Schema DSL (str, num, bool, obj, arr, date) with chainable optional() / describe(), full nested-object and array validation, ISO-date normalization, and stable JSON-style issue paths ($.items[1].id).
  • Typed ManifestError surface with stable codes (INVALID_CONFIG, INVALID_MANIFEST, DUPLICATE_JOB, INVALID_SCHEMA, VALIDATION_FAILED, UNKNOWN_TYPE, UNKNOWN_JOB, INVALID_INPUT).
  • defineJob, validateManifest, validateInput / validateOutput; frozen default config and immutable schema nodes.
  • createJobRegistry / createDefaultJobRegistry: duplicate-name rejection, frozen registrations, validateAll reports, and injected metrics/logger hooks (recordRegister, recordValidation, recordRejected, info, warn).
  • Declarative built-in manifests for billing-shift and audit-flush. Job modules are never imported, so the module stays side-effect free and dependency free.
  • Adds workers/src/__tests__/manifest.test.ts covering happy paths and realistic failure modes: 33 tests, 148 assertions.

Verification evidence

  • Node 26 native type-stripping harness importing the real committed .ts source: 16/16 checks passed, 0 fail.
  • Jest-shim execution of the committed test file: 33/33 passed, 0 fail (148 expect assertions).
  • python tools/check_secrets.py: [OK] / SECRETS_EXIT=0.
  • No new dependencies, no binaries, no new .md/.json files; only the two source files above changed.
  • Commit 346fc82 pushed to IVANLI2412:fix/issue-2261-manifests (no force push).

Bounty payouts (Stellar/Drips Wave, issue #2261)

Base Mainnet (USDC/ETH) 0xC5dD2Ea54FF138bb3f71D3466092eA31eF115868
Solana (USDC/SOL) DN3pfYEvdkoTBP4oaEVvemsr98fZPhDSAbfVfmewRGQ5
PayPal ivanzenteno3@gmail.com

@github-actions
github-actions Bot merged commit f923e1b into Smartdevs17:main Nov 24, 2026
7 of 27 checks passed
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.

Fold worker job definitions into typed job manifests with schemas

1 participant