Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: TSC zero + ESLint zero — full type-safety campaign#73

Merged
flyingrobots merged 32 commits into
mainfrom
fix/tsc-zero-campaign
Apr 2, 2026
Merged

fix: TSC zero + ESLint zero — full type-safety campaign#73
flyingrobots merged 32 commits into
mainfrom
fix/tsc-zero-campaign

Conversation

@flyingrobots
Copy link
Copy Markdown
Member

Summary

  • 1,707 TypeScript errors → 0 across 271 files
  • 1,876 ESLint errors → 0 (from prior lint campaign, included in this branch)
  • 5 markdown lint issues → 0
  • All 8 pre-push gates pass: tsc, IRONCLAD policy, consumer types, ESLint, lint ratchet, declaration surface, markdown lint, unit tests
  • 5,142/5,142 tests green — zero behavioral regressions

What changed

Category Errors Fixed Approach
TS4111 (bracket access) 614 Mechanical script: .prop['prop'] for index signatures
TS2532/TS18048 (possibly undefined) 378 Null guards, ?? default coalescing
TS2345 (argument type mismatch) 224 Type guards, coalescing, conditional spread
TS2322 (type assignment) 136 JSDoc annotation fixes
TS2379 (exactOptionalPropertyTypes) 127 Conditional spread ...(x !== undefined ? {x} : {})
TS6133 (unused variables) 119 Removed unused vars/imports
ESLint (strict-boolean, complexity, etc.) 1,876 Explicit checks, helper extraction, JSDoc
Markdown lint 5 Language specifiers, code sample syntax

Config changes

  • ESLint: Disabled dot-notation rule (conflicts with noPropertyAccessFromIndexSignature)
  • ESLint: Added .claude/** to global ignores
  • ESLint: Added algorithm-heavy files to relaxed-complexity block
  • Vitest: Added .claude/** to test excludes
  • index.d.ts: Widened EffectSinkPort.deliver() return type to DeliveryObservation | DeliveryObservation[]
  • consumer.ts: Fixed publicLenspublicAperture reference

Test plan

  • npm run typecheck — 0 errors
  • npm run typecheck:policy — 0 wildcards
  • npm run typecheck:consumer — 0 errors
  • npm run lint — 0 errors
  • npm run lint:ratchet — invariant holds
  • npm run typecheck:surface — all entries covered
  • npm run lint:md — 0 issues
  • npm run lint:md:code — 0 issues
  • npm run test:local — 5,142/5,142 passing

JSDoc descriptions, strict boolean expressions, complexity extraction,
unsafe type annotations, max-lines/max-params extraction.

Replace raw Error with domain errors:
- RefPort/CryptoPort/NeighborProviderPort: Error → WarpError (port stubs)
- CheckpointService: Error → SchemaUnsupportedError, PatchError
- AuditMessageCodec: cast getCodec() through unknown intermediary

WarpRuntime: extract _emitTimingMessage, _buildTrustGate,
_extractTrustedWriters helpers for complexity reduction.
Update API surface snapshot for new private methods.

Revert agent's eslint.config.js relaxation-list additions — fixed
the actual complexity in 5 files by extracting helpers instead.

Lint errors: 659 → 445 (−214).
JSDoc descriptions, strict boolean expressions, complexity extraction,
unsafe type annotations, max-lines/max-params extraction.

Replace raw Error with domain errors:
- BlobStoragePort: Error → WarpError (port stubs)
- CheckpointMessageCodec: cast getCodec() through unknown intermediary
- SyncAuthService: Error → SyncError
- HookInstaller: Error → WarpError
- CheckpointSerializerV5: Error → PatchError

Lint errors: 445 → 231 (−214).
JSDoc descriptions, strict boolean expressions, complexity extraction,
unsafe type annotations, max-lines/max-params extraction.

Replace raw Error with domain errors:
- TreePort: Error → WarpError (port stubs)
- adapterValidation: Error → AdapterValidationError
- GitGraphAdapter: Error → PersistenceError
- WormholeService: Error → WormholeError
- DagTopology: Error → TraversalError

Fix agent defect: verify-index added graph field to error payloads
(tests expect bare { error } on failure, { graph, ...result } on success).

All 10 lanes complete. Lint errors: 1876 → 13 (−1863, 99.3% reduction).
CrdtError: same WarpError constructor pattern fix as Lane 1.
PatchBuilderV2: strict-boolean on nullable strings, typed callback,
JSDoc descriptions.
PatchSession: re-associate detached JSDoc blocks with their functions.

Lint errors: 1876 → 0. Campaign complete.
Add scripts/lint-ratchet.sh: asserts ESLint reports exactly zero errors.
No threshold files, no ceilings — just zero. Fails loud with full error
output for fast diagnosis.

Gates where this is enforced:
- pre-commit: ESLint on staged JS files (fast, partial)
- pre-push Gate 4: npm run lint (full codebase, exits non-zero on error)
- CI Gate 4b: npm run lint:ratchet (explicit zero-error assertion)

Fix 4 wildcard JSDoc types ({*}) that agents introduced — replaced with
{unknown} or proper structural types. TS policy ratchet caught them.

Also:
- Wire core.hooksPath → scripts/hooks/
- Add npm run lint:ratchet script
- Update CHANGELOG with campaign results
…iminated

noPropertyAccessFromIndexSignature requires bracket notation for properties
accessed through index signatures. Mechanically converted all `.prop` to
`['prop']` for index-signature-typed values, fixed 11 optional-chaining
sites (`?.prop` → `?.['prop']`), and disabled ESLint `dot-notation` rule
which conflicts with this TypeScript strictness flag.

TSC: 1707 → 1093 errors remaining
ESLint: still at zero
- sha1sync.js: add type casts for Uint32Array/number[] indexed access
- StreamingBitmapIndexBuilder.js: initialize class fields, fix
  exactOptionalPropertyTypes, use precise shard types, cast
  IndexStoragePort to IndexStorage for method access
- comparison.methods.js: remove nonexistent type imports, use typed
  casts for Record property access, guard optional NormalizedSelector
  fields, fix exactOptionalPropertyTypes on return types
- SyncController.test.js: use named-property type for mock imports,
  bracket access for host mock properties, guard mock.calls access
- AuditVerifierService.test.js: cast array index access, guard
  receipt.cbor access, bracket access for Record properties, remove
  unused variables
- WarpCore.emit.test.js: cast emitEffect via (p) as any, guard
  nullable props, bracket access for Record properties
Resolved 128 TypeScript errors spanning source, test, and script files:

- TS4111 (noPropertyAccessFromIndexSignature): bracket notation for
  Record<string,unknown> accesses in ConflictAnalyzerService, StrandService,
  TrustRecordService, PatchMessageCodec, TrustEvaluator test
- TS2379/TS2375 (exactOptionalPropertyTypes): conditional property
  assignment in IndexRebuildService, StrandService, ConflictAnalyzerService
- TS2345/TS2532/TS18048 (possibly undefined): null guards in DagPathFinding,
  benchmark, test files; ?? defaults in KeyCodec, SyncAuthService test
- TS6133 (unused vars): removed unused imports in JoinReducer integration
  test, ReducerV5 benchmark, LogicalIndexReader test, elk-layout test,
  SyncAuthService test
- TS2464 (computed property name): extracted TRAILER_KEYS values before
  use as computed keys in PatchMessageCodec
- Disabled ESLint dot-notation rule (conflicts with noPropertyAccessFromIndexSignature)
- MinHeap: null guards for array access, extract _smallestChild to reduce complexity
- infrastructure.js: guard argv access, cast parsed values to typed shape
- TrustStateBuilder: cast subject to typed shape for dot-notation compliance
- BoundaryTransitionRecord: buildDeps() helper for exactOptionalPropertyTypes
- GraphTraversal: add | undefined to optional JSDoc params, stripUndefined helper
- LogicalTraversal: stripUndefined wrapper for all engine.* calls
- Observer: _preInitFields + _getPattern for definite assignment, method reorder
- WarpRuntime: stripUndefined for constructor, add effectPipeline/effectSinks to open() typedef
- EffectSinkPort: widen deliver() return to DeliveryObservation | DeliveryObservation[]
- Test files: JSDoc casts for noUncheckedIndexedAccess, remove unused imports
# Conflicts:
#	src/domain/warp/comparison.methods.js
#	test/unit/domain/WarpCore.emit.test.js
#	test/unit/domain/services/AuditVerifierService.test.js
# Conflicts:
#	src/domain/services/CheckpointService.js
# Conflicts:
#	src/domain/WarpRuntime.js
#	src/domain/services/BoundaryTransitionRecord.js
#	src/domain/trust/TrustStateBuilder.js
#	src/domain/utils/MinHeap.js
# Conflicts:
#	eslint.config.js
#	src/domain/services/ConflictAnalyzerService.js
#	src/domain/services/IndexRebuildService.js
#	src/domain/services/PatchMessageCodec.js
#	src/domain/services/StrandService.js
#	src/domain/trust/TrustRecordService.js
#	test/unit/domain/trust/TrustEvaluator.test.js
Fix 189 TypeScript errors across 31 files using null guards,
conditional spreads for exactOptionalPropertyTypes, typed object
casts for noPropertyAccessFromIndexSignature, and removal of
unused imports/variables.
Resolved 223 TypeScript strict-mode errors across 54 files (55th had none):

- TS4111 (noPropertyAccessFromIndexSignature): replaced Record<string,unknown>
  casts with explicit property types so dot notation remains valid for both
  TSC and ESLint's dot-notation rule
- TS2379 (exactOptionalPropertyTypes): conditional spreads to avoid passing
  undefined to optional properties
- TS2532/TS18048 (possibly undefined): null guards, optional chaining in
  test assertions, type casts for array index access in bounded loops
- TS6133 (unused): removed unused imports, variables, and function params
- TS2345 (argument mismatch): default values, guards, casts
- TS2322 (type mismatch): widened local variable types, fixed annotations

Key patterns:
- TRUST_REASON_CODES changed from Record<string,string> to explicit
  property type to allow dot notation without index signature issues
- Zod schema typedefs updated with `| undefined` on optional fields to
  match exactOptionalPropertyTypes semantics
- HttpSyncServer auth config extracted into buildAuthConfig() to keep
  complexity under ESLint threshold
- History renderer extracted buildEntryLineArgs helper for same reason
Resolved 189 TypeScript errors across 100 source and test files:
- TS2532/TS18048: null guards, ?? defaults, and safe casts for indexed access
- TS2345: argument type mismatches via guards and ?? coercion
- TS2375/TS2379: exactOptionalPropertyTypes via conditional spread
- TS4111: noPropertyAccessFromIndexSignature via variable-key bracket access
- TS6133: removed unused imports and variables
- TS7006: added JSDoc param types for implicit any
- TS2322: fixed return type annotations and type widening
# Conflicts:
#	src/domain/services/AdjacencyNeighborProvider.js
#	src/domain/services/AnchorMessageCodec.js
#	src/domain/services/AuditMessageCodec.js
#	src/domain/services/CheckpointMessageCodec.js
#	src/domain/services/SyncController.js
#	src/domain/trust/TrustEvaluator.js
#	src/infrastructure/adapters/GitGraphAdapter.js
#	test/unit/domain/services/LogicalBitmapIndexBuilder.test.js
#	test/unit/domain/trust/TrustRecordService.convergence.test.js
# Conflicts:
#	bin/cli/commands/debug/conflicts.js
#	bin/cli/commands/strand/materialize.js
#	src/domain/services/BitmapIndexBuilder.js
#	src/domain/services/JoinReducer.js
#	src/domain/services/QueryBuilder.js
#	src/domain/services/SyncAuthService.js
#	src/domain/services/TemporalQuery.js
#	src/domain/services/WormholeService.js
#	src/infrastructure/adapters/CasSeekCacheAdapter.js
#	src/visualization/renderers/ascii/seek.js
#	test/unit/domain/services/MaterializedViewService.test.js
# Conflicts:
#	bin/cli/commands/query.js
#	bin/cli/commands/verify-audit.js
#	src/domain/services/CheckpointSerializerV5.js
#	src/domain/services/HttpSyncServer.js
#	src/domain/services/WarpStateIndexBuilder.js
#	src/visualization/renderers/ascii/path.js
#	test/unit/domain/trust/TrustAdversarial.test.js
# Conflicts:
#	bin/cli/commands/bisect.js
#	bin/cli/commands/verify-index.js
#	bin/presenters/index.js
#	bin/presenters/text.js
#	bin/warp-graph.js
#	src/domain/services/IncrementalIndexUpdater.js
#	src/domain/services/PatchBuilderV2.js
#	src/domain/services/StateReaderV5.js
#	src/domain/trust/TrustCanonical.js
#	src/domain/types/DeliveryObservation.js
#	test/unit/domain/WarpGraph.audit.test.js
#	test/unit/domain/services/AuditReceiptService.test.js
#	test/unit/domain/services/LogicalIndexBuildService.test.js
- QueryBuilder.js: strict-boolean, unsafe-assignment/return, missing JSDoc
- StateReaderV5.js: 25 missing JSDoc descriptions, strict-boolean on object
- SyncAuthService.js: JSDoc descriptions, strict-boolean on nullable strings/numbers
- WormholeService.js: strict-boolean on objects/strings, prefer-destructuring
- TrustEvaluator.js: strict-boolean on nullable string
- GitGraphAdapter.js: strict-boolean on nullable strings/numbers, raw Error to
  AdapterValidationError
- path.js: strict-boolean on nullable strings/numbers/objects
- eslint.config.js: add 4 files to relaxed-complexity block
Fixes strict-boolean-expressions, complexity, and type safety
issues in bisect.js, query.js, warp-graph.js, WarpRuntime.js,
materialize.methods.js, and eslint.config.js relaxation additions.
# Conflicts:
#	bin/cli/commands/query.js
#	bin/warp-graph.js
#	src/domain/services/AdjacencyNeighborProvider.js
#	src/domain/services/BitmapIndexBuilder.js
#	src/domain/services/CheckpointMessageCodec.js
#	src/domain/services/CheckpointSerializerV5.js
#	src/domain/services/PatchBuilderV2.js
# Conflicts:
#	src/domain/services/QueryBuilder.js
#	src/domain/services/WormholeService.js
#	src/visualization/renderers/ascii/path.js
Mechanical TS4111 bracket-access sweep (614), 8-lane parallel agent
campaign for remaining 1093 strictness errors (TS2532, TS2345, TS2322,
TS2379, TS6133, TS18048, TS2464), ESLint cleanup pass, IRONCLAD policy
wildcard fixes, consumer type surface alignment, and markdown lint.

All 7 pre-push gates now pass:
- Gate 1: tsc --noEmit (0 errors)
- Gate 2: IRONCLAD type policy (0 wildcards)
- Gate 3: consumer type surface (0 errors)
- Gate 4: ESLint (0 errors)
- Gate 4b: lint ratchet (invariant holds)
- Gate 5: declaration surface (all entries covered)
- Gate 6+7: markdown lint (0 issues)
Agents over-refactored WarpRuntime.js (deleted buildEffectPipeline),
Observer.js (added _preInitFields breaking _host), WormholeService.js
(removed null guard), and doctor/checks.js (filtered null-sha heads).

Restored originals and applied minimal type-only fixes:
- exactOptionalPropertyTypes: conditional spread for optional params
- noUncheckedIndexedAccess: ?? coalescing for array/map lookups
- Unused variable suppression via void expression
- Double-cast through unknown for incompatible port types

Also excluded .claude/ from vitest to prevent worktree test leaks.

All 8 pre-push gates pass. 5142/5142 tests green.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 1, 2026

Important

Review skipped

Too many files!

This PR contains 299 files, which is 149 over the limit of 150.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bff6985c-b694-4aa8-b526-f764b1f91f40

📥 Commits

Reviewing files that changed from the base of the PR and between fdf2d60 and ca2ffba.

⛔ Files ignored due to path filters (1)
  • test/unit/domain/__snapshots__/WarpRuntime.apiSurface.test.js.snap is excluded by !**/*.snap
📒 Files selected for processing (299)
  • .github/workflows/ci.yml
  • CHANGELOG.md
  • bin/cli/commands/bisect.js
  • bin/cli/commands/check.js
  • bin/cli/commands/debug/conflicts.js
  • bin/cli/commands/debug/provenance.js
  • bin/cli/commands/debug/receipts.js
  • bin/cli/commands/debug/shared.js
  • bin/cli/commands/debug/timeline.js
  • bin/cli/commands/doctor/checks.js
  • bin/cli/commands/doctor/index.js
  • bin/cli/commands/history.js
  • bin/cli/commands/info.js
  • bin/cli/commands/install-hooks.js
  • bin/cli/commands/materialize.js
  • bin/cli/commands/patch.js
  • bin/cli/commands/path.js
  • bin/cli/commands/query.js
  • bin/cli/commands/seek.js
  • bin/cli/commands/strand/braid.js
  • bin/cli/commands/strand/compare.js
  • bin/cli/commands/strand/create.js
  • bin/cli/commands/strand/drop.js
  • bin/cli/commands/strand/materialize.js
  • bin/cli/commands/strand/show.js
  • bin/cli/commands/strand/transfer-plan.js
  • bin/cli/commands/tree.js
  • bin/cli/commands/trust.js
  • bin/cli/commands/verify-audit.js
  • bin/cli/commands/verify-index.js
  • bin/cli/infrastructure.js
  • bin/cli/schemas.js
  • bin/cli/shared.js
  • bin/cli/time-travel-shared.js
  • bin/presenters/index.js
  • bin/presenters/text.js
  • bin/warp-graph.js
  • docs/design/effect-emission-v1.md
  • docs/design/effect-entity-convention.md
  • docs/design/joinreducer-op-strategy.md
  • eslint.config.js
  • index.d.ts
  • package.json
  • scripts/check-dts-surface.js
  • scripts/lint-markdown-code-samples.js
  • scripts/lint-ratchet.sh
  • scripts/ts-policy-check.js
  • src/domain/WarpApp.js
  • src/domain/WarpRuntime.js
  • src/domain/errors/CrdtError.js
  • src/domain/errors/EncryptionError.js
  • src/domain/errors/OperationAbortedError.js
  • src/domain/errors/PersistenceError.js
  • src/domain/errors/StrandError.js
  • src/domain/errors/SyncError.js
  • src/domain/errors/TraversalError.js
  • src/domain/services/AdjacencyNeighborProvider.js
  • src/domain/services/AnchorMessageCodec.js
  • src/domain/services/AuditMessageCodec.js
  • src/domain/services/AuditVerifierService.js
  • src/domain/services/BisectService.js
  • src/domain/services/BitmapIndexBuilder.js
  • src/domain/services/BitmapIndexReader.js
  • src/domain/services/BitmapNeighborProvider.js
  • src/domain/services/BoundaryTransitionRecord.js
  • src/domain/services/CheckpointMessageCodec.js
  • src/domain/services/CheckpointSerializerV5.js
  • src/domain/services/CheckpointService.js
  • src/domain/services/ConflictAnalyzerService.js
  • src/domain/services/CoordinateFactExport.js
  • src/domain/services/DagPathFinding.js
  • src/domain/services/DagTopology.js
  • src/domain/services/DagTraversal.js
  • src/domain/services/GCPolicy.js
  • src/domain/services/GitLogParser.js
  • src/domain/services/GraphTraversal.js
  • src/domain/services/HookInstaller.js
  • src/domain/services/HttpSyncServer.js
  • src/domain/services/IncrementalIndexUpdater.js
  • src/domain/services/IndexRebuildService.js
  • src/domain/services/IndexStalenessChecker.js
  • src/domain/services/JoinReducer.js
  • src/domain/services/KeyCodec.js
  • src/domain/services/LegacyAnchorDetector.js
  • src/domain/services/LogicalIndexBuildService.js
  • src/domain/services/LogicalIndexReader.js
  • src/domain/services/LogicalTraversal.js
  • src/domain/services/MaterializedViewService.js
  • src/domain/services/MessageSchemaDetector.js
  • src/domain/services/MultiplexSink.js
  • src/domain/services/Observer.js
  • src/domain/services/PatchBuilderV2.js
  • src/domain/services/PatchMessageCodec.js
  • src/domain/services/ProvenanceIndex.js
  • src/domain/services/QueryBuilder.js
  • src/domain/services/StateDiff.js
  • src/domain/services/StateReaderV5.js
  • src/domain/services/StateSerializerV5.js
  • src/domain/services/StrandService.js
  • src/domain/services/StreamingBitmapIndexBuilder.js
  • src/domain/services/SyncAuthService.js
  • src/domain/services/SyncController.js
  • src/domain/services/SyncPayloadSchema.js
  • src/domain/services/SyncProtocol.js
  • src/domain/services/SyncTrustGate.js
  • src/domain/services/TemporalQuery.js
  • src/domain/services/TrailerValidation.js
  • src/domain/services/VisibleStateComparisonV5.js
  • src/domain/services/VisibleStateScopeV1.js
  • src/domain/services/VisibleStateTransferPlannerV5.js
  • src/domain/services/WarpStateIndexBuilder.js
  • src/domain/services/Worldline.js
  • src/domain/services/WormholeService.js
  • src/domain/trust/TrustCanonical.js
  • src/domain/trust/TrustEvaluator.js
  • src/domain/trust/TrustRecordService.js
  • src/domain/trust/TrustStateBuilder.js
  • src/domain/trust/canonical.js
  • src/domain/trust/reasonCodes.js
  • src/domain/types/DeliveryObservation.js
  • src/domain/types/PatchDiff.js
  • src/domain/types/TickReceipt.js
  • src/domain/types/WarpErrors.js
  • src/domain/utils/MinHeap.js
  • src/domain/utils/RefLayout.js
  • src/domain/utils/bytes.js
  • src/domain/utils/defaultBlobStorage.js
  • src/domain/utils/defaultCrypto.js
  • src/domain/utils/matchGlob.js
  • src/domain/utils/parseCursorBlob.js
  • src/domain/utils/parseStrandBlob.js
  • src/domain/utils/shardKey.js
  • src/domain/utils/streamUtils.js
  • src/domain/warp/PatchSession.js
  • src/domain/warp/Writer.js
  • src/domain/warp/_wire.js
  • src/domain/warp/checkpoint.methods.js
  • src/domain/warp/comparison.methods.js
  • src/domain/warp/fork.methods.js
  • src/domain/warp/materialize.methods.js
  • src/domain/warp/materializeAdvanced.methods.js
  • src/domain/warp/patch.methods.js
  • src/domain/warp/provenance.methods.js
  • src/domain/warp/query.methods.js
  • src/domain/warp/strand.methods.js
  • src/domain/warp/subscribe.methods.js
  • src/infrastructure/adapters/BunHttpAdapter.js
  • src/infrastructure/adapters/CasBlobAdapter.js
  • src/infrastructure/adapters/CasSeekCacheAdapter.js
  • src/infrastructure/adapters/ConsoleLogger.js
  • src/infrastructure/adapters/DenoHttpAdapter.js
  • src/infrastructure/adapters/GitGraphAdapter.js
  • src/infrastructure/adapters/InMemoryGraphAdapter.js
  • src/infrastructure/adapters/WebCryptoAdapter.js
  • src/infrastructure/adapters/adapterValidation.js
  • src/infrastructure/adapters/httpAdapterUtils.js
  • src/infrastructure/adapters/sha1sync.js
  • src/ports/BlobStoragePort.js
  • src/ports/CryptoPort.js
  • src/ports/EffectSinkPort.js
  • src/ports/GraphPersistencePort.js
  • src/ports/NeighborProviderPort.js
  • src/ports/RefPort.js
  • src/ports/TreePort.js
  • src/visualization/layouts/converters.js
  • src/visualization/layouts/elkAdapter.js
  • src/visualization/layouts/elkLayout.js
  • src/visualization/renderers/ascii/check.js
  • src/visualization/renderers/ascii/formatters.js
  • src/visualization/renderers/ascii/graph.js
  • src/visualization/renderers/ascii/history.js
  • src/visualization/renderers/ascii/info.js
  • src/visualization/renderers/ascii/materialize.js
  • src/visualization/renderers/ascii/opSummary.js
  • src/visualization/renderers/ascii/path.js
  • src/visualization/renderers/ascii/progress.js
  • src/visualization/renderers/ascii/seek.js
  • src/visualization/renderers/svg/index.js
  • src/visualization/utils/time.js
  • src/visualization/utils/truncate.js
  • test/bats/helpers/seed-setup.js
  • test/bats/helpers/seed-trust-sync.js
  • test/bats/helpers/seed-trust.js
  • test/benchmark/Compaction.benchmark.js
  • test/benchmark/ReducerV5.benchmark.js
  • test/benchmark/benchmarkUtils.js
  • test/benchmark/logicalIndex.benchmark.js
  • test/contract/NeighborProviderPort.contract.test.js
  • test/helpers/fixtureDsl.js
  • test/helpers/seededRng.js
  • test/helpers/trustTestUtils.js
  • test/type-check/consumer.ts
  • test/unit/domain/WarpCore.effectPipeline.test.js
  • test/unit/domain/WarpCore.emit.test.js
  • test/unit/domain/WarpGraph.audit.test.js
  • test/unit/domain/WarpGraph.autoGC.test.js
  • test/unit/domain/WarpGraph.autoMaterialize.test.js
  • test/unit/domain/WarpGraph.cascadeDelete.test.js
  • test/unit/domain/WarpGraph.checkpointPolicy.test.js
  • test/unit/domain/WarpGraph.coverageGaps.test.js
  • test/unit/domain/WarpGraph.deleteGuard.test.js
  • test/unit/domain/WarpGraph.deleteGuardEnforce.test.js
  • test/unit/domain/WarpGraph.encryption.test.js
  • test/unit/domain/WarpGraph.errorCodes.test.js
  • test/unit/domain/WarpGraph.frontierChanged.test.js
  • test/unit/domain/WarpGraph.invalidation.test.js
  • test/unit/domain/WarpGraph.noCoordination.test.js
  • test/unit/domain/WarpGraph.patchCount.test.js
  • test/unit/domain/WarpGraph.patchMany.test.js
  • test/unit/domain/WarpGraph.query.test.js
  • test/unit/domain/WarpGraph.queryBuilder.compass.test.js
  • test/unit/domain/WarpGraph.receipts.test.js
  • test/unit/domain/WarpGraph.seekDiff.test.js
  • test/unit/domain/WarpGraph.status.test.js
  • test/unit/domain/WarpGraph.subscribe.test.js
  • test/unit/domain/WarpGraph.syncAuth.test.js
  • test/unit/domain/WarpGraph.syncWith.test.js
  • test/unit/domain/WarpGraph.test.js
  • test/unit/domain/WarpGraph.watch.test.js
  • test/unit/domain/WarpGraph.writerInvalidation.test.js
  • test/unit/domain/crdt/ORSet.test.js
  • test/unit/domain/parseCursorBlob.test.js
  • test/unit/domain/properties/Join.property.test.js
  • test/unit/domain/properties/ORSet.property.test.js
  • test/unit/domain/seekCache.test.js
  • test/unit/domain/services/AdjacencyNeighborProvider.test.js
  • test/unit/domain/services/AuditReceiptService.test.js
  • test/unit/domain/services/AuditVerifierService.test.js
  • test/unit/domain/services/BisectService.test.js
  • test/unit/domain/services/BitmapIndexBuilder.frontier.test.js
  • test/unit/domain/services/BitmapIndexBuilder.integrity.test.js
  • test/unit/domain/services/BitmapIndexReader.test.js
  • test/unit/domain/services/BoundaryTransitionRecord.test.js
  • test/unit/domain/services/CheckpointSerializerV5.test.js
  • test/unit/domain/services/CheckpointService.edgeCases.test.js
  • test/unit/domain/services/CheckpointService.test.js
  • test/unit/domain/services/CommitDagTraversalService.test.js
  • test/unit/domain/services/EdgePropKey.test.js
  • test/unit/domain/services/EffectPipeline.test.js
  • test/unit/domain/services/GCPolicy.test.js
  • test/unit/domain/services/GraphTraversal.test.js
  • test/unit/domain/services/GraphTraversal.transitiveClosure.test.js
  • test/unit/domain/services/HookInstaller.test.js
  • test/unit/domain/services/HttpSyncServer.test.js
  • test/unit/domain/services/IncrementalIndexUpdater.test.js
  • test/unit/domain/services/IndexRebuildService.deep.test.js
  • test/unit/domain/services/JoinReducer.edgeProps.test.js
  • test/unit/domain/services/JoinReducer.integration.test.js
  • test/unit/domain/services/JoinReducer.pathEquivalence.test.js
  • test/unit/domain/services/JoinReducer.receipts.test.js
  • test/unit/domain/services/JoinReducer.test.js
  • test/unit/domain/services/JoinReducer.trackDiff.test.js
  • test/unit/domain/services/LogicalBitmapIndexBuilder.stability.test.js
  • test/unit/domain/services/LogicalBitmapIndexBuilder.test.js
  • test/unit/domain/services/LogicalIndexBuildService.determinism.test.js
  • test/unit/domain/services/LogicalIndexBuildService.test.js
  • test/unit/domain/services/LogicalIndexReader.test.js
  • test/unit/domain/services/MaterializedView.equivalence.test.js
  • test/unit/domain/services/MaterializedViewService.test.js
  • test/unit/domain/services/MigrationService.test.js
  • test/unit/domain/services/MultiplexSink.test.js
  • test/unit/domain/services/PatchBuilderV2.edgeProps.test.js
  • test/unit/domain/services/PatchBuilderV2.test.js
  • test/unit/domain/services/PropertyIndex.test.js
  • test/unit/domain/services/ProvenanceIndex.test.js
  • test/unit/domain/services/StateDiff.test.js
  • test/unit/domain/services/StateSerializerV5.test.js
  • test/unit/domain/services/StreamingBitmapIndexBuilder.test.js
  • test/unit/domain/services/SyncAuthService.test.js
  • test/unit/domain/services/SyncController.test.js
  • test/unit/domain/services/SyncController.trustGate.test.js
  • test/unit/domain/services/SyncProtocol.divergence.test.js
  • test/unit/domain/services/SyncProtocol.stateCoherence.test.js
  • test/unit/domain/services/SyncProtocol.test.js
  • test/unit/domain/services/TreeConstruction.determinism.test.js
  • test/unit/domain/services/TrustPayloadParity.test.js
  • test/unit/domain/services/logging.integration.test.js
  • test/unit/domain/trust/TrustAdversarial.test.js
  • test/unit/domain/trust/TrustCrypto.signVerify.test.js
  • test/unit/domain/trust/TrustCrypto.test.js
  • test/unit/domain/trust/TrustEvaluator.crossMode.test.js
  • test/unit/domain/trust/TrustEvaluator.test.js
  • test/unit/domain/trust/TrustRecordService.chain.test.js
  • test/unit/domain/trust/TrustRecordService.convergence.test.js
  • test/unit/domain/trust/TrustStateBuilder.test.js
  • test/unit/domain/trust/schemas.test.js
  • test/unit/domain/types/WarpTypesV2.test.js
  • test/unit/domain/utils/MinHeap.test.js
  • test/unit/domain/utils/cancellation.test.js
  • test/unit/domain/utils/canonicalStringify.test.js
  • test/unit/domain/warp/buildView.test.js
  • test/unit/domain/warp/checkpoint.gc-isolation.test.js
  • test/unit/helpers/createMockClock.test.js
  • test/unit/infrastructure/adapters/AdapterConformance.js
  • test/unit/infrastructure/adapters/BunHttpAdapter.test.js
  • test/unit/infrastructure/adapters/CasBlobAdapter.test.js
  • test/unit/infrastructure/adapters/CasSeekCacheAdapter.test.js
  • test/unit/infrastructure/adapters/ChunkEffectSink.test.js
  • test/unit/infrastructure/adapters/ClockAdapter.test.js

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/tsc-zero-campaign

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 1, 2026

Release Preflight

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

If you tag this commit as v16.0.0, release workflow will publish.

Adds design doc (docs/design/joinreducer-op-strategy.md) and failing
test file (JoinReducer.pathEquivalence.test.js) that specify:

1. OP_STRATEGIES registry must exist as a frozen Map<string, OpStrategy>
2. Every canonical op type must have a strategy with 5 methods:
   mutate, outcome, snapshot, accumulate, validate
3. Cross-path equivalence: applyFast, applyWithReceipt, applyWithDiff
   must produce identical CRDT state for all op types

4/15 tests fail (registry doesn't exist yet). 11/15 pass (state
equivalence already holds via shared applyOpV2).
…y paths

Replaces five separate switch statements over the same 8 canonical op
types with a frozen Map<string, OpStrategy> registry. Each strategy
defines five methods: mutate, outcome, snapshot, accumulate, validate.

Adding a new op type without all five methods is a hard error at module
load time — the three apply paths (applyFast, applyWithReceipt,
applyWithDiff) can no longer diverge silently.

The public API is unchanged: applyFast, applyWithReceipt, applyWithDiff,
applyOpV2, join, reduceV5 all keep their exact signatures and semantics.

Includes cross-path equivalence tests verifying all three paths produce
identical CRDT state for every op type, multi-writer concurrency,
redundant ops, and the full reduceV5 pipeline.

5157/5157 tests pass. TSC zero. ESLint zero.
Replaced `/** @type {any} */ (otherReg).value` with a proper
undefined guard + expect.unreachable() for type narrowing.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 1, 2026

Release Preflight

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

If you tag this commit as v16.0.0, release workflow will publish.

@flyingrobots flyingrobots merged commit 1391e68 into main Apr 2, 2026
7 checks passed
@flyingrobots flyingrobots deleted the fix/tsc-zero-campaign branch April 2, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant