Skip to content

[codex] add summary envelopes and ghost-surface text matching#490

Open
willwashburn wants to merge 1 commit into
mainfrom
codex/summary-contract-ghost-surface
Open

[codex] add summary envelopes and ghost-surface text matching#490
willwashburn wants to merge 1 commit into
mainfrom
codex/summary-contract-ghost-surface

Conversation

@willwashburn

@willwashburn willwashburn commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Add SDK-owned summary report and time-series envelopes with schema/version, capabilities, normalized window metadata, bucket metadata, and until support.
  • Expose summaryReport(), summaryTimeseries(), and capabilities() through the napi crate and @relayburn/sdk ESM/CJS/type facade.
  • Load matched user text into ghost-surface analysis so Claude/Codex slash-command invocations do not show as unused when they are active.
  • Fix local native binding lookup and strengthen Node conformance coverage for the new envelope APIs.

Validation

  • cargo test --workspace
  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • pnpm --filter @relayburn/sdk build:napi
  • RELAYBURN_SDK_NAPI_BUILT=1 pnpm --filter @relayburn/sdk test
  • pnpm --filter @relayburn/sdk test:bundle
  • pnpm run test
  • git diff --check

Notes

  • Left pre-existing macOS edits in apps/macos/Sources/Burn/BurnApp.swift and BurnLedger.swift unstaged and out of this PR.
  • Left local relay/planning scratch directories untracked and out of this PR.

Review in cubic

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

More reviews will be available in 37 minutes and 37 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ 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 rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c24971d6-ba4d-4550-b223-9398b9cbe44b

📥 Commits

Reviewing files that changed from the base of the PR and between 4c3da37 and f0d3018.

📒 Files selected for processing (19)
  • CHANGELOG.md
  • crates/relayburn-cli/src/commands/summary/mod.rs
  • crates/relayburn-sdk-node/src/lib.rs
  • crates/relayburn-sdk/src/analyze/ghost_surface_inputs.rs
  • crates/relayburn-sdk/src/query_verbs/compare.rs
  • crates/relayburn-sdk/src/query_verbs/hotspots.rs
  • crates/relayburn-sdk/src/query_verbs/mod.rs
  • crates/relayburn-sdk/src/query_verbs/sessions.rs
  • crates/relayburn-sdk/src/query_verbs/summary/compute.rs
  • crates/relayburn-sdk/src/query_verbs/summary/mod.rs
  • crates/relayburn-sdk/src/query_verbs/tests.rs
  • packages/sdk-node/CHANGELOG.md
  • packages/sdk-node/src/binding.cjs
  • packages/sdk-node/src/binding.d.ts
  • packages/sdk-node/src/index.cjs
  • packages/sdk-node/src/index.d.ts
  • packages/sdk-node/src/index.js
  • packages/sdk-node/test/conformance.test.js
  • packages/sdk-node/test/no-onlog.test.js
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/summary-contract-ghost-surface

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.

@willwashburn willwashburn marked this pull request as ready for review June 23, 2026 20:16
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

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

ℹ️ 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".

let records = match handle.inner.query_content(&Query {
session_id: Some(session_id.clone()),
source: Some(source),
since: q.since.clone(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid filtering prompt text by assistant-turn lower bound

When hotspots/ghost-surface is run with a since window that falls between a user slash-command prompt and the assistant turn it triggered, the turn is included by the outer query but this content lookup drops the preceding user ContentRecord because content_passes applies Query.since to content timestamps. That makes active commands like /openspec-apply still appear as ghost surface in recent-window reports; load user text for the selected sessions without the lower bound, or explicitly include the prompt predecessor for each selected turn.

Useful? React with 👍 / 👎.

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