Skip to content

fix: start a document fix however many branches wait, and remake a conflicting branch by itself - #1908

Merged
yansfil merged 4 commits into
mainfrom
fix/no-branch-cap
Oct 30, 2026
Merged

yansfil merged 4 commits into
mainfrom
fix/no-branch-cap

Conversation

@yansfil

@yansfil yansfil commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Related: #1906 (fix/memory-press-feedback also touches the refusal shown on a row, including branches_full; merge-order: this stays alone and merges main once after #1906 and #1903)

Summary

문서 고치기 and Memory's N개 문서에 반영 no longer stop at 결정을 기다리는 브랜치가 5개예요: a fix starts on its own branch from the base however many branches already wait.
When main에 합치기 or main에 바로 올리기 is refused because the base moved and the branch conflicts with it (merge_conflict), Hide starts 다시 맞추기 itself, once per refusal, and the row shows 다시 맞추는 중 under 반영 중.
When the remake is ready, Hide presses the same merge once more by itself, since the operator already asked for it; the row reads 합치는 중 and folds as any merge does.
Only a second refusal, or a remake that made no commit, stops for the operator with 다시 시도; the hand 다시 맞추기 button is gone.
This replaces PRD hide-ai-branch-first-apply D-17 and B28 (operator decision 2026-10-31: "컨플릭트 나면 고쳐서 하면 되는 거 아닌가").

브랜치 6개가 기다려도 문서 고치기가 나오고, 충돌난 브랜치는 반영 중에서 다시 맞추는 중

Review

  • 판단해 주세요: the remade branch is merged without anyone reading the agent's conflict resolution (lead's decision: the press already asked for the merge).
  • 판단해 주세요: which merge a remake finishes lives in memory only; after a restart the remade branch waits for a press rather than adding a store field and a Memory schema migration.
  • 조심해서 볼 파일: herdr-core/src/runtime/suggestion_apply.rs - failure path: the refusal and then LineAction::Rebase go to the worker in that order, so the refusal is recorded before the remake begins.
  • 조심해서 볼 파일: herdr-core/src/runtime/memory_branch.rs - failure path: a merge decision now prepares a rebase start under the lock (promotion_start); on merge_conflict the decision worker restarts the batch with BatchPurpose::Rebase instead of writing the refusal, and writes the refusal when no card restarts.
  • 조심해서 볼 파일: herdr-core/src/runtime/memory_branch.rs finish_remade_batches - runs on each Memory read; it fires only after the batch was seen running, so the old ready rows of a stale read are never merged.
  • 조심해서 볼 파일: contracts/snapshot-wire-enums.json, herdr-core/src/model.rs - snapshot wire: suggestion_hold loses branches_full and the Memory snapshot loses branches_full; the shell already treated it as optional.
  • 비용 검토: no cap was added (principle 15). Running remake agents are bounded only by refusals, and each refusal is one operator press; nothing loops, since a remake that conflicts again needs another press. A cap on concurrent Hide AI agents per Project would be the real bound if one is wanted; this PR does not invent one.

Evidence

  • 확인한 것: core test a_merge_that_conflicts_with_the_base_starts_the_remake_itself on a real git repo: a conflicting merge refuses with merge_conflict, exactly one LineAction::Rebase follows, and once the remade attempt is ready main fast-forwards to the remade tip with no second press.
  • 확인한 것: core test a_remade_branch_that_conflicts_again_waits_for_the_operator: a remake that still conflicts is refused once, no second remake starts, and a later ready attempt moves nothing.
  • 확인한 것: bash scripts/verify-cargo.sh lint passed, and verify-cargo.sh nextest -p herdr-core -p hided ran 4228 tests, all passed.
  • 확인한 것: bash scripts/verify-web.sh passed (web 264 files / 2311 tests, desktop 28 files / 302 tests, typecheck, lint, build); node scripts/check-design-contract.mjs passed.
  • 확인한 것: gallery state hide-ai&state=remaking (dark, ko, 420 px) captured with headless Chromium: six ready branches, AGENTS.md 고치기 still offered, and the remade row reading 다시 맞추는 중 1분.
  • 확인하지 못한 것: the Memory batch's automatic remake and its finishing merge have no test of their own (the decision worker needs a live Herdr spawn); they reuse the restart path 다시 맞추기 took and the operator's merge path.
  • 확인하지 못한 것: no native run in the installed app; a real agent remaking a conflicting branch was not exercised end to end.
Verification record

@yansfil
yansfil merged commit 50bc131 into main Oct 30, 2026
33 checks passed
@yansfil
yansfil deleted the fix/no-branch-cap branch October 30, 2026 17:13
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