Skip to content

Adopt git-cas as the storage composition root#744

Merged
flyingrobots merged 4 commits into
mainfrom
v19-cas-composition-root
Jul 14, 2026
Merged

Adopt git-cas as the storage composition root#744
flyingrobots merged 4 commits into
mainfrom
v19-cas-composition-root

Conversation

@flyingrobots

Copy link
Copy Markdown
Member

Summary

  • replace the Git-shaped application storage contract with an opaque WarpStorage handle and supported GitStorage.open() / MemoryStorage.create() constructors
  • compose one timeline-history adapter and one repository-scoped git-cas adapter behind GitStorage, sharing the same Git plumbing instance with repository tooling
  • inject semantic runtime storage services into runtime, CLI, fork, detached-read, and migration paths; remove reflected adapter construction and duplicate lazy CAS factories
  • update the v19 public docs, emitted declaration gates, package smoke, and real-repository tests

Acceptance evidence

The root opener accepts only an opaque storage handle and forwards its hidden history/runtime binding into each timeline. [cite: src/application/WarpStorage.ts#1-8@310955b27] [cite: src/application/openWarp.ts#11-34@310955b27]

GitStorage.open() creates one plumbing instance, one GitTimelineHistoryAdapter, and one GitCasRepositoryAdapter; MemoryStorage.create() provides the same opaque application boundary. [cite: storage.ts#18-53@310955b27]

The repository adapter creates one CDC git-cas facade and shares it across content, patch, index, state-snapshot, seek-cache, and trust services. [cite: src/infrastructure/adapters/GitCasRepositoryAdapter.ts#47-86@310955b27] [cite: src/infrastructure/adapters/GitCasRepositoryAdapter.ts#89-157@310955b27]

Runtime boot resolves an injected semantic storage provider and consumes its services without importing or constructing concrete storage adapters. [cite: src/domain/warp/RuntimeHostBoot.ts#310-339@310955b27]

The packed-artifact smoke enforces the v19 root/storage values, absence of openWarpGraph, and working installed hook template. [cite: scripts/smoke-packed-artifact.sh#39-64@310955b27]

Related debt closeout

#174 is resolved: runtimeHelpers no longer imports or constructs blob/index infrastructure, while runtime boot obtains those capabilities from the injected provider. [cite: src/domain/runtimeHelpers.ts#10-38@310955b27] [cite: src/domain/warp/RuntimeHostBoot.ts#314-339@310955b27]

#182 is resolved: runtime storage selection is explicit, fails closed when absent, and no longer reflects over persistence or dynamically imports storage adapters. [cite: src/domain/warp/RuntimeHostPortResolvers.ts#95-108@310955b27] [cite: src/domain/warp/RuntimeHostBoot.ts#314-339@310955b27]

Validation

  • npm run prepack
  • npm run test:coverage:ci (92.62% lines globally; 100% of changed executable statements)
  • npx vitest run test/integration --maxWorkers=1 (98 tests)
  • PATH="$PWD/bin:$PATH" bats test/bats/ (110 tests)
  • bash scripts/smoke-packed-artifact.sh
  • npm run lint:quarantine-graduate
  • full pre-push IRONCLAD firewall
  • manual SSJS scorecard: all green

Closes #735
Closes #174
Closes #182

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added the v19 storage API with GitStorage.open() and MemoryStorage.create().
    • Added the streamlined openWarp() entry point for opening named timelines.
    • Added CAS-backed runtime storage and state-cache support.
  • Bug Fixes
    • Improved CLI hook detection, installation, state-cache handling, and runtime storage wiring.
  • Documentation
    • Updated migration, API, architecture, and getting-started guidance for the v19 storage model.
  • Tests
    • Expanded coverage for storage, state-cache validation, hooks, exports, and packaged artifacts.

Walkthrough

V19 replaces adapter-facing storage setup with opaque WarpStorage handles, separates timeline history from CAS-backed runtime services, updates runtime and CLI wiring, and revises the public API, documentation, tests, and package validation.

Changes

V19 storage and runtime architecture

Layer / File(s) Summary
Storage handles and public entrypoint
src/application/*, storage.ts, index.ts, src/ports/RuntimeStorageProviderPort.ts
Adds WarpStorage, storage binding resolution, GitStorage.open(), MemoryStorage.create(), openWarp(), and runtime storage provider contracts.
Runtime and CAS composition
src/domain/warp/*, src/domain/RuntimeHost.ts, src/infrastructure/adapters/*
Routes runtime services through explicit providers, introduces Git and memory runtime storage adapters, injects CAS instances directly, and adds typed state-cache index persistence and validation.
CLI and migration wiring
bin/cli/*, scripts/*, test/bats/*, test/runtime/*
Updates CLI commands, hooks, doctor checks, migrations, and runtime fixtures to consume timeline history, runtime storage, seek-cache, trust-chain, and hook-path ports.
Public documentation and validation
ARCHITECTURE.md, README.md, docs/*, test/type-check/*, test/integration/*, test/unit/*
Documents the v19 storage boundary and updates API, type, integration, CAS, state-cache, runtime, and public-boundary coverage.

Estimated code review effort: 5 (Critical) | ~90+ minutes

Possibly related issues

Possibly related PRs

Poem

A rabbit found storage tucked under a tree,
With timelines hopping from CAS to history.
“Opaque little handles,” she sings with delight,
While receipts bloom softly in moon-garden light.
The hooks now know paths, the caches know where—
And v19 bounds through the fresh evening air.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary, evidence, and validation, but it omits the required Issue section and the ADR checks checklist. Add an Issue section with same-repo issue references and include the ADR checks checkbox list from the template.
Docstring Coverage ⚠️ Warning Docstring coverage is 19.57% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly captures the main change: moving storage composition to git-cas with a new composition-root boundary.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@flyingrobots

Copy link
Copy Markdown
Member Author

Self-review at 18f583ee29fe0a9d10492042b87b4f423ff6c96b

Verdict: no open findings.

I reviewed the final diff against main for public storage leakage, duplicate repository composition, hidden runtime fallbacks, CAS facade duplication, detached/fork propagation, installed-package behavior, and migration/test fixture drift.

Findings discovered and fixed before this review:

  • Removed the dead CLI plumbing factory and routed hook-path resolution through the same plumbing instance owned by GitStorage. [cite: storage.ts#23-38@18f583ee29fe0a9d10492042b87b4f423ff6c96b] [cite: src/infrastructure/adapters/PlumbingHookPathAdapter.ts#16-43@18f583ee29fe0a9d10492042b87b4f423ff6c96b]
  • Added the post-merge template to the npm allowlist and made the packed-artifact smoke install it from a clean consumer. [cite: package.json#49-58@18f583ee29fe0a9d10492042b87b4f423ff6c96b] [cite: scripts/smoke-packed-artifact.sh#59-64@18f583ee29fe0a9d10492042b87b4f423ff6c96b]
  • Aligned the Deno matrix with the published git-cas 6.2 / plumbing 3.1 floor. [cite: test/runtime/deno/deno.json#1-9@18f583ee29fe0a9d10492042b87b4f423ff6c96b]
  • The first pre-push run exposed a trackedness-only inventory miss for the new consumer declaration; a separate follow-up commit added it to the explicit bounded tail. [cite: test/unit/scripts/non-ts-tail-shape.test.ts#29-35@18f583ee29fe0a9d10492042b87b4f423ff6c96b]

Verification at this head:

  • IRONCLAD pre-push passed link, static, type, docs, policy, surface, CAS-boundary, and stable-test gates.
  • Stable suite: 576 files passed, 1 skipped; 7,340 tests passed, 2 skipped.
  • Coverage: 586 files passed, 1 skipped; 7,385 tests passed, 2 skipped; 92.62% lines; changed executable statements 100%.
  • Integration: 19 files / 98 tests passed.
  • CLI BATS: 110/110 passed.
  • npm packed-artifact consumer smoke passed, including hook installation.
  • Quarantine-graduate gate passed for all 109 files in the primary commit.

Residual risk is the intentional v19 breaking storage-constructor change. The migration map, AST export gate, consumer type fixtures, packed artifact, and real-Git integration test cover the supported replacement surface.

@flyingrobots

Copy link
Copy Markdown
Member Author

Code Lawyer review at 18f583ee29fe0a9d10492042b87b4f423ff6c96b

Disposition: clean; no blocking contract defect found.

Public-boundary law

  • WarpStorage is a runtime-backed, frozen, opaque handle; its infrastructure binding lives in a private WeakMap and rejects unsupported or rebound handles. [cite: src/application/WarpStorage.ts#1-8@18f583ee29fe0a9d10492042b87b4f423ff6c96b] [cite: src/application/WarpStorageRegistry.ts#10-35@18f583ee29fe0a9d10492042b87b4f423ff6c96b]
  • openWarp() accepts only that handle and writer identity; timeline opening receives hidden history and runtime-storage capabilities rather than Git or CAS objects. [cite: src/application/openWarp.ts#11-34@18f583ee29fe0a9d10492042b87b4f423ff6c96b]
  • The AST-backed surface test locks the storage subpath to GitStorage, MemoryStorage, and GitStorageOptions, while the package allowlist excludes legacy/browser entry points. [cite: test/unit/scripts/v19-public-api-boundary.test.ts#214-219@18f583ee29fe0a9d10492042b87b4f423ff6c96b] [cite: test/unit/scripts/v19-public-api-boundary.test.ts#248-261@18f583ee29fe0a9d10492042b87b4f423ff6c96b]

Composition law

  • GitStorage.open() creates one plumbing client, one history adapter, and one git-cas repository adapter, then binds only semantic capabilities. [cite: storage.ts#23-39@18f583ee29fe0a9d10492042b87b4f423ff6c96b]
  • GitCasRepositoryAdapter constructs one CDC facade and injects the same instance into content, state snapshots, seek cache, and trust services. [cite: src/infrastructure/adapters/GitCasRepositoryAdapter.ts#47-86@18f583ee29fe0a9d10492042b87b4f423ff6c96b] [cite: src/infrastructure/adapters/GitCasRepositoryAdapter.ts#89-157@18f583ee29fe0a9d10492042b87b4f423ff6c96b]
  • The composition regression test drives content, seek, state, and trust through one injected facade and observes all four stores on that facade. [cite: test/unit/infrastructure/adapters/GitCasRepositoryAdapter.test.ts#99-176@18f583ee29fe0a9d10492042b87b4f423ff6c96b]

Injection and failure law

  • The domain-facing port exposes one coherent semantic service set; it does not expose plumbing or CAS constructors. [cite: src/ports/RuntimeStorageProviderPort.ts#12-35@18f583ee29fe0a9d10492042b87b4f423ff6c96b]
  • Runtime boot resolves that provider once and derives content, journal, checkpoint, index, state, and trie services from it. [cite: src/domain/warp/RuntimeHostBoot.ts#310-339@18f583ee29fe0a9d10492042b87b4f423ff6c96b]
  • Missing storage fails closed with E_RUNTIME_STORAGE_REQUIRED; browser defaults do not install a hidden storage fallback. [cite: src/domain/warp/RuntimeHostPortResolvers.ts#95-108@18f583ee29fe0a9d10492042b87b4f423ff6c96b] [cite: test/unit/domain/warp/RuntimeHostPortResolvers.test.ts#144-157@18f583ee29fe0a9d10492042b87b4f423ff6c96b]

Adapter ownership law

  • CAS-backed adapters receive an already-open facade and cannot dynamically import or lazily construct their own store. [cite: src/infrastructure/adapters/CasBlobAdapter.ts#84-119@18f583ee29fe0a9d10492042b87b4f423ff6c96b]
  • CLI composition opens GitStorage and validates the semantic binding instead of constructing plumbing, CAS, seek, or trust adapters itself. [cite: bin/cli/shared.ts#27-53@18f583ee29fe0a9d10492042b87b4f423ff6c96b]
  • A real-repository integration proves the storage-neutral public path writes accepted timeline history through GitStorage. [cite: test/integration/application/GitStorage.integration.test.ts#18-30@18f583ee29fe0a9d10492042b87b4f423ff6c96b]

The remaining raw asset/tree handle contracts are deliberately outside this slice and remain tracked by the child issues under #734; this PR does not claim those later ownership migrations are complete.

@github-actions

Copy link
Copy Markdown

Release Preflight

  • package version: 18.2.1
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If this PR is from a release/* branch and merges to main, Main Push Release Branch Check will run final preflight and create v18.2.1. A maintainer who is a JSR @git-stunts scope member must then dispatch the Release workflow manually.

@flyingrobots

Copy link
Copy Markdown
Member Author

CI follow-up: the Deno test harness now composes the required repository-storage boundary from the same plumbing and history adapter, then injects that shared storage into every WarpCore.open() call. [cite: test/runtime/deno/helpers.ts#31-68@aaf508875ea80cc1e4148e5ad42b5673f45b4ee1]

Local verification after the fix:

  • npm run typecheck
  • npm run lint
  • npm run test:deno (18 passed, 0 failed)
  • pre-push IRONCLAD gate (all static gates and 7,340 stable tests passed)

@github-actions

Copy link
Copy Markdown

Release Preflight

  • package version: 18.2.1
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If this PR is from a release/* branch and merges to main, Main Push Release Branch Check will run final preflight and create v18.2.1. A maintainer who is a JSR @git-stunts scope member must then dispatch the Release workflow manually.

@flyingrobots

Copy link
Copy Markdown
Member Author

Final-head review addendum at aaf508875ea80cc1e4148e5ad42b5673f45b4ee1

Self-review: clean. Code Lawyer: no contract change and no open finding.

The only delta after the full reviews at 18f583ee is test-harness composition: Deno now mirrors the production invariant by constructing one repository-storage adapter from the same plumbing/history pair and passing it through the shared runtime factory. It neither adds a fallback nor widens a public surface. [cite: test/runtime/deno/helpers.ts#31-68@aaf508875ea80cc1e4148e5ad42b5673f45b4ee1]

The final head passes local type checking, lint, all 18 Deno runtime tests, and the complete pre-push firewall (7,340 stable tests). GitHub Deno and coverage checks are also green.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/infrastructure/adapters/CasBlobAdapter.ts (1)

111-116: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate storeOpts type literal between store() and storeStream().

The same inline type { source: AsyncIterable<Uint8Array>; slug: string; filename: string; encryptionKey?: Uint8Array; encryption?: CasStoreEncryptionOptions } is declared twice. Extracting a shared type alias avoids drift if the shape changes.

♻️ Proposed extraction
+type CasStoreRequest = {
+  source: AsyncIterable<Uint8Array>;
+  slug: string;
+  filename: string;
+  encryptionKey?: Uint8Array;
+  encryption?: CasStoreEncryptionOptions;
+};
+
 export default class CasBlobAdapter extends BlobStoragePort {
   ...
-    const storeOpts: { source: AsyncIterable<Uint8Array>; slug: string; filename: string; encryptionKey?: Uint8Array; encryption?: CasStoreEncryptionOptions } = {
+    const storeOpts: CasStoreRequest = {
       source,
       slug: options?.slug ?? `blob-${Date.now().toString(36)}`,
       filename: 'content',
       ...this._contentEncryption.toStoreOptions(),
     };

(apply the same substitution in storeStream)

Also applies to: 176-181

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/infrastructure/adapters/CasBlobAdapter.ts` around lines 111 - 116,
Extract the duplicated inline `storeOpts` object shape into a shared type alias
near the adapter’s other type definitions, then use that alias for `storeOpts`
in both `store()` and `storeStream()`. Preserve the existing fields and optional
encryption properties exactly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/application/openWarp.ts`:
- Line 19: Replace the installDefaultRuntimeHostNodePorts() call in openWarp
with runtime-host port injection through the composition boundary. Update the
relevant openWarp parameters and downstream construction to pass
instance-specific ports explicitly, avoiding mutation of shared process-wide
resolvers.

In `@src/domain/warp/RuntimeHostBoot.ts`:
- Around line 147-149: Update the runtime storage assignment in RuntimeHostBoot
so null is treated as absent, preventing this.runtimeStorage from being set to
null. Ensure null follows the configured resolver or triggers the existing
E_RUNTIME_STORAGE_REQUIRED handling, and apply the same correction to the other
runtimeStorage assignment path.

In `@src/domain/warp/RuntimeHostPortResolvers.ts`:
- Around line 15-23: Remove the module-level runtimeHostStorageResolver state
and its setter/getter usage. Update the runtime-host input/composition-root flow
to accept and pass a RuntimeStorageProviderPort explicitly, and make host
creation fail closed when that provider is absent instead of reading ambient
module state; leave the other codec and crypto resolvers unchanged.

In `@src/infrastructure/adapters/GitCasRepositoryAdapter.ts`:
- Around line 101-116: Update _createPatchJournal to replace the positional
false argument passed to createGitCasPatchStorage with a named option or
dedicated helper that explicitly conveys the intended patch-storage behavior,
while preserving the current behavior.

In `@src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts`:
- Around line 120-125: Update validateSnapshots to validate every map entry
before returning it as Record<string, GitCasStateCacheEntry}: verify each
value’s required fields and runtime types, validate coordinates, retention
values, and timestamps, and require each map key to match its entry’s
snapshotId. Reject malformed entries with CacheError instead of relying on the
type assertion.
- Around line 314-325: Update all three _loadSnapshotState error-handling paths
in src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts:314-325, 339-350,
and 426-438 to evict snapshots only for confirmed missing or corrupt payload
errors. Preserve encryption-error mapping, let transient
CAS/read/compare-and-swap and lastAccessedAt update failures propagate, and
avoid deleting the cache entry for other errors.

In `@src/infrastructure/adapters/GitTrustChainAdapter.ts`:
- Around line 28-29: Update the CborCodec import used by the
GitTrustChainAdapter so it is a runtime value import, allowing
InstanceType<typeof CborCodec> to resolve correctly; alternatively, replace that
alias with the codec’s direct instance type while preserving the existing
typing.

In `@test/unit/infrastructure/adapters/CasBlobAdapter.test.ts`:
- Around line 200-207: Update CasBlobAdapter.has and its rejection test so only
the CAS’s explicit not-found error resolves to false; rethrow backend,
authorization, integrity, and other errors. Adjust the mocked rejection in the
existing “missing manifest” test to use the repository’s not-found error symbol,
and add coverage confirming non-not-found errors propagate.

In `@test/unit/infrastructure/adapters/GitGraphAdapter.listRefs.test.ts`:
- Around line 3-5: Rename the test file from GitGraphAdapter.listRefs.test.ts to
GitTimelineHistoryAdapter.listRefs.test.ts so it matches the
GitTimelineHistoryAdapter import, describe block, and test subject.

---

Outside diff comments:
In `@src/infrastructure/adapters/CasBlobAdapter.ts`:
- Around line 111-116: Extract the duplicated inline `storeOpts` object shape
into a shared type alias near the adapter’s other type definitions, then use
that alias for `storeOpts` in both `store()` and `storeStream()`. Preserve the
existing fields and optional encryption properties exactly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 79cfeb6c-a6d9-40e1-8243-9f448a594f41

📥 Commits

Reviewing files that changed from the base of the PR and between 059dbf4 and aaf5088.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (109)
  • ARCHITECTURE.md
  • README.md
  • bin/cli/commands/check.ts
  • bin/cli/commands/doctor/checksAux.ts
  • bin/cli/commands/doctor/index.ts
  • bin/cli/commands/doctor/stateCacheCapability.ts
  • bin/cli/commands/doctor/types.ts
  • bin/cli/commands/info.ts
  • bin/cli/commands/install-hooks.ts
  • bin/cli/commands/materialize.ts
  • bin/cli/commands/optic.ts
  • bin/cli/commands/seek.ts
  • bin/cli/commands/trust.ts
  • bin/cli/shared.ts
  • bin/cli/types.ts
  • docs/ANTI_SLUDGE_POLICY.md
  • docs/migrations/v19/README.md
  • docs/topics/api/README.md
  • docs/topics/cli.md
  • docs/topics/getting-started.md
  • docs/topics/querying.md
  • docs/topics/reference.md
  • index.ts
  • package.json
  • scripts/migrations/v17.0.0/fix-imports.ts
  • scripts/smoke-packed-artifact.sh
  • scripts/v18.0.0/migrations/graph-model/GraphModelMigrationScratchRuntimeReplayer.ts
  • scripts/v18.0.0/migrations/graph-model/V17RestoredPublicReadLegacyReadingBuilder.ts
  • src/application/WarpStorage.ts
  • src/application/WarpStorageRegistry.ts
  • src/application/openWarp.ts
  • src/domain/RuntimeHost.ts
  • src/domain/WarpGraph.ts
  • src/domain/api/openWarp.ts
  • src/domain/runtimeHelpers.ts
  • src/domain/services/controllers/ForkController.ts
  • src/domain/services/controllers/detachedOpen.ts
  • src/domain/warp/RuntimeHostBoot.ts
  • src/domain/warp/RuntimeHostPortResolvers.ts
  • src/domain/warp/RuntimeHostProduct.ts
  • src/infrastructure/adapters/CasBlobAdapter.ts
  • src/infrastructure/adapters/CasSeekCacheAdapter.ts
  • src/infrastructure/adapters/CasStoreFactory.ts
  • src/infrastructure/adapters/GitCasRepositoryAdapter.ts
  • src/infrastructure/adapters/GitCasStateCacheIndex.ts
  • src/infrastructure/adapters/GitCasStateCacheRootSetCoordinator.ts
  • src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts
  • src/infrastructure/adapters/GitCommitNodeInfoDecoder.ts
  • src/infrastructure/adapters/GitTimelineHistoryAdapter.ts
  • src/infrastructure/adapters/GitTrustChainAdapter.ts
  • src/infrastructure/adapters/InMemoryBlobStorageAdapter.ts
  • src/infrastructure/adapters/InMemoryGraphAdapter.ts
  • src/infrastructure/adapters/MemoryRuntimeStorageAdapter.ts
  • src/infrastructure/adapters/PlumbingHookPathAdapter.ts
  • src/infrastructure/adapters/adapterValidation.ts
  • src/infrastructure/adapters/gitCasModule.ts
  • src/infrastructure/adapters/gitErrorClassification.ts
  • src/infrastructure/adapters/lazyCasInit.ts
  • src/ports/GraphPersistencePort.ts
  • src/ports/RuntimeStorageCapabilityPort.ts
  • src/ports/RuntimeStorageProviderPort.ts
  • storage.ts
  • test/bats/helpers/seed-setup.ts
  • test/bats/helpers/seed-trust-sync.ts
  • test/bats/helpers/seed-trust.ts
  • test/benchmark/detachedReadBenchmark.fixture.ts
  • test/conformance/v18FirstUseOpticsHonesty.test.ts
  • test/helpers/WarpGraphTestRepositories.ts
  • test/helpers/runtimeHostCommitMessageCodecSetup.ts
  • test/integration/WarpGraph.integration.test.ts
  • test/integration/api/helpers/setup.ts
  • test/integration/application/GitStorage.integration.test.ts
  • test/integration/infrastructure/adapters/GitCasWarpStateCacheAdapter.retention.integration.test.ts
  • test/runtime/deno/deno.json
  • test/runtime/deno/helpers.ts
  • test/type-check/plumbing-declarations.d.ts
  • test/type-check/tsconfig.json
  • test/type-check/v19-consumer.ts
  • test/type-check/v19-first-use.ts
  • test/type-check/v19-subpaths.ts
  • test/unit/application/WarpStorageRegistry.test.ts
  • test/unit/cli/doctor.test.ts
  • test/unit/domain/WarpCore.blobAutoConstruct.test.ts
  • test/unit/domain/WarpCore.stateSessionAutoConstruct.test.ts
  • test/unit/domain/WarpFacade.test.ts
  • test/unit/domain/runtimeProductExecutableSurface.test.ts
  • test/unit/domain/services/GitGraphAdapter.stress.test.ts
  • test/unit/domain/services/GitGraphAdapter.test.ts
  • test/unit/domain/services/TreeConstruction.determinism.test.ts
  • test/unit/domain/services/optic/CheckpointTailBasisVerifier.test.ts
  • test/unit/domain/strandAndRuntimeSeams.test.ts
  • test/unit/domain/warp/RuntimeHostPortResolvers.test.ts
  • test/unit/infrastructure/adapters/CasBlobAdapter.test.ts
  • test/unit/infrastructure/adapters/CasSeekCacheAdapter.eviction.test.ts
  • test/unit/infrastructure/adapters/CasSeekCacheAdapter.test.ts
  • test/unit/infrastructure/adapters/GitCasRepositoryAdapter.test.ts
  • test/unit/infrastructure/adapters/GitCasWarpStateCacheAdapter.retention.test.ts
  • test/unit/infrastructure/adapters/GitCasWarpStateCacheAdapter.test.ts
  • test/unit/infrastructure/adapters/GitGraphAdapter.commitNodeWithTree.test.ts
  • test/unit/infrastructure/adapters/GitGraphAdapter.coverage.test.ts
  • test/unit/infrastructure/adapters/GitGraphAdapter.gitCasPersistence.test.ts
  • test/unit/infrastructure/adapters/GitGraphAdapter.listRefs.test.ts
  • test/unit/infrastructure/adapters/GitTrustChainAdapter.test.ts
  • test/unit/infrastructure/adapters/InMemoryBlobStorageAdapter.test.ts
  • test/unit/infrastructure/adapters/PlumbingHookPathAdapter.test.ts
  • test/unit/infrastructure/adapters/lazyCasInit.test.ts
  • test/unit/scripts/non-ts-tail-shape.test.ts
  • test/unit/scripts/v18-v17-public-read-legacy-reading-builder.test.ts
  • test/unit/scripts/v19-public-api-boundary.test.ts
💤 Files with no reviewable changes (7)
  • src/ports/RuntimeStorageCapabilityPort.ts
  • src/infrastructure/adapters/gitCasModule.ts
  • test/unit/infrastructure/adapters/lazyCasInit.test.ts
  • src/infrastructure/adapters/CasStoreFactory.ts
  • src/infrastructure/adapters/lazyCasInit.ts
  • src/domain/api/openWarp.ts
  • src/domain/runtimeHelpers.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (5)
src/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,tsx,js,jsx}: Do not introduce any, as any, as unknown as, unknown (outside adapters), Record<string, unknown> (outside adapters), *Like placeholder types, JSON.parse/JSON.stringify (outside adapters), fetch (outside adapters), process.env (outside adapters), @ts-ignore, or z.any() in core code; use validated boundary models and ports instead.
Use constructor-injected ports for external capabilities; do not rely on ambient dependencies for I/O, clocks, persistence, or entropy.
Do not create utils.ts, helpers.ts, misc.ts, or common.ts; name files after the actual concept they model.
Prefer one file per class, type, or object; if a file accumulates peer concepts, split it.
Keep helper corridors, fake shape trust, transitional duplication, and compile-time theater out of the codebase; runtime-honest TypeScript must reflect actual behavior.
No enum usage; prefer runtime-backed domain forms and unions.
Do not use boolean trap parameters; prefer named option objects or separate methods.
Avoid magic strings or numbers when a named constant should exist.
Keep domain bytes as Uint8Array; Buffer belongs in infrastructure adapters.

Files:

  • src/application/WarpStorage.ts
  • src/application/openWarp.ts
  • src/infrastructure/adapters/InMemoryGraphAdapter.ts
  • src/infrastructure/adapters/gitErrorClassification.ts
  • src/ports/GraphPersistencePort.ts
  • src/infrastructure/adapters/adapterValidation.ts
  • src/infrastructure/adapters/GitCommitNodeInfoDecoder.ts
  • src/ports/RuntimeStorageProviderPort.ts
  • src/application/WarpStorageRegistry.ts
  • src/infrastructure/adapters/InMemoryBlobStorageAdapter.ts
  • src/domain/services/controllers/ForkController.ts
  • src/infrastructure/adapters/PlumbingHookPathAdapter.ts
  • src/infrastructure/adapters/MemoryRuntimeStorageAdapter.ts
  • src/domain/services/controllers/detachedOpen.ts
  • src/domain/warp/RuntimeHostPortResolvers.ts
  • src/domain/warp/RuntimeHostProduct.ts
  • src/domain/WarpGraph.ts
  • src/domain/RuntimeHost.ts
  • src/infrastructure/adapters/GitCasRepositoryAdapter.ts
  • src/infrastructure/adapters/GitCasStateCacheRootSetCoordinator.ts
  • src/infrastructure/adapters/GitTrustChainAdapter.ts
  • src/infrastructure/adapters/GitCasStateCacheIndex.ts
  • src/infrastructure/adapters/CasSeekCacheAdapter.ts
  • src/infrastructure/adapters/CasBlobAdapter.ts
  • src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts
  • src/domain/warp/RuntimeHostBoot.ts
  • src/infrastructure/adapters/GitTimelineHistoryAdapter.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx}: Do not use direct imports from src/infrastructure/** in src/domain/** or src/ports/**; depend on a port instead.
Do not use direct Node built-ins in src/domain/** or src/ports/**; use a port instead.

Files:

  • src/application/WarpStorage.ts
  • src/application/openWarp.ts
  • src/infrastructure/adapters/InMemoryGraphAdapter.ts
  • bin/cli/commands/optic.ts
  • test/unit/domain/services/TreeConstruction.determinism.test.ts
  • src/infrastructure/adapters/gitErrorClassification.ts
  • test/unit/infrastructure/adapters/InMemoryBlobStorageAdapter.test.ts
  • test/unit/scripts/non-ts-tail-shape.test.ts
  • src/ports/GraphPersistencePort.ts
  • bin/cli/types.ts
  • scripts/migrations/v17.0.0/fix-imports.ts
  • test/unit/infrastructure/adapters/GitGraphAdapter.listRefs.test.ts
  • bin/cli/commands/doctor/types.ts
  • test/unit/domain/strandAndRuntimeSeams.test.ts
  • test/type-check/v19-consumer.ts
  • test/helpers/runtimeHostCommitMessageCodecSetup.ts
  • test/type-check/plumbing-declarations.d.ts
  • test/type-check/v19-first-use.ts
  • test/unit/infrastructure/adapters/PlumbingHookPathAdapter.test.ts
  • test/unit/application/WarpStorageRegistry.test.ts
  • test/integration/application/GitStorage.integration.test.ts
  • src/infrastructure/adapters/adapterValidation.ts
  • test/unit/domain/services/optic/CheckpointTailBasisVerifier.test.ts
  • src/infrastructure/adapters/GitCommitNodeInfoDecoder.ts
  • test/unit/scripts/v18-v17-public-read-legacy-reading-builder.test.ts
  • test/unit/domain/services/GitGraphAdapter.stress.test.ts
  • src/ports/RuntimeStorageProviderPort.ts
  • bin/cli/commands/seek.ts
  • bin/cli/commands/doctor/checksAux.ts
  • src/application/WarpStorageRegistry.ts
  • test/unit/infrastructure/adapters/GitGraphAdapter.coverage.test.ts
  • bin/cli/commands/doctor/stateCacheCapability.ts
  • bin/cli/commands/materialize.ts
  • test/bats/helpers/seed-trust.ts
  • test/bats/helpers/seed-trust-sync.ts
  • bin/cli/commands/doctor/index.ts
  • src/infrastructure/adapters/InMemoryBlobStorageAdapter.ts
  • src/domain/services/controllers/ForkController.ts
  • test/unit/infrastructure/adapters/GitCasRepositoryAdapter.test.ts
  • storage.ts
  • scripts/v18.0.0/migrations/graph-model/GraphModelMigrationScratchRuntimeReplayer.ts
  • test/integration/infrastructure/adapters/GitCasWarpStateCacheAdapter.retention.integration.test.ts
  • test/integration/WarpGraph.integration.test.ts
  • bin/cli/commands/check.ts
  • src/infrastructure/adapters/PlumbingHookPathAdapter.ts
  • test/helpers/WarpGraphTestRepositories.ts
  • src/infrastructure/adapters/MemoryRuntimeStorageAdapter.ts
  • test/integration/api/helpers/setup.ts
  • test/unit/infrastructure/adapters/GitGraphAdapter.commitNodeWithTree.test.ts
  • index.ts
  • src/domain/services/controllers/detachedOpen.ts
  • bin/cli/commands/info.ts
  • test/unit/domain/runtimeProductExecutableSurface.test.ts
  • bin/cli/commands/install-hooks.ts
  • scripts/v18.0.0/migrations/graph-model/V17RestoredPublicReadLegacyReadingBuilder.ts
  • test/type-check/v19-subpaths.ts
  • test/unit/domain/WarpCore.blobAutoConstruct.test.ts
  • test/unit/domain/services/GitGraphAdapter.test.ts
  • test/bats/helpers/seed-setup.ts
  • src/domain/warp/RuntimeHostPortResolvers.ts
  • test/unit/infrastructure/adapters/GitGraphAdapter.gitCasPersistence.test.ts
  • bin/cli/commands/trust.ts
  • src/domain/warp/RuntimeHostProduct.ts
  • test/conformance/v18FirstUseOpticsHonesty.test.ts
  • test/unit/scripts/v19-public-api-boundary.test.ts
  • src/domain/WarpGraph.ts
  • test/runtime/deno/helpers.ts
  • src/domain/RuntimeHost.ts
  • test/unit/domain/warp/RuntimeHostPortResolvers.test.ts
  • src/infrastructure/adapters/GitCasRepositoryAdapter.ts
  • src/infrastructure/adapters/GitCasStateCacheRootSetCoordinator.ts
  • src/infrastructure/adapters/GitTrustChainAdapter.ts
  • src/infrastructure/adapters/GitCasStateCacheIndex.ts
  • test/benchmark/detachedReadBenchmark.fixture.ts
  • test/unit/infrastructure/adapters/GitCasWarpStateCacheAdapter.retention.test.ts
  • test/unit/domain/WarpCore.stateSessionAutoConstruct.test.ts
  • test/unit/infrastructure/adapters/CasSeekCacheAdapter.eviction.test.ts
  • test/unit/cli/doctor.test.ts
  • test/unit/domain/WarpFacade.test.ts
  • src/infrastructure/adapters/CasSeekCacheAdapter.ts
  • bin/cli/shared.ts
  • src/infrastructure/adapters/CasBlobAdapter.ts
  • test/unit/infrastructure/adapters/GitCasWarpStateCacheAdapter.test.ts
  • test/unit/infrastructure/adapters/GitTrustChainAdapter.test.ts
  • src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts
  • src/domain/warp/RuntimeHostBoot.ts
  • src/infrastructure/adapters/GitTimelineHistoryAdapter.ts
  • test/unit/infrastructure/adapters/CasSeekCacheAdapter.test.ts
  • test/unit/infrastructure/adapters/CasBlobAdapter.test.ts
src/ports/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

In src/ports/**, do not import Node built-ins or src/infrastructure/**; ports must stay abstract and depend only on boundary-safe types.

Files:

  • src/ports/GraphPersistencePort.ts
  • src/ports/RuntimeStorageProviderPort.ts
src/domain/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

src/domain/**/*.{ts,tsx,js,jsx}: In src/domain/**, do not use Date.now(), new Date(), Date(), performance.now(), Math.random(), crypto.randomUUID(), crypto.getRandomValues(), setTimeout, setInterval, raw new Error(...)/new TypeError(...), or direct imports from Node built-ins; time, entropy, and external capabilities must enter through ports or parameters, and domain errors should extend WarpError.
Construct domain objects only in core when doing so establishes validated runtime truth; do not build infrastructure adapters, host APIs, persistence implementations, wall clocks, or entropy sources inside core.
Prefer discriminated unions and explicit result types instead of boolean-flag bags, and model expected failures as return values rather than exceptions.
src/domain/ must not import host APIs or Node-specific globals; hexagonal architecture boundaries are mandatory.
Domain code must not use the wall clock directly; time must enter through a port or parameter.

Files:

  • src/domain/services/controllers/ForkController.ts
  • src/domain/services/controllers/detachedOpen.ts
  • src/domain/warp/RuntimeHostPortResolvers.ts
  • src/domain/warp/RuntimeHostProduct.ts
  • src/domain/WarpGraph.ts
  • src/domain/RuntimeHost.ts
  • src/domain/warp/RuntimeHostBoot.ts
src/domain/**/!(*.test).{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use explicit domain concepts with validated constructors, Object.freeze, and instanceof dispatch; domain objects should be runtime-backed nouns, not ad hoc shape bags.

Files:

  • src/domain/services/controllers/ForkController.ts
  • src/domain/services/controllers/detachedOpen.ts
  • src/domain/warp/RuntimeHostPortResolvers.ts
  • src/domain/warp/RuntimeHostProduct.ts
  • src/domain/WarpGraph.ts
  • src/domain/RuntimeHost.ts
  • src/domain/warp/RuntimeHostBoot.ts
🧠 Learnings (1)
📚 Learning: 2026-03-04T12:08:30.347Z
Learnt from: flyingrobots
Repo: git-stunts/git-warp PR: 63
File: package.json:126-126
Timestamp: 2026-03-04T12:08:30.347Z
Learning: Vitest 4 removes vite-node as a dependency and rewrites its pool system. Do not flag the absence of vite-node in package.json or lockfiles as an error for Vitest 4 projects. Use this as a general guideline: if a project uses Vitest 4, missing vite-node is expected and correct; only flag issues if there is evidence the project is not using Vitest 4 or if vite-node is explicitly required by the project.

Applied to files:

  • package.json
🪛 ast-grep (0.44.1)
test/unit/scripts/non-ts-tail-shape.test.ts

[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFileSync } from 'node:child_process';
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)

bin/cli/shared.ts

[warning] 183-183: Filesystem path is not a string literal; a request-/variable-derived path can enable path traversal. Validate and normalize the path before use.
Context: fs.readFileSync(path.join(packageRoot, 'package.json'), 'utf8')
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

(detect-non-literal-fs-filename-typescript)

🔇 Additional comments (108)
ARCHITECTURE.md (1)

13-16: LGTM!

Also applies to: 26-43, 62-64, 112-145, 218-220, 246-249

README.md (1)

61-69: LGTM!

Also applies to: 401-403

bin/cli/commands/doctor/index.ts (1)

74-80: LGTM!

bin/cli/commands/install-hooks.ts (1)

6-6: LGTM!

Also applies to: 20-34, 37-63, 116-132

src/domain/WarpGraph.ts (1)

43-43: LGTM!

Also applies to: 140-140

src/domain/services/controllers/detachedOpen.ts (1)

19-23: LGTM!

Also applies to: 47-47, 65-71

src/ports/RuntimeStorageProviderPort.ts (1)

1-36: LGTM!

bin/cli/commands/check.ts (1)

6-6: LGTM!

Also applies to: 119-122, 130-130, 139-139

bin/cli/commands/materialize.ts (1)

4-13: LGTM!

Also applies to: 48-48, 78-78

bin/cli/commands/optic.ts (1)

65-71: LGTM!

bin/cli/commands/trust.ts (1)

56-58: LGTM!

bin/cli/shared.ts (1)

7-53: LGTM!

Also applies to: 101-117, 181-188, 247-256

docs/topics/api/README.md (1)

69-72: LGTM!

Also applies to: 93-97, 394-394, 408-409

docs/topics/cli.md (1)

16-16: LGTM!

test/unit/cli/doctor.test.ts (1)

4-8: LGTM!

Also applies to: 37-39, 82-108, 126-126, 192-192, 219-219, 266-282, 297-355, 373-382, 391-411, 422-436

bin/cli/commands/doctor/checksAux.ts (1)

90-98: LGTM!

bin/cli/commands/doctor/stateCacheCapability.ts (1)

4-5: LGTM!

Also applies to: 15-23

bin/cli/commands/doctor/types.ts (1)

10-10: LGTM!

Also applies to: 74-74

bin/cli/commands/info.ts (1)

4-4: LGTM!

Also applies to: 16-21, 62-65, 83-83, 100-104

bin/cli/commands/seek.ts (1)

251-252: LGTM!

bin/cli/types.ts (1)

1-4: LGTM!

docs/ANTI_SLUDGE_POLICY.md (1)

66-89: LGTM!

docs/migrations/v19/README.md (1)

24-27: LGTM!

Also applies to: 42-42, 72-76, 243-249

docs/topics/getting-started.md (1)

9-11: LGTM!

Also applies to: 12-25, 150-153

docs/topics/querying.md (1)

24-31: LGTM!

docs/topics/reference.md (1)

41-85: LGTM!

Also applies to: 95-106

scripts/smoke-packed-artifact.sh (1)

40-65: LGTM!

scripts/v18.0.0/migrations/graph-model/GraphModelMigrationScratchRuntimeReplayer.ts (1)

17-18: LGTM!

Also applies to: 118-125

src/domain/warp/RuntimeHostProduct.ts (1)

5-5: LGTM!

Also applies to: 126-131

test/unit/domain/WarpFacade.test.ts (1)

18-19: LGTM!

Also applies to: 138-147, 153-167, 178-186, 209-224, 229-235, 276-283, 348-355, 367-373, 480-487, 502-509

test/unit/domain/runtimeProductExecutableSurface.test.ts (1)

18-25: LGTM!

Also applies to: 56-73

index.ts (1)

13-13: LGTM!

Also applies to: 28-29

package.json (1)

56-56: LGTM!

Also applies to: 120-121

src/application/WarpStorage.ts (1)

1-9: LGTM!

src/application/WarpStorageRegistry.ts (1)

1-36: LGTM!

src/application/openWarp.ts (1)

37-48: LGTM!

test/conformance/v18FirstUseOpticsHonesty.test.ts (1)

5-10: LGTM!

Also applies to: 128-136, 155-158, 171-171, 181-182

test/integration/application/GitStorage.integration.test.ts (1)

1-31: LGTM!

test/unit/application/WarpStorageRegistry.test.ts (1)

1-40: LGTM!

scripts/migrations/v17.0.0/fix-imports.ts (1)

28-28: LGTM!

src/infrastructure/adapters/GitCasStateCacheIndex.ts (1)

1-159: LGTM!

src/infrastructure/adapters/GitCasStateCacheRootSetCoordinator.ts (1)

14-32: LGTM!

Also applies to: 53-53, 143-151, 203-203

src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts (1)

5-111: LGTM!

Also applies to: 128-293, 301-313, 326-338, 351-425, 439-468

test/unit/infrastructure/adapters/CasBlobAdapter.test.ts (1)

15-20: LGTM!

Also applies to: 62-177, 188-198, 219-251, 267-648, 657-720

test/unit/infrastructure/adapters/CasSeekCacheAdapter.eviction.test.ts (1)

5-22: LGTM!

Also applies to: 63-63, 83-83, 110-110, 133-133, 165-165, 185-185

test/unit/infrastructure/adapters/GitCasWarpStateCacheAdapter.retention.test.ts (1)

67-81: LGTM!

Also applies to: 140-140, 163-163, 183-183, 203-203, 231-231, 254-254, 276-276, 309-309, 329-329

test/unit/infrastructure/adapters/GitCasWarpStateCacheAdapter.test.ts (1)

11-11: LGTM!

Also applies to: 74-103, 191-191, 212-212, 224-224, 233-233, 279-285, 649-649

scripts/v18.0.0/migrations/graph-model/V17RestoredPublicReadLegacyReadingBuilder.ts (1)

17-21: LGTM!

Also applies to: 129-129, 142-155

src/infrastructure/adapters/CasBlobAdapter.ts (2)

76-111: LGTM!

Also applies to: 123-130, 133-147, 168-176, 192-198, 211-226, 232-235, 247-247


59-68: 🎯 Functional Correctness

No issue in isLegacyBlobError The fallback only runs for Error instances, so the predicate stays sound.

			> Likely an incorrect or invalid review comment.
src/infrastructure/adapters/CasSeekCacheAdapter.ts (1)

21-35: LGTM!

Also applies to: 109-129, 218-227, 233-234, 258-258, 278-278, 301-301

src/infrastructure/adapters/GitCasRepositoryAdapter.ts (1)

1-100: LGTM!

Also applies to: 117-159

test/integration/infrastructure/adapters/GitCasWarpStateCacheAdapter.retention.integration.test.ts (1)

8-10: LGTM!

Also applies to: 90-103

test/unit/infrastructure/adapters/GitCasRepositoryAdapter.test.ts (1)

99-178: LGTM!

test/unit/infrastructure/adapters/GitGraphAdapter.coverage.test.ts (1)

7-7: LGTM!

Also applies to: 30-33, 770-770

test/unit/infrastructure/adapters/GitGraphAdapter.gitCasPersistence.test.ts (1)

2-2: LGTM!

Also applies to: 131-135, 149-149, 162-162, 173-176, 197-197, 209-209, 230-230, 242-242

src/domain/RuntimeHost.ts (1)

65-65: LGTM!

Also applies to: 179-180, 254-254, 285-285, 513-514

src/domain/services/controllers/ForkController.ts (1)

28-28: LGTM!

Also applies to: 49-49, 160-160

src/domain/warp/RuntimeHostBoot.ts (1)

19-19: LGTM!

Also applies to: 35-35, 47-48, 79-80, 110-111, 206-206, 279-279, 318-339, 375-376, 394-394

test/benchmark/detachedReadBenchmark.fixture.ts (1)

6-6: LGTM!

Also applies to: 20-26, 92-116, 138-144, 196-202, 222-227

test/integration/WarpGraph.integration.test.ts (1)

6-9: LGTM!

Also applies to: 21-25, 34-35

test/unit/domain/WarpCore.stateSessionAutoConstruct.test.ts (1)

5-52: LGTM!

Also applies to: 90-108, 110-128

test/unit/scripts/v18-v17-public-read-legacy-reading-builder.test.ts (1)

50-50: LGTM!

src/infrastructure/adapters/InMemoryBlobStorageAdapter.ts (1)

8-14: LGTM!

src/infrastructure/adapters/MemoryRuntimeStorageAdapter.ts (1)

1-65: LGTM!

test/helpers/runtimeHostCommitMessageCodecSetup.ts (1)

2-6: LGTM!

test/unit/domain/WarpCore.blobAutoConstruct.test.ts (1)

4-43: LGTM!

Also applies to: 46-74, 84-110

test/unit/domain/services/TreeConstruction.determinism.test.ts (1)

13-13: LGTM!

test/unit/domain/warp/RuntimeHostPortResolvers.test.ts (1)

11-12: LGTM!

Also applies to: 99-109, 123-158

test/unit/infrastructure/adapters/InMemoryBlobStorageAdapter.test.ts (1)

3-3: LGTM!

src/infrastructure/adapters/GitCommitNodeInfoDecoder.ts (1)

1-29: LGTM!

src/infrastructure/adapters/GitTimelineHistoryAdapter.ts (1)

2-2: LGTM!

Also applies to: 47-50, 71-71, 80-135, 137-140, 161-170, 181-181, 192-197, 221-221, 249-253, 266-266, 316-316, 407-414

src/infrastructure/adapters/gitErrorClassification.ts (1)

5-5: LGTM!

test/helpers/WarpGraphTestRepositories.ts (1)

5-5: LGTM!

Also applies to: 14-14, 37-37

test/unit/domain/services/GitGraphAdapter.stress.test.ts (1)

2-4: LGTM!

Also applies to: 24-24, 57-57

test/unit/domain/services/GitGraphAdapter.test.ts (1)

2-2: LGTM!

Also applies to: 15-18, 33-33, 103-103, 226-226, 333-333, 417-417, 514-514, 601-601, 662-662

test/unit/domain/services/optic/CheckpointTailBasisVerifier.test.ts (1)

14-14: LGTM!

Also applies to: 69-69

test/unit/infrastructure/adapters/GitGraphAdapter.commitNodeWithTree.test.ts (1)

2-4: LGTM!

Also applies to: 15-15

src/infrastructure/adapters/GitTrustChainAdapter.ts (1)

44-55: LGTM!

Also applies to: 160-172, 190-195, 212-212, 249-250, 315-316

src/infrastructure/adapters/InMemoryGraphAdapter.ts (1)

5-5: LGTM!

src/infrastructure/adapters/adapterValidation.ts (1)

4-4: LGTM!

src/ports/GraphPersistencePort.ts (1)

16-16: LGTM!

test/unit/domain/strandAndRuntimeSeams.test.ts (1)

10-10: LGTM!

Also applies to: 169-172

test/unit/infrastructure/adapters/GitTrustChainAdapter.test.ts (1)

2-7: LGTM!

Also applies to: 31-50, 78-78, 87-88, 148-152, 176-180, 198-232, 259-259, 287-294, 320-324, 337-353, 365-365

test/unit/scripts/non-ts-tail-shape.test.ts (1)

33-33: LGTM!

src/infrastructure/adapters/PlumbingHookPathAdapter.ts (2)

1-1: LGTM!


17-38: LGTM!

storage.ts (2)

1-40: LGTM!


43-55: LGTM!

test/type-check/plumbing-declarations.d.ts (1)

1-24: LGTM!

test/type-check/tsconfig.json (1)

12-12: LGTM!

test/type-check/v19-consumer.ts (1)

32-39: LGTM!

test/type-check/v19-first-use.ts (1)

9-12: LGTM!

test/type-check/v19-subpaths.ts (2)

9-20: LGTM!


29-30: LGTM!

test/unit/infrastructure/adapters/PlumbingHookPathAdapter.test.ts (1)

26-26: LGTM!

test/bats/helpers/seed-setup.ts (2)

22-51: LGTM!


52-67: 🗄️ Data Integrity & Integration

No remaining plumbing import from this helper
All test/bats/helpers consumers already import openGraph or createTrustChain; plumbing is only used internally in seed-setup.ts.

			> Likely an incorrect or invalid review comment.
test/bats/helpers/seed-trust-sync.ts (1)

16-16: LGTM!

Also applies to: 38-38

test/bats/helpers/seed-trust.ts (1)

15-15: LGTM!

Also applies to: 37-37

test/runtime/deno/deno.json (1)

4-5: LGTM!

test/runtime/deno/helpers.ts (3)

35-35: 📐 Maintainability & Code Quality | 💤 Low value

Stale variable name after adapter rename.

gitGraphAdapterModule now holds the dynamically-imported GitTimelineHistoryAdapter module; the name still reflects the removed GitGraphAdapter.

✏️ Proposed rename
-  const gitGraphAdapterModule = (await import(join(root, "src/infrastructure/adapters/GitTimelineHistoryAdapter.ts"))).default;
+  const gitTimelineHistoryAdapterModule = (await import(join(root, "src/infrastructure/adapters/GitTimelineHistoryAdapter.ts"))).default;
   const gitCasRepositoryAdapterModule = (await import(join(root, "src/infrastructure/adapters/GitCasRepositoryAdapter.ts"))).default;
   const warpCoreModule = (await import(join(root, "src/domain/WarpCore.ts"))).default;
   const webCryptoAdapterModule = (await import(join(root, "src/infrastructure/adapters/WebCryptoAdapter.ts"))).default;
   runtimeDefaultsModule.installDefaultRuntimeHostBrowserPorts();
   Plumbing = plumbingModule;
-  GitTimelineHistoryAdapter = gitGraphAdapterModule;
+  GitTimelineHistoryAdapter = gitTimelineHistoryAdapterModule;

47-72: LGTM!


13-15: 🩺 Stability & Availability

No change needed for GitTimelineHistoryAdapter: any; the deno-lint-ignore no-explicit-any comment is already in place.

			> Likely an incorrect or invalid review comment.
test/unit/infrastructure/adapters/CasSeekCacheAdapter.test.ts (2)

9-41: LGTM!


186-203: LGTM!

Also applies to: 264-285, 469-504, 728-736

test/unit/scripts/v19-public-api-boundary.test.ts (1)

49-49: LGTM!

Also applies to: 217-218, 265-270

test/integration/api/helpers/setup.ts (1)

11-12: LGTM!

Also applies to: 33-34, 43-59

Comment thread src/application/openWarp.ts Outdated
Comment thread src/domain/warp/RuntimeHostBoot.ts Outdated
Comment thread src/domain/warp/RuntimeHostPortResolvers.ts Outdated
Comment thread src/infrastructure/adapters/GitCasRepositoryAdapter.ts
Comment thread src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts Outdated
Comment thread src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts Outdated
Comment thread src/infrastructure/adapters/GitTrustChainAdapter.ts
Comment thread test/unit/infrastructure/adapters/CasBlobAdapter.test.ts Outdated
@flyingrobots

Copy link
Copy Markdown
Member Author

Final-head self-review at f882c505547251213e781e55d7c445d5226ade25

Verdict: clean; no open findings.

I reviewed the full follow-up diff and all nine CodeRabbit threads. Eight findings were valid and fixed. The CborCodec value-import request was rejected as a false positive because InstanceType<typeof CborCodec> is wholly type-position usage; both TypeScript projects pass with the correct type-only import.

Key corrections:

  • openWarp() now reads an immutable Node port bundle and injects codec, crypto, trust, commit-message codec, history, and runtime storage explicitly without installing ambient defaults. [cite: src/application/RuntimeHostNodeDefaults.ts#22-38@f882c505547251213e781e55d7c445d5226ade25] [cite: src/application/openWarp.ts#16-35@f882c505547251213e781e55d7c445d5226ade25]
  • Runtime storage treats null as absent and fails closed; the process-global storage resolver and installer are gone. [cite: src/domain/warp/RuntimeHostBoot.ts#139-149@f882c505547251213e781e55d7c445d5226ade25] [cite: src/domain/warp/RuntimeHostPortResolvers.ts#85-95@f882c505547251213e781e55d7c445d5226ade25]
  • Persisted state-cache indexes are runtime-validated down through every snapshot field and map-key identity. [cite: src/infrastructure/adapters/GitCasStateCacheIndexCodec.ts#72-108@f882c505547251213e781e55d7c445d5226ade25] [cite: src/infrastructure/adapters/GitCasStateCacheIndexCodec.ts#123-204@f882c505547251213e781e55d7c445d5226ade25]
  • Cache eviction is limited to explicit missing/integrity codes; transient, decode, encryption, and index-update failures propagate, and concurrent replacements are protected by payload identity. [cite: src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts#76-106@f882c505547251213e781e55d7c445d5226ade25] [cite: src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts#272-308@f882c505547251213e781e55d7c445d5226ade25]
  • CasBlobAdapter.has() returns false only for explicit CAS not-found codes and rethrows all other failures. [cite: src/infrastructure/adapters/CasBlobAdapter.ts#58-68@f882c505547251213e781e55d7c445d5226ade25] [cite: src/infrastructure/adapters/CasBlobAdapter.ts#133-143@f882c505547251213e781e55d7c445d5226ade25]

Validation at this head:

  • Pre-push IRONCLAD firewall: all link, lint, type, policy, consumer, surface, Markdown, docs, source-size, test-law, and CAS-boundary gates passed.
  • Stable suite: 576 files passed, 1 skipped; 7,361 tests passed, 2 skipped.
  • Focused review regressions: 7 files / 113 tests passed.
  • Earlier final-patch matrix also passed coverage (92.62% lines), Deno (18), Bun (72), Node integration (98), CLI BATS (110), build, consumer typecheck, and packed-artifact smoke.
  • Docker-backed npm test could not start because the local Docker daemon is unavailable; its local and alternate-runtime constituent suites were run directly and passed.

@flyingrobots

Copy link
Copy Markdown
Member Author

Final-head Code Lawyer review at f882c505547251213e781e55d7c445d5226ade25

Disposition: clean; no blocking contract defect.

Composition law

The public application root accepts the opaque WarpStorage handle, resolves its hidden semantic binding, and injects every runtime capability explicitly. It neither exposes Git/CAS nor mutates ambient runtime resolvers. [cite: src/application/openWarp.ts#12-35@f882c505547251213e781e55d7c445d5226ade25] [cite: test/unit/scripts/v19-public-api-boundary.test.ts#264-281@f882c505547251213e781e55d7c445d5226ade25]

Failure law

Missing or JavaScript null runtime storage has one fail-closed outcome, E_RUNTIME_STORAGE_REQUIRED; no history-derived fallback remains. [cite: src/domain/warp/RuntimeHostPortResolvers.ts#85-95@f882c505547251213e781e55d7c445d5226ade25] [cite: test/unit/domain/warp/WarpOpenOptions.test.ts#111-123@f882c505547251213e781e55d7c445d5226ade25]

Persisted cache metadata is treated as untrusted input. Every nested record is validated before entering typed domain code, and malformed records produce CacheError rather than shape assertions. [cite: src/infrastructure/adapters/GitCasStateCacheIndexCodec.ts#21-47@f882c505547251213e781e55d7c445d5226ade25] [cite: src/infrastructure/adapters/GitCasStateCacheIndexCodec.ts#85-108@f882c505547251213e781e55d7c445d5226ade25] [cite: test/unit/infrastructure/adapters/GitCasStateCacheIndexCodec.test.ts#41-87@f882c505547251213e781e55d7c445d5226ade25]

Data-preservation law

State-cache reads evict only confirmed missing/corrupt CAS payloads. Operational failures propagate; a concurrently replaced payload cannot be deleted by a stale reader; checkpoint metadata is cleared only when it still names the evicted record. [cite: src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts#76-106@f882c505547251213e781e55d7c445d5226ade25] [cite: src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts#272-296@f882c505547251213e781e55d7c445d5226ade25] [cite: test/unit/infrastructure/adapters/GitCasWarpStateCacheAdapter.test.ts#593-622@f882c505547251213e781e55d7c445d5226ade25]

The internal resolver/helper signature removals reported by Graft are intentional v19-internal contract pruning, have no package-root references, and are locked by the AST public-boundary test. No new public Git or CAS capability leaked.

@github-actions

Copy link
Copy Markdown

Release Preflight

  • package version: 18.2.1
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If this PR is from a release/* branch and merges to main, Main Push Release Branch Check will run final preflight and create v18.2.1. A maintainer who is a JSR @git-stunts scope member must then dispatch the Release workflow manually.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts (1)

251-270: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Don't let lastAccessedAt bookkeeping failures fail an otherwise-successful cache read.

_loadSnapshotState awaits the _mutateIndex call that bumps lastAccessedAt before returning the decoded record. If that write fails (e.g., CAS retries exhausted under concurrent writers), the error propagates through _loadTrackedSnapshot — since it isn't one of the 3 evictable codes, it gets rethrown — and getExact/getBestCompatiblePredecessor/resolveCheckpointHead fail even though the snapshot state was already successfully restored and decoded. This is a purely cosmetic LRU-heuristic update; it shouldn't gate a successful read.

🛡️ Proposed fix: make the lastAccessedAt update best-effort
     const buffer = await this._restoreBuffer(cas, restoreOpts);
     const state = decodeWarpFullState(buffer, this._codec);
-    await this._mutateIndex((idx) => {
-      const tracked = idx.snapshots[record.snapshotId];
-      if (tracked !== null && tracked !== undefined) {
-        tracked.lastAccessedAt = new Date().toISOString();
-      }
-      return idx;
-    });
+    try {
+      await this._mutateIndex((idx) => {
+        const tracked = idx.snapshots[record.snapshotId];
+        if (tracked !== null && tracked !== undefined) {
+          tracked.lastAccessedAt = new Date().toISOString();
+        }
+        return idx;
+      });
+    } catch {
+      // lastAccessedAt is a retention heuristic only; a failed bump must not
+      // fail an already-successful read.
+    }
     return { ...record, state };
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts` around lines 251
- 270, Make the _mutateIndex call in _loadSnapshotState best-effort so failures
updating tracked.lastAccessedAt are caught and do not prevent returning the
successfully restored and decoded snapshot record. Preserve propagation of
errors from manifest reading, buffer restoration, and state decoding.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts`:
- Around line 251-270: Make the _mutateIndex call in _loadSnapshotState
best-effort so failures updating tracked.lastAccessedAt are caught and do not
prevent returning the successfully restored and decoded snapshot record.
Preserve propagation of errors from manifest reading, buffer restoration, and
state decoding.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c9076305-8e7c-4465-857f-41631d970dc7

📥 Commits

Reviewing files that changed from the base of the PR and between aaf5088 and f882c50.

📒 Files selected for processing (106)
  • src/application/RuntimeHostNodeDefaults.ts
  • src/application/openWarp.ts
  • src/domain/WarpGraph.ts
  • src/domain/warp/RuntimeHostBoot.ts
  • src/domain/warp/RuntimeHostPortResolvers.ts
  • src/infrastructure/adapters/CasBlobAdapter.ts
  • src/infrastructure/adapters/GitCasRepositoryAdapter.ts
  • src/infrastructure/adapters/GitCasStateCacheIndexCodec.ts
  • src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts
  • src/infrastructure/adapters/TrailerCommitMessageCodecAdapter.ts
  • src/ports/CommitMessageCodecPort.ts
  • test/conformance/fixtures/V17CheckpointTailOpticGraphFixture.ts
  • test/conformance/post-v17/graphQueryBoundedProvider.blocked.test.ts
  • test/conformance/v18BoundedMemoryLargeGraphGate.test.ts
  • test/conformance/v18CoordinateOpticPublicPath.test.ts
  • test/conformance/v18FirstUseOpticsHonesty.test.ts
  • test/helpers/MemoryRuntimeHost.ts
  • test/unit/domain/WarpApp.facade.test.ts
  • test/unit/domain/WarpCore.apiSurface.test.ts
  • test/unit/domain/WarpCore.blobAutoConstruct.test.ts
  • test/unit/domain/WarpCore.effectPipeline.test.ts
  • test/unit/domain/WarpCore.emit.test.ts
  • test/unit/domain/WarpCore.snapshotHashStability.test.ts
  • test/unit/domain/WarpFacade.test.ts
  • test/unit/domain/WarpGraph.adjacencyCache.test.ts
  • test/unit/domain/WarpGraph.audit.test.ts
  • test/unit/domain/WarpGraph.autoCheckpoint.test.ts
  • test/unit/domain/WarpGraph.autoGC.test.ts
  • test/unit/domain/WarpGraph.autoMaterialize.test.ts
  • test/unit/domain/WarpGraph.autoMaterializeRemove.test.ts
  • test/unit/domain/WarpGraph.backfill.test.ts
  • test/unit/domain/WarpGraph.cascadeDelete.test.ts
  • test/unit/domain/WarpGraph.checkpoint.test.ts
  • test/unit/domain/WarpGraph.checkpointPolicy.test.ts
  • test/unit/domain/WarpGraph.conflicts.test.ts
  • test/unit/domain/WarpGraph.content.test.ts
  • test/unit/domain/WarpGraph.coverageGaps.test.ts
  • test/unit/domain/WarpGraph.deleteGuard.test.ts
  • test/unit/domain/WarpGraph.deleteGuardEnforce.test.ts
  • test/unit/domain/WarpGraph.edgePropVisibility.test.ts
  • test/unit/domain/WarpGraph.edgeProps.test.ts
  • test/unit/domain/WarpGraph.encryption.test.ts
  • test/unit/domain/WarpGraph.errorCodes.test.ts
  • test/unit/domain/WarpGraph.fork.test.ts
  • test/unit/domain/WarpGraph.forkCryptoCodec.test.ts
  • test/unit/domain/WarpGraph.frontierChanged.test.ts
  • test/unit/domain/WarpGraph.invalidation.test.ts
  • test/unit/domain/WarpGraph.lazyMaterialize.test.ts
  • test/unit/domain/WarpGraph.materializeSlice.test.ts
  • test/unit/domain/WarpGraph.noCoordination.test.ts
  • test/unit/domain/WarpGraph.observerBoundary.test.ts
  • test/unit/domain/WarpGraph.patchCount.test.ts
  • test/unit/domain/WarpGraph.patchMany.test.ts
  • test/unit/domain/WarpGraph.patchesFor.test.ts
  • test/unit/domain/WarpGraph.public-sync.test.ts
  • test/unit/domain/WarpGraph.query.test.ts
  • test/unit/domain/WarpGraph.queryBuilder.compass.test.ts
  • test/unit/domain/WarpGraph.queryBuilder.test.ts
  • test/unit/domain/WarpGraph.receipts.test.ts
  • test/unit/domain/WarpGraph.seek.test.ts
  • test/unit/domain/WarpGraph.seekDiff.test.ts
  • test/unit/domain/WarpGraph.serve.test.ts
  • test/unit/domain/WarpGraph.status.test.ts
  • test/unit/domain/WarpGraph.strands.compare.test.ts
  • test/unit/domain/WarpGraph.strands.intents.test.ts
  • test/unit/domain/WarpGraph.strands.test.ts
  • test/unit/domain/WarpGraph.subscribe.test.ts
  • test/unit/domain/WarpGraph.syncAuth.test.ts
  • test/unit/domain/WarpGraph.syncMaterialize.test.ts
  • test/unit/domain/WarpGraph.syncWith.test.ts
  • test/unit/domain/WarpGraph.test.ts
  • test/unit/domain/WarpGraph.traverse.stream.test.ts
  • test/unit/domain/WarpGraph.traverse.test.ts
  • test/unit/domain/WarpGraph.versionVector.test.ts
  • test/unit/domain/WarpGraph.watch.test.ts
  • test/unit/domain/WarpGraph.worldline.test.ts
  • test/unit/domain/WarpGraph.writerApi.test.ts
  • test/unit/domain/WarpGraph.writerInvalidation.test.ts
  • test/unit/domain/WarpWorldline.test.ts
  • test/unit/domain/internalReadingSurface.behavior.test.ts
  • test/unit/domain/runtimeProductExecutableSurface.test.ts
  • test/unit/domain/runtimeReadingBasisErrors.test.ts
  • test/unit/domain/seekCache.test.ts
  • test/unit/domain/services/BisectService.test.ts
  • test/unit/domain/services/Observer.test.ts
  • test/unit/domain/services/TranslationCost.test.ts
  • test/unit/domain/services/WarpMessageCodec.test.ts
  • test/unit/domain/strandAndRuntimeSeams.test.ts
  • test/unit/domain/warp/RuntimeHostPortResolvers.test.ts
  • test/unit/domain/warp/WarpGraphRuntimeBridge.test.ts
  • test/unit/domain/warp/WarpOpenOptions.test.ts
  • test/unit/domain/warp/Writer.sameWriterRace.test.ts
  • test/unit/domain/warp/buildView.test.ts
  • test/unit/domain/worldlineExecutableExamples.test.ts
  • test/unit/domain/worldlineReadExecutablePaths.test.ts
  • test/unit/infrastructure/adapters/CasBlobAdapter.test.ts
  • test/unit/infrastructure/adapters/CborPatchJournalAdapter.test.ts
  • test/unit/infrastructure/adapters/GitCasStateCacheIndexCodec.test.ts
  • test/unit/infrastructure/adapters/GitCasWarpStateCacheAdapter.test.ts
  • test/unit/infrastructure/adapters/GitTimelineHistoryAdapter.listRefs.test.ts
  • test/unit/infrastructure/adapters/InMemoryGraphAdapter.browser.test.ts
  • test/unit/infrastructure/adapters/InMemoryGraphAdapter.integration.test.ts
  • test/unit/scripts/openwarpgraph-composition-root.test.ts
  • test/unit/scripts/openwarpruntime-bridge-closeout.test.ts
  • test/unit/scripts/v19-public-api-boundary.test.ts
  • test/unit/v7-guards.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: test-node (22)
  • GitHub Check: coverage-threshold
  • GitHub Check: preflight
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx}: Do not use direct imports from src/infrastructure/** in src/domain/** or src/ports/**; depend on a port instead.
Do not use direct Node built-ins in src/domain/** or src/ports/**; use a port instead.

Files:

  • test/unit/domain/WarpGraph.checkpointPolicy.test.ts
  • test/unit/domain/WarpGraph.patchMany.test.ts
  • test/unit/domain/warp/WarpGraphRuntimeBridge.test.ts
  • test/unit/domain/WarpApp.facade.test.ts
  • test/unit/domain/WarpGraph.autoMaterialize.test.ts
  • test/unit/domain/WarpGraph.autoMaterializeRemove.test.ts
  • test/unit/domain/WarpGraph.materializeSlice.test.ts
  • test/unit/domain/WarpGraph.cascadeDelete.test.ts
  • test/unit/domain/WarpGraph.adjacencyCache.test.ts
  • test/unit/domain/WarpGraph.patchCount.test.ts
  • test/unit/domain/worldlineReadExecutablePaths.test.ts
  • test/unit/domain/WarpGraph.seek.test.ts
  • test/unit/domain/WarpGraph.edgePropVisibility.test.ts
  • test/unit/domain/services/BisectService.test.ts
  • test/unit/infrastructure/adapters/GitTimelineHistoryAdapter.listRefs.test.ts
  • test/unit/infrastructure/adapters/InMemoryGraphAdapter.integration.test.ts
  • test/unit/domain/WarpGraph.subscribe.test.ts
  • test/unit/domain/WarpGraph.invalidation.test.ts
  • test/unit/domain/WarpGraph.deleteGuardEnforce.test.ts
  • test/unit/domain/WarpGraph.writerApi.test.ts
  • test/unit/domain/warp/buildView.test.ts
  • test/unit/domain/WarpGraph.audit.test.ts
  • test/conformance/post-v17/graphQueryBoundedProvider.blocked.test.ts
  • test/unit/domain/WarpGraph.patchesFor.test.ts
  • test/unit/domain/WarpGraph.strands.compare.test.ts
  • test/unit/domain/WarpGraph.query.test.ts
  • test/unit/domain/WarpCore.apiSurface.test.ts
  • src/infrastructure/adapters/TrailerCommitMessageCodecAdapter.ts
  • test/unit/domain/WarpGraph.queryBuilder.compass.test.ts
  • test/unit/domain/WarpGraph.status.test.ts
  • test/unit/domain/WarpGraph.lazyMaterialize.test.ts
  • test/unit/v7-guards.test.ts
  • test/unit/domain/services/Observer.test.ts
  • test/conformance/v18BoundedMemoryLargeGraphGate.test.ts
  • test/conformance/fixtures/V17CheckpointTailOpticGraphFixture.ts
  • test/unit/domain/WarpGraph.receipts.test.ts
  • test/unit/domain/WarpGraph.fork.test.ts
  • test/unit/domain/WarpGraph.backfill.test.ts
  • test/unit/domain/seekCache.test.ts
  • test/unit/domain/WarpGraph.writerInvalidation.test.ts
  • test/unit/domain/WarpGraph.syncMaterialize.test.ts
  • test/unit/scripts/openwarpgraph-composition-root.test.ts
  • test/unit/domain/WarpGraph.test.ts
  • test/unit/domain/WarpCore.emit.test.ts
  • test/unit/domain/WarpGraph.noCoordination.test.ts
  • test/unit/domain/WarpGraph.strands.test.ts
  • test/unit/domain/WarpGraph.traverse.test.ts
  • test/unit/domain/WarpGraph.strands.intents.test.ts
  • test/conformance/v18CoordinateOpticPublicPath.test.ts
  • test/unit/domain/WarpGraph.traverse.stream.test.ts
  • test/unit/domain/WarpGraph.deleteGuard.test.ts
  • test/unit/domain/WarpGraph.content.test.ts
  • test/unit/scripts/openwarpruntime-bridge-closeout.test.ts
  • test/unit/infrastructure/adapters/GitCasStateCacheIndexCodec.test.ts
  • test/unit/infrastructure/adapters/CborPatchJournalAdapter.test.ts
  • test/unit/domain/warp/Writer.sameWriterRace.test.ts
  • test/unit/domain/WarpGraph.encryption.test.ts
  • test/unit/domain/WarpGraph.seekDiff.test.ts
  • test/unit/domain/WarpGraph.queryBuilder.test.ts
  • test/unit/domain/WarpGraph.forkCryptoCodec.test.ts
  • src/ports/CommitMessageCodecPort.ts
  • test/unit/domain/WarpGraph.checkpoint.test.ts
  • test/unit/domain/WarpGraph.edgeProps.test.ts
  • test/unit/domain/WarpCore.snapshotHashStability.test.ts
  • test/unit/domain/WarpGraph.versionVector.test.ts
  • test/unit/domain/runtimeReadingBasisErrors.test.ts
  • test/unit/domain/WarpGraph.syncWith.test.ts
  • test/unit/domain/WarpWorldline.test.ts
  • test/unit/domain/WarpGraph.public-sync.test.ts
  • test/unit/domain/WarpGraph.autoCheckpoint.test.ts
  • test/helpers/MemoryRuntimeHost.ts
  • test/unit/domain/WarpGraph.syncAuth.test.ts
  • test/unit/infrastructure/adapters/InMemoryGraphAdapter.browser.test.ts
  • test/unit/domain/WarpGraph.autoGC.test.ts
  • test/unit/domain/WarpGraph.observerBoundary.test.ts
  • test/unit/domain/WarpCore.effectPipeline.test.ts
  • test/unit/domain/services/TranslationCost.test.ts
  • test/unit/domain/worldlineExecutableExamples.test.ts
  • test/unit/domain/WarpGraph.worldline.test.ts
  • test/unit/domain/WarpGraph.errorCodes.test.ts
  • test/unit/domain/warp/WarpOpenOptions.test.ts
  • test/unit/domain/WarpGraph.coverageGaps.test.ts
  • test/unit/domain/runtimeProductExecutableSurface.test.ts
  • test/unit/domain/WarpGraph.frontierChanged.test.ts
  • test/unit/domain/internalReadingSurface.behavior.test.ts
  • test/unit/domain/WarpGraph.watch.test.ts
  • test/unit/domain/services/WarpMessageCodec.test.ts
  • src/domain/warp/RuntimeHostPortResolvers.ts
  • test/unit/domain/strandAndRuntimeSeams.test.ts
  • src/infrastructure/adapters/GitCasStateCacheIndexCodec.ts
  • test/unit/domain/WarpGraph.conflicts.test.ts
  • src/application/openWarp.ts
  • test/unit/scripts/v19-public-api-boundary.test.ts
  • test/unit/domain/WarpCore.blobAutoConstruct.test.ts
  • src/application/RuntimeHostNodeDefaults.ts
  • test/unit/domain/warp/RuntimeHostPortResolvers.test.ts
  • test/unit/domain/WarpGraph.serve.test.ts
  • test/conformance/v18FirstUseOpticsHonesty.test.ts
  • test/unit/domain/WarpFacade.test.ts
  • src/domain/WarpGraph.ts
  • src/infrastructure/adapters/GitCasRepositoryAdapter.ts
  • src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts
  • src/infrastructure/adapters/CasBlobAdapter.ts
  • test/unit/infrastructure/adapters/GitCasWarpStateCacheAdapter.test.ts
  • test/unit/infrastructure/adapters/CasBlobAdapter.test.ts
  • src/domain/warp/RuntimeHostBoot.ts
src/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,tsx,js,jsx}: Do not introduce any, as any, as unknown as, unknown (outside adapters), Record<string, unknown> (outside adapters), *Like placeholder types, JSON.parse/JSON.stringify (outside adapters), fetch (outside adapters), process.env (outside adapters), @ts-ignore, or z.any() in core code; use validated boundary models and ports instead.
Use constructor-injected ports for external capabilities; do not rely on ambient dependencies for I/O, clocks, persistence, or entropy.
Do not create utils.ts, helpers.ts, misc.ts, or common.ts; name files after the actual concept they model.
Prefer one file per class, type, or object; if a file accumulates peer concepts, split it.
Keep helper corridors, fake shape trust, transitional duplication, and compile-time theater out of the codebase; runtime-honest TypeScript must reflect actual behavior.
No enum usage; prefer runtime-backed domain forms and unions.
Do not use boolean trap parameters; prefer named option objects or separate methods.
Avoid magic strings or numbers when a named constant should exist.
Keep domain bytes as Uint8Array; Buffer belongs in infrastructure adapters.

Files:

  • src/infrastructure/adapters/TrailerCommitMessageCodecAdapter.ts
  • src/ports/CommitMessageCodecPort.ts
  • src/domain/warp/RuntimeHostPortResolvers.ts
  • src/infrastructure/adapters/GitCasStateCacheIndexCodec.ts
  • src/application/openWarp.ts
  • src/application/RuntimeHostNodeDefaults.ts
  • src/domain/WarpGraph.ts
  • src/infrastructure/adapters/GitCasRepositoryAdapter.ts
  • src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts
  • src/infrastructure/adapters/CasBlobAdapter.ts
  • src/domain/warp/RuntimeHostBoot.ts
src/ports/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

In src/ports/**, do not import Node built-ins or src/infrastructure/**; ports must stay abstract and depend only on boundary-safe types.

Files:

  • src/ports/CommitMessageCodecPort.ts
src/domain/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

src/domain/**/*.{ts,tsx,js,jsx}: In src/domain/**, do not use Date.now(), new Date(), Date(), performance.now(), Math.random(), crypto.randomUUID(), crypto.getRandomValues(), setTimeout, setInterval, raw new Error(...)/new TypeError(...), or direct imports from Node built-ins; time, entropy, and external capabilities must enter through ports or parameters, and domain errors should extend WarpError.
Construct domain objects only in core when doing so establishes validated runtime truth; do not build infrastructure adapters, host APIs, persistence implementations, wall clocks, or entropy sources inside core.
Prefer discriminated unions and explicit result types instead of boolean-flag bags, and model expected failures as return values rather than exceptions.
src/domain/ must not import host APIs or Node-specific globals; hexagonal architecture boundaries are mandatory.
Domain code must not use the wall clock directly; time must enter through a port or parameter.

Files:

  • src/domain/warp/RuntimeHostPortResolvers.ts
  • src/domain/WarpGraph.ts
  • src/domain/warp/RuntimeHostBoot.ts
src/domain/**/!(*.test).{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use explicit domain concepts with validated constructors, Object.freeze, and instanceof dispatch; domain objects should be runtime-backed nouns, not ad hoc shape bags.

Files:

  • src/domain/warp/RuntimeHostPortResolvers.ts
  • src/domain/WarpGraph.ts
  • src/domain/warp/RuntimeHostBoot.ts
🔇 Additional comments (108)
src/application/RuntimeHostNodeDefaults.ts (1)

2-45: LGTM!

test/unit/domain/WarpGraph.public-sync.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.query.test.ts (1)

13-13: LGTM!

test/unit/domain/WarpGraph.queryBuilder.compass.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.queryBuilder.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.seek.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.seekDiff.test.ts (1)

2-2: LGTM!

test/unit/scripts/openwarpruntime-bridge-closeout.test.ts (1)

6-6: LGTM!

Also applies to: 50-50

src/application/openWarp.ts (1)

7-7: LGTM!

Also applies to: 19-19, 31-34, 41-52

test/conformance/fixtures/V17CheckpointTailOpticGraphFixture.ts (1)

6-6: LGTM!

test/conformance/post-v17/graphQueryBoundedProvider.blocked.test.ts (1)

2-2: LGTM!

test/conformance/v18BoundedMemoryLargeGraphGate.test.ts (1)

6-6: LGTM!

test/conformance/v18CoordinateOpticPublicPath.test.ts (1)

3-6: LGTM!

test/conformance/v18FirstUseOpticsHonesty.test.ts (1)

8-8: LGTM!

Also applies to: 128-137, 155-158, 171-171, 181-182

test/unit/domain/WarpFacade.test.ts (1)

17-17: LGTM!

Also applies to: 139-145, 153-159, 179-184, 209-224, 229-235, 277-283, 349-354, 369-374, 482-487, 505-509

src/domain/WarpGraph.ts (1)

37-45: LGTM!

Also applies to: 142-142, 158-159

src/ports/CommitMessageCodecPort.ts (1)

47-58: LGTM!

test/unit/domain/services/TranslationCost.test.ts (1)

2-2: LGTM!

test/unit/domain/services/WarpMessageCodec.test.ts (1)

884-884: LGTM!

test/unit/domain/strandAndRuntimeSeams.test.ts (1)

3-12: LGTM!

Also applies to: 51-51, 171-174

test/unit/infrastructure/adapters/InMemoryGraphAdapter.browser.test.ts (1)

4-4: LGTM!

test/unit/infrastructure/adapters/InMemoryGraphAdapter.integration.test.ts (1)

3-3: LGTM!

test/unit/scripts/openwarpgraph-composition-root.test.ts (1)

5-5: LGTM!

src/domain/warp/RuntimeHostBoot.ts (2)

9-10: LGTM!

Also applies to: 19-19, 35-35, 47-48, 79-80, 110-111, 147-149, 206-206, 310-336, 391-391


369-385: 🎯 Functional Correctness

Confirm the storageServices.trie-absent path. If trie can be absent, this branch no longer creates a session opener, so materialization and state reads need another path to handle that case.

test/unit/domain/warp/WarpGraphRuntimeBridge.test.ts (1)

3-3: LGTM!

Also applies to: 11-16

test/unit/domain/warp/WarpOpenOptions.test.ts (1)

11-11: LGTM!

Also applies to: 82-85, 97-100, 111-124

test/unit/domain/warp/Writer.sameWriterRace.test.ts (1)

3-3: LGTM!

test/unit/domain/warp/buildView.test.ts (1)

3-3: LGTM!

test/unit/domain/worldlineReadExecutablePaths.test.ts (1)

4-7: LGTM!

test/unit/infrastructure/adapters/GitTimelineHistoryAdapter.listRefs.test.ts (1)

1-222: LGTM!

test/unit/scripts/v19-public-api-boundary.test.ts (1)

49-49: LGTM!

Also applies to: 217-218, 264-281

src/domain/warp/RuntimeHostPortResolvers.ts (1)

7-13: LGTM!

Also applies to: 85-95

test/unit/domain/WarpGraph.traverse.stream.test.ts (1)

3-3: LGTM!

test/unit/domain/WarpGraph.traverse.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.watch.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.writerApi.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.writerInvalidation.test.ts (1)

2-2: LGTM!

test/unit/domain/warp/RuntimeHostPortResolvers.test.ts (1)

11-12: LGTM!

Also applies to: 99-109, 123-129, 131-144

src/infrastructure/adapters/CasBlobAdapter.ts (1)

16-32: LGTM!

Also applies to: 58-70, 87-122, 134-147, 182-190, 206-209, 225-225, 246-249, 261-261

test/unit/domain/WarpGraph.serve.test.ts (1)

2-2: LGTM!

Also applies to: 6-22

test/unit/domain/WarpGraph.status.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.subscribe.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.syncAuth.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.syncMaterialize.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.syncWith.test.ts (1)

3-3: LGTM!

test/unit/infrastructure/adapters/CasBlobAdapter.test.ts (1)

3-21: LGTM!

Also applies to: 22-26, 55-65, 67-186, 188-223, 225-467, 467-536, 536-556, 557-662, 663-704, 705-745, 746-748

src/infrastructure/adapters/GitCasRepositoryAdapter.ts (1)

114-114: LGTM!

test/unit/domain/WarpGraph.checkpointPolicy.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.content.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.deleteGuard.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.deleteGuardEnforce.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.edgePropVisibility.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.edgeProps.test.ts (1)

2-2: LGTM!

src/infrastructure/adapters/GitCasStateCacheIndexCodec.ts (1)

1-254: LGTM!

src/infrastructure/adapters/GitCasWarpStateCacheAdapter.ts (1)

5-52: LGTM! Eviction is now correctly narrowed to confirmed missing/corrupt CAS payload errors, and index reads/writes go through the new typed codec.

Also applies to: 63-249, 272-413

test/unit/domain/WarpGraph.lazyMaterialize.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.materializeSlice.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.noCoordination.test.ts (1)

3-3: LGTM!

test/unit/domain/WarpGraph.patchCount.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.patchMany.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.patchesFor.test.ts (1)

2-2: LGTM!

src/infrastructure/adapters/TrailerCommitMessageCodecAdapter.ts (1)

240-240: LGTM!

test/unit/domain/WarpGraph.autoCheckpoint.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.conflicts.test.ts (1)

4-4: LGTM!

Also applies to: 139-139

test/unit/domain/WarpGraph.strands.intents.test.ts (1)

5-6: LGTM!

Also applies to: 156-156

test/unit/domain/WarpGraph.strands.test.ts (1)

5-5: LGTM!

Also applies to: 155-155

test/unit/domain/WarpGraph.worldline.test.ts (1)

5-5: LGTM!

Also applies to: 155-155

test/unit/domain/runtimeReadingBasisErrors.test.ts (1)

2-8: LGTM!

test/unit/infrastructure/adapters/CborPatchJournalAdapter.test.ts (1)

299-299: LGTM!

Also applies to: 317-317

test/helpers/MemoryRuntimeHost.ts (1)

1-59: LGTM!

test/unit/domain/WarpApp.facade.test.ts (1)

6-10: LGTM!

Also applies to: 47-52

test/unit/domain/WarpCore.apiSurface.test.ts (1)

3-4: LGTM!

Also applies to: 16-16

test/unit/domain/WarpCore.snapshotHashStability.test.ts (1)

3-5: LGTM!

Also applies to: 183-185

test/unit/domain/WarpGraph.observerBoundary.test.ts (1)

5-5: LGTM!

Also applies to: 160-160

test/unit/domain/WarpGraph.strands.compare.test.ts (1)

5-6: LGTM!

Also applies to: 153-153

test/unit/domain/internalReadingSurface.behavior.test.ts (1)

5-10: LGTM!

Also applies to: 75-75, 97-97

test/unit/v7-guards.test.ts (1)

2-8: LGTM!

test/unit/domain/WarpCore.blobAutoConstruct.test.ts (1)

2-19: LGTM!

Also applies to: 44-74, 84-110

test/unit/domain/WarpCore.effectPipeline.test.ts (1)

2-11: LGTM!

test/unit/domain/WarpCore.emit.test.ts (1)

2-10: LGTM!

Also applies to: 179-179

test/unit/domain/WarpGraph.adjacencyCache.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.audit.test.ts (1)

9-9: LGTM!

test/unit/domain/WarpGraph.autoGC.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.autoMaterialize.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.autoMaterializeRemove.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.backfill.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.cascadeDelete.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.checkpoint.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.coverageGaps.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.receipts.test.ts (1)

13-13: LGTM!

test/unit/domain/WarpGraph.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.versionVector.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.encryption.test.ts (1)

8-8: LGTM!

test/unit/domain/WarpGraph.errorCodes.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.fork.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.forkCryptoCodec.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.frontierChanged.test.ts (1)

2-2: LGTM!

test/unit/domain/WarpGraph.invalidation.test.ts (1)

2-2: LGTM!

test/unit/infrastructure/adapters/GitCasWarpStateCacheAdapter.test.ts (2)

74-159: LGTM!


342-761: LGTM!

test/unit/domain/WarpWorldline.test.ts (1)

5-5: LGTM!

test/unit/domain/runtimeProductExecutableSurface.test.ts (1)

3-3: LGTM!

Also applies to: 18-25, 56-73

test/unit/domain/seekCache.test.ts (1)

2-2: LGTM!

test/unit/domain/services/BisectService.test.ts (1)

2-2: LGTM!

test/unit/domain/services/Observer.test.ts (1)

2-2: LGTM!

test/unit/domain/worldlineExecutableExamples.test.ts (1)

6-12: LGTM!

Also applies to: 250-250

test/unit/infrastructure/adapters/GitCasStateCacheIndexCodec.test.ts (1)

1-88: LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant