Skip to content

fix(scripts): restore work DAG generation#78

Open
flyingrobots wants to merge 3 commits into
mainfrom
fix/graph-work
Open

fix(scripts): restore work DAG generation#78
flyingrobots wants to merge 3 commits into
mainfrom
fix/graph-work

Conversation

@flyingrobots

Copy link
Copy Markdown
Owner

Summary

Fixes npm run graph:work after the current @git-stunts/git-warp package shape changed. The work DAG generator was importing the package default as WarpGraph, but the default export is now the app facade; syncCoverage() lives on WarpCore.

This PR updates scripts/generate-work-dag.ts to import the named WarpCore export while keeping the existing GitGraphAdapter wiring.

XYPH Tracking

Tracked in XYPH itself by attaching comment:graph-work-fix-20260708 to task:dag-visualization.

Graph patch pushed:

80d4dc9a55bcad5aa635d0a7fcd5876fb2552ef6

Verification

  • npm run graph:work
  • npm run test:local via pre-push hook when pushing fix/graph-work
  • diagram checks via pre-push hook when pushing fix/graph-work
  • npm run test:local via pre-push hook when pushing refs/warp/xyph/writers/agent.antigravity
  • diagram checks via pre-push hook when pushing refs/warp/xyph/writers/agent.antigravity

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 22 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1f164ec1-f5f5-4b18-b8b4-f070b82b9e74

📥 Commits

Reviewing files that changed from the base of the PR and between 402b366 and db01d80.

📒 Files selected for processing (2)
  • scripts/generate-work-dag.ts
  • test/unit/RepositoryHygiene.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/graph-work

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.

Copy link
Copy Markdown
Owner Author

@codex Self-review pass complete. Findings below for confirmation.

Severity File Line Type Finding Recommended mitigation prompt
Low scripts/generate-work-dag.ts 15 Maintainability / naming precision The fix imports WarpCore but aliases it back to WarpGraph. That preserves the obsolete mental model from the broken code path. This script now depends specifically on WarpCore.open(), syncCoverage(), and materialize(), so the symbol should say WarpCore directly. Keeping the stale alias makes future package-surface migrations harder to reason about and invites another default-export/API-shape mistake. Rename the import to WarpCore without aliasing, update InstanceType<typeof WarpGraph> to InstanceType<typeof WarpCore>, update WarpGraph.open(...) to WarpCore.open(...), and keep the local variable name graph unchanged so runtime behavior stays identical.

No Critical, High, or Medium issues found. Functional intent is satisfied: the changed import targets the class that exposes syncCoverage(), which is the method that made npm run graph:work fail before this branch.

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

Copy link
Copy Markdown
Owner Author

@codex Resolved the self-review finding in dbac5eb.

The script now imports WarpCore directly, uses InstanceType<typeof WarpCore>, and calls WarpCore.open(...) without preserving the stale WarpGraph alias.

Verification after the fix:

  • npm run graph:work
  • npm run lint
  • npm run build
  • git diff --check
  • pre-push npm run test:local
  • pre-push diagram checks

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

Copy link
Copy Markdown
Owner Author

@codex New self-audit finding discovered during Code Lawyer pass.

Severity File Line Type Finding Recommended mitigation prompt
P3 Medium scripts/generate-work-dag.ts 366 Type hygiene / incomplete refactor generateWorkMd() still annotates its graph parameter as InstanceType<typeof WarpGraph> after the import was renamed to WarpCore. The stale symbol survives because the script is executed through tsx and the repository build does not type-check this script path deeply enough to catch the unresolved type reference. This leaves rot in the exact code path the PR is cleaning up. Add a deterministic regression test that fails when scripts/generate-work-dag.ts contains the stale WarpGraph symbol, then replace the remaining InstanceType<typeof WarpGraph> with InstanceType<typeof WarpCore>.

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

Copy link
Copy Markdown
Owner Author

@codex Code Lawyer Activity Summary

# Source Severity File Lines Issue Commit Outcome
1 Self P3 Medium scripts/generate-work-dag.ts 366 Stale WarpGraph type reference survived the direct WarpCore rename. db01d80 Resolved with a deterministic repository hygiene regression test plus InstanceType<typeof WarpCore>.

Review-thread discovery:

  • Conversation comments: 5
  • Submitted reviews: 0
  • Review threads: 0
  • Unresolved review threads: 0

Verification for db01d80:

  • RED: npx vitest run test/unit/RepositoryHygiene.test.ts failed on stale WarpGraph reference.
  • GREEN: replaced remaining stale type reference with WarpCore.
  • VERIFY: npx vitest run test/unit/RepositoryHygiene.test.ts passed.
  • VERIFY: npm run graph:work passed.
  • VERIFY: npm run lint passed.
  • VERIFY: npm run build passed.
  • VERIFY: git diff --check passed.
  • PUSH HOOK: npm run test:local passed (123 passed | 1 skipped, 1074 passed | 4 todo).
  • PUSH HOOK: diagram checks passed.

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

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