V18 Continuum slices 11-15#95
Conversation
|
Warning Review limit reached
Your plan currently allows 1 review/hour. Refill in 54 minutes and 5 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughAdds runtime-backed Continuum generated-family inventory, git-warp reading-envelope and witnessed-suffix source facts, a tick patch/receipt witness ladder, public exports, unit tests, and design/BEARING/CHANGELOG/workload documentation for v18 slices 11–15. ChangesV18 Continuum Compatibility Enhancements
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Release Preflight
If you tag this commit as |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
test/unit/domain/continuum/GitWarpReadingEnvelopeSourceFacts.test.ts (1)
39-83:⚠️ Potential issue | 🟠 Major | ⚡ Quick winClose remaining branch-coverage gaps in this test slice.
Please add cases for the optional-path behavior (
hasStateHash()whenstateHashis absent) and the constructor’s payload type guard failure path so this touched slice can satisfy the coverage gate.As per coding guidelines: “Touched code in refactor slices must reach 100% test coverage before the slice is considered done”.
🤖 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 `@test/unit/domain/continuum/GitWarpReadingEnvelopeSourceFacts.test.ts` around lines 39 - 83, Add two tests: one that constructs source facts with a payload lacking stateHash and asserts payload.hasStateHash() is false (use makePayload() or construct GitWarpReadingEnvelopePayloadFact without stateHash) to cover the optional-path for hasStateHash(); and another that calls new GitWarpReadingEnvelopeSourceFacts with a payload of the wrong type (e.g., a plain object or an instance of a different fact class) and asserts it throws WarpError to exercise the constructor’s payload type-guard failure path. Ensure you use the existing helpers/methods (makeSourceFacts, makePayload, GitWarpReadingEnvelopePayloadFact, GitWarpReadingEnvelopeSourceFacts, hasStateHash()) and mirror the other test patterns (expect(...).toThrow(WarpError)).test/unit/domain/index.exports.test.ts (1)
84-84:⚠️ Potential issue | 🟠 Major | ⚡ Quick winRemove forbidden
as anycast from dynamic import in test
test/unit/domain/index.exports.test.tsline 84 contains(await import('../../../index.ts')) as any, which violates the TypeScript anti-sludge rule (“Noany” / “Noas any”). Replace it with a typed module shape (orunknown+ narrowing).Suggested fix
-const { WarpGraph, WarpRuntime, Worldline, ObserverView } = (await import('../../../index.ts') as any); +type IndexModule = typeof import('../../../index.ts'); +const { WarpGraph, WarpRuntime, Worldline, ObserverView } = + (await import('../../../index.ts')) as IndexModule & { + WarpGraph?: unknown; + WarpRuntime?: unknown; + ObserverView?: unknown; + };🤖 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 `@test/unit/domain/index.exports.test.ts` at line 84, The test is using a forbidden `as any` cast on the dynamic import; replace it by importing as unknown and narrowing to a proper module shape (or define a minimal interface for the module) before destructuring. Specifically, change the line that imports '../../../index.ts' to assign the result to a variable typed as unknown, then assert/narrow that variable to an interface containing WarpGraph, WarpRuntime, Worldline, and ObserverView (or import the module type) and destructure from that typed value so no `as any` is used.
🤖 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 `@docs/BEARING.md`:
- Line 254: The sentence referring to GitWarpReadingEnvelopeSourceFacts is
grammatically awkward; update the clause so it reads either "requires translated
git-warp evidence posture" or "requires git-warp evidence to be translated" for
clarity—modify the documentation line mentioning
GitWarpReadingEnvelopeSourceFacts to use one of these phrasings so the meaning
is unambiguous.
In `@src/domain/continuum/ContinuumGeneratedFamilyInventoryEntry.ts`:
- Around line 70-73: requireNonEmptyString currently accepts strings composed
only of whitespace and also doesn't return the validated value; update the
function requireNonEmptyString to treat whitespace-only strings as invalid by
using value.trim().length === 0 in the validation (alongside the existing typeof
check), throw the same WarpError('E_VALIDATION') for those cases, and return the
original value when valid so callers (e.g., constructors in
ContinuumGeneratedFamilyInventoryEntry) receive the validated string.
In `@src/domain/continuum/GitWarpWitnessedSuffixSourceFacts.ts`:
- Around line 95-110: freezePatchFacts currently only checks presence and type
but not ordering; update it to verify the input array is in the expected
canonical order (ascending sequence) before freezing: after type-checking each
GitWarpWitnessedSuffixPatchFact in freezePatchFacts, compare each adjacent pair
using the project's canonical comparator (e.g.
compareGitWarpWitnessedSuffixPatchFact(a,b) or implement a comparator that
enforces sequence order) and throw a WarpError with 'E_VALIDATION' if any pair
is out of order; only then push into checkedValues and return
Object.freeze(checkedValues).
In `@test/unit/domain/continuum/ContinuumGeneratedFamilyInventory.test.ts`:
- Around line 49-101: Add unit tests covering the missing branches: assert
ContinuumGeneratedFamilyStatus.isAuthoredOnly() returns true for an
"authored-only" status value and false for other valid statuses, and add a test
that calls ContinuumGeneratedFamilyInventory.requireEntry for a family id that
is absent (create an inventory from makeCompleteEntries() filtered to remove one
family) and assert it throws WarpError; use
createCurrentContinuumGeneratedFamilyInventory() / makeEntry() /
ContinuumGeneratedFamilyInventoryEntry to build fixtures and reference
ContinuumGeneratedFamilyStatus.isAuthoredOnly() and
ContinuumGeneratedFamilyInventory.requireEntry() in the new assertions.
In `@test/unit/domain/continuum/GitWarpTickWitnessLadder.test.ts`:
- Around line 108-120: The test for GitWarpTickWitnessLadder is missing a
runtime-guard assertion for receipt being undefined; add an assertion that
constructing new GitWarpTickWitnessLadder with an object where receipt is
explicitly undefined (similar to the existing patch undefined case) throws
WarpError. Target the constructor of GitWarpTickWitnessLadder in
test/unit/domain/continuum/GitWarpTickWitnessLadder.test.ts and add a new
expect(() => new GitWarpTickWitnessLadder({ patch: PATCH, patchSha: PATCH_SHA,
receipt: undefined })) toThrow(WarpError) so the receipt-guard branch is
exercised.
---
Outside diff comments:
In `@test/unit/domain/continuum/GitWarpReadingEnvelopeSourceFacts.test.ts`:
- Around line 39-83: Add two tests: one that constructs source facts with a
payload lacking stateHash and asserts payload.hasStateHash() is false (use
makePayload() or construct GitWarpReadingEnvelopePayloadFact without stateHash)
to cover the optional-path for hasStateHash(); and another that calls new
GitWarpReadingEnvelopeSourceFacts with a payload of the wrong type (e.g., a
plain object or an instance of a different fact class) and asserts it throws
WarpError to exercise the constructor’s payload type-guard failure path. Ensure
you use the existing helpers/methods (makeSourceFacts, makePayload,
GitWarpReadingEnvelopePayloadFact, GitWarpReadingEnvelopeSourceFacts,
hasStateHash()) and mirror the other test patterns
(expect(...).toThrow(WarpError)).
In `@test/unit/domain/index.exports.test.ts`:
- Line 84: The test is using a forbidden `as any` cast on the dynamic import;
replace it by importing as unknown and narrowing to a proper module shape (or
define a minimal interface for the module) before destructuring. Specifically,
change the line that imports '../../../index.ts' to assign the result to a
variable typed as unknown, then assert/narrow that variable to an interface
containing WarpGraph, WarpRuntime, Worldline, and ObserverView (or import the
module type) and destructure from that typed value so no `as any` is used.
🪄 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: 57807a86-fe21-411b-ae19-0138290ee1cd
📒 Files selected for processing (27)
CHANGELOG.mddocs/BEARING.mddocs/design/0159-v18-replan-with-evidence/v18-replan-with-evidence.mddocs/design/0160-v18-generated-family-inventory-refresh/v18-generated-family-inventory-refresh.mddocs/design/0161-v18-tickpatch-tickreceipt-witness-ladder/v18-tickpatch-tickreceipt-witness-ladder.mddocs/design/0162-v18-reading-envelope-source-facts/v18-reading-envelope-source-facts.mddocs/design/0163-v18-witnessed-suffix-source-facts/v18-witnessed-suffix-source-facts.mddocs/method/backlog/WORKLOADS.mddocs/method/backlog/up-next/PROTO_tickpatch-tickreceipt-witness-ladder-audit.mdindex.tssrc/domain/continuum/ContinuumGeneratedFamilyInventory.tssrc/domain/continuum/ContinuumGeneratedFamilyInventoryEntry.tssrc/domain/continuum/ContinuumGeneratedFamilyStatus.tssrc/domain/continuum/GitWarpReadingEnvelopePayloadFact.tssrc/domain/continuum/GitWarpReadingEnvelopeSourceFacts.tssrc/domain/continuum/GitWarpTickPatchReplayCore.tssrc/domain/continuum/GitWarpTickReceiptShell.tssrc/domain/continuum/GitWarpTickReceiptWitnessCore.tssrc/domain/continuum/GitWarpTickWitnessLadder.tssrc/domain/continuum/GitWarpWitnessedSuffixPatchFact.tssrc/domain/continuum/GitWarpWitnessedSuffixSourceFacts.tssrc/domain/continuum/createCurrentContinuumGeneratedFamilyInventory.tstest/unit/domain/continuum/ContinuumGeneratedFamilyInventory.test.tstest/unit/domain/continuum/GitWarpReadingEnvelopeSourceFacts.test.tstest/unit/domain/continuum/GitWarpTickWitnessLadder.test.tstest/unit/domain/continuum/GitWarpWitnessedSuffixSourceFacts.test.tstest/unit/domain/index.exports.test.ts
💤 Files with no reviewable changes (1)
- docs/method/backlog/up-next/PROTO_tickpatch-tickreceipt-witness-ladder-audit.md
|
| # | Source | Severity | File / Area | Issue | Resolution | Evidence |\n|---:|---|---|---|---|---|---|\n| 1 | CodeRabbit inline thread | P2 Major | |
Release Preflight
If you tag this commit as |
|
| # | Source | Severity | File / Area | Issue | Resolution | Evidence |\n|---:|---|---|---|---|---|---|\n| 1 | CodeRabbit inline thread | P2 Major | |
Release Preflight
If you tag this commit as |
Summary
ADR Checks
Verification
Summary by CodeRabbit
New Features
Documentation
Tests