Skip to content

fix!: default checkpointPolicy to { every: 64 } - #842

Open
flyingrobots wants to merge 9 commits into
mainfrom
fix/default-checkpoint-policy
Open

fix!: default checkpointPolicy to { every: 64 }#842
flyingrobots wants to merge 9 commits into
mainfrom
fix/default-checkpoint-policy

Conversation

@flyingrobots

@flyingrobots flyingrobots commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Default omitted checkpointPolicy to a bounded cadence of 64 replayed patches.
  • Preserve checkpointPolicy: null as the explicit no-compaction opt-out.
  • Model checkpoint cadence as validated runtime truth and prove derivative runtime propagation.

Omitting checkpointPolicy silently disabled auto-checkpointing, so replay depth was unbounded:

normalizeCheckpointPolicy(undefined) -> undefined
_tryAutoCheckpoint()                 -> returns when no policy exists

Measured on a real store at 262 unreplayed patches: one read spawned 5,267 Git subprocesses, and the backlog grew by two commits per write. The degradation was silent and monotonic.

checkpointPolicy before after
omitted no checkpointing, unbounded replay default cadence of 64
null explicit opt-out explicit opt-out

Breaking change

Graphs opened without an explicit policy now write checkpoint commits once replay depth reaches or exceeds 64. State hashes are unaffected because a checkpoint is a snapshot, not a semantic graph change. Pass checkpointPolicy: null to retain no-compaction behavior.

Issue

Closes #843

Test plan

Current branch baseline:

  • npm run lint
  • npm run typecheck -- --pretty false
  • Hosted Node, Bun, Deno, coverage, performance, generated SDK, preflight, and type-firewall checks
  • Focused checkpoint-policy, auto-checkpoint, detached-open, and fork regression tests after review repairs
  • Full stable unit suite after review repairs
  • Final exact-head hosted checks after publication

ADR checks

  • This PR does not implement ADR 2 without satisfying ADR 3
  • N/A — this PR does not change persisted operation formats
  • N/A — this PR does not change wire compatibility
  • N/A — this PR does not change schema constants or namespaces

Auto-checkpointing is what bounds replay depth, but it was opt-in: RuntimeHost
stored `checkpointPolicy || null` and `_tryAutoCheckpoint` returns immediately
on a null policy. A caller that never supplied one therefore replayed its entire
patch history since the last explicit checkpoint on every materialize, with no
upper bound, and reads paid the cost.

Measured on a real store at 262 unreplayed patches: one read spawned 5,267 Git
subprocesses, and the backlog grew by two commits per write forever. Nothing
surfaced this — the degradation is silent and monotonic.

An omitted policy now takes DEFAULT_CHECKPOINT_POLICY. `checkpointPolicy: null`
remains the explicit opt-out, so no-compaction stays reachable by asking for it
rather than by forgetting. `every` is compared against the replay depth reported
by materialize, not writes performed by the current process, so short-lived
callers still compact once the backlog crosses the threshold.

Two existing cases asserted the old contract and are updated deliberately:
WarpGraph.checkpointPolicy 'defaults _checkpointPolicy to null when not
provided' and WarpOpenOptions 'freezes required runtime open options'. A new
case pins the null-vs-omitted distinction so the opt-out cannot regress into
the default.

Full unit suite: 7299 passed, 0 failed, 2 skipped.

BREAKING CHANGE: graphs opened without an explicit checkpointPolicy now write
checkpoint commits once replay depth reaches 64 patches. State hashes are
unaffected; a checkpoint is a snapshot, not a semantic change. Pass
checkpointPolicy: null to restore the previous behaviour.
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@flyingrobots, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 386031ba-539f-4dc1-9a4f-7c0250f3cd8e

📥 Commits

Reviewing files that changed from the base of the PR and between adfad2e and 4764176.

📒 Files selected for processing (17)
  • CHANGELOG.md
  • src/domain/RuntimeHost.ts
  • src/domain/WarpGraph.ts
  • src/domain/services/controllers/ForkController.ts
  • src/domain/services/controllers/detachedOpen.ts
  • src/domain/warp/CheckpointPolicy.ts
  • src/domain/warp/RuntimeHostBoot.ts
  • src/domain/warp/RuntimeHostProduct.ts
  • test/unit/CheckpointPolicyChangelog.test.ts
  • test/unit/domain/WarpGraph.checkpointPolicy.test.ts
  • test/unit/domain/services/controllers/ForkController.checkpointPolicy.test.ts
  • test/unit/domain/services/controllers/ForkController.policy.test.ts
  • test/unit/domain/services/controllers/ForkController.validation.test.ts
  • test/unit/domain/strandAndRuntimeSeams.test.ts
  • test/unit/domain/warp/CheckpointPolicy.test.ts
  • test/unit/domain/warp/CheckpointPolicySourcePolicy.test.ts
  • test/unit/domain/warp/WarpOpenOptions.test.ts
📝 Walkthrough

Summary by CodeRabbit

  • Breaking Changes

    • Omitting checkpointPolicy now enables automatic checkpointing every 64 replayed patches.
    • Set checkpointPolicy to null to explicitly disable automatic checkpointing.
    • Consumers without a policy may create checkpoint commits once the replay-depth threshold is reached.
  • Bug Fixes

    • Checkpoint policy handling now distinguishes omitted, disabled, valid, and invalid values.
    • Invalid non-positive or non-integer intervals continue to be rejected.
    • State hashes remain unchanged.
    • Checkpoint settings are now consistently normalized across supported configurations.

Walkthrough

The runtime host now applies an immutable default checkpoint policy of { every: 64 } when omitted. An explicit null disables automatic checkpointing. Runtime seams, validation, tests, and the changelog reflect this behavior.

Changes

Checkpoint policy behavior

Layer / File(s) Summary
Policy value and validation
src/domain/warp/CheckpointPolicy.ts, test/unit/domain/warp/CheckpointPolicy.test.ts
CheckpointPolicy validates positive integer cadences, provides an interval-64 default, preserves instances, and converts configuration objects.
Runtime policy normalization and wiring
src/domain/warp/RuntimeHostBoot.ts, src/domain/WarpGraph.ts, src/domain/RuntimeHost.ts, src/domain/services/controllers/detachedOpen.ts, src/domain/warp/RuntimeHostProduct.ts
Runtime seams use CheckpointPolicy values. Omitted input uses the default policy. Explicit null remains an opt-out.
Default and opt-out behavior validation
test/unit/domain/WarpGraph.checkpointPolicy.test.ts, test/unit/domain/warp/WarpOpenOptions.test.ts, CHANGELOG.md
Tests verify default normalization, explicit opt-out, and supplied-policy normalization. The changelog records checkpoint and state-hash behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

A rabbit checks the replay trail,
At sixty-four, checkpoints prevail.
Omit the rule: the default starts.
Choose null: no checkpoint parts.
State hashes stay unchanged.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The changes cover the default policy and validation, but evidence is missing for detached and forked null propagation and their required regression tests. Pass the normalized policy, including null, through detached and forked construction seams, then add and run the required regression tests.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary breaking change: the default checkpoint policy is now every 64 patches.
Description check ✅ Passed The description includes all required sections, references issue #843, documents testing status, and completes the ADR checks.
Out of Scope Changes check ✅ Passed The changelog, runtime changes, domain types, and tests are directly related to the linked issue objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@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: 4

🤖 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 `@CHANGELOG.md`:
- Around line 24-26: Update the changelog wording around checkpoint creation to
state that replay depth “reaches or exceeds 64,” making the inclusive threshold
explicit instead of implying it must exceed 64.

In `@src/domain/warp/RuntimeHostBoot.ts`:
- Around line 215-217: Replace the structural checkpoint policy with a
validated, frozen runtime-backed CheckpointPolicy value object. In
src/domain/warp/RuntimeHostBoot.ts, update lines 215-217 to construct
DEFAULT_CHECKPOINT_POLICY via CheckpointPolicy, expose CheckpointPolicy in
construction options at lines 57-57 and normalized options at lines 116-116, and
update the raw-input validation at lines 226-246 to construct and return the
value object, using instanceof dispatch at the domain boundary.

In `@test/unit/domain/WarpGraph.checkpointPolicy.test.ts`:
- Around line 39-40: Add an explicit equality assertion for
DEFAULT_CHECKPOINT_POLICY.every in the checkpoint policy test, requiring the
contractual value 64 while retaining the existing positivity and policy
assertions.
- Around line 115-119: Update the opted-out test’s openRuntimeHostProduct call
to pass null directly as checkpointPolicy, removing the unnecessary any cast and
preserving the test’s verification of the nullable TypeScript contract.
🪄 Autofix

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 Plus

Run ID: d57c220f-8e8a-4b14-adcf-4148d6e67652

📥 Commits

Reviewing files that changed from the base of the PR and between 7ed1fd2 and adfad2e.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • src/domain/warp/RuntimeHostBoot.ts
  • test/unit/domain/WarpGraph.checkpointPolicy.test.ts
  • test/unit/domain/warp/WarpOpenOptions.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (8)
  • GitHub Check: test-bun
  • GitHub Check: test-deno
  • GitHub Check: test-node (22)
  • GitHub Check: type-firewall-generated-sdk
  • GitHub Check: coverage-threshold
  • GitHub Check: type-firewall-lint
  • GitHub Check: v19 base/head performance
  • GitHub Check: preflight
⚠️ CI failures not shown inline (2)

GitHub Actions: PR Issue Reference / 0_require-issue-reference.txt: fix!: default checkpointPolicy to { every: 64 }

Conclusion: failure

View job details

##[group]Run set -euo pipefail
 �[36;1mset -euo pipefail�[0m
 �[36;1m�[0m
 �[36;1mnode <<'NODE'�[0m
 �[36;1mconst fs = require('node:fs');�[0m
 �[36;1mconst https = require('node:https');�[0m
 �[36;1m�[0m
 �[36;1mconst event = JSON.parse(fs.readFileSync(process.env.GITHUB_EVENT_PATH, 'utf8'));�[0m
 �[36;1mconst ***REDACTED_SECRET_ASSIGNMENT***
 �[36;1mconst pr = event.pull_request;�[0m
 �[36;1mconst repository = event.repository.full_name;�[0m
 �[36;1mconst [owner, repo] = repository.split('/');�[0m
 �[36;1mconst text = `${pr.title ?? ''}\n${pr.body ?? ''}`;�[0m
 �[36;1m�[0m
 �[36;1mconst escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');�[0m
 �[36;1mconst numbers = new Set();�[0m
 �[36;1m�[0m
 �[36;1mconst addNumber = (value) => {�[0m
 �[36;1m  const number = Number(value);�[0m
 �[36;1m  if (Number.isSafeInteger(number) && number > 0) {�[0m
 �[36;1m    numbers.add(number);�[0m
 �[36;1m  }�[0m
 �[36;1m};�[0m
 �[36;1m�[0m
 �[36;1mfor (const match of text.matchAll(/(^|[^\w/-])#([1-9]\d*)\b/g)) {�[0m
 �[36;1m  addNumber(match[2]);�[0m
 �[36;1m}�[0m
 �[36;1m�[0m
 �[36;1mfor (const match of text.matchAll(/\bGH-([1-9]\d*)\b/gi)) {�[0m
 �[36;1m  addNumber(match[1]);�[0m
 �[36;1m}�[0m
 �[36;1m�[0m
 �[36;1mconst sameRepo = escapeRegExp(repository);�[0m
 �[36;1mfor (const match of text.matchAll(new RegExp(`\\b${sameRepo}#([1-9]\\d*)\\b`, 'gi'))) {�[0m
 �[36;1m  addNumber(match[1]);�[0m
 �[36;1m}�[0m
 �[36;1m�[0m
 �[36;1mfor (const match of text.matchAll(�[0m
 �[36;1m  new RegExp(`https://github\\.com/${sameRepo}/issues/([1-9]\\d*)\\b`, 'gi'),�[0m
 �[36;1m)) {�[0m
 �[36;1m  addNumber(match[1]);�[0m
 �[36;1m}�[0m
 �[36;1m�[0m
 �[36;1mnumbers.delete(Number(pr.number));�[0m
 �[36;1m�[0m
 �[36;1mconst requestIssue = (number) =>�[0m
 �[36;1m  new Promise((resolve, reject) => {�[0m
 �[36;1m    const request = https.request(�[0m
 �[36;1m      {�[0m
 �[36;1m        hostname: 'api.github.com',�[0m
 �[36;1m        method: 'GET',�[0m
 �[36;1m        path: `/repos/...

GitHub Actions: PR Issue Reference / require-issue-reference: fix!: default checkpointPolicy to { every: 64 }

Conclusion: failure

View job details

##[group]Run set -euo pipefail
 �[36;1mset -euo pipefail�[0m
 �[36;1m�[0m
 �[36;1mnode <<'NODE'�[0m
 �[36;1mconst fs = require('node:fs');�[0m
 �[36;1mconst https = require('node:https');�[0m
 �[36;1m�[0m
 �[36;1mconst event = JSON.parse(fs.readFileSync(process.env.GITHUB_EVENT_PATH, 'utf8'));�[0m
 �[36;1mconst ***REDACTED_SECRET_ASSIGNMENT***
 �[36;1mconst pr = event.pull_request;�[0m
 �[36;1mconst repository = event.repository.full_name;�[0m
 �[36;1mconst [owner, repo] = repository.split('/');�[0m
 �[36;1mconst text = `${pr.title ?? ''}\n${pr.body ?? ''}`;�[0m
 �[36;1m�[0m
 �[36;1mconst escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');�[0m
 �[36;1mconst numbers = new Set();�[0m
 �[36;1m�[0m
 �[36;1mconst addNumber = (value) => {�[0m
 �[36;1m  const number = Number(value);�[0m
 �[36;1m  if (Number.isSafeInteger(number) && number > 0) {�[0m
 �[36;1m    numbers.add(number);�[0m
 �[36;1m  }�[0m
 �[36;1m};�[0m
 �[36;1m�[0m
 �[36;1mfor (const match of text.matchAll(/(^|[^\w/-])#([1-9]\d*)\b/g)) {�[0m
 �[36;1m  addNumber(match[2]);�[0m
 �[36;1m}�[0m
 �[36;1m�[0m
 �[36;1mfor (const match of text.matchAll(/\bGH-([1-9]\d*)\b/gi)) {�[0m
 �[36;1m  addNumber(match[1]);�[0m
 �[36;1m}�[0m
 �[36;1m�[0m
 �[36;1mconst sameRepo = escapeRegExp(repository);�[0m
 �[36;1mfor (const match of text.matchAll(new RegExp(`\\b${sameRepo}#([1-9]\\d*)\\b`, 'gi'))) {�[0m
 �[36;1m  addNumber(match[1]);�[0m
 �[36;1m}�[0m
 �[36;1m�[0m
 �[36;1mfor (const match of text.matchAll(�[0m
 �[36;1m  new RegExp(`https://github\\.com/${sameRepo}/issues/([1-9]\\d*)\\b`, 'gi'),�[0m
 �[36;1m)) {�[0m
 �[36;1m  addNumber(match[1]);�[0m
 �[36;1m}�[0m
 �[36;1m�[0m
 �[36;1mnumbers.delete(Number(pr.number));�[0m
 �[36;1m�[0m
 �[36;1mconst requestIssue = (number) =>�[0m
 �[36;1m  new Promise((resolve, reject) => {�[0m
 �[36;1m    const request = https.request(�[0m
 �[36;1m      {�[0m
 �[36;1m        hostname: 'api.github.com',�[0m
 �[36;1m        method: 'GET',�[0m
 �[36;1m        path: `/repos/...
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{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
  • src/domain/warp/RuntimeHostBoot.ts
  • test/unit/domain/warp/WarpOpenOptions.test.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/domain/warp/RuntimeHostBoot.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/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/RuntimeHostBoot.ts
🧠 Learnings (1)
📚 Learning: 2026-03-08T19:50:17.519Z
Learnt from: flyingrobots
Repo: git-stunts/git-warp PR: 65
File: CHANGELOG.md:88-88
Timestamp: 2026-03-08T19:50:17.519Z
Learning: Follow the Keep a Changelog convention for CHANGELOG.md. Allow duplicate subheadings across versions (e.g., '### Added', '### Fixed'). Configure markdownlint MD024 with {"siblings_only": true} to avoid cross-version false positives.

Applied to files:

  • CHANGELOG.md

Comment thread CHANGELOG.md Outdated
Comment thread src/domain/warp/RuntimeHostBoot.ts Outdated
Comment thread test/unit/domain/WarpGraph.checkpointPolicy.test.ts Outdated
Comment thread test/unit/domain/WarpGraph.checkpointPolicy.test.ts
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Release Preflight

  • package version: 19.0.2
  • 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 v19.0.2. A maintainer who is a JSR @git-stunts scope member must then dispatch the Release workflow manually.

@flyingrobots

Copy link
Copy Markdown
Member Author

Code Lawyer self-audit — newly discovered issues

Full origin/main...HEAD audit found four issues beyond the current CodeRabbit threads.

# Severity Source Location Finding Required outcome
1 P1 Self src/domain/services/controllers/detachedOpen.ts:64; src/domain/services/controllers/ForkController.ts:164 Explicit checkpointPolicy: null is omitted when derivative runtimes open. With this PR's default-on behavior, omission re-enables { every: 64 }; detached reads can regain checkpoint writes and forks do not preserve the caller's opt-out. Pass the normalized policy, including null, through every derivative-open seam and prove both paths deterministically.
2 P1 Self test/unit/domain/WarpGraph.autoCheckpoint.test.ts:248 The existing “no policy” test only proves that ten patches are below the new default. No execution test proves that an omitted policy checkpoints at the exact default threshold. Add an exact-64 default-policy witness plus a direct explicit-null non-checkpoint witness.
3 P2 Self + PR expansion test/unit/domain/WarpGraph.checkpointPolicy.test.ts:71,93,103,118 The touched test contains four banned as any casts. CodeRabbit identified the new opt-out cast, but hot-adoption policy requires the whole touched file to be honest. Replace every cast with direct valid input or a justified @ts-expect-error runtime-boundary probe.
4 P2 Self + PR expansion src/domain/WarpGraph.ts:146; src/domain/services/controllers/detachedOpen.ts:27,40; src/domain/services/controllers/ForkController.ts:52; src/domain/RuntimeHost.ts:213; src/domain/warp/RuntimeHostProduct.ts:146 A value object confined to RuntimeHostBoot.ts leaves the same domain concept represented as structural { every: number } bags across live host seams. Introduce one validated, frozen CheckpointPolicy runtime noun and carry it through every checkpoint-policy domain surface; retain a named boundary config only where raw caller input is accepted.

@codex second opinion requested: please challenge the severity, completeness, and proposed boundaries before merge.

No fixes are included in this comment; the findings will be handled one at a time with RED → GREEN → VERIFY → COMMIT evidence.

@flyingrobots

Copy link
Copy Markdown
Member Author

@codex Second-opinion requested on one additional self-audit finding discovered during the touched-file SSJS scorecard.

Severity File Lines Issue
P2 src/domain/services/controllers/ForkController.ts 128-149 Four as Error assertions violate the no-assertion doctrine. Because the checkpoint-policy refactor must eventually touch this seam, it must graduate these casts rather than carry them forward.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Release Preflight

  • package version: 19.0.2
  • 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 v19.0.2. A maintainer who is a JSR @git-stunts scope member must then dispatch the Release workflow manually.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Release Preflight

  • package version: 19.0.2
  • 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 v19.0.2. A maintainer who is a JSR @git-stunts scope member must then dispatch the Release workflow manually.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Release Preflight

  • package version: 19.0.2
  • 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 v19.0.2. A maintainer who is a JSR @git-stunts scope member must then dispatch the Release workflow manually.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 7, 2026
@flyingrobots

Copy link
Copy Markdown
Member Author

@codex Final-diff second opinion requested on two new self-audit findings introduced during the repair loop.

Severity File Lines Issue
P1 src/domain/warp/RuntimeHostProduct.ts 147 _tryAutoCheckpoint was added to the host-product type solely for a test. This leaks an internal method into the capability surface; prove the 64-patch behavior through public patch/materialize operations and remove it.
P2 src/domain/services/controllers/ForkController.ts 124-150 Assertion cleanup dropped the validator detail from both the public error message and context.originalError. Preserve existing diagnostics with runtime narrowing; style cleanup must not weaken behavior.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Release Preflight

  • package version: 19.0.2
  • 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 v19.0.2. A maintainer who is a JSR @git-stunts scope member must then dispatch the Release workflow manually.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Release Preflight

  • package version: 19.0.2
  • 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 v19.0.2. A maintainer who is a JSR @git-stunts scope member must then dispatch the Release workflow manually.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Release Preflight

  • package version: 19.0.2
  • 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 v19.0.2. A maintainer who is a JSR @git-stunts scope member must then dispatch the Release workflow manually.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Release Preflight

  • package version: 19.0.2
  • 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 v19.0.2. A maintainer who is a JSR @git-stunts scope member must then dispatch the Release workflow manually.

@flyingrobots

Copy link
Copy Markdown
Member Author

Activity Summary

# Severity Source Issue Outcome Commit
1 P1 Self PR lacked a valid live issue contract Created and linked #843 with the required labels and v20.0.0 milestone metadata
2 P1 PR Checkpoint cadence was only a structural shape Added a validated, frozen runtime value and boundary normalization 9d9159487
3 P3 Self Fork validation used avoidable type assertions Removed assertion-driven error handling 0a329496a
4 P1 Self Derivative opens could lose explicit checkpoint opt-out Preserved null through detached and fork construction 5b8b550e7
5 P3 PR Policy tests retained type escape hatches Removed escape hatches and added source-policy witnesses ddd24580d
6 P2 PR Default cadence test accepted any positive value Pinned the public contract to exactly 64 41320f8f4
7 P4 PR Changelog obscured the inclusive threshold Documented checkpointing at reaches-or-exceeds 64 7a66ff865
8 P2 Self Tests exposed a private auto-checkpoint implementation seam Replaced it with public-behavior proof at the 64-patch boundary 802a88e17
9 P1 Self Fork cleanup discarded validation diagnostics and non-Error behavior Preserved exact diagnostic context and non-Error identity 47641765f

Verification

  • Exact head: 47641765f4d45de5421ca4c04a95f09b44caefcb; local and published refs match.
  • Review threads: 4/4 resolved; 0 unresolved.
  • Hosted checks: all green, including Node 22, Bun, Deno, coverage, performance, preflight, link, issue-reference, and every type-firewall job.
  • Local stable suite: 7,136 passed, 2 skipped.
  • Local coverage suite: 7,337 passed, 2 skipped; 92.91% statements, 85.52% branches, 96.26% functions, 92.97% lines.
  • Focused touched-code coverage: CheckpointPolicy.ts 100% across all metrics; changed ForkController validation branches covered.
  • Lint, typecheck, Semgrep, quarantine, generated SDK, and policy hooks: green.
  • Graft structural review: 17 files; no breaking removals.
  • One initial post-suite Vite close-timeout warning did not reproduce with the hanging-process reporter; the diagnostic rerun exited cleanly and identified no retained process.

@codex second-opinion request: please review the exact-head invariants, especially derivative null propagation and preserved fork validation diagnostics.

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.

Default auto-checkpointing to bound replay depth

1 participant