Skip to content

Fix DeepReport repo-memory persistence: depth-2 paths silently dropped by file glob - #51172

Closed
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/deep-report-fix-repo-memory-persistence
Closed

Fix DeepReport repo-memory persistence: depth-2 paths silently dropped by file glob#51172
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/deep-report-fix-repo-memory-persistence

Conversation

Copilot AI commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

DeepReport's repo-memory (memory/deep-report branch) has been frozen at an April snapshot despite daily runs. The workflow prompt writes memory to /tmp/gh-aw/repo-memory/default/memory/deep-report/ — two folders deep — while its file-glob: ["*.md"] is a slashless pattern, which push_repo_memory compiles with matchSubfolderRoot and therefore matches only files exactly one folder deep. Every file was rejected at push time, and the rejection path logged core.info("No files to copy from artifact"), so the run looked like a clean no-op.

// slashless pattern => "[^/]+/[^/]*\.md"
globPatternToRegex("*.md", { matchSubfolderRoot: true })
  .test("deep-report/last_analysis_timestamp.md");         // true  — persisted
  .test("memory/deep-report/last_analysis_timestamp.md");  // false — silently skipped

Workflow fix

  • .github/workflows/deep-report.md: memory paths moved to /tmp/gh-aw/repo-memory/default/deep-report/ (read, task-mining, and write steps), plus an explicit layout note instructing the agent to copy any legacy memory/deep-report/ files into the new location so history carries forward.
  • Added *.json to file-glob — the task-mining step persists processed-discussions.json / extracted-tasks.json, which the *.md-only filter had also been dropping.

Silent-failure visibility

  • push_repo_memory.cjs: when every artifact file is rejected by the glob, emit core.warning naming the rejected paths, the active FILE_GLOB_FILTER, and the depth rule, instead of an info-level no-op.

Prevention for other workflows

  • repo_memory_prompt.go: the generated memory constraints now include a Required Layout bullet whenever any configured glob is slashless, so agents are told up front that root-level and deeply-nested files are discarded. Affects 24 recompiled lock files.
  • Documented the same in reference/repo-memory.md; added a changeset.

Tests cover the new Go constraint helper, the constraints emitted by buildRepoMemoryPromptSection, and the deep-report path regression at the glob level.

…ches

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix DeepReport repo-memory persistence issue Fix DeepReport repo-memory persistence: depth-2 paths silently dropped by file glob Aug 7, 2026
Copilot AI requested a review from pelikhan August 7, 2026 19:52
@pelikhan
pelikhan marked this pull request as ready for review August 7, 2026 19:54
Copilot AI balanced review requested due to automatic review settings August 7, 2026 19:54
@pelikhan

pelikhan commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts on this branch.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes DeepReport repo-memory persistence by correcting storage paths, expanding accepted formats, and improving glob mismatch visibility.

Changes:

  • Moves DeepReport memory files to the supported depth-one layout and permits JSON.
  • Adds warnings when glob filtering rejects all scanned files.
  • Documents and generates layout constraints, recompiling affected workflows.
Show a summary per file
File Description
pkg/workflow/repo_memory_template_test.go Tests generated layout constraints.
pkg/workflow/repo_memory_prompt.go Generates slashless-glob layout guidance.
docs/src/content/docs/reference/repo-memory.md Documents skipped-file warnings.
actions/setup/js/push_repo_memory.test.cjs Adds warning and path regression checks.
actions/setup/js/push_repo_memory.cjs Warns when filtering accepts no files.
.github/workflows/workflow-health-manager.lock.yml Adds generated layout guidance.
.github/workflows/smoke-ci.lock.yml Adds generated layout guidance.
.github/workflows/sergo.lock.yml Adds generated layout guidance.
.github/workflows/pr-triage-agent.lock.yml Adds generated layout guidance.
.github/workflows/eslint-refiner.lock.yml Adds generated layout guidance.
.github/workflows/delight.lock.yml Adds generated layout guidance.
.github/workflows/deep-report.md Corrects memory paths and permits JSON.
.github/workflows/deep-report.lock.yml Recompiles the DeepReport workflow.
.github/workflows/daily-testify-uber-super-expert.lock.yml Adds generated layout guidance.
.github/workflows/daily-sentrux-report.lock.yml Adds generated layout guidance.
.github/workflows/daily-news.lock.yml Adds generated layout guidance.
.github/workflows/daily-formal-spec-verifier.lock.yml Adds generated layout guidance.
.github/workflows/daily-cli-performance.lock.yml Adds generated layout guidance.
.github/workflows/daily-awf-spec-compiler-surfacing.lock.yml Adds generated layout guidance.
.github/workflows/copilot-session-insights.lock.yml Adds generated layout guidance.
.github/workflows/copilot-pr-prompt-analysis.lock.yml Adds generated layout guidance.
.github/workflows/copilot-pr-nlp-analysis.lock.yml Adds generated layout guidance.
.github/workflows/copilot-cli-deep-research.lock.yml Adds generated layout guidance.
.github/workflows/copilot-centralization-optimizer.lock.yml Adds generated layout guidance.
.github/workflows/copilot-agent-analysis.lock.yml Adds generated layout guidance.
.github/workflows/audit-workflows.lock.yml Adds generated layout guidance.
.github/workflows/agentic-token-optimizer.lock.yml Adds generated layout guidance.
.github/workflows/agentic-token-audit.lock.yml Adds generated layout guidance.
.github/workflows/agent-performance-analyzer.lock.yml Adds generated layout guidance.
.changeset/patch-repo-memory-glob-depth-visibility.md Records the patch-level behavior change.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Suppressed comments (1)

pkg/workflow/repo_memory_prompt.go:69

  • This layout constraint is only added in the single-memory default branch. A non-default single memory or a multi-memory configuration takes the return path at lines 115–181, whose template receives no glob constraints, so those slashless configurations remain undocumented and can still silently lose root/deep files. Propagate the requirement per memory through the multi-memory prompt as well.
				constraints.WriteString(repoMemorySubfolderConstraint(memory.FileGlob))
  • Files reviewed: 30/30 changed files
  • Comments generated: 3
  • Review effort level: Balanced

Comment on lines +403 to +405
// All files present in the artifact were rejected by the glob filter. Without a warning this
// looks like a successful no-op run, so memory silently stops being updated (see deep-report
// stale-memory incident). Surface the mismatch with the offending paths and patterns.
Comment on lines +260 to +261
`push_repo_memory` tool and check its output: if it reports that files were filtered out or that
there were no files to copy, fix the paths/extensions and retry.
Comment on lines +26 to +28
return "- **Required Layout**: Patterns without a `/` (e.g. `*.md`) only match files placed in exactly one subfolder " +
"of the memory folder (e.g. `my-topic/notes.md`). Files written at the memory root or nested more than one folder " +
"deep are silently skipped when memory is pushed.\n"
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.

[deep-report] Fix DeepReport repo-memory persistence — stuck at 2026-04-03 for 4+ months of daily runs

3 participants