Repository navigation
Description
Objective
Make cache-memory, comment-memory, and repo-memory content available to on.steps: (the pre-activation job) so deterministic filter steps can make dispatch/activation decisions based on prior memory state — without an LLM turn.
Context
Issue #43924 describes how on.steps: runs in the pre_activation job (see pkg/workflow/compiler_pre_activation_job.go) but memory stores are only ever restored in the agent job. This forces authors to either burn an LLM turn just to read memory, or duplicate state in a separate actions/cache.
The on.steps: pre-activation job is the natural place for a deterministic "should I activate and what should I do?" filter — but only if it can read persisted memory.
Implementation Plan
Implementation Plan
Files to Modify
pkg/workflow/compiler_pre_activation_job.go— inject memory restore steps into the pre-activation job when memory is configuredpkg/workflow/cache.go— potentially refactorgenerateCacheMemoryStepsto accept a target builder/context so it can be reused in the pre-activation job- Relevant tests — add tests that verify memory restore steps appear in the pre-activation job steps when
on.steps:+ memory are both configured
Approach
- In
buildPreActivationJobSteps(incompiler_pre_activation_job.go), whendata.CacheMemoryConfig,data.RepoMemoryConfig, ordata.SafeOutputs.CommentMemoryis set andon.stepsis non-empty, emit the corresponding restore steps before the useron.stepsentries. - Reuse or extract the same restore step generation functions used by the agent job (
generateCacheMemorySteps,generateRepoMemorySteps, comment-memory prepare step) — making them accept a generic target builder or returning step YAML strings. - Ensure the pre-activation job runner environment has the necessary scripts available (they come from the
setupaction — check whether setup runs in the pre-activation job or only in the agent job). - Make memory restore in
on.stepsopt-in (only injected when the workflow uses both memory andon.steps), not always-on. - Add tests asserting restore steps precede user
on.stepsin the pre-activation job.
Acceptance Criteria
- When a workflow has
on.steps:andcache-memory:, cache-memory is restored beforeon.stepsrun in the pre-activation job - Same for
repo-memoryandcomment-memory - Memory restore in pre-activation does not emit write-back/commit steps (read-only surface)
- Existing
on.stepstests continue to pass (make test) - New test covers the memory-in-pre-activation scenario
-
make recompilepasses
Generated by 📋 Plan Command · 79.6 AIC · ⌖ 11.7 AIC · ⊞ 4.7K · ◷
Comment /plan to run again
- expires on Jul 8, 2026, 10:39 PM UTC-08:00
Activity
github-actions commentedon Jul 7, 2026
🍪 Issue Monster selected this for Copilot
I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪