Repository navigation
Area P batch 1: P2, P14, P1, P7, P8 and commit cost accounting fix - #505
Open
Mola-maker wants to merge 1 commit into
Open
Mola-maker wants to merge 1 commit into
Mola-maker wants to merge 1 commit into
Conversation
Mola-maker
force-pushed
the
area-p/batch-1
branch
from
October 29, 2026 12:43
d4cbd28 to
cd5aabd
Compare
Implements the first batch of Area P (layerfs-connect#14; P2 tracked as layerfs#484): JS SDK constructor options (P2), branch paging and snapshot continuation (P14), Node SDK history calls (P1), commit author and labels (P7), and commit/layer reads with a binary flag (P8), plus the retro finding 1 fix charging actual LWW and merge-unit costs and yielding exactly one snapshot continuation for a rejected commit. Product code only (core, engine, api) with its tests; push/pull history work stays blocked by R7 and is not simulated. Fixes the CI failures on the previous head: bool_assert_comparison lints in the P1/P14 tests, and the lineage-backfill old-store simulator, which predated P7's commit author/labels columns (a pre-lineage Store also predates those columns, so make_old now drops them and strips their text, or the migration chain matches no stage and open fails). Production LOC: 102831 -> 103677 (delta +846); core+engine+api via python -I tools/production_loc.py --json; reference absent (retired R9c; last counted 65,417 at tree 498dd19).
Mola-maker
force-pushed
the
area-p/batch-1
branch
from
October 29, 2026 13:19
cd5aabd to
60c1dac
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.
Area P batch 1: P2, P14, P1, P7, P8 + retro cost-accounting fix
Part of Area P of the LayerFS 2.0 working plan
(Ephemeral-AI-Lab/layerfs-connect#14). P2 is tracked as #484 here;
P1, P7, P8, P14 are tracked as layerfs-connect#53, #58, #59, #65.
This batch contains only product code (
core/,engine/,api/) andits tests — no plans, build infrastructure, or docs-only changes.
Done-when coverage in this batch (each client can mount, run a command,
commit, and read history; push/pull remain blocked by R7, as before):
LayerFS.open(name, options?),LayerFS.init(name, folder, timeout?, options?)): explicit optionswin over
LAYERFS_*environment, which wins over built-in defaults;the resolved snapshot is deep-copied once at construction.
list_branchesshort pages resume after returned items, and workspaces resolve their
branch even past the 64-branch history page (the 65th-workspace fix:
the branch-name map now follows history continuation pages). The
snapshot's per-branch commit cut is budget-aware.
branch.graph(branch, pageSize, pagePos)bounded traversal andbranch.changed_paths(commit, pageSize, pagePos)with the three-parent rule.workspace.commit(ws, message, force, { author?, labels? })with author / per-label / total-labelsbyte limits; author and labels are stored alongside the commit and
are NOT identity (derive is unchanged).
commit/layer reads plus the
binaryflag onfs.read(results carrybytesinstead oftext). Reads never mount a workspace and nevermove a branch head.
costs previously omitted LWW decisions and merge units, so a page
could pass the 49,152-byte estimate and fail the control codec, and
an oversized unit was silently omitted. Costs are now charged at
actual encoded size via a shared helper; cursor pagers always make
progress; oversized units are omitted wholesale with
unitsTruncated: true(present on every commit object). This alsofixes a snapshot continuation bug the review caught: a rejected
commit previously produced a duplicate map key the control decoder
rejects; it now yields exactly one restart continuation, proven by a
regression test that fails on the old code with
ControlError("SDK field repeated").Verification (Linux, Disposable stores, this branch)
area_p14_paging4/4,area_p1_history4/4,area_p7_attribution8/8,sdk_method_golden1/1 (underumask 022), boundary guard 964 PASS./dev/fuse in the build environment); disclosed, not claimed.
p14 2/1 before, all green after).
Known follow-ups (not in this batch)
unitsTruncatedpublic documentation lands with the P9agent.mdupdate (P9 event stream is the next slice).
layerfs-connect integration follow as separate PRs.