# git-cas v6.5.9 Release Notes

v6.5.9 adds bounded compound staging-workspace admission for applications that
construct dependency-ordered page and bundle graphs. It replaces one temporary
retention publication per construction wave with one exact final workspace
generation, without changing application handles, stored object bytes,
workspace descriptors, ref layout or namespaces, readers, or existing
workspace methods. Successful compound admission deliberately reduces
workspace-ref update frequency.

## Compound Workspace Admission

`workspace.batch()` owns one bounded callback and one operation-scoped Git
persistence view:

```js
const admitted = await workspace.batch({
  maxOperations: 3,
  operation: async (scope) => {
    const pages = await scope.pages.putBatch({ pages: pageRequests });
    const leaves = await scope.bundles.putOrderedBatch({
      bundles: buildLeafRequests(pages),
    });
    return (
      await scope.bundles.putOrderedBatch({
        bundles: [buildRootRequest(leaves)],
      })
    )[0];
  },
});

admitted.value;
admitted.retention;
```

The scope exposes only the existing bounded page-batch and ordered-bundle-batch
operations. Calls serialize by invocation order and return frozen handle
arrays for later dependency waves. The default scope limit is 64 operations;
the exported hard limit is 1,024. Every call also retains its existing page,
bundle, member, object, and byte ceilings.

Success installs the union of previously retained workspace targets and every
new compound target exactly once. The callback value becomes caller-visible
only after scoped Git resources close and the paired retention result names the
exact final generation. Existing staging methods continue to retain their
result independently and remain appropriate when an intermediate handle must
leave private construction code.

## Failure and Trust Boundary

Invalid bounds, empty operations, callback failure, staged-write failure,
session-close failure, and checked final-retention failure return no admitted
value and do not move the prior workspace generation. The first failure stops
later queued work. Distinct callback/write and operation/close failures remain
available through `AggregateError`. Immutable objects written before refusal
may remain unreachable for Git's ordinary reclamation.

The callback is trusted JavaScript. git-cas closes an escaped scope and never
returns the callback value before retention, but it cannot prevent callback
code from assigning a provisional handle into external state as a side effect.
Such a leaked handle has no compound retention witness and is outside the
contract.

## Process-Topology Witness

The committed five-sample witness compares the same 33-operation graph under
independent per-wave retention and compound admission. Each mode produces 64
pages, 16 leaf bundles, one root bundle, and the same ordered sequence of 81
application handles in fresh SHA-1 and SHA-256 bare repositories.

| Format  | Mode     | Git children | Git interactions | Median wall ms | Worker CPU ms |
| ------- | -------- | -----------: | ---------------: | -------------: | ------------: |
| SHA-1   | per-wave |          200 |              380 |       3763.820 |       370.336 |
| SHA-1   | compound |           23 |              238 |        733.116 |       113.672 |
| SHA-256 | per-wave |          200 |              380 |       3709.930 |       373.898 |
| SHA-256 | compound |           23 |              238 |        726.976 |       114.407 |

Both formats reduced Git child creation by 88.5% and median wall time by about
80.5% on the measured host: 200 to 23 Git children and 33 retained generations
to one. `fast-import`, `commit-tree`, symbolic-ref containment checks, and
checked ref updates fell from one per wave to one per compound admission. The
semantic handle digests matched exactly.

The remaining 18 `mktree` children preserve validation across interdependent
descriptor-pack visibility boundaries. Further reduction requires a separately
proved typed tree-writing protocol or equivalent deterministic construction;
this release does not bypass Git's object validation.

See the [machine witness](https://github.com/git-stunts/git-cas/blob/main/docs/design/0060-compound-workspace-admission/witness/compound-workspace-admission.json)
and [verification narrative](https://github.com/git-stunts/git-cas/blob/main/docs/design/0060-compound-workspace-admission/witness/verification.md)
for the exact source, environment, counts, digests, and method.

## Reachability Proof

Real-Git integration tests cover SHA-1 and SHA-256 success and refusal. They
verify one checked publication, zero active scoped fast-import sessions after
settlement, immediate-prune readability while retained, reclamation after
checked release, and no workspace generation after a dependent wave fails.

## Verification

Implementation review #124 merged normally as
`eb8d617620fa8f401fb887f5b1bbc341d4746b0a`; its exact reviewed head
`29ba6e88c787a5e54c95a554e9166fd21aae31c0` passed all 14 release-verifier
stages with 7,141 observed tests across Node, Bun, Deno, and all three real-Git
integration suites. Exact versioned candidate
`5512acd477bc5e5a11339d6027a03631d1a3544a` then passed the same 14-stage
method with 7,147 observed tests: 2,179 Node, 2,178 Bun, 2,169 Deno, and 207
integration tests in each runtime. No tag, npm artifact, or GitHub Release is
claimed by this candidate.

## Compatibility

This release is additive and requires no application or stored-data migration.
Existing repositories open in place. It introduces no new object format,
descriptor version, ref namespace, reader, transaction log, authority cutover,
or mixed-version rewrite. Applications may leave every existing workspace call
unchanged and adopt `workspace.batch()` only where intermediate handles remain
private to one bounded construction.
