You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "liugddx (via GitHub)" <gi...@apache.org> on 2026/09/24 02:57:32 UTC

[PR] fix(runtime): report the Host clock from ScheduledTask [maka]

liugddx opened a new pull request, #5667:
URL: https://github.com/apache/maka/pull/5667

   ## Summary
   
   `ScheduledTask` takes epoch milliseconds, but nothing tells the model the current time or the Host time zone. To schedule "today at 10:00" the model reached for Bash, which fails closed on Windows under `ask`/`explore`, so the task was never created.
   
   Every `ScheduledTask` result now ends with the Host clock, e.g. `now=1790214165000 (2026-09-24T09:42:45+08:00 (Asia/Shanghai))`. `nextFireAt` also includes its local rendering, so the model can check the schedule it just created. The description tells the model to call `mode=list` for the clock before it computes `runAt`/`startAt`. The system prompt is unchanged, so prompt caching is unaffected. Clock and zone are injectable for tests.
   
   Fixes #5665
   
   ## Verification
   
   - New `scheduled-task-tools.test.ts`: offset and zone formatting (`Asia/Shanghai`, `UTC`), `list` reports the clock, `create` echoes the local fire time. It fails without the change.
   - `node --test` over `scheduled-task-tools` and `code-mode-backend` on this branch alone: 32 pass, 0 fail.
   - `biome check`, ASF header check, protocol epoch guard, `git diff --check`: clean. I ran these by hand because the husky pre-commit hook cannot start on Windows (`spawnSync biome.cmd` → `EINVAL`), so the commit used `--no-verify`.
   - Not run: an end-to-end Desktop session. The tool output format changes (lines are appended); no test or consumer in the repo parses these strings.
   
   ## Review focus
   
   This PR is independent of #5666 but sits in the same user journey. With both, the agent can go from `tool_search` → `ScheduledTask list` (clock) → `create` without a shell.
   
   ## AI use
   
   - [ ] No generative tool made a substantive contribution
   - [x] Generative tooling made a substantive contribution
   
   Tool(s) and scope: Claude Code diagnosed the failure from the source, and wrote the change and the tests. I reviewed the change. The commit carries a `Generated-by: Claude Code` trailer.
   
   ## Checklist
   
   - [x] Tests cover the change and fail without it
   - [x] Lint, format, typecheck and the affected suites pass locally
   
   Does this PR entail a change in behavior?
   
   - [x] Yes — described under Summary above
   - [ ] No
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix(runtime): report the Host clock from ScheduledTask [maka]

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx merged PR #5667:
URL: https://github.com/apache/maka/pull/5667


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org