Skip to content

fix: scope Git materialization, stream large pin retirement, and normalize live-edit coordinates - #43

Merged
showxu merged 1 commit into
masterfrom
fix/scoped-materialization-and-live-edit-update
Dec 1, 2026
Merged

showxu merged 1 commit into
masterfrom
fix/scoped-materialization-and-live-edit-update

Conversation

@showxu

@showxu showxu commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Path-scoped Git discovery and materialization:
    • Replace repeated local catalog clone --mirror --no-local clones with transport-advertised ls-remote --symref discovery (uploadpack.hideRefs preserved) backed by an isolated bare catalog/archive repository and validated packed refs.
    • Resolve requested repo-relative paths via structured ls-tree -z / cat-file tree walks (retaining traversed symlink entries, resolved targets, and intermediate directories exited via ..), authenticate coordinate-only Git support files against a canonical empty-ref archive representation (with full-order tar streaming for stateful export-subst), and materialize only the selected ledger closure per (root source identity, commit).
    • Deduplicate mirror object durability walks to one barrier per mirror per retention call.
  • Same-transaction large pin retirement:
    • Add descriptor-relative streaming preimage hashing for eligible cache/materialized/<source-key>/<full-oid> pins across preparation, publication, rollback, sealDisposal, partial-delete recovery, and final leaf unlink.
    • Retire private entry.N.work before ready, perform two-pass pre-publish container reader and whole-journal encoding admission (including bounded rollback conflict headroom), enforce descriptor-bound directory mode verification during partial deletion, and enforce preimage freshness on skipped ledger entries.
    • Plan pin maintenance deterministically before reporting so combined updates own legacy pin shrinking/expiration and filtered updates touch only required pins, with live-edit vetoes blocking both deletion and replacement.
  • Coordinate-only Antigravity Git locking & offline legacy restore:
    • Freeze new exact-Git Antigravity instructions and nested includes as .git coordinates (entry.object == nil) rather than embedding body bytes into contentObjects.
    • Split RetentionReferences into requiredGitObjects and protectedGitRefs so self-contained legacy v2 .embedded locks restore offline without producer/mirror/cache/network access while preserving existing refs.
    • Prove post-deployment .embedded → .git equivalence on filtered and marketplace updates, preserving untouched lock bytes and inodes on unchanged filtered updates.
  • Live-edit coordinate normalization, doctor audits & scope admission:
    • Share raw-component authored path normalization across LedgerFreeze, LedgerImpact.requireProtected, and discoveryFingerprint, eliminating false-positive requiresCombinedUpdate deadlocks for root mode: edit skills (resource.path == "." / trailing /.).
    • Audit all unique locked instruction inputs, nested includes, and prompt-only inputs independently of deployed targets in InstructionDoctor, gate ordinary Markdown link checks per target, guard bare repositories against git status, and match local upstream revisions through the transport-visible catalog.
    • Fix macOS /private/tmp vs /tmp TransactionLockContext scope admission across state directory creation, align root linked-skill resourceDestination for Content Audit, skip redundant tree reads in unchanged UpdateReporting, and update Documentation/Architecture/State.md and CHANGELOG.md (0.3.2).

Verification

  • swift build -c release: passed
  • Isolated-environment swift test: 1,460 tests in 199 suites passed (plus 42 targeted tests on the final 2-file format-scanner fix) and 34 exhaustive publication matrix tests (1,619 interruption cases) passed
  • xcrun swift-format lint --strict --configuration .swift-format --recursive Package.swift Sources Tests: passed
  • python3 Scripts/generate-manifest-schema.py --check & git diff --check: passed
  • Representative downstream consumer checks against this exact commit:
    • agents-tools/cli: release build passed; isolated-HOME real-scale migration of a 1.53 GiB local repository shrank cache/materialized from 1.5G to 6.7M (contentObjects = 0), passed incremental instructions update with edited live skills, passed steady-state no-op update, and passed doctor
    • skill-cli/cli: isolated-HOME swift test passed (96 tests in 14 suites)

@showxu
showxu force-pushed the fix/scoped-materialization-and-live-edit-update branch from c2ad88b to b9733a1 Compare November 30, 2026 17:20
@showxu
showxu merged commit a5150eb into master Dec 1, 2026
11 checks passed
@showxu
showxu deleted the fix/scoped-materialization-and-live-edit-update branch December 1, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant