Skip to content

bot_schedules: a row names the next run but never the repeat rule or its time zone - #3358

Open
HugoXK wants to merge 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-schedules-row-rule
Open

HugoXK wants to merge 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-schedules-row-rule

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3357

Owner: Dev-1
Reviewer: Birfy
Written-by: Dev-1
Bot: FlyBot Dev-1

What changed

bot_schedules printed only next <instant> (UTC) and nothing about the repeat rule, so "daily 09:00 Asia/Shanghai" reached the reader as next 2030-01-01T01:00:00.000Z, and a paused task answered no next run with no rule at all. The record on the row already carries kind / everySeconds / time / timeZone / weekdays / expression (the fields requestOf() reads), so the row now prints them.

  • core/src/host/schedules.js: one ruleText(record) helper beside requestOf() turns a record into every 3600s, daily 09:00 Asia/Shanghai, weekly 1,3,5 09:00 Asia/Shanghai or cron … Asia/Shanghai; the row builder appends it in parentheses after next <instant> / no next run, so a paused row keeps the rule. A one-shot at/after has no repeat rule and keeps its next <instant> wording unchanged.
  • core/test/schedules.test.js: the #3357 test covers an active daily row and the same row paused. The two #3197 tests pin the row byte for byte, so their expected rows gain the new (daily … Asia/Shanghai) field — the only existing assertions that move.
  • docs/subsystems/core-host.md (one sentence in Scheduled tasks: the Bot-wide list) and changelog.d/3357.added.md; patches/ds-bot/0001-core-fixes.patch regenerated by node scripts/ds-bot-patches.mjs generate.

Red first, on base bab1fe963b65913f5cd1021d30e6598a7f571627

cd core && TZ=UTC node --import ./test/harness-resolve.mjs --test --test-name-pattern='#3357' test/schedules.test.js:

not ok 1 - \#3357: bot_schedules names the repeat rule and its time zone, paused or not
  error: 'an active row names the rule and its zone'
  expected: /daily 09:00 Asia\/Shanghai/
  actual: - "Standup" (s-daily) — next 2030-01-01T01:00:00.000Z, active, own chat, earlier part, session w1
# tests 1
# pass 0
# fail 1

Green after the change: the same command # tests 1 / # pass 1 / # fail 0; the whole file test/schedules.test.js # tests 48 / # pass 48 / # fail 0.

Ran at the tip

  • TZ=UTC npm run verify → exit 0, no failing tests: core 3463/3463/0, project 153/153/0, social 780/780/0, tree 157, timeline 178, workflow 544, plane 25, .github+policy 735/735, interop 37/37, live-e2e lint/test 34/34; plugin lint 0 errors; build-client --check OK; ds-bot-patches check + canonical ok.
  • ARCH_DOCS_BASE=bab1fe963b65913f5cd1021d30e6598a7f571627 npm run arch-docs → OK (5 changed file(s)).

Not run: the bench smoke test and the real-model live run (skipped in CI as usual).

No UI face: the change is the tool's text, not a screen.

Checkpoint

{
  "pr": 3358,
  "claim": "Dev-1",
  "issue": 3357,
  "summary": "bot_schedules printed only a UTC next instant, so a daily rule and its time zone never reached the reader and a paused task lost the rule entirely. Each row now appends the record's repeat rule in parentheses — every Ns, daily/weekly time and zone, or the cron expression — beside next <instant> or no next run; one-shot at/after rows keep their wording. No model request, no UI change.",
  "files": [
    "core/src/host/schedules.js",
    "core/test/schedules.test.js",
    "docs/subsystems/core-host.md",
    "changelog.d/3357.added.md"
  ],
  "checks": {
    "ran": "red on base: #3357 1/0/1 (AssertionError an active row names the rule and its zone); green #3357 1/1/0 and schedules.test.js 48/48/0; TZ=UTC npm run verify exit 0 (core 3463/3463/0, all plugin suites 0 failures); arch-docs OK (5); patches check+canonical ok; build-client --check OK",
    "result": "green",
    "at": "7cde06b329de8ee2b9743929539884812f5358e8"
  },
  "next": "none — ready for review"
}

@HugoXK

HugoXK commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

@Birfy — verdict request for this tip, once: 7cde06b329de8ee2b9743929539884812f5358e8.

Fixes #3357, base bab1fe963b65913f5cd1021d30e6598a7f571627 (= live main), 5 files +96/−21, maintainer_can_modify: true.

At that exact tip: 18 checks = 15 success + 2 skipped + 1 failure — the only red is enqueue-guard (do not enqueue #3358: no Verifier report names the tip 7cde06b329de), which is precisely what this request exists to clear. tests-ok, merge-gate, judge, package, plugins (social|timeline|tree|workflow), mock and the ubuntu leg are all green; live · real model and window check are skipped.

Red-first evidence in the body: #3357 test 1/0/1 (an active row names the rule and its zone; today the row only carries next 2030-01-01T01:00:00.000Z), then 1/1/0 green, schedules.test.js 48/48, TZ=UTC npm run verify exit 0, arch-docs OK (5).

@HugoXK

HugoXK commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

@Birfy: review request for #3358 at tip 7cde06b (base bab1fe9)

@github-actions github-actions Bot added the risk:T2 Risk tier T2 (host/plugin code or an unnamed path), set by the controller from the diff label Nov 24, 2026
@HugoXK

HugoXK commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

FlyBot 2.0 audit (2026-11-25), read-only. This PR has no 2.0 landing point, so it was not repackaged; it stays open as the v1.0 record. Nothing was closed, retargeted or merged — the owner decides.

It changes core/src/host/schedules.js + tests + patch mirror: 0 of 5 paths exist at upstream main (6be84f48, now be7b1dac). The bot_schedules text row no longer exists (0 hits), and 2.0's live surface already names the repeat rule per row: flybot_workspace/static/automations/app.mjs:433-453 scheduleSummary (rendered at :591) and runtime/flybot-workspace-web/features/automations/automations.js:158-165. A port would duplicate a rule the product already shows.

Evidence: FLYBOT_2.0_PR_AUDIT_RESULT.md (owner report, 2026-11-25).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:T2 Risk tier T2 (host/plugin code or an unnamed path), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bot_schedules: a row names the next run but never the repeat rule or its time zone

1 participant