Skip to content

Fix Repo Assist memory migration - #391

Merged
dsyme merged 2 commits into
mainfrom
fix/repo-assist-memory-migration
Oct 6, 2026
Merged

dsyme merged 2 commits into
mainfrom
fix/repo-assist-memory-migration

Conversation

@dsyme

@dsyme dsyme commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • move legacy Repo Assist memory cleanup into a deterministic pre-agent step
  • remove every stale memory entry except notes.json, including legacy runid.json and non-JSON files
  • keep custom memory validation read-only and restore max-file-count to one
  • report the actual unexpected filenames when validation fails

This fixes upgraded repositories whose existing memory/repo-assist branch contains files from older Repo Assist memory formats.

Validation

  • gh aw compile workflows/repo-assist.md --approve
  • gh aw compile --validate workflows/repo-assist.md
  • exercised migration against legacy files and a legacy directory; only notes.json remained

Security review

The compilation reported a changed memory-validation script and required explicit approval. I reviewed the change: it only removes the validator's filesystem mutations and improves its error message. No secrets, actions, or redirects were added or removed. The new migration step operates only within /tmp/gh-aw/repo-memory/default and preserves notes.json.

dsyme and others added 2 commits October 6, 2026 23:55
Move legacy-file cleanup before agent execution so custom validation remains read-only, remove all stale memory entries except notes.json, and restore the one-file limit.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the six-change limit until legacy memory deletions have been persisted.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsyme
dsyme marked this pull request as draft October 6, 2026 22:59
@dsyme

dsyme commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Compiled and traced this change in fslaborg/Deedle with gh-aw v0.89.21.

The generated order is correct:

  1. clone memory/repo-assist
  2. run the migration before the agent
  3. filter and validate memory after the agent
  4. upload the artifact
  5. validate and push it in push_repo_memory

For Deedle this now works because its memory branch has already been manually cleaned to contain only notes.json.

However, this PR alone does not migrate a still-dirty remote memory branch. The agent job removes legacy files from its working copy, but push_repo_memory.cjs copies only files present in the artifact and scopes git status/git add to those paths. Missing legacy JSON files therefore are not staged as deletions in the push job, and push-time validation still sees them.

I restored max-file-count: 6, because once deletion propagation is supported a migration can change up to five legacy entries plus notes.json. This PR should remain draft until the required gh-aw deletion-propagation mechanism is implemented or the migration strategy is changed.

@dsyme
dsyme marked this pull request as ready for review October 6, 2026 23:06
@dsyme
dsyme merged commit 055e901 into main Oct 6, 2026
1 check passed
@dsyme
dsyme deleted the fix/repo-assist-memory-migration branch October 6, 2026 23:06
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