Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
f4ea755
Test CBOR op hydration boundary
flyingrobots Jun 20, 2026
32201ba
Use runtime op dispatch for schema detection
flyingrobots Jun 20, 2026
d1dbcfc
Document patch write visibility contract
flyingrobots Jun 20, 2026
01d148c
Introduce WarpKernelPort persistence surface
flyingrobots Jun 20, 2026
953ba26
Name StrandController host capabilities
flyingrobots Jun 20, 2026
f944a65
Split materialize strategies
flyingrobots Jun 20, 2026
c111353
Add runtime-backed WarpOpenOptions
flyingrobots Jun 20, 2026
c7d8b10
Guard EdgePropSet wire activation
flyingrobots Jun 20, 2026
3974427
Fix materialize strategy lint gates
flyingrobots Jun 20, 2026
3e99600
Add explicit sync auth scheme boundary
flyingrobots Jun 20, 2026
67d5439
Retire content attachment spec posture
flyingrobots Jun 20, 2026
f728382
Retire CRDT shim vocabulary
flyingrobots Jun 20, 2026
0ad54d2
Add structural observer accumulation surface
flyingrobots Jun 20, 2026
fd49724
Add read-only MCP stdio server
flyingrobots Jun 20, 2026
b51cede
Gate legacy substrate reads behind migration policy
flyingrobots Jun 20, 2026
27885da
Add operation policy port for retries and streams
flyingrobots Jun 20, 2026
4fb9c8f
Add vault-resolved CAS content encryption policy
flyingrobots Jun 20, 2026
75d0e35
Document capability namespace aliases
flyingrobots Jun 20, 2026
f0e43fa
Patch trailer-codec declarations
flyingrobots Jun 20, 2026
09ef74c
Document GitPlumbing substrate rename
flyingrobots Jun 20, 2026
2eaf39d
Fix runtime option regression tests
flyingrobots Jun 20, 2026
c38011b
Fix npm audit dependency findings
flyingrobots Jun 20, 2026
a7cb5e5
Guard generated declaration surface
flyingrobots Jun 20, 2026
b6930e1
Add merge conflict corpus benchmark
flyingrobots Jun 20, 2026
bcef4ce
Enforce source size ratchet
flyingrobots Jun 20, 2026
5a65bb6
Audit dependency hygiene posture
flyingrobots Jun 20, 2026
bc30ce6
Retire TSC zero agent audit debt
flyingrobots Jun 20, 2026
bb117e5
Fill honest CLI command families
flyingrobots Jun 20, 2026
8683eb1
Extract conflict pipeline context
flyingrobots Jun 20, 2026
0b2f997
Add isolated same-writer race witness
flyingrobots Jun 20, 2026
550c903
Add merge classifier noun family
flyingrobots Jun 20, 2026
d86f614
Freeze lane coordinate capability boundary
flyingrobots Jun 20, 2026
8a180cd
Clarify observer-first guide posture
flyingrobots Jun 20, 2026
6bdc4ad
Add TTD merge inspection protocol
flyingrobots Jun 20, 2026
1151d94
Add async graph traversal streams
flyingrobots Jun 20, 2026
0171477
Stream materialization patch collection
flyingrobots Jun 20, 2026
125d20c
Stream materialization reduction witnesses
flyingrobots Jun 20, 2026
dcb281e
Rename projection read handle
flyingrobots Jun 20, 2026
a7b60ae
Add docs runtime convergence ratchet
flyingrobots Jun 20, 2026
2bcf8cb
Align WARP teaching docs with runtime posture
flyingrobots Jun 20, 2026
e685b85
Freeze receipt envelope boundary
flyingrobots Jun 20, 2026
f5726a4
Add bounded query support rules
flyingrobots Jun 20, 2026
637b242
Add causal index query plans
flyingrobots Jun 20, 2026
d671fc4
Add graph diff comparison API
flyingrobots Jun 20, 2026
79087c2
Add witnessed suffix admission shell
flyingrobots Jun 20, 2026
49866b0
Add observer plan reading envelopes
flyingrobots Jun 20, 2026
05e7a9c
Expose receipt anchors through observer envelopes
flyingrobots Jun 20, 2026
7b97c56
Add support fragment query plans
flyingrobots Jun 20, 2026
7a6801b
Make strand materialization follow live parent basis
flyingrobots Jun 20, 2026
2ac4c74
Lock PatchSession typed error classification
flyingrobots Jun 20, 2026
ed5d1dc
Make trust record subject validation pure
flyingrobots Jun 20, 2026
39a0940
Add audit ambient time ratchet
flyingrobots Jun 20, 2026
14ec93a
Add sync response paging metrics
flyingrobots Jun 20, 2026
5742d30
Allow protocol version token exceptions
flyingrobots Jun 20, 2026
36cb73f
Ratchet domain wall-clock suppressions
flyingrobots Jun 20, 2026
b65618b
Ratchet retired WarpServe boundary
flyingrobots Jun 20, 2026
3371eee
Ratchet op hydration boundaries
flyingrobots Jun 20, 2026
720bea7
Extract op strategy registry validation
flyingrobots Jun 20, 2026
2c3225b
Share canonical receipt validation utilities
flyingrobots Jun 20, 2026
aa73c78
Fix GraphDiff nested immutability
flyingrobots Jun 20, 2026
2800873
Fix CAS content key copying
flyingrobots Jun 20, 2026
8dba1f2
Fix sync paging DTO type aliases
flyingrobots Jun 20, 2026
075d196
Fix graph diff public API proof
flyingrobots Jun 20, 2026
8a48c1a
Fix CAS blob key copy expectations
flyingrobots Jun 20, 2026
2afea47
Fix package root validation gates
flyingrobots Jun 20, 2026
81a2add
Fix strand read basis validation
flyingrobots Jun 20, 2026
7afbf5e
Fix release preflight build order
flyingrobots Jun 21, 2026
6d1a279
Fix CAS missing content classification
flyingrobots Jun 21, 2026
58f2ba4
Fix Bun Zod import interop
flyingrobots Jun 21, 2026
77b580f
Fix: reject non-finite MCP request IDs
flyingrobots Jun 21, 2026
c68fc49
Fix: use compatible serve port schema message
flyingrobots Jun 21, 2026
e4ad4d0
Fix: guard malformed op strategy entries
flyingrobots Jun 21, 2026
6a20ac6
Fix: share query plan validation helpers
flyingrobots Jun 21, 2026
e3340bf
Fix: align strand patch listing basis
flyingrobots Jun 21, 2026
06eb26c
Fix: cap sync request page size
flyingrobots Jun 21, 2026
31c87e4
Fix: type canonical replacer boundary
flyingrobots Jun 21, 2026
4f92fef
Fix: snapshot runtime GC policy config
flyingrobots Jun 21, 2026
9ea98f2
Fix: compare CAS payload bytes by value
flyingrobots Jun 21, 2026
b9f2718
Fix: type op strategy validation contract
flyingrobots Jun 21, 2026
fef0c2a
Fix: cover runtime state store cache
flyingrobots Jun 21, 2026
45c74b5
Fix: type TTD merge inspector constructor
flyingrobots Jun 21, 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
3 changes: 3 additions & 0 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
- name: TS policy
run: npm run typecheck:policy

- name: Build
run: npm run build --silent

- name: Test
run: npm run test:local --if-present

Expand Down
132 changes: 129 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,136 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Docs now have a doctrine/runtime alignment ratchet that defines status labels,
runtime evidence, and release rules for public claims that run ahead of the
implementation.
- README, Guide, and Advanced Guide now point readers at a teaching-alignment
audit before treating target WARP doctrine as shipped runtime behavior.
- `GitWarpReceiptEnvelopeBoundary` now freezes the minimal receipt/provenance
anchor external envelope consumers may depend on without exposing raw debug
receipt details as protocol truth.
- `BoundedSupportRule` now gives query plans a runtime-backed support law so
exact entity reads, neighborhood traversals, and wildcard discovery are
distinguishable before execution.
- `CausalIndexPlan` now carries the query-provider index posture for bounded
support rules, including the existing provenance entity-patch index family and
explicit global-discovery fallback.
- `SupportFragmentPlan` now gives bounded query reads a support-scoped fragment
materialization contract, including coordinate-scoped fragment keys and an
explicit `global-fallback` posture for discovery queries.
- `GraphDiff` now exposes a first-class comparison diff result for live Lamport
ranges through `comparison.diff({ from, to })`, without routing through
wildcard query scans.
- `GitWarpWitnessedSuffixAdmissionShell` now gives suffix import/export an
observer-readable shell with explicit admission outcomes and replay-bearing
hologram material instead of a naked patch-list contract.
- A dated TSC Zero agent-merge audit now retires the historical #505/B171
drift concern by reconstructing PR #73's conflict-resolution scope and
mapping it to current TypeScript owner modules.
- The CLI now exposes honest `sync`, `serve`, `fork`, `checkpoint`, `gc`, and
`watch` command families backed by current runtime capabilities, while docs
keep `export` / `import` and `upgrade` / `migrate` omitted until those
adapter boundaries exist.
- Conflict analysis pipeline stages now receive an explicit
`ConflictPipelineContext` instead of the `ConflictAnalyzerService`
orchestrator, keeping graph access and hashing dependencies narrow.
- Same-writer race coverage now includes isolated runtime handles so the
accepted outcome is one visible winner plus one retryable writer-ref loss.
- `MergeClassifier` now emits explicit projection, semantic, or governance
merge labels from runtime-backed merge evidence and is checked against the
normalized merge conflict corpus.
- Lane, coordinate, and debugger capability authority now has a frozen
substrate boundary naming `worldline`, `strand`, `braid`, and stable
coordinate anchors for external protocol consumers.
- The Guide and Advanced Guide now make Observer-first reads the documented
client posture while explicitly warning that aperture redaction is not
encryption.
- TTD merge inspection now has a public read-only object-merge protocol with
precursor, branch footprint, candidate join, obstruction, lowering, policy,
and classifier evidence.
- Graph traversal now exposes `bfsStream()` and `dfsStream()` async generator
APIs, with collected `bfs()` and `dfs()` results layered over the same
traversal path.
- Patch collection for materialization now has stream-first frontier,
checkpoint, and writer patch APIs, with legacy array collectors reduced to
stream collection wrappers.
- Materialization now reduces default-runtime patch streams directly and carries
a deterministic witness that fails if live materialization buffers patch
entries before reducing them.
- `WarpKernelPort` now names the cohesive WARP kernel persistence contract
(`CommitPort` + `BlobPort` + `TreePort` + `RefPort`) so domain services no
longer need anonymous four-port intersections for core graph persistence.
- Sync responses now support an explicit `{ maxPatches, cursor }` page contract
and return first-class response-shaping metrics for patch count, skipped
writers, estimated payload bytes, and injected latency observations.
- `WarpOpenOptions` now provides a frozen, runtime-backed open-options boundary
for runtime graph openers while raw option objects remain accepted at the
composition boundary.
- Coordinate-backed Optics now expose the public v18 success path:
`prepareOpticBasis()`, `coordinate()`, and `coordinate.optic()` let
Worldline-first callers run coherent node and property optic reads from a
stable coordinate while keeping `openWarpGraph()` and materialize-first APIs
out of first-use application code.

### Changed

- Observers now carry an optional structural basis and expose deterministic
accumulation/emission objects (`ObserverBasis`, `ObserverAccumulation`, and
`ObserverEmission`) alongside the existing projection/query surface.
- Observers now expose `plan()` and `readingEnvelope()` so reusable observers
and one-shot reads share a source/config plan and emitted reading envelope
family with witness, shell, budget, plurality, and residual metadata.
- Observer reading envelopes now validate and carry receipt boundary anchors, so
read surfaces can expose substrate receipt truth without depending on raw
materialization receipt internals.
- Strand materialization now resolves parent-basis patches from the live
frontier when the runtime provides `getFrontier()`, so untouched strand
regions follow parent truth while overlay divergence remains strand-owned.
- `git warp mcp` now starts a local stdio MCP server with a read-only tool
catalog for graph info, node ids, node properties, edges, and existence
checks; write-capable tools remain absent until writer/trust policy is
explicit at the MCP boundary.
- `CasContentEncryptionPolicy` now gives `GitGraphAdapter` an operator-facing
vault-resolved git-cas encryption boundary for CAS content, including
current scheme selection, vault verification diagnostics, and legacy scheme
migration errors.
- The `@git-stunts/trailer-codec` dependency now carries a local
`patch-package` declaration patch, allowing git-warp to remove the ambient
trailer-codec shim and casted codec singleton construction.
- A normalized merge-conflict corpus and `benchmark:merge-conflicts` harness now
classify projection, semantic, and governance conflict cases for future merge
lifting work.
- `npm run lint` now includes a source-size ratchet that enforces the 500 LOC
source, 800 LOC test, and 300 LOC tooling caps for new files while keeping
current over-budget files in an explicit relaxation list.

### Changed

- The old exported `Worldline` read-handle class is now `ProjectionHandle`,
matching its actual role as a pinned projection/read handle instead of a
causal-history object.
- Removed the stale `tar` override after current dependent ranges resolve to
patched `tar@7.5.16`, relaxed the direct `zod` dependency to the current v3
range, and documented every active `patch-package` patch.
- Updated development dependency locks for the current `npm audit` findings:
Vite resolves to the patched 8.0.16 line, `tmp` resolves to 0.2.7,
`brace-expansion` resolves to 5.0.6 where used by markdown tooling, the
markdownlint CLI resolves to 0.49.x, and the explicit `tar` override now
points at the patched 7.5.16 release.
- Retired the legacy root `index.d.ts` monolith posture: npm consumers now
receive generated `dist/index.d.ts` declarations from the TypeScript source
barrel, while JSR continues to publish `index.ts` directly.
- Patch write docs now state the public visibility contract: `commit()`,
`writer.commitPatch(...)`, and `graph.patches.patch(...)` only resolve after
the canonical writer ref advances and reads back at the returned patch SHA.
- HTTP sync auth now declares the signed scheme with
`x-warp-auth-scheme: shared-secret-hmac-sha256`; peers continue to accept
legacy HMAC requests without the header during migration, but unsupported
declared schemes are rejected before HMAC verification.
- The content attachment spec now presents `ContentAttachmentRecord`,
`ContentAttachmentPayload`, and `GraphContentAttachmentSetOp` as the primary
storage-plane model while documenting `_content*` keys only as legacy
compatibility input.
- CRDT tests and diagnostics now use the `VersionVector` and `ORSet` class API
names directly, with a regression guard preventing legacy helper shim exports
from returning to the domain modules.
- `EffectSinkPort.deliver()` now returns `DeliveryObservation[]`
consistently. Custom sinks must wrap single observations in an array; the
built-in no-op, console, chunk, multiplex, and effect-pipeline surfaces all
Expand Down Expand Up @@ -409,6 +531,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **`browser.d.ts` deleted** — Same: `browser.ts` is the source of truth and npm consumers receive generated `dist/browser.d.ts`.
- **`contracts/type-surface.m8.json` deleted** — The Ironclad manifest is redundant when the barrel IS the contract.
- **Entry points renamed** — Source entry points moved from `index.js` → `index.ts`, `browser.js` → `browser.ts`, and `bin/warp-graph.js` → `bin/warp-graph.ts`. npm exports point at generated `dist/*.js`; JSR exports point at TypeScript source.
- **`@git-stunts/plumbing` class rename** — The substrate package now exposes
the Git plumbing runtime as the default `GitPlumbing` class. Consumers that
imported a named `Plumbing` symbol must switch to a default import and choose
the local name explicitly: `import GitPlumbing from '@git-stunts/plumbing';`.

### Changed

Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@ design docs, witnesses, retros, and archived backlog cards are evidence.
Current public API cost labels are in
[PUBLIC_API_COSTS.md](docs/PUBLIC_API_COSTS.md).

## Runtime posture

Use [GLOSSARY.md](docs/GLOSSARY.md) for shipped, transition, and target noun
status. Use the
[Doctrine/runtime Alignment Ratchet](docs/DOCTRINE_RUNTIME_ALIGNMENT.md) and
[teaching alignment audit](docs/audits/WARP_DOCTRINE_RUNTIME_ALIGNMENT.md) when
a doc claim is stronger than the runtime surface.

Current first-use docs teach `openWarpWorldline()`, worldline reads,
coordinates, and observer apertures as the current application path. Live
holographic strands, common-basis braid validation, witnessed suffix admission,
and support-scoped fragment materialization remain target doctrine unless their
own docs say otherwise.

## Quick start

```typescript
Expand Down Expand Up @@ -109,6 +123,13 @@ Worldlines and Optics unless it is deliberately working on those lower layers.

`openWarpGraph()` is organized around four architectural moments:

Public examples use the flat capability aliases (`graph.patches`,
`graph.query`, `graph.checkpoint`) as the canonical user-facing form. The
moment-scoped form (`graph.commitment.patches`,
`graph.revelation.query`, `graph.folding.checkpoint`) is the same runtime
object and is available when code wants to make the architectural moment
explicit.

| Moment | Capabilities | What it does |
|--------|-------------|--------------|
| **Commitment** | `patches`, `strands`, `comparison` | Admits claims into frontier-relative truth |
Expand All @@ -121,6 +142,7 @@ Worldlines and Optics unless it is deliberately working on those lower layers.
| Term | Meaning |
|------|---------|
| **Worldline** | Canonical admitted causal lane. The shared truth others may rely on. |
| **ProjectionHandle** | Pinned read handle over a live, historical, coordinate, or strand source. |
| **Coordinate** | Stable causal read position used by coherent Optics. |
| **Strand** | Speculative causal lane with fork provenance. Private until admitted. |
| **Braid** | Plural composition over a family of lanes. Not itself a lane. |
Expand Down Expand Up @@ -165,6 +187,8 @@ your source tree. Sync happens through normal `git push` / `git fetch`.
- **[Migration Guide](docs/migrations/v18.0.0.md)** — Worldline-first v18 API migration
- **[CLI Guide](docs/CLI_GUIDE.md)** — terminal workflows
- **[Vision](docs/VISION.md)** — repo doctrine
- **[Glossary](docs/GLOSSARY.md)** — shipped, transition, and target noun status
- **[Doctrine/runtime Alignment Ratchet](docs/DOCTRINE_RUNTIME_ALIGNMENT.md)** — evidence rule for docs-ahead claims
- **[Specs](docs/specs/)** — normative protocol and format specifications

## Substrate stack
Expand Down
71 changes: 71 additions & 0 deletions bin/cli/commands/checkpoint.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { z } from 'zod';

import { EXIT_CODES, parseCommandArgs, usageError } from '../infrastructure.ts';
import { openGraph, readActiveCursor, readCheckpointDate } from '../shared.ts';
import type { CliOptions } from '../types.ts';

const CHECKPOINT_OPTIONS = {};

const checkpointSchema = z.object({}).strict();

function checkpointUsage(): never {
throw usageError('Usage: warp-graph checkpoint <status|create|sync-coverage>');
}

type CheckpointPayload =
| { graph: string; checkpoint: string | null; date: string | null }
| { graph: string; checkpoint: string; status: 'created' }
| { graph: string; status: 'coverage-synced' };

async function assertNoActiveCursor(
persistence: Awaited<ReturnType<typeof openGraph>>['persistence'],
graphName: string,
): Promise<void> {
const cursor = await readActiveCursor(persistence, graphName);
if (cursor !== null) {
throw usageError('checkpoint create refuses to run while seek cursor is active; run git warp seek --latest first');
}
}

async function checkpointStatus(options: CliOptions): Promise<{ payload: CheckpointPayload; exitCode: number }> {
const { graph, graphName, persistence } = await openGraph(options);
const checkpoint = await graph._readCheckpointSha();
const date = await readCheckpointDate(persistence, checkpoint);
return {
payload: { graph: graphName, checkpoint, date },
exitCode: EXIT_CODES.OK,
};
}

async function createCheckpoint(options: CliOptions): Promise<{ payload: CheckpointPayload; exitCode: number }> {
const { graph, graphName, persistence } = await openGraph(options);
await assertNoActiveCursor(persistence, graphName);
await graph.materialize();
const checkpoint = await graph.createCheckpoint();
return {
payload: { graph: graphName, checkpoint, status: 'created' },
exitCode: EXIT_CODES.OK,
};
}

async function syncCoverage(options: CliOptions): Promise<{ payload: CheckpointPayload; exitCode: number }> {
const { graph, graphName } = await openGraph(options);
await graph.syncCoverage();
return {
payload: { graph: graphName, status: 'coverage-synced' },
exitCode: EXIT_CODES.OK,
};
}

export default async function handleCheckpoint(
{ options, args }: { options: CliOptions; args: string[] },
): Promise<{ payload: CheckpointPayload; exitCode: number }> {
const action = args[0] ?? 'status';
const rest = args.slice(1);
parseCommandArgs(rest, CHECKPOINT_OPTIONS, checkpointSchema);

if (action === 'status') { return await checkpointStatus(options); }
if (action === 'create') { return await createCheckpoint(options); }
if (action === 'sync-coverage') { return await syncCoverage(options); }
return checkpointUsage();
}
58 changes: 58 additions & 0 deletions bin/cli/commands/fork.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { z } from 'zod';

import { EXIT_CODES, parseCommandArgs } from '../infrastructure.ts';
import { openGraph } from '../shared.ts';
import type { CliOptions } from '../types.ts';

const FORK_OPTIONS = {
from: { type: 'string' },
at: { type: 'string' },
'fork-name': { type: 'string' },
'fork-writer': { type: 'string' },
};

const forkSchema = z.object({
from: z.string().min(1, 'Missing value for --from'),
at: z.string().min(1, 'Missing value for --at'),
'fork-name': z.string().min(1, 'Missing value for --fork-name').optional(),
'fork-writer': z.string().min(1, 'Missing value for --fork-writer').optional(),
}).strict().transform((val) => ({
from: val.from,
at: val.at,
forkName: val['fork-name'] ?? null,
forkWriter: val['fork-writer'] ?? null,
}));

type ForkPayload = {
graph: string;
forkGraph: string;
forkWriter: string;
from: string;
at: string;
status: 'created';
};

export default async function handleFork(
{ options, args }: { options: CliOptions; args: string[] },
): Promise<{ payload: ForkPayload; exitCode: number }> {
const { values } = parseCommandArgs(args, FORK_OPTIONS, forkSchema);
const { graph, graphName } = await openGraph(options);
const forked = await graph.fork({
from: values.from,
at: values.at,
...(values.forkName !== null ? { forkName: values.forkName } : {}),
...(values.forkWriter !== null ? { forkWriterId: values.forkWriter } : {}),
});

return {
payload: {
graph: graphName,
forkGraph: forked.graphName,
forkWriter: forked.writerId,
from: values.from,
at: values.at,
status: 'created',
},
exitCode: EXIT_CODES.OK,
};
}
Loading
Loading