Build HistoryStore — opt-in git and mode detection
The pro-m1 foundation card. SwiftGitX 0.4.0 (bundled libgit2, the pathfinder's pin) joins the one target; new Kanban/Git/ holds BoardGitMode (pure nearest-.git-wins detection, .git-as-file counts, NSString ancestor walk), HistoryStore (@MainActor @Observable; compose() is the tier gate — free tier gets no object, no detection, no stat), GitRepository (scope-confined SwiftGitX handles: create = init + HEAD forced to main + whole-tree "Initial board state" commit; branch reads incl. unborn/detached; path-history ranks), GitIdentity (derived default as a pure function + repo-local config reader — not libgit2's merged ladder), and GitPathHistory (Mutex-guarded lazy ranker). beginSession composes the git state beside the tier and feeds BoardStore.makeIdentityHistoryRanker; git-mode loads pass the git-backed IdentityHistoryRanker to BoardLoader. The popover's git slot resolves a pure five-way matrix: free tier unchanged (absent / BoardGitNote), Pro mode-aware — Add Git on mode none, honest prose on repo-nested, read-only branch line on git. Provider binding unchanged: both tiers still bind native until the undo/redo card. 42 new tests across 8 suites, all repositories built through bundled libgit2; InertGitTests untouched and green. 2194 tests / 375 suites. Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
+19
-2
@@ -22,6 +22,19 @@ packages:
|
||||
IndieAbout:
|
||||
url: https://git.rzen.dev/rzen/indie-about.git
|
||||
minorVersion: 0.2.2
|
||||
# **The bundled git client** (06-history-undo.md ▸ Rules: "Bundled libgit2 — no git install
|
||||
# required"): SwiftGitX vendors libgit2 as an in-process library, so every git operation the app
|
||||
# performs runs inside the sandbox with no `Process`, no `/usr/bin/git`, and no sandbox extension.
|
||||
# A board's history therefore works identically in a Release build on a machine that has never had
|
||||
# Xcode or the command-line tools installed.
|
||||
#
|
||||
# `exactVersion` rather than a range, and pinned to the pathfinder's own 0.4.0: the package is
|
||||
# pre-1.0 with an API that moves between minors (the commit and diff surfaces this depends on both
|
||||
# changed shape in 0.3→0.4), so a floating pin would be a resolver deciding when the git provider
|
||||
# stops compiling.
|
||||
SwiftGitX:
|
||||
url: https://github.com/ibrahimcetin/SwiftGitX
|
||||
exactVersion: 0.4.0
|
||||
|
||||
settings:
|
||||
base:
|
||||
@@ -40,8 +53,11 @@ settings:
|
||||
# resources. There is one product, one Info.plist, one entitlements file, one Swift module, and one
|
||||
# `.kanban` UTI **exported** (never imported) by the app that owns it.
|
||||
#
|
||||
# libgit2 arrives here with pro-m1 — a dependency of the one target, dormant behind the subscription
|
||||
# gate rather than the contents of a second download.
|
||||
# libgit2 arrived here with pro-m1, as SwiftGitX above — a dependency of the one target, dormant
|
||||
# behind the subscription gate rather than the contents of a second download. It links into the free
|
||||
# app and never runs there: detection itself is tier-gated (`HistoryStore.compose`), so a free-tier
|
||||
# session opens without so much as a `fileExists` under `.git` (12-editions.md ▸ The free tier and
|
||||
# `.git`, and `InertGitTests`).
|
||||
targets:
|
||||
# MARK: - Lanework
|
||||
|
||||
@@ -83,6 +99,7 @@ targets:
|
||||
- package: swift-markdown
|
||||
product: Markdown
|
||||
- package: IndieAbout
|
||||
- package: SwiftGitX
|
||||
postBuildScripts:
|
||||
- script: '"${SRCROOT}/../indie-skills/skills/app-versioning/scripts/update_build_info.sh"'
|
||||
name: Update Build Info
|
||||
|
||||
Reference in New Issue
Block a user