Skip to content

fix: принимать object payload в scheduled tasks#680

Merged
xlabtg merged 3 commits into
xlabtg:mainfrom
konard:issue-679-198121ded3c1
Jun 21, 2026
Merged

fix: принимать object payload в scheduled tasks#680
xlabtg merged 3 commits into
xlabtg:mainfrom
konard:issue-679-198121ded3c1

Conversation

@konard

@konard konard commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Что изменено

Fixes #679

  • telegram_create_scheduled_task теперь принимает payload как JSON-строку или уже распарсенный JSON-object из tool-call arguments.
  • telegram_update_task получил тот же входной контракт; пустая строка по-прежнему очищает payload.
  • Перед сохранением object payload нормализуется обратно в JSON-строку, поэтому формат в базе и исполнителе scheduled tasks не меняется.
  • Проверка payload вынесена в общий helper и покрыта регрессионными тестами.

Как воспроизвести

До исправления вызов telegram_create_scheduled_task с object payload, например { "type": "agent_task", "instructions": "Review TON price" }, отбрасывался schema validation с ошибкой payload: must be string, хотя JSON tool-call arguments уже были распарсены фреймворком.

После исправления такой object payload проходит schema validation, валидируется executor'ом и сохраняется как JSON-строка.

Проверки

  • npm test -- src/agent/tools/telegram/tasks/__tests__/recurring-and-update-tasks.test.ts
  • npm run build:sdk
  • npm run typecheck
  • npm run lint
  • npm test

Скриншоты не прикладываются: изменение не затрагивает UI.

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: xlabtg#679
@konard konard changed the title [WIP] Bug: telegram_create_scheduled_task payload validation fails — "must be string" for JSON object fix: принимать object payload в scheduled tasks Jun 21, 2026
@konard konard marked this pull request as ready for review June 21, 2026 17:50
@konard

konard commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator Author

Working session summary

Готово: PR обновлён и переведён в ready for review: #680

Что вошло:

  • telegram_create_scheduled_task и telegram_update_task теперь принимают payload как JSON-строку или уже распарсенный object.
  • Object payload нормализуется обратно в JSON-строку перед сохранением, поэтому формат в базе и executor не менялись.
  • Добавлены регрессионные тесты на schema validation и executor-пути.
  • Убран временный .gitkeep, PR diff теперь содержит только 4 релевантных файла.

Проверки:

  • Локально прошли npm test -- src/agent/tools/telegram/tasks/__tests__/recurring-and-update-tasks.test.ts, npm run build:sdk, npm run typecheck, npm run lint, npm test.
  • GitHub Actions на актуальном SHA 8bd4238c прошли: CI, CodeQL, Secret Scanning, Benchmarks successful; E2E skipped по условиям workflow.
  • Рабочее дерево чистое.

This summary was automatically extracted from the AI working session output.

@konard

konard commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.5
  • Provider: OpenAI
  • Public pricing estimate: $17.609525

📊 Context and tokens usage:

  • 439.6K / 200K (220%) input tokens, 41.2K / 128K (32%) output tokens

Total: (439.6K + 11.4M cached) input tokens, 41.2K output tokens, $17.609525 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Thinking level: max (~31999 tokens)
  • Model: GPT-5.5 (gpt-5.5)

📎 Log file uploaded as Repository (52477KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard

konard commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator Author

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@xlabtg xlabtg merged commit 607bf05 into xlabtg:main Jun 21, 2026
30 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.

Bug: telegram_create_scheduled_task payload validation fails — "must be string" for JSON object

2 participants