Repository navigation
docs: say a script cron starts its own copy of a stubbed server - #33716
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: this is a docs-only change, and both sentences tell users about a gap that already exists in the code. What this change shipsInventory (2 items) — 2 justifiedIntent: a user who stubs and shares an MCP server learns that a script cron still starts its own copy of it on every run, and what to do about that. This is an ADDITION (documentation).
[FIRST-PRINCIPLES-REVIEWED] 1f1c4c2 Description read[DESCRIPTION-READ] 7b5601cc18a73223fcdbb5cfacd16d50ebb4d6b5d3fce215bd796c9915632e36 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS This is a docs-only change. Both anchors resolve, and the claim that a script cron starts its own servers matches [DESIGN-REVIEWED] 1f1c4c2 Description read[DESCRIPTION-READ] 25f727be8d9af36a74140c0395754d0ddf1226ead9ef958ca75b6f4a9e09518f That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
buluoray
left a comment
There was a problem hiding this comment.
Approving. Docs only: a script cron's ctx.call_tool starts its own copy of a stubbed, shared MCP server and stops it at run end, and the docs list the workarounds (src/kiro_crew/docs/cron-and-scheduling.md:150, configuration.md:812). Every claim matches source (cron_script_mcp.py:388-414, 348-357; config/integration_sections.py:471-479), and both links resolve.
e1642ce to
8d3970f
Compare
|
Rebased: main moved in src/kiro_crew/docs/configuration.md, src/kiro_crew/docs/cron-and-scheduling.md since this head went green (2caa69b -> fd5d9ef); CI re-running. The red Static Ratchet Gate on the old head was main's: [operator: bolichen97] |
Pull request was closed
|
[operator: bolichen97] Closed and reopened with no code change: PR Readiness was waiting on a Code Review run that records its base (the #33337 rule), and only a new pull request event starts one. The close turned auto-merge off; it is re-armed once this re-run is green. |
The recipe for a server that signs in again and again says every chat, worker and helper reaches one shared backend once the server is stubbed and shared. A script cron is not one of them: each run starts its own copy of the server and stops it when the run ends, so a server that keeps its sign-in only in memory signs in again on every run. Say so in the cron docs, with the workarounds, and point the recipe at it. Part of #32996
8d3970f to
1f1c4c2
Compare
|
Rebased: main moved in src/kiro_crew/docs/configuration.md, src/kiro_crew/docs/cron-and-scheduling.md since this head went green (fd5d9ef -> 478d13a); CI re-running. GitHub reported this PR as conflicting: #33905 rewrote the credential-scan sentences of the same The red Backend Tests shard on the old head, [operator: bolichen97] |
buluoray
left a comment
There was a problem hiding this comment.
Approve on 1f1c4c2. Rebase only since the earlier APPROVE at 8d3970f: the PR's added sentences are byte-identical, only main's surrounding call_tool paragraph changed; every claim still matches source and both anchors resolve. Decisive lines: src/kiro_crew/docs/cron-and-scheduling.md:150, src/kiro_crew/docs/configuration.md:824-825, src/kiro_crew/cron_script_mcp.py:404-411, src/kiro_crew/cron_script_mcp.py:363, src/kiro_crew/cron_script.py:301-302
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approving. On this head the review checked the new text against the code. A script cron's call_tool starts each MCP server from Crew's own agent spec through KeptMcpServers, not from the gateway stub overlay. CronContext.close stops those servers when the run ends, and preview does the same. Both new anchors (#script-and-command-crons and #a-server-that-signs-in-again-and-again) resolve to real headings. A test merge with main is clean, and no doc under docs/decisions conflicts with the change.
Done well: the PR fixes an overclaim in the sign-in recipe instead of adding a mechanism. It names three concrete workarounds and keeps the promise that the server runs inside the script's sandbox, which matches the maintainer decision on #32996.
Problem / Motivation
Goal: A user who stubs and shares an MCP server learns from the docs that a script cron still starts its own copy of that server on every run, and what to do instead.
The recipe "A server that signs in again and again" in
configuration.mdsays every chat, worker and helper reaches one shared backend once the server is stubbed and shared. A script cron is not covered: each run'sctx.call_toolstarts its own copy of the server and stops it when the run ends. Neither doc says so, so a user who followed the recipe expects the cron to sign in once and instead sees a sign-in on every run.Why it matters
A server that keeps its sign-in only in memory signs in again on every script cron run. A job that runs once a minute signs in 60 times an hour, and a service that throttles sign-ins starts answering HTTP 429. Today the docs give the user no way to learn that the recipe does not cover this case, or which workaround to use.
Not a goal
ctx.call_toolto the shared backend through the MCP gateway. That would run the server outside the script's sandbox, whichcron-and-scheduling.mdpromises it runs inside on Linux and macOS, so it waits until shared gateway backends are sandboxed at least as tightly as a script (the hardeningmcp_gateway/backend.pytracks as Phase 2).What changed (motivation → approach → change)
The docs now tell a user that the stub recipe does not reach script crons, before they find out from a run of sign-ins.
The cron docs'
call_toolparagraph says a run's servers stop when the run ends, a stubbed and shared server included, so a server that keeps its sign-in only in memory signs in again on every run. It lists the three ways around that: make all of its calls in one run, run the job less often, or use an agent cron, which spends a model turn on each run. The recipe inconfiguration.mdgains one sentence saying a script cron is not covered, with a link to that section.Backwards compatibility
Compatible: documentation only; no code, config key or behaviour changes.
Removes nothing: two statements are added and no existing text is taken away.
Tests
N/A — docs only. The statements were checked against the code on the base:
cron_script_mcp.pystarts each server from the agent spec in~/.kiro/agents/, not from the broker-stub overlay the gateway hands to chat sessions, and itsclose()stops every kept server when the run ends../scripts/docs-lint.shpasses and checks that both link targets exist; it does not check anchors in this tree, so both anchors were checked by hand against their headings.Manual verification
N/A — no runtime behaviour changes. Both paragraphs were read through as rendered Markdown, and both links land on their headings.
Screenshots / video
N/A — no frontend change.
Related Issues
Part of #32996
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)