You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
저널은 이미 git의 오브젝트 모델(내용주소 blob/tree/commit, HEAD/PREV refs)을 말한다. 빠져
있던 것은 어휘다: 시도를 남기고 비교하고 채택하는 동사와, 왜 이 상태를 택했는지의 기록.
state 층: refProtocol의 쓰기 순서 법에 (5') 가지 교체를 더한다(assertRefName, PREV 직접
커밋 금지, 가지 판독은 후퇴 없이 명시 예외). commitState가 ref를, openState가 { ref }를
받고, store 계약에 listRefs/removeRef가 는다(Memory/Opfs/JournalKernel 세 드라이버).
objectModel의 commit.env에 note(provenance, canonical JSON 4KB 상한)가 실린다.
journal 층: commitBranch(HEAD/PREV 불변, parents=갈림점) / listBranches / recoverBranch
(h0 대조 동일) / adoptBranch(가지 물질화 후 HEAD 커밋, parents=가지 커밋, note.adoptedFrom)
/ deleteBranch. live 판정이 가지 세대를 걷어 pack/prune이 가지를 지운다. 가지가 존재하면
마커가 v2가 되어 구 pyproc recover가 fail-closed하고(구 버전 prune이 못 보는 가지 blob을
지우는 유실 차단), 마지막 가지 삭제가 v1을 복원한다. 힙 상태는 병합이 성립하지 않으므로
merge는 없다: 가지의 소비 동사는 adopt다.
porcelain: history.branch/branches/recoverBranch/adopt/deleteBranch + commit({ note })와,
휘발 구역의 history.attempts(codes): 같은 기반에서 후보를 직렬로 돌려 형제 가지로 남기고
사이마다 기반으로 되감아 실패가 다음 시도를 오염시키지 못하며 adopt(i)가 승자를 복원한다.
직렬인 이유는 restoreLive가 ms 단위로 싸고 병렬(fork)은 시도 수만큼 힙을 사기 때문이다.
내구 핸들(KernelElection)은 이번 범위 밖이다(선출 fence와의 결합은 별도 판단).
실측: tests/attempts/stateKernel/branchRefsProbe.html 10/10 GREEN(실 OPFS + 실 힙 전
수명주기). 게이트 하한 인상: [state 커널] 12->14, 브라우저 gate.html 112->133.
검증: npm test 3374 passed 0 failed, test:browser 133/133 연속 3회, test:installed 37/37,
test:golden 8/8, test:types 0, test:package ok, test:contracts 7 suites.
신설 게이트 음성 시험 6종 통과: 가지 커밋이 HEAD를 움직이게 하면 RED, note 상한 제거 RED,
파손 가지 첫 부팅 위장 RED, liveKeys에서 가지를 빼면 prune 후 부활이 명시 파손으로 RED
(조용한 유실 아님까지 실증), 마커 상시 v1이면 RED, attempts의 기반 복원을 빼면 격리 판정 RED.
/** Which ref this commit moved: "HEAD", or "branch-<name>" for a branch commit. */
724
+
ref: string;
725
+
/** The content address of the commit object this generation is anchored at. */
726
+
commit: string;
723
727
pages: number;
724
728
wrote: number;
725
729
mb: number;
@@ -785,8 +789,23 @@ declare class MachineJournal {
785
789
/** Starts the idle watcher. It never interrupts running code. */
786
790
start(): MachineJournal;
787
791
stop(): void;
788
-
/** Commits the current state at a manual boundary. Returns the changed page count and the bytes actually written after dedupe. */
789
-
commit(): Promise<JournalCommitResult|null>;
792
+
/** Commits the current state at a manual boundary. Returns the changed page count and the bytes actually written after dedupe. opts.note rides the commit object as provenance. */
/** Materializes a branch generation onto the heap (same h0 contract as recover). Null when the branch does not exist; corruption is an explicit error, never a first-boot masquerade. */
/** Materializes the branch and commits that state to HEAD. The adopting commit's parents point at the branch commit and its note carries { adoptedFrom } plus opts.note. */
/** Removes the branch ref. Blob reclamation is the next prune's job. Deleting the last branch restores marker version 1 (older-version compatibility). */
0 commit comments