Skip to content

fix(cron): restore interactive sessions and label scheduled turns - #1579

Open
Open-Squilla wants to merge 4 commits into
mainfrom
fix/restore-automation-session-chat
Open

fix(cron): restore interactive sessions and label scheduled turns#1579
Open-Squilla wants to merge 4 commits into
mainfrom
fix/restore-automation-session-chat

Conversation

@Open-Squilla

@Open-Squilla Open-Squilla commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Scope

Automation runs remain conversations: users can ask follow-up questions in a scheduled run's session and retain its context. Revert #1547's read-only composer and shared turn-admission rejection, then make the public interactive field agree with that restored behavior.

Scheduled agent prompts and replies now persist their Cron source through the existing transcript provenance fields. The WebUI labels automatic prompts as “Scheduled trigger” and scheduled replies as “Scheduled”; manual follow-ups keep their ordinary appearance. Labels survive history reload and Gateway restart, for both current-session and isolated execution.

Scope boundary: the rollback, session interactivity contract, scheduled message provenance, and synthetic regression coverage. A separate test-only commit fixes successful-compaction fixtures that exceeded their tiny token budget under the optional-tokenizer fallback.

Non-goals: changing scheduler target selection, sidebar grouping, adding a related-automation navigation entry, or changing permissions and session owner fencing.

Compatibility: #1547 merged after v0.5.4. The rollback restores the preceding behavior without an upgrade shim. Provenance uses existing optional RPC/database fields, requires no migration, and does not rewrite older history. Session ids/epochs and the current-versus-isolated execution policy are preserved. These changes are platform-neutral.

Branch

Base branch: main

Target exception: N/A

Issue

Linked issue: Refs #1547

Release Note

Release note: Restore follow-up conversations in automation sessions and identify scheduled prompts and replies in chat history.

Tests

Ruff: passed for changed non-generated Python files.

Pytest:

  • 404 session-list and turn-ingress RPC tests passed.
  • 166 scheduled-turn, finalizer, paused-turn, session-owner, current-session Cron, restart-recovery, and context-overflow checks passed.
  • After the test-fixture correction, the complete context-overflow file passed with both normal tokenization and a forced unavailable optional tokenizer: 44 passed in each mode. The original three Windows failures were reproduced before the fix; budgets and insufficient-compaction assertions remain unchanged.

Frontend: 81 source-label/component/rendering unit tests passed. 17 Chromium history-hydration and queue/steer tests passed against the built artifact, including labels after reload, unlabelled manual follow-ups, and the editable automation composer.

Build: npm run build passed, including types, architecture, localization, theme, runtime bundle, and staged-artifact verification.

Contracts: python scripts/contracts/generate_gateway_contracts.py --check passed with the pinned toolchain.

Regression tests: added. Coverage includes SQLite reopen, exact-owner rejection after reset, current-session execution without duplicate forwarding, legacy and per-run Cron interactivity, and durable labels in both kinds of conversation.

Notes: the local checks are targeted; the full repository suite, Windows runtime, Linux runtime, and desktop installers were not run locally. Earlier CI also encountered HTTP 504 downloads for Electron/toolchain artifacts; those infrastructure failures were diagnosed separately from the compaction fixture failures. GitNexus and direct diff inspection verified the intended scope against upstream main. The shared finalizer/rendering paths carry broad impact, covered here by ordinary follow-up, paused-turn, and owner-reset checks. The default test path remains offline, deterministic, credential-free, and safe for forks.

Maintainer Live Check

Maintainer live check: yes

Surface: gateway

Verified the final implementation on macOS using a separate Gateway with persistent test state, its built WebUI, and real provider calls. No browser network interception or fake provider responses were used for this check.

  • Three synthetic one-shot jobs fired at their scheduled times: current-session agent execution, isolated agent execution with origin delivery, and a static reminder. All succeeded.
  • Current-session execution wrote one prompt/reply pair; isolated execution wrote its own pair and delivered one result to the origin. Scheduled entries carried Cron provenance, and all tested sessions reported interactive: true.
  • Browser follow-ups in both agent sessions used the existing inventory context correctly. Each remained in the same session, with no Cron label on the manual prompt or answer.
  • Restarted the Gateway and compared exact message ids, contents, provenance, and session identity; all three scenarios were preserved. The browser remains usable after reload.
  • Removed only the three completed synthetic jobs after validation. Runtime state, provider output, screenshots, and credentials remain outside the repository.

Safety

No secrets, local-only artifacts, private prompts/transcripts, channel identifiers, or AI session notes are committed. Permissions, scheduler routing, and durable owner fencing are preserved.

Third-Party Origin

Third-party origin: none

Documentation Changes

N/A — no documentation files changed.

@Open-Squilla Open-Squilla changed the title fix(session): restore interactive automation conversations fix(cron): restore interactive sessions and label scheduled turns Sep 7, 2026
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.

1 participant