Skip to content

fix: preserve sticky scheduler runtime and event lineage - #572

Draft
zhuanyongxigua wants to merge 4 commits into
mainfrom
codex/sticky-runtime-fix
Draft

fix: preserve sticky scheduler runtime and event lineage#572
zhuanyongxigua wants to merge 4 commits into
mainfrom
codex/sticky-runtime-fix

Conversation

@zhuanyongxigua

@zhuanyongxigua zhuanyongxigua commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

  • rebuild command-scoped startup and selected-provider LLM facade environment after a sandbox is loaded or reused, with scoped token cleanup
  • persist the SchedulerRun-to-Sandbox link before command execution and calculate sticky compatibility from effective Agent/Scheduler inputs rather than the whole Project revision
  • preserve authoritative STOPPED lifecycle state across late command persistence and support an explicit, fail-closed .git/index.lock cleanup before resuming a stopped sticky sandbox
  • persist authenticated parent Event lineage so the original webhook Event trace can expand routed control and workload runs, while hardening webhook idempotency and credential-header handling

This is a draft integration PR for the platform support needed by per-project sticky schedulers. It fixes the runtime facade mismatch reproduced after session reload, unrelated-revision sticky churn, missing pre-command run linkage, late cell writes reviving stopped metadata, and routed workloads being absent from the root Event trace.

Testing

Completed on the current branch:

  • GOTOOLCHAIN=go1.26.2 go test ./pkg/agentcompose/adapters ./pkg/events/webhooks ./pkg/llms/runtimefacade ./pkg/model ./pkg/schedulers ./pkg/storage/configstore ./pkg/storage/sandboxstore -count=1
  • focused -race -count=1 passed for adapters, webhooks, runtimefacade, model, schedulers, and configstore
  • the two new sandboxstore lifecycle regression tests passed individually with -race -count=1; the complete sandboxstore race package produced no result after about eight minutes and was stopped
  • task --force docs:build
  • git diff --check origin/main...HEAD

Known validation boundary:

  • a previous isolated E2E proved root Event lineage through ingress/control/workload, but it used an earlier commit and a new sandbox
  • the final 0b66f661 HEAD still needs the complete dev180 sticky E2E: two runs reuse one Sandbox, facade traffic has no 401, pre-command linkage is visible, force-stop remains STOPPED after late command persistence, resume cleanup occurs, and the root trace includes the workload

The full repository suite currently also contains baseline failures on macOS outside this branch's changed runtime code (timezone and /var versus /private/var assertions). This Draft is not ready to merge until the final E2E and CI review are complete.

Checklist

  • Documentation updated when behavior or configuration changed.
  • Tests added or updated for user-visible behavior.
  • No secrets, private endpoints, internal certificates, or local runtime state included.

Draft follow-up

  • Run the complete sticky/facade/force-stop/resume-cleanup/root-trace E2E on dev180 with the exact PR build.
  • Review whether the webhook-lineage, sandbox-lifecycle, and optional Git cleanup changes should remain together or be split before marking ready.

@monkeyscan

monkeyscan Bot commented Aug 8, 2026

Copy link
Copy Markdown

评审任务执行失败。

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