Repository navigation
fix: show a Memory row's press as working from the press - #1906
Merged
Merged
Conversation
A 제안 row's 문서 고치기 on a Memory card is held by the core from the press until a read of Memory shows its promotion, so the row reads 고치는 중 at once instead of keeping its button for the tens of seconds the agent takes to start. A press while another Memory change runs waits its turn instead of being refused unseen, and a refused start is drawn on its row with the reason. The read that shows a promotion's running cards is asked for as soon as they are written, before the agent starts.
…ntence The row carries the refusal's code (branches_full, not_git, promotion_unavailable, action_busy, presses_full, store_unavailable, project_unavailable, project_unreachable) and the tab words it in every interface language; only a code the tab has no words for, such as the store's own refusals, shows the core's sentence.
yansfil
added a commit
that referenced
this pull request
Oct 30, 2026
…nflicting branch by itself (#1908) 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: "컨플릭트 나면 고쳐서 하면 되는 거 아닌가").  ## 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. <details><summary>Verification record</summary> </details>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
제안 탭에서 Memory 행의
문서 고치기를 눌러도 아무 일도 없는 것처럼 보였습니다.누름은 실제로 처리되고 있었지만, 에이전트가 뜨기까지(수십 초) 화면은 버튼 그대로였고, 그동안 다른 행을 누르면 조용히 거절됐습니다.
이제 누른 행은 그 순간
고치는 중으로 바뀌고, Memory가 실제 진행 상태를 읽어 오면 그 행으로 넘어갑니다.다른 카드가 시작 중일 때 누른 행은 차례를 기다리고, 시작이 거절되면 그 행에
시작하지 못했어요 · <이유>와다시 시도가 나옵니다.이유는 거절 코드별로 번역된 문구이고, 문구가 없는 코드(저장소 자체의 거절)만 코어 문장을 아래에 보여 줍니다.
Review
web/src/i18n/resources/suggestions.ts,suggestions.refusal.*, 4개 언어)action_failed(카드가 사라짐, 문서와 다름 답변 필요 등 저장소 자체 거절)는 문장마다 이유가 달라 코어 문장을 그대로 둡니다herdr-core/src/runtime/project_memory.rs-apply_memory_action을begin_memory_action(거절을 반환)으로 나눔; 실패 경로가 Memory 탭에 그대로 가는지herdr-core/src/runtime/memory_promotion.rs-start_promotion이 running 기록 직후reserved()로 읽기를 요청; 쓰기 스레드가 Runtime 락을 잠깐 잡음(effects permit은 try_lock만 쓰므로 교착 없음)herdr-core/src/runtime/suggestion_memory.rs- 누름 단계(대기/실행/기록됨/거절), 읽기 세대로 넘겨주는 시점,Refusal::of의 kind→코드 대응Evidence
a_pressed_memory_row_reads_working_before_its_write_runs- 실제 store와 delivery worker로 누르고 Runtime 락을 쥔 채(쓰기 전) 행이 Applying/HideAiWorking, 같은 행 재클릭은 무시, 이후 에이전트 시작 실패까지 행이 버튼으로 돌아가지 않음a_press_behind_another_memory_change_waits_and_a_refusal_shows_on_its_row- 다른 Memory 변경 중 누름은 대기(working), 이어서 거절되면 행에promotion_unavailable코드와 코어 문장lay_memory_rows단위 테스트로 진행/거절/넘어가기 누름의 행 모양HideAiTool.test.tsx- 아는 코드는 번역 문구만, 모르는 코드(not_started)는 코어 문장을 detail로 보여 줌verify-cargo.sh lint통과,verify-cargo.sh test-scoped -p herdr-core3563 passed / 0 failed(첫 커밋), 두 번째 커밋 후 Memory·제안 관련 290개 재실행 통과verify-web.sh web typecheck·lint·test2313 passedhide-aiscenememory_pressed상태를 ko·en, dark로 Playwright 캡처; 패널 폭에서 잘리던 긴 문구 둘을 줄임Verification record
base f74c9aa, head c4a9907.