Skip to content

docs(rules): many sessions, one machine — a probe lock, npm run sync, the main checkout as a mirror - #145

Merged
playidea-lab merged 1 commit into
mainfrom
docs/session-rules
Sep 7, 2026
Merged

docs(rules): many sessions, one machine — a probe lock, npm run sync, the main checkout as a mirror#145
playidea-lab merged 1 commit into
mainfrom
docs/session-rules

Conversation

@playidea-lab

Copy link
Copy Markdown
Owner

무엇

규칙 1은 세션들을 서로의 파일에서 떼어 놓았지만, 9/6·9/7에는 기계 위에서 만났습니다. headed Chromium이 다른 세션의 headless 뒤에서 뜨지 못했고, uv 캐시 잠금을 다퉜고, 이름으로 죽인 정리가 다른 세션의 브라우저를 잡았고, 야간이 같은 식으로 죽었고, 한 세션의 푸시가 main을 한 시간 빨갛게 만들어 다른 PR이 기다렸습니다. 규칙 4로 적고, 둘은 코드로 강제합니다.

  • probe_lock() (tests/browser/launch.py): ~/.cache/borch/browser-probe.lock에 flock. 모든 probe가 시작하는 세 serve()에서 잡으므로 두 번째 probe는 기다리며 누구 차례인지 말합니다. BORCH_NO_PROBE_LOCK=1로 끌 수 있음. tests/test_probe_lock.py.
  • npm run sync: build_api.py → sync_counts.py. _total이 인덱스를 따라가고, 영어가 바뀐 한국어 항목(stale)은 실패, 한국어가 없는 이름은 집계만(--missing로 목록). vision_v2_twins 둘의 한국어를 여기서 추가.
  • 규칙 1 갱신: 워크트리에서 npm ci(symlink 금지 — 사흘의 빨간 밤), 본 체크아웃 ~/git/borch는 origin/main의 미러(오늘 132커밋 뒤 버전 브랜치 + 576줄 잔해 + untracked nightly.py 상태에서 발견 → 패치로 보존 후 리셋).
  • 규칙 2: 야간이 ../borch-nightly 워크트리의 스크립트 사본으로 돈다는 것을 명시.

검증

파이썬 1407 통과(잠금 테스트 2개 포함), npm run sync exit 0(stale 0).

🤖 Generated with Claude Code

https://claude.ai/code/session_01QEnGjNSC2qZzPKW68XJxz6

… and the main checkout as a mirror

Rule 1 kept sessions out of each other's files; on 2026-09-06/07 they met on the
machine instead. A headed Chromium never launched while another session's headless one
was up, two runs fought over the uv cache lock, a cleanup by process name took another
session's browser, a nightly died the same way, and one push turned main red for an
hour while another's PR waited. Rule 4 writes down what held afterwards, and two parts
of it are code rather than etiquette:

  · probe_lock() in tests/browser/launch.py — flock on ~/.cache/borch/browser-probe.lock,
    taken in the three serve() functions every probe starts from, so a second probe
    waits and says whose turn it is. tests/test_probe_lock.py holds it.
  · npm run sync — build_api.py, then sync_counts.py: the _total counts follow the index
    and a Korean entry whose English moved fails; names without Korean are counted
    (--missing lists them). Two such names from vision_v2_twins get theirs here.

Rule 1 changes with it: npm ci in the worktree, not a symlink to the main checkout's
node_modules (three red nights came from that link), and the main checkout is a mirror
of origin/main — it was found on a version branch 132 commits behind with a session's
leftover 576 lines and an untracked nightly.py that launchd had run for four days; the
leftovers are kept as a patch beside it. Rule 2 names the worktree the nightly runs from.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEnGjNSC2qZzPKW68XJxz6
@playidea-lab
playidea-lab merged commit 4c0324b into main Sep 7, 2026
2 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.

2 participants