docs(rules): many sessions, one machine — a probe lock, npm run sync, the main checkout as a mirror - #145
Merged
Merged
Conversation
playidea-lab
force-pushed
the
docs/session-rules
branch
from
September 6, 2026 23:25
10a5039 to
8eb42a3
Compare
… 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
force-pushed
the
docs/session-rules
branch
from
September 6, 2026 23:39
8eb42a3 to
e3bc891
Compare
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.
무엇
규칙 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 둘의 한국어를 여기서 추가.npm ci(symlink 금지 — 사흘의 빨간 밤), 본 체크아웃~/git/borch는 origin/main의 미러(오늘 132커밋 뒤 버전 브랜치 + 576줄 잔해 + untracked nightly.py 상태에서 발견 → 패치로 보존 후 리셋).../borch-nightly워크트리의 스크립트 사본으로 돈다는 것을 명시.검증
파이썬 1407 통과(잠금 테스트 2개 포함),
npm run syncexit 0(stale 0).🤖 Generated with Claude Code
https://claude.ai/code/session_01QEnGjNSC2qZzPKW68XJxz6