Defer cache-memory saves until after threat detection validates agent output#5772
Defer cache-memory saves until after threat detection validates agent output#5772
Conversation
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
- Modified generateCacheMemorySteps to use actions/cache/restore when threat detection is enabled - Created buildUpdateCacheMemoryJob to save cache from artifacts after detection succeeds - Integrated update_cache_memory job into compiler_jobs.go workflow building - Added actions/cache/save to actions-lock.json - Created comprehensive tests for cache-memory with threat detection Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
|
@copilot add security section in memory docs about delayed updates |
…ction Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added security section to memory.md documenting the delayed cache update behavior with threat detection. The section explains the 5-step validation process and security benefits of deferring cache updates until after detection succeeds. Commit: 440dc66 |
|
@copilot add caches to smoke agentic workflows |
Added cache-memory configuration to all main smoke test workflows: - smoke-copilot - smoke-claude - smoke-codex - smoke-copilot-no-firewall - smoke-copilot-playwright Each workflow now includes a cache memory test requirement to verify the cache-memory functionality and the delayed cache update behavior with threat detection. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added These workflows will test the delayed cache update behavior with threat detection since they all have safe-outputs configured. The cache will be saved via the Commit: 013a92a |
|
@copilot merge main |
|
@copilot merge main |
…c-job-artifacts # Conflicts: # .github/workflows/smoke-claude.lock.yml # .github/workflows/smoke-claude.md # .github/workflows/smoke-codex.lock.yml # .github/workflows/smoke-codex.md # .github/workflows/smoke-copilot-no-firewall.lock.yml # .github/workflows/smoke-copilot-no-firewall.md # .github/workflows/smoke-copilot.lock.yml # .github/workflows/smoke-copilot.md
Resolved merge conflicts in smoke test workflows by combining both test requirements: - Kept cache-memory testing from this branch - Added safe-input gh tool testing from main branch All smoke test workflows now include both test requirements (numbered 5 and 6). Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot add issues: read permissions to smoke agentic workflows. In strict mode, extra read permissions is a warning, not an error. |
…ript sources The update_pr_description_helpers.cjs module was registered in scripts.go but was not included in GetJavaScriptSources() map in js.go, causing bundler to fail when update_pull_request.cjs tried to require it. Added: - Embed directive for update_pr_description_helpers.cjs in js.go - Entry in GetJavaScriptSources() map to make it available to the bundler This fixes the "module missing" error in the update_pull_request job. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Fixed the module missing error. The issue was that Added the missing embed directive and map entry to make the module available to the bundler. Commit: ea7e41f |
|
🤖 SYSTEM_INIT: Smoke Copilot No Firewall ACTIVATED. PROCESSING pull request. ALL SUBSYSTEMS ONLINE. |
|
📰 BREAKING: Smoke Copilot Playwright is now investigating this pull request. Sources say the story is developing... |
|
📰 DEVELOPING STORY: Smoke Copilot reports failed. Our correspondents are investigating the incident... |
|
🔮 The ancient spirits stir... Smoke Codex awakens to divine this pull request... |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
💥 WHOOSH! Smoke Claude springs into action on this pull request! [Panel 1 begins...] |
Smoke Test Results - Run 20008666097Timestamp: 2025-12-07T18:44:16Z Test Results:
Overall Status: FAIL (gh tool authentication issue)
|
All smoke test workflows already have |
Smoke Test Results - ClaudeLast 2 PRs:
Tests:
Status: PASS
|
Smoke Test Results✅ Playwright MCP: Successfully navigated to GitHub.com (title: "GitHub · Change is constant. GitHub keeps you ahead. · GitHub") Status: PASS
|
Smoke Test Results: Copilot Engine✅ File Writing: Created Status: FAIL - Critical tools (gh-aw, jq, authenticated gh) unavailable in workflow execution environment 📰🔥📋 https://github.com/githubnext/gh-aw/actions/runs/20008666116 fer issue #5772 🗺️ |
|
Last merged PRs: #5776 "Add shared/gh.md import and gh issues list test to smoke workflows"; #5775 "Add expires field with relative time support to create-discussion, create-issue, and create-pull-request for auto-closing"
|
Summary
Successfully implemented cache-memory artifact-based updates to ensure memories are only saved to cache after threat detection validates the agent's output.
Changes Made
generateCacheMemoryStepsto useactions/cache/restoreinstead ofactions/cachewhen threat detection is enabled, preventing automatic cache saves via post-actionbuildUpdateCacheMemoryJobfunction that generates a new job to download cache-memory artifacts and save them to GitHub Actions cache after detection passescompiler_jobs.goactions/cache/save@v4to actions-lock.json for explicit cache savingcache_memory_threat_detection_test.gocovering:How It Works
Before (Issue):
actions/cachewhich auto-saves cache via post-actionAfter (Fixed):
actions/cache/restore(no auto-save)update_cache_memoryjob downloads artifacts and saves to cache ONLY if detection succeedsDocumentation
Added security section to memory.md explaining:
Smoke Test Coverage
Added cache-memory configuration to the following smoke test workflows to validate the feature with real agentic workloads:
Each workflow now includes cache memory test requirements to verify that cache-memory functionality works correctly and that the delayed cache update behavior operates as expected when threat detection is enabled.
Bug Fix
Fixed module missing error where update_pr_description_helpers.cjs was not available to the bundler when processing update_pull_request.cjs. The module was registered in scripts.go but missing from the GetJavaScriptSources() map in js.go.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Changeset
update_cache_memoryjob saves them to the Actions cache only after detection succeeds.Smoke Test Summary - Run 20008666097
Timestamp: 2025-12-07T18:44:16Z
Status: FAIL
Summary: 5/6 tests passed - gh safe-input tool requires GH_TOKEN authentication