Skip to content

fix(aeon-update): keep the new baseline off main until the sync PR merges - #1256

Merged
aaronjmars merged 1 commit into
mainfrom
fix/aeon-update-baseline-on-merge
Oct 21, 2026
Merged

aaronjmars merged 1 commit into
mainfrom
fix/aeon-update-baseline-on-merge

Conversation

@aaronjmars

@aaronjmars aaronjmars commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Bug

An aeon-update sync moved its baseline on the instance's main before its PR merged. On aeon-agent, main commit e1535314 wrote baseline_sha 75f3b55 to memory/topics/aeon-update-state.json while PR #273 (3a747cd..75f3b55) was still open. That made the PR conflict, and closing it unmerged would have made the next run skip those 13 commits. The design says the baseline moves only on merge.

Cause

The run committed the state file and its run log on the PR branch. The post-run commit (scripts/commit-run-results.sh) stashes post-run state, pushes the branch, and pops the stash on main. The pop conflicted on the log (the branch had a copy main lacked), and the fallback then restored the whole memory/ and output/ trees from the stash. The stash tree is the branch head plus the post-run edits, so the branch-only state file was copied onto main too (run 39522418979: "post-run state conflicted with main on pop; keeping this run's copy").

Fix

  • commit-run-results.sh: on a pop conflict, restore only the files the stash itself changed. Files the agent committed only on its branch stay off main.
  • aeon-update SKILL.md: stage only the synced files plus the state file (never logs, token usage, output/, the dashboard feed or the generated notify/secretcurl helpers), amend only the state file for last_pr, and write the log after the commit while staying on the branch, so the pop no longer conflicts.
  • One sync PR at a time: if an aeon-update/sync-* PR is open, the run writes nothing and exits AEON_UPDATE_PR_OPEN (one line only if upstream moved past it). report mode and pending_conflicts handling are unchanged.
  • Test: the pop-conflict case in test_commit_results_feature_branch.sh now also commits a branch-only state file and checks it stays off main (fails on the old script, passes now).
  • eyebrowlock.json: aeon-update entry re-hashed with eyebrow v0.5.6 (finding line 92 -> 100).

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…rges

A sync run committed its state file and run log on the PR branch. The
post-run commit then hit a stash-pop conflict on the log, and its fallback
restored whole memory/ and output/ trees from the stash, which is the
branch head plus the post-run edits. So the branch-only baseline landed on
main before the PR merged (aeon-agent e1535314 wrote 75f3b55 while #273
was open), the PR conflicted, and closing it unmerged would have skipped
its commits on the next run.

- commit-run-results.sh: on a pop conflict, restore only the files the
  stash changed, never files the agent committed only on its branch.
- aeon-update: stage only the synced files plus the state file (no logs,
  token usage, output, dashboard feed or generated helpers), amend only
  the state file, stay on the branch for the log, and do nothing while an
  earlier sync PR is still open (new AEON_UPDATE_PR_OPEN).
- test: the pop-conflict case now also commits a branch-only state file
  and checks it stays off main.
- eyebrowlock: aeon-update hash + finding line (92 -> 100), v0.5.6 rescan.

Co-Authored-By: Claude <noreply@anthropic.com>
@aaronjmars
aaronjmars merged commit 465b6c0 into main Oct 21, 2026
7 checks passed
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