Repository navigation
fix(cron): allow webhook isolated runs to reuse sessionKey sessions - #70895
dannylin108 wants to merge 2 commits into
Conversation
Greptile SummaryThis PR fixes a session rollover bug in isolated cron runs by computing Confidence Score: 5/5Safe to merge — the change is minimal, well-tested, and preserves existing behavior for non-hook isolated runs. The logic change is a single two-line conditional that correctly scopes the session-force behavior. The new test covers the key regression case, and all 27 existing tests continue to pass. No data-loss or auth boundary risk is introduced. No files require special attention. Reviews (1): Last reviewed commit: "fix(cron): reuse hook sessions for isola..." | Re-trigger Greptile |
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. This PR should close because it is the implicit hook-session-persistence variant of a real webhook session-continuity problem, and the remaining work is already owned by the canonical issue plus the explicit Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Keep persistent hook-session work on the explicit So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Keep persistent hook-session work on the explicit Do we have a high-confidence way to reproduce the issue? Yes, source-level. Current main dispatches hook-agent requests as isolated cron jobs, passes Is this the best way to solve the issue? No. This PR is a plausible minimal patch, but the best fix is an explicit persistent hook-session mode that preserves default isolation and keeps the trust boundary reviewable. Security review: Security review needs attention: Needs attention: the diff changes the hook session-key trust boundary by making durable reuse implicit for hook-sourced isolated runs.
AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 8ed6c78b7891. |
|
To use Codex here, create an environment for this repo. |
|
Added the requested changelog entry under |
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
|
This pull request has been automatically marked as stale due to inactivity. |
Motivation
/hooks/agentwebhook calls that intentionally provide stablesessionKeyvalues orexternalContentSource; this caused unwanted session rollovers and lost history.Description
forceNewSessioninsrc/cron/isolated-agent/run.tsand only force a fresh session whensessionTarget === "isolated"and the run is not hook/webhook-sourced, preserving hook sessions whenexternalContentSourceorhook:*session keys are present.src/cron/isolated-agent/run.skill-filter.test.tsto add a regression test that verifies webhook-sourced isolated runs passforceNew: falsetoresolveCronSessionwhile keeping the existing isolated-cron behavior.src/cron/isolated-agent/run.ts,src/cron/isolated-agent/run.skill-filter.test.ts.Testing
pnpm test src/cron/isolated-agent/run.skill-filter.test.ts src/cron/isolated-agent/session.test.tsand the suite passed.Fixes #70894