Skip to content

feat: add scheduled chat messages - #11397

Open
kvzz42 wants to merge 1 commit into
kirodotdev:mainfrom
kvzz42:feat/schedule-once-autonudge
Open

kvzz42 wants to merge 1 commit into
kirodotdev:mainfrom
kvzz42:feat/schedule-once-autonudge

Conversation

@kvzz42

@kvzz42 kvzz42 commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Let users schedule exact composer text once for a chosen future time in the same chat from a visible Send later control, without persisting plaintext or weakening audience containment.

Kiro Crew has no safe composer path for deferring ordinary chat text. A cron creates another conversation and changes the prompt contract instead of submitting the user’s message in the chat they chose.

Why it matters

Deferred text should keep the same conversation, workspace, app, audience, prompt, skill, and slash-command behavior as a normal composer submission. The feature must not let agent-writable automation metadata impersonate fresh user input or let stale browser and mirror state redirect a message.

Not a goal

  • Preserve pending scheduled messages across a Kiro Crew restart.
  • Persist scheduled plaintext or introduce a long-lived signing key.
  • Change recurring cron behavior or ordinary AutoNudge, queue, and directive authority.
  • Allow more than one automation in a chat.

What changed (motivation → approach → change)

Send later submits the composer’s exact text once, in its original chat, at the selected time. It uses the split AutoNudge service as the timer and keeps authoritative text in gateway-owned memory, rather than creating a cron conversation or trusting the agent-writable loop store.

Area Change
website/src/components, website/src/pages, website/src/monitoring, website/src/lib, website/src/types, website/src/utils Adds a visible Clock immediately beside Send and retains Send later in desktop + and touch More menus. Optimize moves into those same menus while its shortcut and guards remain intact. Staged files, folders, or session references disable every Send later entry with text-only guidance; a stopping composer disables them with its existing status and closes an open picker. The Send at picker, restart disclosure, pending banner, edit, and authenticated unschedule flow share the existing composer path. Send later and Run once reject local minutes skipped by daylight-saving transitions instead of silently scheduling a different wall time. The Schedule page points chat-scheduled messages back to their original chat.
src/kiro_crew/autonudge.py, src/kiro_crew/autonudge_service, autonudge_authz.py, autonudge_selfarm.py Adds a one-shot discriminator and absolute deadline to a text-free durable row. Exact text and provenance remain process-local. Create, edit, cancel, completion, restart cleanup, and close rollback settle transactionally under service locks; a failed completed-row cleanup retries on the bounded overdue cadence instead of spinning. Scheduled edits use a protected-state revision compare under the mutation lock, with browser-compatible hashing for every JSON string, so a stale tab cannot overwrite a newer edit. Failed dispatched turns consume a durable replay attempt; the third failed attempt retires the row.
src/kiro_crew/dashboard, src/kiro_crew/slack, src/kiro_crew/goal_command.py Sends through the ordinary chat turn path while withholding live-user, directive, queue, stage-resume, and orchestrator authority. Admission captures workspace, app, memory, attendance, and selected mirror identity. Every asynchronous egress rechecks that identity; Slack options reauthorize after token minting and immediately before posting. Provider-free slash commands stamp their successful terminal directly. Protected scheduled-state updates publish once to owner clients after provenance and generation checks. In-flight Unschedule refusal emits a denied SEL record, and shared goal parsing keeps scheduled /goal text from mutating automation.
src/kiro_crew/cron.py, cron_service/fields.py, website/src/components/JobForm.tsx Keeps existing one-shot cron records editable as Run once and preserves their absolute fire time in list/update round trips. Create-form clock defaults are frozen for the form lifetime, including after a successful create. Run-once updates reject non-positive timestamps before replacing a working recurring schedule; ordinary recurring executions are unchanged.
website/src/i18n, docs, test, website/src/test, .github/black-baseline.txt Localizes the new states and the short Optimize accessibility label, gives every dropped-message cause the same reason-neutral recovery guidance, documents the security/lifecycle contract, adds backend/frontend race and authority regressions, and removes one graduated Black baseline entry.

A pending message is dropped after restart because its exact text is intentionally not persisted. The picker discloses that before scheduling. Busy pre-dispatch sessions retry without spending an attempt. Successful completion removes the one-shot record. A read-only relay-archive chat refuses the turn like any other send. Failed, truncated, cancelled, or unclaimed dispatched turns retry; after three such failures, the message is retired only after its reason-neutral dropped notice is durable. The dropped-message card gives recovery guidance without claiming which safety check stopped delivery. Manual early fire is refused.

Backwards compatibility

Breaking: PATCH of an existing scheduled-message AutoNudge row now requires a 64-hex expected_revision; a stale or revision-less scheduled edit is rejected instead of using last-write-wins. Cron updates that set at_ts=0 are now rejected before mutation instead of replacing a working schedule with an inert one-shot. Writer sweep on origin/main @ d50deedd56a92e00687336aec19447c0dc5f2796: main has no scheduled-row writer; its AutoNudgePopover PATCHes only ordinary goal loops and remains accepted. Main’s CLI, dashboard, MCP, and onboarding one-shot writers require a future or strictly positive timestamp and never use zero as a scheduled value. This PR’s SessionAutomationPopover is the sole scheduled-row writer and sends a revision derived from loop ID, slot, exact protected message, and deadline on both text and time edits.

Tests

  • 2,442/2,442 tests pass across all 23 backend test files changed by this PR.
  • 609/609 tests pass across all 16 TypeScript frontend test files changed by this PR.
  • The repo-wide contract, fence, guard, and composition suites (143 files) pass 7,762 tests. The one failure, a dashboard boot hook-order contract, comes from a locally built website/dist registering extra window-entry routes; the same file passes on a clean checkout of the base.
  • Black, isort, Flake8, mypy (2,243 source files), TypeScript, changed-file ESLint, and i18n pass.

Manual verification

Scripted Playwright loaded the real production build through the repository’s standard gateway-free /api/** fixture harness at desktop and 390 px touch widths. It typed a draft and asserted that the visible Clock is enabled immediately beside Send, no inline Optimize remains, desktop + and touch More each retain Send later and Optimize, and both pickers stay within the viewport. The notice fixture also asserted the exact reason-neutral dropped-message copy before capture.

Screenshots / video

Visible Clock beside Send — desktop

Desktop composer with the visible Send later Clock immediately beside Send

Desktop + menu retains Send later and Optimize

Desktop composer menu with Send later and Optimize

Touch picker opened from the visible Clock

Touch composer with the Send later picker opened from the visible Clock

More exact-head UI evidence

Desktop Send later picker opened from the visible Clock

Touch composer with the visible Send later Clock beside Send

Touch More menu retaining Send later and Optimize

Desktop Send later disabled with the text-only reason while a file is staged

Touch Send later disabled with the text-only reason while a file is staged

Reason-neutral dropped scheduled-message notice

Related Issues

Fixes #9836

Supersedes #9960

Pattern harvest

Rule candidate: review-prompt
Pattern: Deferred user speech must keep exact text outside agent-writable state, capture its audience at admission, compare protected edit state under the mutation lock, and revalidate every egress after asynchronous work.

Checklist

  • At most two commits, with a Conventional Commits title
  • Existing related tests pass and new tests cover the feature
  • Self-review completed; code follows project style
  • Documentation updated
  • No secrets, credentials, or internal references in the diff

@kvzz42
kvzz42 requested review from a team and buluoray September 16, 2026 23:04
@github-actions github-actions Bot added the fork Pull request from a fork (external contributor) label Sep 16, 2026
@kvzz42

kvzz42 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Intent: Let a user defer an exact composer message while preserving its original session and the session automation exclusivity shared with goals and monitors.
Not a goal: This PR does not add channel scheduling, deferred attachments, or a second cron-backed delivery path.

@github-actions github-actions Bot added the readiness: action required A blocking check or review needs attention label Sep 16, 2026
@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ⏭️ skipped

Revision 449fc60273244168bfef8006e1c851913e0cecec touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Advisory — does not block merge.

@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5, fork) — ✅ PASS

Premise-level review of 3b89a5e6a601f750c12a5ff5b97b91c7b8cead58 via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Verify the Slack egress rework: every live turn now routes through _select_slack_mirror_target, despite "Ordinary messages and live relays keep their existing behavior."

Not justified as shipped

  • Item 8 — rides along: one-shot cron "Run once" round-trip (at_ts on the list API, PATCH at/delay/at_time, delete_after_run derivation) is a second job inside a Send-later feature PR; declared, and its defect is readable in the diff — api_crons returned no machine field for at jobs, so the editor reopened them as an empty Cron expression.

The rewritten pins in test_session_control.py and test_channel_connect_row.py strengthen, not reverse, the prior decisions: the pause-before-resolve ordering survives inside the new selector's AST assertion, and per-publication authorization becomes target-bound. The egress rework is cause-level — a deferred message fires after a gap in which mirrors can retarget, and binding authorization to the exact selected link closes the authorize-then-rebind window for every sink, not just the scheduled one. No new config key, env var, or default ships; specs update in the same commit; the RFC lens is not triggered (opt-in capability beside unchanged defaults).

What this change ships

Inventory (10 items) — 9 justified

Intent: let a user defer an exact composer message to a chosen time inside the same conversation — ADDITION (fixes #9836). The change has more than 10 observable differences; these are the 10 most noticeable.

  1. Composer gains "Send later" (+ menu on pointer, More menu on touch) submitting exact text once at a chosen time — justified
  2. Send-at picker rejects past times and discloses restart cancellation before scheduling — justified
  3. Pending banner in chat with Edit/Unschedule; Schedule page lists it with a read-only original-chat pointer — justified
  4. A scheduled message occupies the chat's single automation slot, 409-conflicting with goals and monitors — justified
  5. Pending messages do not survive gateway restart; exact text lives only in gateway process memory, durable row stays text-free — justified
  6. Agent directives cannot unschedule it, and the delivered turn carries no human-only directive authority — justified
  7. Failed containment drops the message with a visible notice card plus SEL record instead of sending — justified
  8. One-shot cron jobs round-trip as "Run once" in the Schedule editor (at_ts field, PATCH retime, delete-after-run derivation) — rides along: declared second job with its own diff-readable defect
  9. Every Slack/channel egress sink authorizes the exact mirror target it sends to (fence pins rewritten to the selector form) — justified
  10. /goal --max <huge digits> becomes a non-mutating usage error via the new goal_command module (5 counted call sites: autonudge ×2, chat_runner, autonudge handlers ×2) — justified

[FIRST-PRINCIPLES-REVIEWED] 3b89a5e

@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5, fork) — 🟡 CONCERNS

Design-level review of 3b89a5e6a601f750c12a5ff5b97b91c7b8cead58 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: CONCERNS

Stale superseded-design claims remain: the spec promises at-least-once replay across a crash the memory-only backend cannot deliver; the description cites absent bundle-ceiling hunks.

Watch

  • docs/system-specs/modules/learn-cron-dashboard.md contradicts itself in one commit: the new AutoNudge paragraph says "a restart resets and replays an accepted-but-unfinished turn … This is at-least-once across a process crash; a crash … may replay the exact user input," while the same file (and session.md, security.md, and the load code, which drops rows lacking memory provenance) says "no scheduled message survives restart." A maintainer building settlement or recovery logic against the replay sentence will code for delivery semantics that do not exist.
    Clears when: the replay sentence is deleted or rescoped to same-process store reload, matching the restart-cancellation contract.
  • The description's change table claims website/scripts bundle-ceiling updates ("measured shared-catalog and translation chunks with 5.0% headroom"), but no such hunk exists in the diff — phantom claim, likely carried from the superseded revision.
    Clears when: the description drops that row or the ceiling change is actually in the diff.

Suggestions

  • On startup discard of a pending scheduled row, emit the existing scheduled_message_dropped notice into the owning chat instead of only a gateway log, so the cancellation is visible where the user scheduled it.

[DESIGN-REVIEWED] 3b89a5e

@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review (fork) — 🔴 changes requested (blocking)

Reviewed 3b89a5e6a601f750c12a5ff5b97b91c7b8cead58 via the fork AI-review pipeline; updated in place on each push.

2 of 2 blocking finding(s) are security-class and were withheld from adjudication, so the blocking verdict stands.

BLOCKING -- website/src/components/ChatInput.tsx:1866 -- stale scheduled callbacks mutate the active chat
restoreScheduledDraft(result.message) / onAutomationChange?.(null)
Unschedule in chat A -> switch to chat B while pending -> A’s text enters B’s draft and B’s automation is cleared.
Anchor: residual/crash-data-loss-corruption
Fix: bind completion updates to the originating slot and route draft and automation changes by that slot.

BLOCKING -- src/kiro_crew/dashboard/chat_runner.py:17331 -- multipart Slack reply continues after mirror revocation
_reply_mirror_target = ( / await state.slack_client.post_message(_reply_mirror_chan, ...)
Long scheduled reply -> unlink after the first awaited post -> remaining chunks or options reach the revoked thread.
Anchor: backend-security-controls
Fix: reselect and authorize the target before every chunk and block send, stopping when authorization fails.

[BLOCK-MERGE] 3b89a5e
[GPT-REVIEWED] 3b89a5e

Adjudication (Opus 5) — is blocking on each finding proportionate?

F1 — HIGH: cross-slot write with no recovery for the draft half.
Conditions confirmed: slotId changes in place rather than remounting the composer (the PR's own reset effect keys on [slotId], ChatInput.tsx hunk @1580), so the in-flight DELETE's onSuccess closes over the new slot's value/onChange; onAutomationChange(null) clears by the currently-active record's slotKey (website/src/pages/ChatPage.tsx:7829-7837) against automation resolved for the active slot (ChatPage.tsx:1191). Recovery: the automation half can self-correct from the staleTime: 0 snapshot (ChatPage.tsx:1183) or a live SSE record, but only on a refetch trigger; the appended draft text has none — the user must find and delete it. Rarity is not extreme: clicking Unschedule and then a sidebar chat within one local DELETE round-trip is ordinary impatient-user behavior, not a contradicting-timing artifact.

F2 — Cross-audience publication with no recall.
Conditions confirmed: the target is authorized once before the chunk loop and reused for every subsequent post_message/post_blocks (patch hunk @17328-17402 over src/kiro_crew/dashboard/chat_runner.py), so only the first send is synchronous with the authorization; a multi-part reply is produced whenever the text exceeds SLACK_MSG_LIMIT (src/kiro_crew/slack/format.py:723), which long agent replies routinely do. Recovery: none — the base code states the invariant itself, "a reply already sent cannot be recalled" (src/kiro_crew/dashboard/chat_runner.py:4038). The window is not extreme either: a fence exists precisely because a second actor is concurrently active on the turn, so a concurrent unlink is the expected case rather than a contrived one.

[ADJUDICATION] 3b89a5e total=0 uphold=0 downgrade=0
[GPT-ADJUDICATED] 3b89a5e

[ADJUDICATION-FENCED] 3b89a5e fenced=2 flagged=0
UPHOLD-FENCED F1 website/src/components/ChatInput.tsx:1866 -- The slot-switch-during-pending-DELETE window is an ordinary user sequence, the callback provably re-binds to the new slot's props, and the mis-appended draft has no self-correcting path.
UPHOLD-FENCED F2 src/kiro_crew/dashboard/chat_runner.py:17331 -- Authorization is synchronous with only the first of N chunk sends, multi-part replies are routine at the Slack size limit, and a published message is unrecallable by the code's own stated invariant.
[GPT-ADJUDICATED-FENCED] 3b89a5e

@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review (fork) — ✅ no blocking findings

Reviewed bcc4f5c9596ee9965a59a5a9f334cab4072c94b2 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] bcc4f5c

@kvzz42

kvzz42 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author
  • Restart can discard an unfinished scheduled turn

fixed — 7b90d95c1694
Dispatch and terminal completion are persisted separately. A restart replays a dispatched-but-unfinished turn; only scheduled_completed retires the record.

@kvzz42

kvzz42 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author
  • Feature map omits scheduled messages

fixed — 7b90d95c1694
docs/feature-map/README.md now maps the composer, editor, handler, and POST/PATCH/DELETE AutoNudge endpoints for scheduled chat messages.

@kvzz42

kvzz42 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author
  • Uncapped one-shot timer sleep

fixed — 7b90d95c1694
Scheduled sleeps are capped by _SCHEDULED_MESSAGE_BEAT_SECS; each wake recomputes the remaining wall-clock interval before delivery.

@kvzz42

kvzz42 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author
  • Zero-consumer delete_after_run response field

fixed — 7b90d95c1694
The unused API response field, frontend type member, and response assertion were removed. Internal cron storage semantics remain unchanged.

@kvzz42

kvzz42 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author
  • Editor Cancel deletes the scheduled message

fixed — 7b90d95c1694
The destructive action is explicitly rendered as Delete with a trash icon. Successful deletion restores the message text to the composer draft; closing the popover only discards edits.

@kvzz42

kvzz42 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author
  • Send later hides its disabled reasons

fixed — 7b90d95c1694
The menu row now renders the active blocking reason inline and in its title for empty drafts, offline state, existing automation, unsupported session mode, restricted memory, and unavailable session state.

@kvzz42

kvzz42 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author
  • Past time silently disables Schedule

fixed — 7b90d95c1694
Both time pickers expose aria-invalid and render the existing future-time guidance inline with role=status.

@kvzz42

kvzz42 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author
  • Scheduled-message editor uses Run once wording

fixed — 7b90d95c1694
The editor labels its date-time control with the Send later copy instead of cron-specific Run once wording.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 17, 2026
@kvzz42
kvzz42 force-pushed the feat/schedule-once-autonudge branch from 7b90d95 to 3d4f537 Compare September 17, 2026 02:49
@kvzz42

kvzz42 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author
  • Cancellation was labeled Delete

fixed — 3d4f53729c08
Both scheduled-message cancellation controls now say Cancel; the editor uses an X rather than a trash icon, and cancellation restores the message to the composer.

@kvzz42

kvzz42 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author
  • Monitor conflict did not explain how to proceed

fixed — 3d4f53729c08
The disabled reason now names the bounded monitor and tells the user to stop it, using existing localized strings.

@kvzz42

kvzz42 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author
  • Send later had no touch entry point

fixed — 3d4f53729c08
Touch layouts expose Send later in the existing More menu and anchor the time picker to that mobile trigger. The regression clicks through to the picker.

@kvzz42

kvzz42 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: removed unmeasured App budget change

fixed
SHA ab6651f drops the App hunk because the current head passes at 3714 KB.

@kvzz42

kvzz42 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: removed unrelated member-scheduling feature-map churn

fixed
SHA ab6651f restores the Schedule row and retains the verified Scheduled chat message row.

@kvzz42

kvzz42 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: removed unrelated member-scheduling feature-map churn

fixed
SHA ab6651f removes the nonexistent MemberScheduleDialog claim from this PR.

@kvzz42

kvzz42 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: removed unmeasured App budget change

fixed
SHA ab6651f keeps App at 3714 KB, so the body and diff agree.

@kvzz42

kvzz42 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

rebutted
The restart warning is visible directly above the commit action and explicitly says the message is deleted and not sent. Muted secondary styling preserves hierarchy without hiding the consequence.

@kvzz42

kvzz42 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

rebutted
The consequence is persistent, adjacent to the action, and explicit that restart deletes the message. Full-strength styling would compete with the primary scheduling controls without improving comprehension.

@kvzz42

kvzz42 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

needs-a-decision
Maintainers: does the accepted memory-only, restart-cancelled v1 contract also accept no post-restart in-chat notice, given the plaintext is intentionally unavailable after restart?

@kvzz42

kvzz42 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

needs-a-decision
Maintainers: does the accepted restart-cancelled v1 contract permit the pending banner to disappear after restart without a replacement notice?

@kvzz42

kvzz42 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

needs-a-decision
Maintainers: explicitly accept silent restart cancellation, or require a text-free scheduled_message_dropped history notice after load-time cleanup.

@kvzz42

kvzz42 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

needs-a-decision
Maintainers: accept Send later in the existing + Add files and options menu for v1, or require it on the send control before merge.

@kvzz42

kvzz42 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

needs-a-decision
Maintainers: accept the documented and screenshot-tested + menu placement for v1, or require send-control placement before merge.

@kvzz42

kvzz42 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

needs-a-decision
Maintainers: confirm one automation per chat is the intended v1 contract; the composer already explains that the active monitor must be stopped before scheduling.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]: This PR has been idle since 2026-09-25 with two blocking findings and a conflicting base. I reviewed the blockers — several of them need your decision rather than a mechanical fix:

  • The rebase is a port, not a text merge. Main has since split autonudge.py into responsibility-owner modules (refactor: compose the AutoNudge service from responsibility owners #14994, 09-29) and cron.py into cron_service owners (refactor: split cron.py into cron_service owners behind its facade #14615). Your +1,104 lines of scheduled-message state, settlement and rollback have to be re-homed into owners that did not exist when this was written, and which owner holds the scheduled-message logic is a design call. git merge-tree finds 17 conflicting files, with about 5k conflicted lines in autonudge.py alone across 9 hunks.
  • The two red test shards need a choice, not a fix. Both failures come from main's security-guard tests in test_decisions_model_route_app_actor.py (feat(decisions): route unpinned turns through Jev while preview is on #12871), which look for a literal _turn_kwargs: dict = {"_directive_user_origin": not bool(request_app)} and for the app token at three queue call sites. You hoisted that into directive_user_origin = not bool(request_app) and relay_containment_admission is None, so the AST sweep no longer sees it. Either restore the inline form at the dispatch and queue sites, or change main's guard sweep — and that guard belongs to another PR, so it is not ours to edit unilaterally.
  • Your own needs-a-decision is still unanswered. You asked a maintainer to confirm that one automation per chat is the intended v1 contract. That is a real contract question and it gates the design; it needs a repo writer, and I am surfacing it rather than answering it.
  • UX placement. The review asks you to expose "Send later" from the send button too, or record why not, and flags that two look-alike one-shot mechanisms now exist (Send later and Run once). First Principles separately flags the "Run once" cron round-trip as separable scope. Where the control lives and whether Run once ships here are product calls.

Two findings ARE concrete and would be ours once the above is settled — both security-class and both upheld on adjudication: stale scheduled callbacks in ChatInput.tsx:1866 letting chat A's text enter chat B's draft and clear B's automation (bind completion updates to the originating slot), and chat_runner.py:17331 continuing a multipart Slack reply after mirror revocation (reselect and authorize before every chunk). Neither has a disposition for head 3b89a5e; your last dispositions are for bcc4f5c.

Also worth knowing: at 11,833 added lines across 80 files introducing a new subsystem, this is past the surface our automation will reason about unattended, so we would not drive it even with every answer above. And Opus 5 never completed on this head — it died on an installation rate limit, so its "No findings" comment is from the older bcc4f5c.

Two smaller accuracy items: the spec still carries an "at-least-once … may replay the exact user input" sentence in learn-cron-dashboard.md that contradicts this PR's restart-cancellation behaviour, and the body claims website/scripts bundle-ceiling hunks that are not in the diff.

When you've settled the ownership, the guard-test question and the placement calls, the pipeline will re-assess on its next cycle.

Copy link
Copy Markdown
Contributor

PR triage (2026-10-05): rebase needed, plus one overlap to discuss

Rebase. Head 72f8af9 sits on f31e2f7, and origin/main (a92dde1) is now 230 commits ahead. git merge-tree origin/main origin/pr/11397 reports content conflicts in 10 files:
src/kiro_crew/autonudge_service/firing.py, src/kiro_crew/autonudge_service/timers.py, src/kiro_crew/dashboard/chat_handlers.py, src/kiro_crew/dashboard/chat_runner.py, src/kiro_crew/slack/gateway.py, test/test_autonudge_dashboard_fire.py, website/src/components/ChatInput.tsx, website/src/i18n/en.context.json, website/src/i18n/locales/en-XA.json, website/src/i18n/locales/en.manual.json.
Some of these come from AutoNudge work merged after your base, for example #16352 (d4a3e2fd6f), #17001 and #16802.

CI on this head is red, and the failures come from this diff, not from flakes:

  • test_decisions_model_route_app_actor.py::test_the_accepting_handler_builds_both_keys_into_its_kwargs and ::test_the_queue_sweep_finds_the_sites_it_is_meant_to_guard (expected 2, found []). These are feat(decisions): route unpinned turns through Jev while preview is on #12871's guard tests. chat_handlers.py:1379 now builds _turn_kwargs from the hoisted directive_user_origin, so the guard's literal and AST sweep can no longer find the sites. The semantics look stricter, not weaker. Still, the guard has to be satisfied, or changed in agreement with its owner. Removing it is not an option.
  • test_error_code_contract.py::test_no_new_error_response_without_a_code: a new error response has no machine-readable code.
  • test_transcript_derivation_seam.py::TestTheFence::test_every_plain_read_in_the_tree_is_named_as_plumbing: slack/gateway.py _read_messages is a plain transcript read that isn't named as plumbing.
  • Frontend src/i18n/productName.test.ts: a catalog value hardcodes the product name.
  • The GPT 6.1, Opus 5.5 and Security Scope reviews are all "incomplete" on 72f8af9, so this head has no completed AI or security-scope verdict.

Overlap to discuss: #9815 (draft, same author), "feat(cron): let a created job target a chat session". Both PRs serve issue #9836, but they use different mechanisms, so this is not a duplicate:

I found no breaking change to an existing surface. The expected_revision requirement only applies to scheduled-message rows, which main cannot create. main's cron update has no at_ts input at all. Interactive relays keep the series version rule and terminator-only success. I found no P0. The cross-chat callback finding from the earlier review is addressed in chat-input/scheduling.tsx: requestSlotIsCurrent and requestAutomationIsCurrent gate every completion. Recommendation: rebase and continue development.

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kvzz42 for the scheduled-messages work. One rebase issue before this can land.

#17642 and #17662 (remote-crew-sidebar RFC, wave 4) deleted the relay path on main. The peer now owns its session and the dashboard opens a crew window onto it (#16757). These hunks touch code that no longer exists, so they are no longer needed:

  • src/kiro_crew/dashboard/remote_relay.py (deleted on main): all hunks, R54-1047 (RemoteTurnError, ensure_version_parity, _drop_unsent_user_row, relay_remote_turn, _peer_turn_chunks).
  • src/kiro_crew/slack/gateway.py: the relay_remote_turn import from remote_relay at R183-186 and its call at R7832.
  • test/test_local_command_done_landing.py (new file): imports relay_remote_turn at R16 and calls it at R56.
  • test/test_remote_crew_execution.py (deleted on main): all hunks, including the relay_remote_turn calls (R567-R4054) and the _relay_in_flight asserts at R3930 and R4017.

Could you drop those hunks and rebase on main? Please keep the rest of the PR as it is. Thank you.

@dodgeblaster dodgeblaster left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stewarding review for #9836 (Schedule a one-shot cron from the UI). Re-grounded against current main (5821f39214).

Where main stands now (the gap this PR targets is still real):

  • website/src/components/JobForm.tsx still derives schedMode from isInterval (line 77) else isWeekly (line 112) else cron (line 114) — there is no once mode. A one-shot job (at, no every_secs/cron_expr) still falls into cron mode with an empty expression and buildBody refuses to save it, so an MCP-created one-shot still cannot be round-tripped from the Schedule page.
  • The backend one-shot halves ARE merged: src/kiro_crew/dashboard/handlers/cron_jobs.py resolves at/delay/at_time. So the Schedule-tab once read-path fix has everything it needs on main.

Blocking: this PR no longer applies to main. As @iamwhatever already flagged (CHANGES_REQUESTED, 2026-10-08), RFC waves #17642 / #17662 / #16757 deleted the relay path (src/kiro_crew/dashboard/remote_relay.py) that several hunks here depend on (relay_remote_turn and its import in slack/gateway.py). Those hunks touch code that no longer exists, so the PR is CONFLICTING and cannot be applied as-is.

Scope concern. Beyond the scheduled-messages feature, this PR also carries a large autonudge* refactor (rename/move across autonudge.py, autonudge_authz.py, autonudge_selfarm.py, autonudge_service/*, plus their tests). Folding an unrelated subsystem rename into a feature PR widens the blast radius and makes the rebase harder than it needs to be. A smaller PR scoped to the Schedule once read-path (a fourth schedMode recognising at/no-every_secs/no-cron_expr, buildBody emitting at, i18n keys, Screenshot Evidence) would land far more easily, as @CrysisDeu's triage on #9836 suggested.

Validation note (unattended-execution safety). A UI create path for a one-shot must go through the SAME validation/approval as the existing cron create route — a scheduled job runs an agent turn unattended. Please confirm the composer-caret / form path posts through POST /api/crons (the cron_jobs.py validation) and does not introduce a side door.

Recommendation. This needs the author to: (1) rebase onto current main and drop the deleted-relay hunks; (2) split the unrelated autonudge refactor out; (3) re-request review. As a fork PR it also needs the author's rebase and a maintainer to run/merge — not something a reviewer can push here. Leaving the issue open; not approving a PR that cannot currently apply.

Review posted as part of the #9836 T1/T2 sweep.

This branch has not been deployed

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

Labels

fork Pull request from a fork (external contributor) merge conflict Branch has merge conflicts with its base — author must resolve before merge needs-author-decision PR blocked on author input readiness: action required A blocking check or review needs attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Schedule a one-shot cron from the UI (Schedule tab once mode + composer shortcut)

7 participants