Skip to content

feat: op type class hierarchy (cycle 0009)#80

Merged
flyingrobots merged 14 commits intomainfrom
cycle/0009-op-type-class-hierarchy
Apr 7, 2026
Merged

feat: op type class hierarchy (cycle 0009)#80
flyingrobots merged 14 commits intomainfrom
cycle/0009-op-type-class-hierarchy

Conversation

@flyingrobots
Copy link
Copy Markdown
Member

@flyingrobots flyingrobots commented Apr 6, 2026

Summary

  • 8 typedef ops (NodeAdd, NodeRemove, EdgeAdd, EdgeRemove, NodePropSet, EdgePropSet, PropSet, BlobValue) promoted to frozen classes with constructor validation and instanceof dispatch
  • Base Op class (abstract) provides shared runtime identity
  • Factory functions in WarpTypesV2.js delegate to class constructors
  • All three JoinReducer paths (applyFast, applyWithReceipt, applyWithDiff) proven to work with class instances
  • 97 new tests across 4 test files; 5504 total tests passing
  • noCoordination safety gate: 7/7 pass
  • Wire format unchanged — zero behavioral change

What's deferred

  • Slice 4: Consumer instanceof migration (MessageSchemaDetector, presenter, TickReceipt) — backlog up-next/
  • Slice 5: CBOR hydration boundary (decode produces class instances) — backlog up-next/

Test plan

  • 97 new tests: constructor validation, freeze, instanceof isolation, factory delegation, OpNormalizer round-trip, JoinReducer integration
  • 35 existing WarpTypesV2 tests updated (real Dot instances, encoded dot strings)
  • noCoordination regression suite: 7/7
  • Full unit suite: 5504/5504
  • Lint: 0 errors, 0 warnings

Summary by CodeRabbit

  • New Features

    • Operation types now have stronger runtime identity, validation, and immutability for more predictable behavior.
    • Patching auto-materializes when enabled, so materialize() is no longer required before remove ops.
  • Bug Fixes

    • VersionVector constructor now validates input to prevent runtime errors.
  • Documentation

    • Added design, retro, migration, and backlog docs on the op-class migration and CBOR hydration.
  • Tests

    • Added ~97 tests covering ops, factories, normalization, and reducer integration.

Pull PROTO_op-type-class-hierarchy (cool-ideas) and
CC_op-types-typedef-to-class (bad-code) into cycle 0009.

Hill: replace 8 typedef ops with frozen class hierarchy for runtime
identity, constructor validation, and instanceof dispatch.
Base Op class (abstract) + 8 concrete subclasses:
NodeAdd, NodeRemove, EdgeAdd, EdgeRemove, NodePropSet,
EdgePropSet, PropSet, BlobValue.

Each class: constructor validation, Object.freeze, instanceof
dispatch. Edge types use options objects (max-params compliance).
Shared validators in validate.js.

Cycle 0009 ��� op-type-class-hierarchy
Factory functions in WarpTypesV2.js now delegate to Op class
constructors. OpNormalizer.normalizeRawOp() and lowerCanonicalOp()
already return class instances via the factory functions.

Updated WarpTypesV2.test.js: real Dot instances replace plain objects,
encoded dot strings replace object arrays for observedDots.

15 new factory-integration tests + 35 updated existing tests.

Cycle 0009 — op-type-class-hierarchy
11 new tests verifying class-instance ops work through all three
reducer paths (applyFast, applyWithReceipt, applyWithDiff) and
OP_STRATEGIES dispatch. No source changes needed — the string-keyed
strategy Map already dispatches correctly for class instances since
they carry the same .type field.

Cycle 0009 — op-type-class-hierarchy
Cycle 0009 — op-type-class-hierarchy
Witness: hill met — all 8 agent questions answered YES (Q9 deferred).
All 3 human questions answered YES. Hard gates: noCoordination 7/7,
5504/5504 tests, lint clean.

Retro: fast RED→GREEN, edge options objects caught by lint, existing
tests had wrong Dot field names hidden by any-casts.

New backlog:
- PROTO_op-consumer-instanceof-migration (up-next, S)
- PROTO_cbor-op-hydration (up-next, M)
- CC_versionvector-constructor-no-validation (bad-code, S)

Cycle 0009 — op-type-class-hierarchy
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 6, 2026

Important

Review skipped

This PR was authored by the user configured for CodeRabbit reviews. CodeRabbit does not review PRs authored by this user. It's recommended to use a dedicated user account to post CodeRabbit review feedback.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 35e334fa-28b7-461b-86ba-ba9e137583af

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
📝 Walkthrough

Walkthrough

This PR replaces plain-object op typedefs with a frozen Op class hierarchy (8 concrete subclasses), updates WarpTypesV2 factories to construct those classes, adds shared validation helpers, updates tests (~97 added/modified) and docs (design/retro/backlog), and adjusts CI/test scripts; CHANGELOG also notes auto-materialize-on-remove behavior for createPatch().

Changes

Cohort / File(s) Summary
Op class hierarchy & new ops
src/domain/types/ops/Op.js, src/domain/types/ops/NodeAdd.js, src/domain/types/ops/NodeRemove.js, src/domain/types/ops/EdgeAdd.js, src/domain/types/ops/EdgeRemove.js, src/domain/types/ops/PropSet.js, src/domain/types/ops/NodePropSet.js, src/domain/types/ops/EdgePropSet.js, src/domain/types/ops/BlobValue.js
Adds abstract Op base and eight concrete op subclasses. Constructors perform runtime validation, set public fields including preserved type strings, and freeze instances for immutability.
Validation utilities
src/domain/types/ops/validate.js
New shared validation helpers (assertNonEmptyString, assertNoReservedBytes, assertArray) used by op constructors; throw descriptive errors on invalid input.
Factory updates
src/domain/types/WarpTypesV2.js
Factory functions now return op class instances (e.g., new NodeAdd(...), new EdgeAdd({...})) instead of plain objects; JSDoc return types updated and some argument shapes adjusted (use Dot instances, observedDots as strings).
Tests — unit & integration
test/unit/domain/types/ops/Op.test.js, test/unit/domain/types/ops/validate.test.js, test/unit/domain/types/ops/factory-integration.test.js, test/unit/domain/types/ops/reducer-integration.test.js, test/unit/domain/types/WarpTypesV2.test.js
Adds/updates tests (~97) covering constructor validation, instanceof isolation, immutability, factory integration, OpNormalizer normalize/lower behavior, and JoinReducer/patch application with class-instance ops.
Normalizer / reducer integration (tests)
test/unit/domain/types/ops/factory-integration.test.js, test/unit/domain/types/ops/reducer-integration.test.js
Verifies OpNormalizer conversions and JoinReducer/patch paths accept and process class-instance ops end-to-end (applyOpV2, applyFast, applyWithReceipt, applyWithDiff).
Docs & changelog
CHANGELOG.md, docs/design/0009-op-type-class-hierarchy/..., docs/method/retro/0009-op-type-class-hierarchy/retro.md, docs/method/backlog/...
Adds design, witness, retro, and backlog docs describing the op-class refactor plus CBOR-hydration/consumer-instanceof slices (deferred); updates CHANGELOG (also notes auto-materialize-on-remove).
CLI JSDoc tweak
bin/cli/commands/debug/shared.js
Adds DebugOpLike typedef and updates collectTouchedIds JSDoc and property access to dot notation.
Minor JSDoc
src/domain/services/JoinReducer.js
Widened observedDots JSDoc to `ReadonlyArray
CI & test script
.github/workflows/ci.yml, package.json
CI job now uses actions/setup-node@v6, installs bats, runs tests runner-local via new test:node22:ci npm script (installs CLI shims), replacing prior Docker-based test invocation.
Removed/archived docs
docs/method/backlog/cool-ideas/PROTO_op-type-class-hierarchy.md (deleted), docs/method/backlog/bad-code/CC_op-types-typedef-to-class.md (deleted)
Deleted older backlog/idea docs superseded by the new design/retro material.

Sequence Diagram(s)

sequenceDiagram
  participant Factory as WarpTypesV2 (factory)
  participant OpClass as Op subclasses
  participant Normalizer as OpNormalizer
  participant Reducer as JoinReducer
  participant Store as Patch/Journal

  Factory->>OpClass: construct specific Op subclass (e.g., NodeAdd, EdgeAdd)
  OpClass-->>Factory: returns frozen instance (preserves `type`)
  Factory->>Normalizer: provide raw or canonical op
  Normalizer->>OpClass: normalizeRawOp / lowerCanonicalOp (map ↔ instances)
  Reducer->>OpClass: applyOpV2 / applyFast with Op instances
  Reducer->>Store: emit patch/receipt (patch.ops contain Op instances)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I hopped from typedefs into class,
Constructors checked each dot and mass.
Frozen paws stamp ops in place,
Tests clap loudly — tidy trace.
Carrot break now, well-earned grace.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed Title 'feat: op type class hierarchy (cycle 0009)' clearly and specifically summarizes the main change: promoting typedef ops to frozen classes with constructor validation and instanceof dispatch.
Description check ✅ Passed Description comprehensively covers all required sections: clear summary of changes, detailed test plan with quantified results, and thorough ADR compliance checks addressing wire format, persisted ops, and schema stability.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🧹 Nitpick comments (1)
test/unit/domain/types/WarpTypesV2.test.js (1)

442-447: Use distinct Dot instances per add-op fixture.

This test currently reuses one Dot for both NodeAdd and EdgeAdd. Separate dots keep fixtures aligned with causal-identity expectations and avoid normalizing an invalid pattern.

Proposed test tweak
-      const dot = new Dot('w', 1);
+      const nodeDot = new Dot('w', 1);
+      const edgeDot = new Dot('w', 2);
       const ops = [
-        createNodeAddV2('n1', dot),
+        createNodeAddV2('n1', nodeDot),
         createNodeRemoveV2('n1', []),
-        createEdgeAddV2('n1', 'n2', 'r', dot),
+        createEdgeAddV2('n1', 'n2', 'r', edgeDot),
         createEdgeRemoveV2('n1', 'n2', 'r', []),
         createPropSetV2('n1', 'k', 'v'),
       ];
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/unit/domain/types/WarpTypesV2.test.js` around lines 442 - 447, The test
reuses one Dot instance for both NodeAdd and EdgeAdd which violates
causal-identity expectations; update the ops fixture so createNodeAddV2 and
createEdgeAddV2 each receive their own distinct Dot (e.g., two Dot(...)
instances) instead of sharing the same dot variable; locate the ops array
construction around the calls to createNodeAddV2, createNodeRemoveV2,
createEdgeAddV2, and createEdgeRemoveV2 and replace the single shared Dot with
separate Dot instances for the add operations.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/design/0009-op-type-class-hierarchy/op-type-class-hierarchy.md`:
- Around line 31-32: The design doc claims JoinReducer.OP_STRATEGIES dispatches
by instanceof but the implementation uses string-key lookup via op.type; update
the design doc text (references: JoinReducer.OP_STRATEGIES, JoinReducer.js line
showing OP_STRATEGIES.get(op.type)) to accurately state that strategy lookup is
performed by the `.type` string on operation instances, or explicitly document
that an instanceof-based dispatch approach is planned/deferred and not currently
used; ensure the doc references the `.type` property on class instances and
remove or rephrase any lines asserting instanceof dispatch.

In `@src/domain/types/ops/EdgeRemove.js`:
- Around line 36-40: The container-level assertArray call in the EdgeRemove
constructor is not enough—after assertArray(observedDots, 'EdgeRemove',
'observedDots') you must validate each element is a non-empty encoded dot string
before freezing; iterate observedDots and run the appropriate element validator
(e.g., an existing assertEncodedDot or a new small helper) on each entry
(include context 'EdgeRemove' and 'observedDots' and the element index in error
messages), then set this.observedDots = Object.freeze([...observedDots]).

In `@src/domain/types/ops/NodePropSet.js`:
- Around line 8-9: NodePropSet's constructor currently uses assertNonEmptyString
but does not reject NUL bytes for the identifiers; update the validation in the
NodePropSet constructor (the class/function named NodePropSet) to check both the
node and key parameters for banned NUL bytes (e.g., string.includes('\0')) and
throw/raise the same validation error when found; reuse or extend
assertNonEmptyString (or add a small helper) so both node and key are rejected
on construction if they contain '\0' (also apply the same check to the other
validation locations referenced in the comment around lines 33-35).

In `@src/domain/types/ops/NodeRemove.js`:
- Around line 29-31: The constructor for NodeRemove only asserts observedDots is
an array but doesn't validate elements; update the NodeRemove constructor to
iterate observedDots and validate each entry is a non-empty string (e.g., use or
add an assertString/assertNonEmpty helper) before freezing the array, and throw
a clear error mentioning 'NodeRemove' and 'observedDots' if any element is
invalid so downstream remove processing cannot receive bad entries.

In `@src/domain/types/ops/PropSet.js`:
- Around line 12-13: PropSet currently only calls assertNonEmptyString for the
key, which allows NUL bytes; update the PropSet constructor (or the helper it
uses) to reject any key containing '\0' by adding a NUL-byte check alongside the
existing assertNonEmptyString validation (e.g., throw if key.includes('\0'));
ensure the same change is applied for all PropSet key validations mentioned
(lines ~37-39) so every code path that sets PropSet.key enforces non-empty and
no NUL bytes, referencing the PropSet constructor and assertNonEmptyString
helper for where to add the check.

In `@test/unit/domain/types/ops/factory-integration.test.js`:
- Line 15: Remove the unused import by deleting the BlobValue import statement
(the "import BlobValue from ...BlobValue.js" line) from the test file; ensure
there are no remaining references to the BlobValue symbol in the file and run
the tests/linter to confirm the unused-import warning is resolved.
- Around line 120-129: The test's `canonical` variable is typed as a union so
TypeScript can't see `node`/`key` even after the runtime `toBeInstanceOf` check;
narrow the type before accessing properties by casting `canonical` to
`NodePropSet` (e.g., use a type assertion like `canonical as NodePropSet` or
assign `const nodeProp = canonical as NodePropSet`) and then assert
`nodeProp.node`, `nodeProp.key`, and `nodeProp.value`; keep using
`normalizeRawOp`, `NodePropSet`, and the `canonical` variable names to locate
the change.

---

Nitpick comments:
In `@test/unit/domain/types/WarpTypesV2.test.js`:
- Around line 442-447: The test reuses one Dot instance for both NodeAdd and
EdgeAdd which violates causal-identity expectations; update the ops fixture so
createNodeAddV2 and createEdgeAddV2 each receive their own distinct Dot (e.g.,
two Dot(...) instances) instead of sharing the same dot variable; locate the ops
array construction around the calls to createNodeAddV2, createNodeRemoveV2,
createEdgeAddV2, and createEdgeRemoveV2 and replace the single shared Dot with
separate Dot instances for the add operations.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: ba3cdbe1-183c-4e0d-b5dd-cac2ae425741

📥 Commits

Reviewing files that changed from the base of the PR and between 7d64a95 and 87666b9.

📒 Files selected for processing (25)
  • CHANGELOG.md
  • docs/design/0009-op-type-class-hierarchy/op-type-class-hierarchy.md
  • docs/design/0009-op-type-class-hierarchy/witness.md
  • docs/method/backlog/bad-code/CC_op-types-typedef-to-class.md
  • docs/method/backlog/bad-code/CC_versionvector-constructor-no-validation.md
  • docs/method/backlog/cool-ideas/PROTO_op-type-class-hierarchy.md
  • docs/method/backlog/up-next/PROTO_cbor-op-hydration.md
  • docs/method/backlog/up-next/PROTO_op-consumer-instanceof-migration.md
  • docs/method/retro/0009-op-type-class-hierarchy/retro.md
  • src/domain/types/WarpTypesV2.js
  • src/domain/types/ops/BlobValue.js
  • src/domain/types/ops/EdgeAdd.js
  • src/domain/types/ops/EdgePropSet.js
  • src/domain/types/ops/EdgeRemove.js
  • src/domain/types/ops/NodeAdd.js
  • src/domain/types/ops/NodePropSet.js
  • src/domain/types/ops/NodeRemove.js
  • src/domain/types/ops/Op.js
  • src/domain/types/ops/PropSet.js
  • src/domain/types/ops/validate.js
  • test/unit/domain/types/WarpTypesV2.test.js
  • test/unit/domain/types/ops/Op.test.js
  • test/unit/domain/types/ops/factory-integration.test.js
  • test/unit/domain/types/ops/reducer-integration.test.js
  • test/unit/domain/types/ops/validate.test.js
💤 Files with no reviewable changes (2)
  • docs/method/backlog/bad-code/CC_op-types-typedef-to-class.md
  • docs/method/backlog/cool-ideas/PROTO_op-type-class-hierarchy.md

Code review (12 issues, 0 remaining):

C1/M2/m1/m2: Add assertNoReservedBytes to all op constructors —
rejects NUL (\x00) and \x01 prefix in identifiers. Matches
PatchBuilderV2._assertNoReservedBytes. PropSet exempted (legitimately
carries \x01-prefixed nodes for edge prop wire encoding).

M1: Design doc Status DESIGN → HILL MET. Added Delivered vs. Deferred
table clarifying which scope items shipped.

n1: Blank line between frontmatter fields in design doc.
n2: Witness references test descriptions instead of line numbers.
n3: Retro file count 9 → 10.
n4: WarpTypesV2 import alias PropSetOpClass → PropSetClass.

15 new validation tests. 5519 total tests passing.

Cycle 0009 — op-type-class-hierarchy
Use case: mirroring git history into a warp graph. HEAD snapshot is
fast, but full history backfill is O(commits). Explores edge-based
chronological ordering, checkpoint seeding, wormhole compression,
and lazy materialization with continuation tokens.

Cycle 0009 — op-type-class-hierarchy
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/domain/types/WarpTypesV2.js`:
- Around line 160-162: The JSDoc `@returns` annotations still reference
plain-object typedefs (e.g., OpV2NodeAdd) while the factory functions like
createNodeAddV2, createNodeRemoveV2, createEdgeAddV2, createEdgeRemoveV2,
createPropSetV2, createNodePropSetV2, and createEdgePropSetV2 now return class
instances (NodeAddClass, NodeRemoveClass, EdgeAddClass, EdgeRemoveClass,
PropSetClass, NodePropSetClass, EdgePropSetClass); update each function's
`@returns` tag to reference the corresponding class type (e.g., `@returns`
{NodeAddClass}) OR change the typedefs to alias the classes (e.g., `@typedef`
{NodeAddClass} OpV2NodeAdd) so TypeScript sees them as compatible.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 43fbdd8b-5655-418b-9c1d-4e366037d012

📥 Commits

Reviewing files that changed from the base of the PR and between 87666b9 and 90ce8e6.

📒 Files selected for processing (15)
  • docs/design/0009-op-type-class-hierarchy/op-type-class-hierarchy.md
  • docs/design/0009-op-type-class-hierarchy/witness.md
  • docs/method/backlog/cool-ideas/PROTO_incremental-history-backfill.md
  • docs/method/retro/0009-op-type-class-hierarchy/retro.md
  • src/domain/types/WarpTypesV2.js
  • src/domain/types/ops/BlobValue.js
  • src/domain/types/ops/EdgeAdd.js
  • src/domain/types/ops/EdgePropSet.js
  • src/domain/types/ops/EdgeRemove.js
  • src/domain/types/ops/NodeAdd.js
  • src/domain/types/ops/NodePropSet.js
  • src/domain/types/ops/NodeRemove.js
  • src/domain/types/ops/validate.js
  • test/unit/domain/types/ops/Op.test.js
  • test/unit/domain/types/ops/validate.test.js
✅ Files skipped from review due to trivial changes (6)
  • src/domain/types/ops/NodePropSet.js
  • docs/method/backlog/cool-ideas/PROTO_incremental-history-backfill.md
  • docs/method/retro/0009-op-type-class-hierarchy/retro.md
  • test/unit/domain/types/ops/validate.test.js
  • docs/design/0009-op-type-class-hierarchy/witness.md
  • docs/design/0009-op-type-class-hierarchy/op-type-class-hierarchy.md
🚧 Files skipped from review as they are similar to previous changes (6)
  • src/domain/types/ops/EdgeAdd.js
  • src/domain/types/ops/EdgePropSet.js
  • src/domain/types/ops/NodeRemove.js
  • src/domain/types/ops/validate.js
  • src/domain/types/ops/EdgeRemove.js
  • test/unit/domain/types/ops/Op.test.js

@flyingrobots
Copy link
Copy Markdown
Member Author

Resolved the outstanding review feedback on this branch.

Issue Outcome Commit
EdgeRemove observedDots element validation Added per-entry validation and regression coverage c6eb3139
NodeRemove observedDots element validation Added per-entry validation and regression coverage c6eb3139
PropSet key NUL-byte validation Enforced reserved-byte rejection and added regression coverage c6eb3139
Unused BlobValue import in factory integration test Removed unused import cb5ab974
canonical narrowing in factory integration test Narrowed to NodePropSet before property assertions cb5ab974
WarpTypesV2 factory/type mismatch Updated factory return annotations, aliased op typedefs to class-backed types, and aligned helper surfaces so typecheck:src is green cb5ab974
WarpTypesV2 factory test reused one Dot across add ops Split the fixture to use distinct Dot instances cb5ab974

Local verification for the fix set:

  • npm run typecheck:src
  • npx eslint src/domain/types/WarpTypesV2.js src/domain/services/JoinReducer.js bin/cli/commands/debug/shared.js src/domain/types/ops/NodeRemove.js src/domain/types/ops/EdgeRemove.js src/domain/types/ops/PropSet.js test/unit/domain/types/ops/Op.test.js test/unit/domain/types/ops/factory-integration.test.js test/unit/domain/types/WarpTypesV2.test.js
  • npx vitest run test/unit/domain/types/ops/Op.test.js test/unit/domain/types/ops/factory-integration.test.js test/unit/domain/types/WarpTypesV2.test.js test/unit/domain/types/ops/reducer-integration.test.js

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 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.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
.github/workflows/ci.yml (1)

69-79: Consider keeping one smoke check for the Node 22 Docker path.

This block now validates the suite on the runner, but it no longer builds or runs docker-compose.test.yml’s test-node22 service. Since npm run test:node22 is still a supported path, a lightweight advisory build/run for that image would keep Dockerfile/compose drift from going unnoticed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 69 - 79, The workflow removed the
Docker-based smoke check for the Node 22 image; add a lightweight CI step after
"Run unit + integration tests" that builds and briefly runs the test-node22
service from docker-compose.test.yml to detect Dockerfile/compose drift (use the
compose file and service name test-node22); implement it as a short
build-and-run smoke step (e.g., docker-compose -f docker-compose.test.yml build
test-node22 then docker-compose -f docker-compose.test.yml up -d test-node22 and
a quick health/exit check, then tear down) so the pipeline still validates the
docker image used by npm run test:node22 without running the full test suite.
package.json (1)

100-100: Reuse the existing test entrypoint here.

Line 100 re-embeds vitest run test/unit test/integration instead of composing the test script on Lines 84-85, so the Node 22 suite now has another source of truth alongside docker-compose.test.yml:26-33. That makes the CI and Docker paths easier to drift apart.

♻️ Proposed simplification
-    "test:node22:ci": "GIT_STUNTS_DOCKER=1 sh -c 'npx vitest run test/unit test/integration && bats test/bats/'",
+    "test:node22:ci": "GIT_STUNTS_DOCKER=1 sh -c 'npm run test -- test/integration && bats test/bats/'",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 100, The "test:node22:ci" script duplicates the vitest
invocation instead of reusing the existing "test" entrypoint; update the
"test:node22:ci" script to call the central "test" script (e.g.,
GIT_STUNTS_DOCKER=1 sh -c 'npm run test' or equivalent) while preserving the
original environment flag and any bats invocation so CI uses the single source
of truth defined by the "test" script.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 69-79: The workflow removed the Docker-based smoke check for the
Node 22 image; add a lightweight CI step after "Run unit + integration tests"
that builds and briefly runs the test-node22 service from
docker-compose.test.yml to detect Dockerfile/compose drift (use the compose file
and service name test-node22); implement it as a short build-and-run smoke step
(e.g., docker-compose -f docker-compose.test.yml build test-node22 then
docker-compose -f docker-compose.test.yml up -d test-node22 and a quick
health/exit check, then tear down) so the pipeline still validates the docker
image used by npm run test:node22 without running the full test suite.

In `@package.json`:
- Line 100: The "test:node22:ci" script duplicates the vitest invocation instead
of reusing the existing "test" entrypoint; update the "test:node22:ci" script to
call the central "test" script (e.g., GIT_STUNTS_DOCKER=1 sh -c 'npm run test'
or equivalent) while preserving the original environment flag and any bats
invocation so CI uses the single source of truth defined by the "test" script.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 504dbdcb-6bf4-402f-bd5d-f09fa147933d

📥 Commits

Reviewing files that changed from the base of the PR and between cb5ab97 and e4ce1c2.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • docs/method/backlog/bad-code/CC_versionvector-constructor-no-validation.md
  • package.json
✅ Files skipped from review due to trivial changes (1)
  • docs/method/backlog/bad-code/CC_versionvector-constructor-no-validation.md

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 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 baac95f into main Apr 7, 2026
8 of 9 checks passed
@flyingrobots flyingrobots deleted the cycle/0009-op-type-class-hierarchy branch April 7, 2026 07:24
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