@git-stunts/git-cas 6.5.6 → 6.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/GUIDE.md +29 -0
- package/README.md +16 -10
- package/UPGRADING.md +48 -0
- package/build-info.json +2 -2
- package/docs/API.md +66 -12
- package/docs/releases/v6.5.7.md +56 -0
- package/docs/releases/v6.5.8.md +89 -0
- package/index.d.ts +50 -0
- package/index.js +15 -1
- package/package.json +4 -2
- package/src/domain/services/AssetService.js +201 -10
- package/src/domain/services/BoundedWriteWavePersistence.js +235 -0
- package/src/domain/services/BundleBatchPlanner.js +349 -0
- package/src/domain/services/BundleService.js +225 -2
- package/src/domain/services/CasService.d.ts +16 -0
- package/src/domain/services/CasService.js +9 -18
- package/src/domain/services/ManifestRepository.js +129 -50
- package/src/domain/services/ManifestTreeService.js +47 -0
- package/src/domain/services/PageService.js +26 -9
- package/src/domain/services/RootSet.js +32 -0
- package/src/domain/services/RootSetPersistence.js +58 -1
- package/src/domain/services/StagedTarget.js +19 -0
- package/src/domain/services/StagingWorkspace.js +21 -7
- package/src/domain/services/forkCasPersistence.js +20 -0
- package/src/infrastructure/adapters/GitObjectSessionPool.js +47 -5
- package/src/infrastructure/adapters/GitPersistenceAdapter.js +217 -16
- package/src/infrastructure/adapters/GitPersistenceWriteScope.js +154 -0
- package/src/infrastructure/adapters/GitRefAdapter.js +38 -3
- package/src/infrastructure/adapters/GitUpdateRefSessionPool.js +115 -0
- package/src/package-version.js +1 -1
- package/src/ports/GitPersistencePort.js +43 -0
- package/src/ports/GitRefPort.js +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [6.5.8] — 2026-08-23
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Bounded application write waves** - `assets.putBatch()` and
|
|
15
|
+
`bundles.putOrderedBatch()` accept explicit count, object, and byte limits,
|
|
16
|
+
preserve input-order results, and are mirrored by scoped staging workspaces.
|
|
17
|
+
A successful workspace batch anchors every returned handle in one exact
|
|
18
|
+
generation.
|
|
19
|
+
|
|
20
|
+
### Performance
|
|
21
|
+
|
|
22
|
+
- **Pipelined Git object and ref protocols** - bounded asset and bundle writes
|
|
23
|
+
pipeline blob, manifest-tree, descriptor-tree, and target-metadata waves;
|
|
24
|
+
checked ref updates reuse one typed `update-ref --stdin` process. Existing
|
|
25
|
+
single-write and older-Plumbing fallbacks remain available.
|
|
26
|
+
|
|
27
|
+
## [6.5.7] — 2026-08-23
|
|
28
|
+
|
|
29
|
+
### Performance
|
|
30
|
+
|
|
31
|
+
- **Bounded stream session reads** - `readBlobStream()` now reuses the
|
|
32
|
+
persistent `cat-file` session for blobs at or below a fixed 10 MiB ceiling,
|
|
33
|
+
removing process-per-payload startup for small reads. Larger objects retain
|
|
34
|
+
the genuine one-shot streaming path without a speculative content read, and
|
|
35
|
+
plumbing without typed sessions retains the existing fallback.
|
|
36
|
+
|
|
10
37
|
## [6.5.6] — 2026-07-30
|
|
11
38
|
|
|
12
39
|
### Changed
|
package/GUIDE.md
CHANGED
|
@@ -173,6 +173,35 @@ order, and uses one scoped Git write session when the plumbing adapter supports
|
|
|
173
173
|
it. Use individual `pages.put()` calls when inputs should not share one bounded
|
|
174
174
|
memory envelope.
|
|
175
175
|
|
|
176
|
+
Independent assets and ordered bundles have equivalent bounded write-wave
|
|
177
|
+
surfaces:
|
|
178
|
+
|
|
179
|
+
```js
|
|
180
|
+
const stagedAssets = await cas.assets.putBatch({
|
|
181
|
+
assets: assetRequests,
|
|
182
|
+
maxBatchAssets: 4,
|
|
183
|
+
maxBatchObjects: 4096,
|
|
184
|
+
maxBatchBytes: 256 * 1024 * 1024,
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
const stagedBundles = await cas.bundles.putOrderedBatch({
|
|
188
|
+
bundles: orderedBundleRequests,
|
|
189
|
+
maxBatchBundles: 64,
|
|
190
|
+
maxBatchMembers: 8192,
|
|
191
|
+
maxBatchObjects: 256,
|
|
192
|
+
maxBatchBytes: 64 * 1024 * 1024,
|
|
193
|
+
});
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Asset batching keeps at most `maxBatchAssets` source pipelines active, shares
|
|
197
|
+
bounded blob phases, and emits complete manifest trees in one final dependency
|
|
198
|
+
wave. Bundle batching collects only the explicitly bounded request array,
|
|
199
|
+
preplans its deterministic descriptor graph, and writes each bottom-up tree
|
|
200
|
+
depth as one bounded wave. Both methods preserve input-order output and return
|
|
201
|
+
no partial result array on failure. Higher `maxBatchAssets` values can reduce
|
|
202
|
+
protocol round trips when the caller can afford more simultaneously live
|
|
203
|
+
source pipelines; the default remains four.
|
|
204
|
+
|
|
176
205
|
Repeated `pages.get()` calls reuse immutable payload reads within the store's
|
|
177
206
|
bounded page cache. The defaults retain at most 128 payloads and 8 MiB; use
|
|
178
207
|
`pageCacheEntries` and `pageCacheBytes` to tune that ceiling. Every result is a
|
package/README.md
CHANGED
|
@@ -37,10 +37,12 @@ Unlike traditional LFS which moves files to external servers, `git-cas` treats t
|
|
|
37
37
|
or publish them with generation-scoped evidence instead of managing Git
|
|
38
38
|
objects, trees, or payload OIDs directly.
|
|
39
39
|
- **Bounded Git Process Reuse**: Immutable object metadata and tree reads reuse
|
|
40
|
-
typed Git sessions behind the adapter
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
typed Git sessions behind the adapter. On session-capable adapters, streaming
|
|
41
|
+
blob reads at or below a fixed 10 MiB ceiling use one bounded session read;
|
|
42
|
+
larger payloads retain the genuine one-shot streaming path. Explicitly
|
|
43
|
+
bounded page, asset, and ordered-bundle batches pipeline independent Git
|
|
44
|
+
writes and retain each successful workspace batch under one exact generation
|
|
45
|
+
without changing content identity.
|
|
44
46
|
- **Key Lifecycle**: Envelope encryption separates DEKs from KEKs. Rotate passphrases across an entire vault without re-encrypting data blobs. Privacy mode HMAC-hashes slug names to prevent metadata discovery.
|
|
45
47
|
- **Runtime-Adaptive**: A single core supports Node.js 22+, Bun, and Deno through a strict hexagonal port architecture with runtime-specific crypto adapters.
|
|
46
48
|
|
|
@@ -49,7 +51,7 @@ Unlike traditional LFS which moves files to external servers, `git-cas` treats t
|
|
|
49
51
|
Existing v5 users should read [UPGRADING.md](./UPGRADING.md) and run
|
|
50
52
|
`npm run upgrade` in dry-run mode before restoring old encrypted vault entries.
|
|
51
53
|
For the release overview, see the
|
|
52
|
-
[v6.5.
|
|
54
|
+
[v6.5.8 Release Notes](./docs/releases/v6.5.8.md).
|
|
53
55
|
|
|
54
56
|
### 1. CLI Usage
|
|
55
57
|
|
|
@@ -150,12 +152,12 @@ Core capabilities:
|
|
|
150
152
|
read-only, and `sweep()` can release only markers whose expiry has passed.
|
|
151
153
|
- **Application storage**: `assets`, `pages`, `bundles`, `retention`, and
|
|
152
154
|
`publications` compose streaming CAS writes, bounded structured
|
|
153
|
-
materializations, explicitly bounded page batches,
|
|
154
|
-
complete-validation member reads, reachability roots,
|
|
155
|
-
and immutable lifecycle evidence.
|
|
155
|
+
materializations, explicitly bounded asset/page/bundle batches,
|
|
156
|
+
direct-reference or complete-validation member reads, reachability roots,
|
|
157
|
+
compare-and-swap refs, and immutable lifecycle evidence.
|
|
156
158
|
- **Scoped staging workspaces**: `workspaces.open()` mirrors application writes
|
|
157
|
-
behind one renewable temporary RootSet, supports one-generation bounded
|
|
158
|
-
batches, returns only after each handle is anchored, promotes
|
|
159
|
+
behind one renewable temporary RootSet, supports one-generation bounded
|
|
160
|
+
asset/page/bundle batches, returns only after each handle is anchored, promotes
|
|
159
161
|
destination-first, and exposes bounded age, expiry, logical-content, and
|
|
160
162
|
direct-root diagnostics with opaque cleanup pagination.
|
|
161
163
|
- **Envelope recipients**: multi-recipient key wrapping and recipient rotation
|
|
@@ -230,6 +232,10 @@ All three runtimes are tested in CI on every push. The hexagonal architecture is
|
|
|
230
232
|
identity for git-cas-owned commits in unconfigured bare repositories.
|
|
231
233
|
- **[v6.5.6 Release Notes](./docs/releases/v6.5.6.md)**: Bijou 7 hosted
|
|
232
234
|
cockpit ownership and deterministic checked-ref conflict classification.
|
|
235
|
+
- **[v6.5.7 Release Notes](./docs/releases/v6.5.7.md)**: Bounded persistent
|
|
236
|
+
sessions for small streaming blob reads while large payloads remain streamed.
|
|
237
|
+
- **[v6.5.8 Release Notes](./docs/releases/v6.5.8.md)**: Bounded application
|
|
238
|
+
write waves, one-generation workspace batches, and reusable ref sessions.
|
|
233
239
|
- **[Upgrading](./UPGRADING.md)**: Migration guide for v5 → v6.
|
|
234
240
|
- **[Changelog](./CHANGELOG.md)**: Version history and migration notes.
|
|
235
241
|
|
package/UPGRADING.md
CHANGED
|
@@ -2,6 +2,54 @@
|
|
|
2
2
|
|
|
3
3
|
v6.0.0 is a major release that simplifies the encryption model, hardens security defaults, and cleans up the architecture. This guide covers every breaking change and what you need to do.
|
|
4
4
|
|
|
5
|
+
## v6.5.7 To v6.5.8
|
|
6
|
+
|
|
7
|
+
v6.5.8 adds bounded application-write batches and requires no application or
|
|
8
|
+
stored-data migration. Existing single-write methods, handles, object bytes,
|
|
9
|
+
refs, retention evidence, and custom persistence fallbacks remain compatible.
|
|
10
|
+
|
|
11
|
+
Callers with independent assets or ordered bundles can opt into the new
|
|
12
|
+
input-ordered APIs:
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
const assets = await cas.assets.putBatch({ assets: assetRequests });
|
|
16
|
+
const bundles = await cas.bundles.putOrderedBatch({ bundles: bundleRequests });
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The same methods are available under scoped staging workspaces. Every result
|
|
20
|
+
from a successful workspace batch carries the same exact retained generation.
|
|
21
|
+
Count, planned-object, aggregate-member, and byte bounds reject oversized
|
|
22
|
+
admission before success is returned; partial immutable object creation remains
|
|
23
|
+
possible on failure, as with repeated single writes.
|
|
24
|
+
|
|
25
|
+
The default asset batch admits four active source pipelines with a 4,096-object
|
|
26
|
+
and 256 MiB envelope. Ordered-bundle batches default to 64 bundles, 8,192
|
|
27
|
+
members, 256 planned objects, and 64 MiB of admitted descriptor material.
|
|
28
|
+
Tune these only when the caller owns the corresponding source and memory
|
|
29
|
+
budget.
|
|
30
|
+
|
|
31
|
+
See [v6.5.8 Release Notes](./docs/releases/v6.5.8.md) for the exact identity,
|
|
32
|
+
process-topology, fallback, and publication-boundary evidence.
|
|
33
|
+
|
|
34
|
+
## v6.5.6 To v6.5.7
|
|
35
|
+
|
|
36
|
+
v6.5.7 changes no public API, package export, object identity, manifest, ref,
|
|
37
|
+
or retention contract and requires no application or stored-data migration.
|
|
38
|
+
|
|
39
|
+
On session-capable Git persistence adapters, `readBlobStream()` now inspects
|
|
40
|
+
immutable object metadata through the persistent `cat-file` session. Blobs at
|
|
41
|
+
or below a fixed 10 MiB ceiling are returned as one bounded chunk through that
|
|
42
|
+
session. This changes backpressure granularity for admitted small reads, but
|
|
43
|
+
the method remains an `AsyncIterable` with identical bytes and errors.
|
|
44
|
+
|
|
45
|
+
Objects above 10 MiB retain the genuine one-shot streaming path and are never
|
|
46
|
+
speculatively session-read. Raising `maxBlobSize` cannot raise this fixed
|
|
47
|
+
ceiling. Adapters without typed sessions, plus exceptional metadata or bounded
|
|
48
|
+
read failures, retain the existing one-shot fallback.
|
|
49
|
+
|
|
50
|
+
See [v6.5.7 Release Notes](./docs/releases/v6.5.7.md) for the measured process
|
|
51
|
+
topology, fixed residency boundary, and compatibility details.
|
|
52
|
+
|
|
5
53
|
## v6.5.5 To v6.5.6
|
|
6
54
|
|
|
7
55
|
v6.5.6 changes no public API or stored-data schema and requires no migration.
|
package/build-info.json
CHANGED
package/docs/API.md
CHANGED
|
@@ -939,7 +939,7 @@ explicit lifecycle operations. It composes the lower-level store, manifest,
|
|
|
939
939
|
tree, RootSet, commit, and ref operations without requiring callers to manage
|
|
940
940
|
payload OIDs.
|
|
941
941
|
|
|
942
|
-
### `assets.put()`
|
|
942
|
+
### `assets.put()` and `assets.putBatch()`
|
|
943
943
|
|
|
944
944
|
```javascript
|
|
945
945
|
const staged = await cas.assets.put({
|
|
@@ -955,6 +955,13 @@ const staged = await cas.assets.put({
|
|
|
955
955
|
merkleThreshold,
|
|
956
956
|
chunking,
|
|
957
957
|
});
|
|
958
|
+
|
|
959
|
+
const stagedBatch = await cas.assets.putBatch({
|
|
960
|
+
assets: [firstAssetOptions, secondAssetOptions],
|
|
961
|
+
maxBatchAssets: 4,
|
|
962
|
+
maxBatchObjects: 4096,
|
|
963
|
+
maxBatchBytes: 256 * 1024 * 1024,
|
|
964
|
+
});
|
|
958
965
|
```
|
|
959
966
|
|
|
960
967
|
Streams an `AsyncIterable<Uint8Array>` through the existing CAS pipeline,
|
|
@@ -966,7 +973,26 @@ limits documented in the streaming matrix.
|
|
|
966
973
|
`filename` defaults to `slug`. All other storage options have the same meaning
|
|
967
974
|
as `store()`.
|
|
968
975
|
|
|
969
|
-
|
|
976
|
+
`putBatch()` requires an explicit array of ordinary asset options and returns
|
|
977
|
+
an immutable result array in the same order. It keeps at most
|
|
978
|
+
`maxBatchAssets` source pipelines active, pipelines immutable blob and manifest
|
|
979
|
+
writes through bounded Git protocol waves, and writes all complete manifest
|
|
980
|
+
trees in one final dependency phase. Defaults are four active assets, 4,096
|
|
981
|
+
aggregate written objects, and 256 MiB of aggregate written bytes. Supported
|
|
982
|
+
upper bounds are 64 active assets, 100,000 objects, and 1 GiB. Plumbing protocol
|
|
983
|
+
requests remain internally capped at 256 objects and 64 MiB per request.
|
|
984
|
+
|
|
985
|
+
A failed source, bound, persistence operation, or result-cardinality check
|
|
986
|
+
rejects the whole call; it never returns a partial array as a complete batch.
|
|
987
|
+
The error metadata includes bounded staging counts for immutable objects that
|
|
988
|
+
may have been written before failure. `maxBatchAssets` is a resource/performance
|
|
989
|
+
choice: raising it can reduce protocol rounds while increasing the number of
|
|
990
|
+
simultaneously live caller streams.
|
|
991
|
+
|
|
992
|
+
**`assets.put()` returns:** `Promise<StagedAsset>`
|
|
993
|
+
|
|
994
|
+
**`assets.putBatch()` returns:** `Promise<ReadonlyArray<StagedAsset>>`, ordered
|
|
995
|
+
one-for-one with the input `assets` array.
|
|
970
996
|
|
|
971
997
|
```javascript
|
|
972
998
|
{
|
|
@@ -1078,7 +1104,7 @@ The canonical page token is:
|
|
|
1078
1104
|
git-cas:1:page:blob:raw:<sha1|sha256>:<oid>
|
|
1079
1105
|
```
|
|
1080
1106
|
|
|
1081
|
-
### `bundles.put()` and `bundles.
|
|
1107
|
+
### `bundles.put()`, `bundles.putOrdered()`, and `bundles.putOrderedBatch()`
|
|
1082
1108
|
|
|
1083
1109
|
```javascript
|
|
1084
1110
|
const staged = await cas.bundles.put({
|
|
@@ -1093,6 +1119,17 @@ const staged = await cas.bundles.put({
|
|
|
1093
1119
|
const streamed = await cas.bundles.putOrdered({
|
|
1094
1120
|
members: orderedAsyncMemberPairs,
|
|
1095
1121
|
});
|
|
1122
|
+
|
|
1123
|
+
const stagedBatch = await cas.bundles.putOrderedBatch({
|
|
1124
|
+
bundles: [
|
|
1125
|
+
{ members: firstOrderedMemberPairs },
|
|
1126
|
+
{ members: secondOrderedMemberPairs },
|
|
1127
|
+
],
|
|
1128
|
+
maxBatchBundles: 64,
|
|
1129
|
+
maxBatchMembers: 8192,
|
|
1130
|
+
maxBatchObjects: 256,
|
|
1131
|
+
maxBatchBytes: 64 * 1024 * 1024,
|
|
1132
|
+
});
|
|
1096
1133
|
```
|
|
1097
1134
|
|
|
1098
1135
|
Members are named application handles, byte sources, or `{ source, maxBytes }`
|
|
@@ -1103,6 +1140,20 @@ to every member handle. `put()` sorts an in-memory object, `Map`, or pair array.
|
|
|
1103
1140
|
out-of-order canonical paths, enabling construction with bounded resident
|
|
1104
1141
|
state.
|
|
1105
1142
|
|
|
1143
|
+
`putOrderedBatch()` requires an explicit array of ordered-bundle requests,
|
|
1144
|
+
collects only that declared group, and returns an immutable input-ordered array.
|
|
1145
|
+
It defaults to at most 64 bundles, 8,192 aggregate members, 256 planned objects,
|
|
1146
|
+
and 64 MiB across inline pages, descriptors, and trees. Callers may lower any
|
|
1147
|
+
limit; supported maxima are 256 bundles, 100,000 aggregate members, 256 objects,
|
|
1148
|
+
and 64 MiB. Per-bundle repository limits still apply independently.
|
|
1149
|
+
|
|
1150
|
+
After admission, the batch validates shared immutable handles once, writes
|
|
1151
|
+
inline pages together, writes all descriptor blobs in bounded windows, and
|
|
1152
|
+
writes independent tree nodes bottom-up by depth. Grouping changes scheduling,
|
|
1153
|
+
not descriptor bytes, tree entries, handles, or member order. A failure returns
|
|
1154
|
+
no complete result array and carries bounded staging evidence for immutable
|
|
1155
|
+
objects already written.
|
|
1156
|
+
|
|
1106
1157
|
Repository defaults, which an operation may only lower, are:
|
|
1107
1158
|
|
|
1108
1159
|
| Limit | Default |
|
|
@@ -1376,11 +1427,13 @@ The workspace mirrors only application-storage writes:
|
|
|
1376
1427
|
|
|
1377
1428
|
```javascript
|
|
1378
1429
|
await workspace.assets.put(options);
|
|
1430
|
+
await workspace.assets.putBatch(options);
|
|
1379
1431
|
await workspace.assets.adopt(options);
|
|
1380
1432
|
await workspace.pages.put(options);
|
|
1381
1433
|
await workspace.pages.putBatch(options);
|
|
1382
1434
|
await workspace.bundles.put(options);
|
|
1383
1435
|
await workspace.bundles.putOrdered(options);
|
|
1436
|
+
await workspace.bundles.putOrderedBatch(options);
|
|
1384
1437
|
```
|
|
1385
1438
|
|
|
1386
1439
|
Each method returns only after a direct workspace generation reaches the
|
|
@@ -1388,11 +1441,12 @@ returned typed handle. The result is otherwise the ordinary staged result plus
|
|
|
1388
1441
|
a workspace `RetentionWitness`. Calls on one workspace serialize their ref
|
|
1389
1442
|
mutations so concurrent staging cannot silently lose an accumulated root.
|
|
1390
1443
|
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1444
|
+
The three workspace batch methods accept the same options as their top-level
|
|
1445
|
+
counterparts. Each returns one retained result per input in input order, while
|
|
1446
|
+
all results from that batch name the same exact workspace generation. Duplicate
|
|
1447
|
+
content preserves ordered results but is retained only once in that generation.
|
|
1448
|
+
Batch construction and the one-generation installation remain serialized with
|
|
1449
|
+
all other mutations on that workspace.
|
|
1396
1450
|
|
|
1397
1451
|
This guarantee starts when the method returns. Like all Git object composition,
|
|
1398
1452
|
the object-write-to-ref-update interval still relies on Git's ordinary
|
|
@@ -3384,7 +3438,7 @@ new CasError({ message, code, meta, documentationUrl });
|
|
|
3384
3438
|
| `MANIFEST_NOT_FOUND` | No manifest entry found in the Git tree | `readManifest()`, `inspectAsset()`, `collectReferencedChunks()` |
|
|
3385
3439
|
| `GIT_ERROR` | Underlying Git plumbing command failed | `readManifest()`, `inspectAsset()`, `collectReferencedChunks()` |
|
|
3386
3440
|
| `GIT_REF_NOT_FOUND` | Git ref lookup found no ref; vault reads normalize this to empty state | `GitRefAdapter`, `VaultPersistence` |
|
|
3387
|
-
| `INVALID_OPTIONS` | Mutually exclusive options
|
|
3441
|
+
| `INVALID_OPTIONS` | Mutually exclusive options, malformed batch input, or unsupported option value | `store()`, `restore()`, asset and bundle batches |
|
|
3388
3442
|
| `RESOURCE_CLOSED` | A facade or persistence adapter operation began while or after closure was in progress | `ContentAddressableStore`, `GitPersistenceAdapter` |
|
|
3389
3443
|
| `HANDLE_INVALID` | Handle object, canonical token, or staged result is malformed or unsupported | Application handles and staged results |
|
|
3390
3444
|
| `HANDLE_KIND_MISMATCH` | A handle has a valid envelope but the wrong content kind | Handle parsing and application storage |
|
|
@@ -3395,14 +3449,14 @@ new CasError({ message, code, meta, documentationUrl });
|
|
|
3395
3449
|
| `PAGE_BATCH_LIMIT` | Page batch count or aggregate bytes exceed the explicit batch policy | `pages.putBatch()` |
|
|
3396
3450
|
| `BUNDLE_CORRUPT` | Persisted bundle descriptors, edges, ranges, or target summaries disagree | Bundle reads, retention, publication |
|
|
3397
3451
|
| `BUNDLE_DESCRIPTOR_LIMIT` | Bundle descriptor bytes exceed admission or repository read policy | Bundle construction and validation |
|
|
3398
|
-
| `BUNDLE_DUPLICATE_PATH` | Two ordered bundle members use the same canonical path | `bundles.putOrdered()`
|
|
3452
|
+
| `BUNDLE_DUPLICATE_PATH` | Two ordered bundle members use the same canonical path | `bundles.putOrdered()`, `bundles.putOrderedBatch()` |
|
|
3399
3453
|
| `BUNDLE_FANOUT_LIMIT` | Bundle tree width, depth, or nesting exceeds policy | Bundle construction and validation |
|
|
3400
3454
|
| `BUNDLE_LIMIT_INVALID` | Configured or per-operation bundle limits are malformed or attempt to raise repository policy | Facade construction, bundle writes |
|
|
3401
3455
|
| `BUNDLE_MEMBER_INVALID` | Bundle member input or resolved handle target is invalid | Bundle construction |
|
|
3402
|
-
| `BUNDLE_MEMBER_LIMIT` | Bundle member count exceeds admission or repository read policy
|
|
3456
|
+
| `BUNDLE_MEMBER_LIMIT` | Bundle or aggregate batch member count exceeds admission or repository read policy | Bundle construction and validation |
|
|
3403
3457
|
| `BUNDLE_MEMBER_NOT_FOUND` | Requested bundle member path is absent | `bundles.openMember()` |
|
|
3404
3458
|
| `BUNDLE_MEMBER_NOT_STREAMABLE` | Requested member is a nested structured bundle rather than bytes | `bundles.openMember()` |
|
|
3405
|
-
| `BUNDLE_MEMBER_ORDER` | Ordered bundle input is not strictly increasing by canonical path | `bundles.putOrdered()`
|
|
3459
|
+
| `BUNDLE_MEMBER_ORDER` | Ordered bundle input is not strictly increasing by canonical path | `bundles.putOrdered()`, `bundles.putOrderedBatch()` |
|
|
3406
3460
|
| `BUNDLE_PATH_INVALID` | Bundle member path is empty, unsafe, or non-canonical | Bundle writes and reads |
|
|
3407
3461
|
| `BUNDLE_PATH_LIMIT` | Bundle member path exceeds its UTF-8 byte bound | Bundle construction and validation |
|
|
3408
3462
|
| `COLLECTION_NAMESPACE_INVALID` | Managed collection namespace or cache ref is not canonical | `caches.open()` |
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# git-cas v6.5.7 Release Notes
|
|
2
|
+
|
|
3
|
+
v6.5.7 removes process-per-payload startup for small blobs requested through
|
|
4
|
+
the streaming persistence contract. It changes no public package API, object
|
|
5
|
+
identity, stored-data format, ref, or retention behavior.
|
|
6
|
+
|
|
7
|
+
## Bounded Session-Backed Stream Reads
|
|
8
|
+
|
|
9
|
+
On plumbing that exposes a typed `cat-file --batch-command` session,
|
|
10
|
+
`GitPersistenceAdapter.readBlobStream()` now inspects immutable object type and
|
|
11
|
+
size before choosing a content route. A blob at or below the fixed 10 MiB
|
|
12
|
+
ceiling is read through the existing repository-scoped session and returned as
|
|
13
|
+
one `Buffer` chunk.
|
|
14
|
+
|
|
15
|
+
The ceiling is fixed independently of `maxBlobSize`; callers cannot configure
|
|
16
|
+
the optimization into unbounded allocation. Returning one chunk changes
|
|
17
|
+
backpressure granularity for admitted small objects, but the public
|
|
18
|
+
`AsyncIterable` method, byte sequence, object identity, and error surface remain
|
|
19
|
+
unchanged.
|
|
20
|
+
|
|
21
|
+
Objects above 10 MiB retain the genuine one-shot streaming path. Metadata is
|
|
22
|
+
inspected first, so oversized content is streamed exactly once and never read
|
|
23
|
+
and discarded through the bounded session. Plumbing without typed sessions,
|
|
24
|
+
unsupported object posture, and failed bounded reads retain the previous
|
|
25
|
+
one-shot fallback.
|
|
26
|
+
|
|
27
|
+
## Process-Topology Witness
|
|
28
|
+
|
|
29
|
+
The committed diagnostic used 32 deterministic 4,096-byte objects. The legacy
|
|
30
|
+
fallback opened 32 one-shot `cat-file` children. The bounded session route
|
|
31
|
+
opened one persistent child, issued 32 metadata requests and 32 bounded reads,
|
|
32
|
+
returned the same semantic digest, and left zero active sessions after close.
|
|
33
|
+
|
|
34
|
+
A 10 MiB + 1 byte object opened one persistent child for metadata and one
|
|
35
|
+
one-shot content stream. It performed no session content read. Docker-backed
|
|
36
|
+
integration tests repeat the small-object law in SHA-1 and SHA-256 repositories
|
|
37
|
+
and verify exact bytes plus deterministic closure.
|
|
38
|
+
|
|
39
|
+
These are structural process-count and semantic-equality results. They are not
|
|
40
|
+
a wall-clock guarantee, a claim that every downstream Git child disappears, or
|
|
41
|
+
an aggregate caller-residency bound.
|
|
42
|
+
|
|
43
|
+
## Verification
|
|
44
|
+
|
|
45
|
+
The release candidate passed the repository's complete 14-step verifier with
|
|
46
|
+
6,922 observed tests across Node, Bun, and Deno. The matrix includes public
|
|
47
|
+
type compatibility, executable examples, 202 real-Git integration tests on
|
|
48
|
+
each runtime, build stamping, and npm and JSR dry-runs.
|
|
49
|
+
|
|
50
|
+
## Compatibility
|
|
51
|
+
|
|
52
|
+
This release requires no application or stored-data migration. Existing
|
|
53
|
+
objects, manifests, handles, refs, retention evidence, package exports, and
|
|
54
|
+
custom persistence adapters remain valid. Consumers automatically receive the
|
|
55
|
+
bounded route when their injected Git plumbing supports typed sessions; large
|
|
56
|
+
payloads and fallback implementations keep the prior streaming behavior.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# git-cas v6.5.8 Release Notes
|
|
2
|
+
|
|
3
|
+
v6.5.8 removes process-per-artifact write amplification for bounded groups of
|
|
4
|
+
independent assets and ordered bundles. It adds input-ordered batch APIs and
|
|
5
|
+
one-generation workspace retention without changing existing object bytes,
|
|
6
|
+
handles, refs, single-write behavior, or stored-data formats.
|
|
7
|
+
|
|
8
|
+
## Bounded Application Write Waves
|
|
9
|
+
|
|
10
|
+
`assets.putBatch()` admits a caller-supplied array under explicit active-asset,
|
|
11
|
+
planned-object, and aggregate-byte limits. Each asset retains the same store,
|
|
12
|
+
chunking, encryption, compression, manifest, and handle semantics as
|
|
13
|
+
`assets.put()`. Independent chunk and manifest blobs are submitted in bounded
|
|
14
|
+
waves, followed by the manifest trees that depend on them. Results preserve
|
|
15
|
+
input order, including repeated content.
|
|
16
|
+
|
|
17
|
+
`bundles.putOrderedBatch()` validates and preplans a bounded array of the
|
|
18
|
+
existing deterministic ordered-bundle graphs. Descriptor blobs are written
|
|
19
|
+
together, and tree layers are written bottom-up. The batch is limited by bundle
|
|
20
|
+
count, aggregate members, planned object count, and admitted bytes. Serialized
|
|
21
|
+
descriptors, fanout topology, tree entries, and returned handles remain
|
|
22
|
+
identical to repeated `bundles.putOrdered()` calls.
|
|
23
|
+
|
|
24
|
+
Scoped staging workspaces mirror both APIs. A successful batch installs one
|
|
25
|
+
exact RootSet generation and every returned retention witness names that same
|
|
26
|
+
generation. The authoritative ref write remains checked and no-dereference;
|
|
27
|
+
concurrent head movement returns the existing conflict instead of being
|
|
28
|
+
retried or hidden.
|
|
29
|
+
|
|
30
|
+
## Session and Compatibility Behavior
|
|
31
|
+
|
|
32
|
+
On Plumbing 3.3.0, git-cas pipelines blob, tree, and metadata groups through
|
|
33
|
+
typed sessions and reuses one `update-ref --stdin` child across successful
|
|
34
|
+
checked mutations. A failed update-ref transaction is discarded and closed;
|
|
35
|
+
later semantic work may open a fresh session. Adapter closure drains every
|
|
36
|
+
owned child.
|
|
37
|
+
|
|
38
|
+
Existing single methods remain supported. Persistence adapters without the
|
|
39
|
+
new optional batch methods retain ordered per-item fallbacks. A blob above the
|
|
40
|
+
64 MiB fast-import ceiling deliberately uses the existing one-shot writer
|
|
41
|
+
while eligible members remain batched. No unbounded source is collected merely
|
|
42
|
+
because its operation participates in a batch.
|
|
43
|
+
|
|
44
|
+
## Process-Topology Witness
|
|
45
|
+
|
|
46
|
+
The committed five-sample witness uses the published
|
|
47
|
+
`@git-stunts/plumbing@3.3.0` artifact in temporary SHA-1 and SHA-256 bare
|
|
48
|
+
repositories. Before-and-after semantic digests match in every sample.
|
|
49
|
+
|
|
50
|
+
| Operation | Git children | Typed interactions | Median wall reduction |
|
|
51
|
+
| ---------------------------- | -----------: | -----------------: | --------------------: |
|
|
52
|
+
| 16 SHA-1 assets | 49 -> 2 | 64 -> 19 | 87.137% |
|
|
53
|
+
| 16 SHA-256 assets | 49 -> 2 | 64 -> 19 | 86.673% |
|
|
54
|
+
| 16 SHA-1 workspace bundles | 147 -> 8 | 224 -> 13 | 91.047% |
|
|
55
|
+
| 16 SHA-256 workspace bundles | 147 -> 8 | 224 -> 13 | 90.930% |
|
|
56
|
+
|
|
57
|
+
Process and interaction counts plus semantic identity are the deterministic
|
|
58
|
+
acceptance evidence. Wall time and worker CPU are host observations, not
|
|
59
|
+
universal speed guarantees. The residual children preserve Git authority for
|
|
60
|
+
tree construction, commit identity, ref containment checks, and checked
|
|
61
|
+
publication.
|
|
62
|
+
|
|
63
|
+
## Failure and Reachability
|
|
64
|
+
|
|
65
|
+
Wrong batch result cardinality rejects the entire semantic batch. Source
|
|
66
|
+
failure records its input index and bounded staging evidence, closes admitted
|
|
67
|
+
sibling iterators at their next chunk boundary, and never starts later queued
|
|
68
|
+
sources. Immutable objects written before a failure may remain unreachable;
|
|
69
|
+
no partial result array is presented as success.
|
|
70
|
+
|
|
71
|
+
Real-Git tests stage asset and bundle batches, prune immediately, verify all
|
|
72
|
+
retained content, release the workspace, prune again, and observe released
|
|
73
|
+
bundle roots become collectible. SHA-1 and SHA-256 identity tests compare the
|
|
74
|
+
complete returned handle sequence against repeated singles.
|
|
75
|
+
|
|
76
|
+
## Verification
|
|
77
|
+
|
|
78
|
+
The release candidate passed the repository's complete 14-step verifier with
|
|
79
|
+
7,057 observed tests across Node, Bun, and Deno. The matrix includes public
|
|
80
|
+
type compatibility, executable examples, 203 real-Git integration tests on
|
|
81
|
+
each runtime, build stamping, npm packing, and JSR publication dry-runs.
|
|
82
|
+
|
|
83
|
+
## Compatibility
|
|
84
|
+
|
|
85
|
+
This release requires no application or stored-data migration. Applications
|
|
86
|
+
may keep every existing single-write call unchanged. Batch adoption is
|
|
87
|
+
explicit and additive; custom adapters and older Plumbing implementations keep
|
|
88
|
+
their established fallback paths. JSR metadata remains validation-only because
|
|
89
|
+
the release workflow publishes npm plus the GitHub Release.
|
package/index.d.ts
CHANGED
|
@@ -515,6 +515,7 @@ export declare class GitPersistencePortBase {
|
|
|
515
515
|
writeBlob(content: Uint8Array): Promise<string>;
|
|
516
516
|
writeBlobs?(contents: Iterable<Uint8Array>): Promise<string[]>;
|
|
517
517
|
writeTree(entries: string[]): Promise<string>;
|
|
518
|
+
writeTrees?(trees: Iterable<string[]>): Promise<string[]>;
|
|
518
519
|
readBlob(oid: string, maxBytes?: number): Promise<Uint8Array>;
|
|
519
520
|
readBlobStream(oid: string): Promise<AsyncIterable<Uint8Array>>;
|
|
520
521
|
readTree(
|
|
@@ -529,6 +530,12 @@ export declare class GitPersistencePortBase {
|
|
|
529
530
|
): AsyncIterable<{ mode: string; type: string; oid: string; name: string }>;
|
|
530
531
|
readObjectType(oid: string): Promise<string>;
|
|
531
532
|
readObjectSize(oid: string): Promise<number>;
|
|
533
|
+
readObjectInfos?(
|
|
534
|
+
oids: Iterable<string>
|
|
535
|
+
): Promise<Array<{ oid: string; type: string; size: number }>>;
|
|
536
|
+
withWriteScope?<T>(
|
|
537
|
+
operation: (persistence: GitPersistencePortBase) => Promise<T>
|
|
538
|
+
): Promise<T>;
|
|
532
539
|
setMaxBlobSize?(maxBlobSize: number): void;
|
|
533
540
|
close?(): Promise<void>;
|
|
534
541
|
[Symbol.asyncDispose]?(): Promise<void>;
|
|
@@ -563,6 +570,8 @@ export declare class GitRefPortBase {
|
|
|
563
570
|
after?: string | null;
|
|
564
571
|
limit: number;
|
|
565
572
|
}): AsyncIterable<{ ref: string; oid: string; symref: string | null }>;
|
|
573
|
+
close?(): Promise<void>;
|
|
574
|
+
[Symbol.asyncDispose]?(): Promise<void>;
|
|
566
575
|
}
|
|
567
576
|
|
|
568
577
|
/** Git-backed implementation of the persistence port. */
|
|
@@ -576,6 +585,13 @@ export declare class GitPersistenceAdapter extends GitPersistencePortBase {
|
|
|
576
585
|
treeCacheBytes?: number;
|
|
577
586
|
});
|
|
578
587
|
writeBlobs(contents: Iterable<Uint8Array>): Promise<string[]>;
|
|
588
|
+
writeTrees(trees: Iterable<string[]>): Promise<string[]>;
|
|
589
|
+
readObjectInfos(
|
|
590
|
+
oids: Iterable<string>
|
|
591
|
+
): Promise<Array<{ oid: string; type: string; size: number }>>;
|
|
592
|
+
withWriteScope<T>(
|
|
593
|
+
operation: (persistence: GitPersistencePortBase) => Promise<T>
|
|
594
|
+
): Promise<T>;
|
|
579
595
|
setMaxBlobSize(maxBlobSize: number): void;
|
|
580
596
|
close(): Promise<void>;
|
|
581
597
|
[Symbol.asyncDispose](): Promise<void>;
|
|
@@ -596,6 +612,8 @@ export declare class GitRefAdapter extends GitRefPortBase {
|
|
|
596
612
|
after?: string | null;
|
|
597
613
|
limit: number;
|
|
598
614
|
}): AsyncIterable<{ ref: string; oid: string; symref: string | null }>;
|
|
615
|
+
close(): Promise<void>;
|
|
616
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
599
617
|
}
|
|
600
618
|
|
|
601
619
|
export type RepositoryObjectType = 'blob' | 'tree' | 'commit' | 'tag';
|
|
@@ -816,6 +834,10 @@ export declare class RootSet {
|
|
|
816
834
|
entries: Iterable<RootSetEntry>;
|
|
817
835
|
expectedHeadOid?: string | null;
|
|
818
836
|
}): Promise<RootSetMutationResult>;
|
|
837
|
+
replaceExact(options: {
|
|
838
|
+
entries: Iterable<RootSetEntry>;
|
|
839
|
+
expectedHeadOid: string | null;
|
|
840
|
+
}): Promise<RootSetMutationResult>;
|
|
819
841
|
mutate(
|
|
820
842
|
mutator: (
|
|
821
843
|
entries: ReadonlyArray<Readonly<RootSetEntry>>,
|
|
@@ -1449,6 +1471,12 @@ export interface AssetPutOptions {
|
|
|
1449
1471
|
|
|
1450
1472
|
export interface AssetCapability {
|
|
1451
1473
|
put(options: AssetPutOptions): Promise<StagedAsset>;
|
|
1474
|
+
putBatch(options: {
|
|
1475
|
+
assets: AssetPutOptions[];
|
|
1476
|
+
maxBatchAssets?: number;
|
|
1477
|
+
maxBatchObjects?: number;
|
|
1478
|
+
maxBatchBytes?: number;
|
|
1479
|
+
}): Promise<ReadonlyArray<StagedAsset>>;
|
|
1452
1480
|
adopt(options: { treeOid: string }): Promise<StagedAsset>;
|
|
1453
1481
|
open(options: {
|
|
1454
1482
|
handle: AssetHandleInput;
|
|
@@ -1504,6 +1532,18 @@ export interface BundleCapability {
|
|
|
1504
1532
|
| AsyncIterable<[string, BundleMemberInput]>;
|
|
1505
1533
|
limits?: Partial<BundleLimits>;
|
|
1506
1534
|
}): Promise<StagedBundle>;
|
|
1535
|
+
putOrderedBatch(options: {
|
|
1536
|
+
bundles: Array<{
|
|
1537
|
+
members:
|
|
1538
|
+
| Iterable<[string, BundleMemberInput]>
|
|
1539
|
+
| AsyncIterable<[string, BundleMemberInput]>;
|
|
1540
|
+
limits?: Partial<BundleLimits>;
|
|
1541
|
+
}>;
|
|
1542
|
+
maxBatchBundles?: number;
|
|
1543
|
+
maxBatchMembers?: number;
|
|
1544
|
+
maxBatchObjects?: number;
|
|
1545
|
+
maxBatchBytes?: number;
|
|
1546
|
+
}): Promise<ReadonlyArray<StagedBundle>>;
|
|
1507
1547
|
getMember(options: {
|
|
1508
1548
|
handle: BundleHandleInput;
|
|
1509
1549
|
path: string;
|
|
@@ -1633,6 +1673,9 @@ export declare class StagingWorkspace {
|
|
|
1633
1673
|
readonly expiresAt: string | null;
|
|
1634
1674
|
readonly assets: {
|
|
1635
1675
|
put(options: AssetPutOptions): Promise<WorkspaceRetainedAsset>;
|
|
1676
|
+
putBatch(
|
|
1677
|
+
options: Parameters<AssetCapability['putBatch']>[0],
|
|
1678
|
+
): Promise<ReadonlyArray<WorkspaceRetainedAsset>>;
|
|
1636
1679
|
adopt(options: { treeOid: string }): Promise<WorkspaceRetainedAsset>;
|
|
1637
1680
|
};
|
|
1638
1681
|
readonly pages: {
|
|
@@ -1644,6 +1687,9 @@ export declare class StagingWorkspace {
|
|
|
1644
1687
|
readonly bundles: {
|
|
1645
1688
|
put(options: Parameters<BundleCapability['put']>[0]): Promise<WorkspaceRetainedBundle>;
|
|
1646
1689
|
putOrdered(options: Parameters<BundleCapability['putOrdered']>[0]): Promise<WorkspaceRetainedBundle>;
|
|
1690
|
+
putOrderedBatch(
|
|
1691
|
+
options: Parameters<BundleCapability['putOrderedBatch']>[0],
|
|
1692
|
+
): Promise<ReadonlyArray<WorkspaceRetainedBundle>>;
|
|
1647
1693
|
};
|
|
1648
1694
|
checkpoint(options: { handles: Iterable<ApplicationHandleInput> }): Promise<WorkspaceCheckpointResult>;
|
|
1649
1695
|
renew(): Promise<WorkspaceCheckpointResult>;
|
|
@@ -1813,6 +1859,10 @@ export default class ContentAddressableStore {
|
|
|
1813
1859
|
|
|
1814
1860
|
createTree(options: { manifest: Manifest; merkleThreshold?: number }): Promise<string>;
|
|
1815
1861
|
|
|
1862
|
+
createTrees(
|
|
1863
|
+
requests: Array<{ manifest: Manifest; merkleThreshold?: number }>,
|
|
1864
|
+
): Promise<string[]>;
|
|
1865
|
+
|
|
1816
1866
|
verifyIntegrity(manifest: Manifest, options?: VerifyIntegrityOptions): Promise<boolean>;
|
|
1817
1867
|
|
|
1818
1868
|
readManifest(options: { treeOid: string }): Promise<Manifest>;
|