Skip to content

Fix validate-repo-suggestion stale-base bug#112

Merged
ksimback merged 1 commit intomainfrom
fix/validate-repo-suggestion-stale-base
Apr 25, 2026
Merged

Fix validate-repo-suggestion stale-base bug#112
ksimback merged 1 commit intomainfrom
fix/validate-repo-suggestion-stale-base

Conversation

@ksimback
Copy link
Copy Markdown
Owner

Summary

Active-priorities #3 from the roadmap. The validate-repo-suggestion.yml workflow was reading data/repos.json from the workflow's local checkout, then committing that content to a branch based on latest main via the GitHub API. If main moved between checkout and the commit step, the local copy was stale — and the later squash-merge silently dropped everything that had landed in the gap.

PR #89 hit this in the wild: keepnotes-ai/keep was added cleanly, but AxDSan/mnemosyne (added moments earlier in PR #88) was overwritten. Had to be restored manually in PR #94.

Fix

Fetch repos.json content via the GitHub API (ref: 'main') right before mutating it, instead of reading from fs. The fetched file.sha is reused as the parent SHA for the commit — same optimistic-concurrency check as before, so if another PR squeaks in between the API fetch and the commit, this run fails loudly with a 409 instead of silently dropping content.

Action item

⚠️ PR #79 (mem0) is still DIRTY for the same reason and this fix doesn't retroactively repair it. Two options:

  • Manual rebase — pull the mem0 branch locally, rebase on main, force-push. Resolves the conflict, preserves the PR.
  • Close and re-trigger — close PR Add mem0ai/mem0 to Memory & Context #79, find the original issue, re-label it repo-suggestion to re-fire the workflow. New branch will be based on current main.

Recommend option 2 since it exercises the new code path and confirms the fix in production.

Test plan

  • Vercel preview deploy clean (workflow YAML only — no runtime impact)
  • After merge, next repo-suggestion issue submitted will exercise the new code path
  • Validate by submitting a test repo suggestion + watching the auto-PR's diff vs latest main: should only show the one new entry being added, not changes to other entries

🤖 Generated with Claude Code

validate-repo-suggestion.yml read repos.json from the workflow's local
checkout, then committed that content to a branch based on latest main.
If any other PR merged to main between checkout and this step (concurrent
auto-PR, manual merge, bot push), the local copy was stale — and the
later squash-merge silently dropped everything that had landed in the gap.

Surfaced by PR #89: keepnotes-ai/keep was added cleanly, but
AxDSan/mnemosyne (added by PR #88 during the gap) was overwritten and
had to be restored later in PR #94. PR #79 (mem0) is still DIRTY for
the same reason and needs manual rebase or workflow re-trigger.

Fix: fetch repos.json content via the GitHub API (`ref: 'main'`) right
before mutating it, instead of reading from `fs`. The fetched `file.sha`
is then used as the parent SHA for createOrUpdateFileContents — same
optimistic-concurrency check as before, so if another PR squeaks in
between the fetch and the commit, this one fails loudly with a 409
instead of silently dropping content.

Removed: the now-redundant second `getContent` call and the unused
`require('fs')`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hermes-ecosystem Ready Ready Preview, Comment Apr 25, 2026 7:21pm

Request Review

@ksimback ksimback merged commit e22b4fe into main Apr 25, 2026
2 checks passed
@ksimback ksimback deleted the fix/validate-repo-suggestion-stale-base branch April 25, 2026 19:23
ellenlivia-mem0 pushed a commit to ellenlivia-mem0/hermes-ecosystem that referenced this pull request Apr 27, 2026
mem0 is a universal memory layer shipped as an official Hermes Agent
memory provider (one-command setup via `hermes memory setup`). Adds
the repo to the Memory & Context category on the map and the
best-memory-providers list, with a gbrain-style overview summarizing
the three auto-invoked tools (mem0_profile, mem0_search, mem0_conclude)
and the non-blocking, circuit-breakered retrieval model.

Also calls out the OSS / self-hosted path: mem0 is Apache-2.0, so the
same provider runs either managed (app.mem0.ai) or fully self-hosted
via the Python SDK (`pip install mem0ai`) or Docker Compose stack
(Postgres + Qdrant + your own LLM/embedder), pointing Hermes at a
local endpoint.

Rebased onto latest main to fix the stale-checkout drift flagged by
PR ksimback#112 — earlier branch state had silently dropped contributions
from PRs ksimback#74, ksimback#80, ksimback#84, ksimback#87, ksimback#88, ksimback#89 plus the ksimback#105ksimback#114 fixes.
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