Skip to content

refactor: align ObservedGraphProjection query paths with git-warp StateReader#66

Merged
flyingrobots merged 6 commits into
mainfrom
cycle/snapshot-invariant-violation
Jun 21, 2026
Merged

refactor: align ObservedGraphProjection query paths with git-warp StateReader#66
flyingrobots merged 6 commits into
mainfrom
cycle/snapshot-invariant-violation

Conversation

@flyingrobots

Copy link
Copy Markdown
Owner

Resolves duplication of CRDT state reconstruction in XYPH by migrating fetchSnapshot and fetchEntityDetail to git-warp's official createStateReader and scopeMaterializedState APIs.

@flyingrobots

Copy link
Copy Markdown
Owner Author

Self-Code Review Findings

I have performed a strict, pedantic self-code review on the changes introduced in this branch against origin/main.

File Severity Infraction Resolution Status
src/infrastructure/ObservedGraphProjection.ts Warning Duplicated and excessively long duck-typing condition checking for nodeAlive in UnifiedStateReader.create and fetchEntityDetail. Resolved: Extracted code to a clean helper function isRealWarpState(state) and refactored both callers.
design/cycles/0028-snapshot-invariant-violation.md Style Nit Inconsistent header capitalization (Sentence Case mixed with Title Case) and trailing colons on header elements. Resolved: Standardized all headings to Title Case and removed colons.

The working tree is completely clean, and all 1,006 unit/integration/acceptance tests pass successfully.

cc @codex - Please review and confirm.

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

More reviews will be available in 16 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

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 credits.

🚦 How do rate limits work?

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

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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 99a40a4b-ddd0-4016-8a67-67e8097abf95

📥 Commits

Reviewing files that changed from the base of the PR and between da070d8 and 328d07d.

⛔ Files ignored due to path filters (2)
  • docs/diagrams/docs-structure.svg is excluded by !**/*.svg
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (11)
  • CONTRIBUTING.md
  • README.md
  • design/cycles/0028-snapshot-invariant-violation.md
  • design/cycles/README.md
  • docs/diagrams/docs-structure.mmd
  • docs/diagrams/docs-structure.mmd.sha256
  • package.json
  • src/domain/services/ControlPlaneService.ts
  • src/infrastructure/ObservedGraphProjection.ts
  • src/infrastructure/adapters/WarpObservationAdapter.ts
  • src/infrastructure/adapters/WorldlineObservedProjectionAdapter.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cycle/snapshot-invariant-violation

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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85999f5171

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/infrastructure/ObservedGraphProjection.ts
Comment thread src/infrastructure/ObservedGraphProjection.ts
Comment thread src/infrastructure/ObservedGraphProjection.ts
Comment thread src/infrastructure/ObservedGraphProjection.ts Outdated
…o preserve worldline coordinates and aperture semantics in ObservedGraphProjection
@flyingrobots

Copy link
Copy Markdown
Owner Author

⚖️ Code Lawyer Audit & Closure Report

All review comments and lint issues resolved. Summary of actions taken:

Issue Severity File Commit SHA Outcome
Preserve observed worldline state in StateReader path P1 Critical src/infrastructure/ObservedGraphProjection.ts 02ae7b4 Bypassed state snapshots on non-live projection graphs, routing to direct handle queries
Preserve full observer aperture semantics P1 Critical src/infrastructure/ObservedGraphProjection.ts 02ae7b4 Bypassed snapshot scoping on observer-backed sessions to honor original apertures
Guard non-match observer lenses before prefix scoping P2 Major src/infrastructure/ObservedGraphProjection.ts 02ae7b4 Guarded prefix matching to verify lens.match exists before scoping
Fall back for nodes outside the preload cache P2 Major src/infrastructure/ObservedGraphProjection.ts 02ae7b4 Added fallback logic to query underlying graph on preload cache misses
Replace inline mermaid in CONTRIBUTING.md P2 Major CONTRIBUTING.md 065a2eb5 Extracted and pre-rendered SVG/SHA-256 assets to satisfy pre-push hook

No additional structural defects or non-deterministic behaviors were found during the deep self-audit.

@flyingrobots

Copy link
Copy Markdown
Owner Author

⚖️ Code Lawyer Audit & Closure Report

Self-Code Review completed. Here are the findings of the audit:

Issue Severity File Commit SHA Outcome
ObservedGraphProjection Refactoring Informational src/infrastructure/ObservedGraphProjection.ts 02ae7b4 Refactored to align with git-warp StateReader; passes all tests and preserves worldline coordinates
CONTRIBUTING.md Inline Diagram Informational CONTRIBUTING.md 065a2eb5 Replaced inline diagram with pre-rendered SVG/SHA-256 sidecars
Tar Package Override Upgraded Informational package.json 328d07d6 Upgraded to 7.5.16 to clear production dependency vulnerability checks

Total Findings: 0 critical, 0 major, 0 minor, 3 informational.

@codex please confirm if you agree with this clean review result.

@flyingrobots flyingrobots merged commit ea45a12 into main Jun 21, 2026
9 checks passed
@flyingrobots flyingrobots deleted the cycle/snapshot-invariant-violation branch June 21, 2026 13:33
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 328d07d18e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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