Repository navigation
Conversation
Cron jobs always produce exactly 1 user↔agent exchange — the task prompt plus one reply — so minExchangesForCompletion: 2 zero-scores every cron episode before content is even evaluated. This starves L2 induction of signal after the bridge stabilises. Adds `cronSentinels` to RewardConfig (schema, defaults, types). When the first user turn starts with a sentinel prefix, check 1 (exchange count) is skipped; content/triviality checks still apply. Default sentinel covers the Hermes cron prompt. The `snapshot.meta?.initialUserText` fallback handles episodes scored during recovery when turns aren't materialised. If the field is absent the episode falls back to the old skip behaviour — no false positives. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Automated Test Results: PASSED Cloud test-engine rerun against
Manual code review is still required before merge. |
🤖 Open Code ReviewTarget: PR #1848 🔍 OpenCodeReview found 5 issue(s) in this PR. 1.
|
|
OCR follow-up in
Local verification after the follow-up: reward/config tests |
✅ Automated Test Results: PASSEDAll tests passed (53/53 executed). memos_local_plugin/unit: 53/53. Duration: 5s Branch: |
|
Thanks for the contribution. The default |
Summary
Adds a config-driven bypass so cron-initiated episodes can be scored even when they fall below the
minExchangesForCompletionthreshold.Problem
Scheduled agent jobs usually produce a single exchange: one cron prompt and one agent response. Deployments with a stricter exchange floor can therefore discard substantive scheduled work before reward scoring.
Solution
Adds
RewardConfig.cronSentinels, an array of user-turn prefixes. When the first user turn starts with a configured prefix, only the exchange-count gate is bypassed. Content length, triviality, tool-heavy, and repetition gates remain active.The default is an empty array (
[]), so existing deployments keep their current behavior. Operators can opt in throughconfig.yaml:Design notes
meta.initialUserText; later user turns are never used for sentinel matching.cronSentinelsremains optional in the exportedRewardConfiginterface for backward compatibility with programmatic callers; resolved config always supplies[].Test plan
meta.initialUserText.103/103).Generated with Claude Code