Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
d0dec6d
fix(repo): sparse sidecar check by base path, widen while an op is st…
tonibergholm-codento Oct 20, 2026
cd99042
Merge remote-tracking branch 'origin/main' into fix/224-sparse-followups
tonibergholm-codento Oct 20, 2026
559474e
fix(repo): safe retry and old-view paths for the stopped-op sparse wi…
tonibergholm-codento Oct 20, 2026
4f779c8
fix(repo): record a stopped-op widen's writes so a retry cannot adopt…
tonibergholm-codento Oct 20, 2026
80cb926
Merge remote-tracking branch 'origin/main' into fix/224-sparse-followups
tonibergholm-codento Oct 20, 2026
42c99ac
Merge branch 'main' into fix/224-sparse-followups
tonibergholm-codento Oct 20, 2026
d12e910
Merge remote-tracking branch 'origin/fix/224-sparse-followups' into f…
tonibergholm-codento Oct 20, 2026
cdcf0a9
fix(repo): remove what an interrupted stopped-op widen laid on abort …
tonibergholm-codento Oct 20, 2026
db8b946
Merge remote-tracking branch 'origin/main' into fix/224-sparse-followups
tonibergholm-codento Oct 20, 2026
ca3cf04
fix(repo): clean widen residue before completion reads the tree; keep…
tonibergholm-codento Oct 20, 2026
d100f34
Merge remote-tracking branch 'origin/main' into fix/224-sparse-followups
tonibergholm-codento Oct 20, 2026
f935113
fix(repo): widen-laid files keep the recorded executable bit (#224, #…
tonibergholm-codento Oct 20, 2026
4ceb4b6
fix(repo): refuse a stopped-op widen over a path with a newline (#224)
tonibergholm-codento Oct 20, 2026
f191512
fix(repo): NUL-separate the stopped-op widen record (#224)
tonibergholm-codento Oct 20, 2026
fef619a
fix(repo): widen guard ignores case aliases; completion drops the sta…
tonibergholm-codento Oct 20, 2026
bceda64
Merge branch 'main' into fix/224-sparse-followups
tonibergholm-codento Oct 20, 2026
9a4328b
fix(repo): a header-only widen journal is a pending widen (#224)
tonibergholm-codento Oct 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .claude/skills/sc-cli-reference/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,11 @@ bash demo/run_merge_ergonomics_demo.sh # sc conflicts/sc resolve proof (P
cargo run --bin sc -- sparse set <prefix…> [--identity <key>] # narrow the working tree to
# these path prefixes; re-lays disk now (P24). Warns per
# prefix that matches no tracked path; at least one
# prefix is required (`sparse disable` is the full view)
# prefix is required (`sparse disable` is the full view).
# While a merge/pick/rebase is stopped only a widen is
# accepted (new prefixes must cover the old ones): it
# lays out the newly in-view files, leaves protected
# ones absent, and `--continue` then proceeds (#224)
cargo run --bin sc -- sparse show [--json] # list the active sparse prefixes ("disabled" if
# the spec is empty/absent) (P24)
cargo run --bin sc -- sparse disable [--identity <key>] # clear the spec and rematerialize
Expand Down
18 changes: 13 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ transport-adjacent. The rest, imperatively:
capability, and no DTO field capable of carrying protected ciphertext or
identity material.
- **Partial clones refuse `sc export`, `sparse disable`, an empty `sparse set` (and, on a non-lazy clone, one outside the filter), `sc rewrap`,
`sc grant`/`revoke`, creating, switching to or leaving a private branch, a merge, cherry-pick or rebase whose conflict lies outside the view or whose `.theirs` sidecar would lie outside the view (partial clones only: on a full clone the sidecar is exempt as it sits beside an in-view file) (no ref, state or working-tree change; on every clone, a conflict stop that needs sealing outside the view is refused the same way), `sc push` to a git remote, and
`sc grant`/`revoke`, creating, switching to or leaving a private branch, a merge, cherry-pick or rebase whose conflict lies outside the view (a `.theirs` sidecar sits beside its conflicted path, so it is in view whenever that path is; ADR-0049) (no ref, state or working-tree change; on every clone, a conflict stop that needs sealing outside the view is refused the same way), `sc push` to a git remote, and
`sc fetch` from any native remote but the promisor origin.** `sc merge`, `sc cherry-pick` and `sc rebase` work, including conflicts inside the view (P37c). `sc ws` and `sc work` work too (ADR-0050): workspaces and agents see the clone's view only, and harvest lands through the same merge. `sc backfill --all`
converts to a genuine full clone and re-enables them. The filter records what
a clone *asked for*, not what is present: after a fetch an in-filter object
Expand Down Expand Up @@ -251,10 +251,14 @@ transport-adjacent. The rest, imperatively:
- **Sparse is checkout-only**, and a stopped merge/pick/rebase writes no
conflict marker or sealing-input plaintext outside the view: an out-of-sparse
conflicted path or sealing input refuses with a `sc sparse set` hint before
any write (ADR-0034, #210; from `rebase --continue` the hint says to abort
first, since `sparse set` is refused mid-rebase). A binary conflict's
`<path>.theirs` sidecar sits beside its in-view file and may not match a
file-exact spec; completion and abort remove it.
any write (ADR-0034, #210). While a merge/pick/rebase is stopped, `sparse
set` accepts only a strict widen (new spec covers the old; narrowing,
sideways and `disable` still refuse): it lays out just the newly in-view
files from the stop's decided root and leaves protected ones absent, so a
`rebase --continue` refusal is fixed by widening and rerunning it (#224). A
binary conflict's `<path>.theirs` sidecar sits beside its in-view file and
may not match a file-exact spec (partial clones check it by its base path);
completion and abort remove it.
- **`.sc/git-remotes/<name>/marks` carries `git_oid ↔ sc_id` identity —
deleting it is destructive.** Deleting the sibling `mirror.git` is always
safe (reconstructed on next use). Stale marks self-heal on push/export.
Expand All @@ -268,6 +272,10 @@ transport-adjacent. The rest, imperatively:
sidecars it wrote are listed apart in `.sc/CONFLICT_SIDECARS`; abort, `rebase
--continue` and `sc resolve` remove only those, never a `.theirs` file the stop
did not write; the completing commit leaves them out of the tree and removes them.
A stopped-op `sparse set` widen records the files it is writing in
`.sc/sparse-widen` (local-only like the rest, removed with the spec write or
the op); abort and completion delete what an interrupted widen laid outside
the view.
- **A merge, switch, cherry-pick, rebase, undo or sparse-spec change refuses, before any write, to lay a file or
directory onto an untracked or ignored one** (`refuse_untracked_overwrite`); move it
away and retry. Merging into an unborn branch and the conflict stop of a merge into a private branch are not guarded.
Expand Down
11 changes: 11 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,17 @@ scale-&-reach horizon):
`sc sparse set` on a full clone is refused with a pointer to `sc sparse
disable` (a partial clone keeps its `sc backfill` refusal); and `.sc/sparse`
parsing ignores blank lines.
- **Sparse follow-ups from #210 — shipped (#224).** A partial clone treats a
binary conflict's `.theirs` sidecar as in view when its conflicted path is, so
a file-exact spec no longer refuses it. `sc sparse set` may widen (never
narrow) while a merge, cherry-pick or rebase is stopped: the files coming into
view are laid out from the stop's decided root, so `rebase --continue`'s
out-of-view refusal no longer needs an abort. Protected files that come into
view mid-stop are not decrypted: they stay absent from disk and completion
carries them. A rebase's final fold re-lays the tree and decrypts them with
`--identity`; a merge or cherry-pick finished with `sc commit` writes no
working tree, so they stay absent until the next operation that does (a
`switch`, or `sparse set` again).
- **Transparent lazy-fetch for partial clones (P27).** `sc backfill` is
explicit-only by design (ADR-0037's "no network in read paths" choice);
the identical filtered-walk/gap infra could instead dial the promisor
Expand Down
4 changes: 3 additions & 1 deletion crates/repo/src/conflict_plaintext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ pub(crate) fn read(layout: &Layout) -> Result<BTreeSet<String>> {
}
}

/// Drop both records.
/// Drop both records, and the stopped-op widen's (`.sc/sparse-widen`): all of
/// them end with the stopped merge, pick or rebase.
pub(crate) fn clear(layout: &Layout) -> Result<()> {
remove_if_present(&layout.sparse_widen_path())?;
remove_if_present(&path(layout))?;
remove_if_present(&sidecar_path(layout))
}
Expand Down
7 changes: 7 additions & 0 deletions crates/repo/src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ impl Layout {
pub fn sparse_prev_path(&self) -> PathBuf {
self.dot_sc.join("sparse-prev")
}
/// `.sc/sparse-widen` — the paths a `sparse set` widen during a stopped
/// merge, pick or rebase is writing, recorded before the writes. It is the
/// evidence that a file found at one of them on a retry is the widen's own
/// earlier write and not the user's; removed once the spec is stored.
pub fn sparse_widen_path(&self) -> PathBuf {
self.dot_sc.join("sparse-widen")
}
/// `.sc/serve-tokens.toml` — server access-control tokens (P29): each entry is
/// `{label, hash = BLAKE3(raw token), scope}`. Presence of ≥1 entry turns on
/// bearer auth for `sc serve --http`. Distinct from `recipients.toml`
Expand Down
Loading
Loading