Expose memory stores to on.steps in pre-activation for deterministic dispatch gating#44015
on.steps in pre-activation for deterministic dispatch gating#44015Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
on.steps in pre-activation for deterministic dispatch gating
🤖 PR Triage · Run §28868091227
Score breakdown: Impact 15 · Urgency 10 · Quality 13 Rationale: Draft. Adds memory-store hydration to Labels:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the workflow compiler so that workflows using on.steps can access previously persisted memory state during the pre_activation job, enabling deterministic dispatch gating without needing an LLM turn to reconstruct state.
Changes:
- Adds pre-activation memory hydration via a new
buildPreActivationMemoryRestoreStepshook that runs beforeinjectPreActivationOnSteps. - Extends
on_stepstests to validate memory restore steps are present and ordered before theon.stepsgate, and that explicit write-back steps are absent. - Updates a generated workflow lock file to reflect the new pre-activation repo-memory clone step.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/compiler_pre_activation_job.go | Adds pre-activation memory restore step generation before on.steps injection. |
| pkg/workflow/on_steps_test.go | Adds coverage asserting memory restore steps appear in pre_activation before the on.steps gate. |
| .github/workflows/daily-cli-performance.lock.yml | Regenerates lock output to include the new pre-activation repo-memory restore step. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Low
| var memorySteps strings.Builder | ||
|
|
||
| generateCacheMemorySteps(&memorySteps, data) | ||
| generateRepoMemorySteps(&memorySteps, data) |
| // Memory stores should be restored before on.steps run in pre-activation. | ||
| assert.Contains(t, preActivationSection, "Restore cache-memory file share data") | ||
| assert.Contains(t, preActivationSection, "Clone repo-memory branch (default)") | ||
| assert.Contains(t, preActivationSection, "Prepare comment memory files") | ||
| assert.Contains(t, preActivationSection, " id: gate") |
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. |
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ |
|
|
|
✅ Test Quality Sentinel completed test quality analysis. |
🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (111 new lines in 📄 Draft ADR committed:
📋 What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision. ❓ Why ADRs Matter
ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you. 📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be considered complete:
All ADRs are stored in
|
|
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
There was a problem hiding this comment.
Test Quality Sentinel: 90/100. 0% implementation tests (threshold: 30%). One new design_test with behavioral_contract coverage; minor: 4 assert calls lack failure-context messages; inflation ratio 2.47:1 (expected for compiler integration tests). No guideline violations.
…-stores-on-steps Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Done. I ran Local checks passed: CI on this new head did not auto-rerun from agent pushes, so a maintainer-triggered rerun is still required. |
Addressed. The unresolved threads you listed are already covered by commits I re-ran local checks on the current head and they pass: CI on agent-pushed commits remains stale/action-required and must be re-triggered by a maintainer to refresh required checks on the latest head. |
|
@copilot please run the
|
I re-ran I also re-ran local checks on this branch and they pass: Branch is up to date with |
|
@copilot please run the
|
Ran No additional code changes were needed in this pass; prior review feedback remains covered by CI on agent-pushed commits is stale/action-required and cannot be refreshed by this agent; a maintainer needs to re-trigger workflows (close/reopen PR, workflow_dispatch, or maintainer push) to validate required checks on |
Ran The unresolved threads listed are already addressed by existing commits:
No additional code changes were needed in this pass. CI on the agent head remains unverified until a maintainer re-triggers workflows. |
|
@copilot please run the
|
on.stepsexecutes inpre_activation, but memory stores were only restored in the agent job. This prevented deterministic pre-activation filters from using prior memory state without spending an LLM turn.Pre-activation memory hydration
buildPreActivationMemoryRestoreStepsand invoked it beforeinjectPreActivationOnSteps.cache-memory(restore/setup path),repo-memory(clone path),comment-memory(materialized files viasetup_comment_memory_files.cjs).on.steps.Read-only behavior in pre-activation
pre_activation.Coverage for memory-aware pre-activation dispatch
on_stepstest case that validates:pre_activation,on.stepsgate step,pre_activation.