Skip to content

ruff_cpp_spo: harvest_pgring example (structure-only harvest of PG-Ring) - #126

Merged
AdaWorldAPI merged 5 commits into
mainfrom
ccr-9f3b8075-74u47l-pgring-harvest
Oct 19, 2026
Merged

AdaWorldAPI merged 5 commits into
mainfrom
ccr-9f3b8075-74u47l-pgring-harvest

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Adds crates/ruff_cpp_spo/examples/harvest_pgring.rs and its [[example]] entry (requires the libclang feature).

The example walks the PG-Ring sources (Gómez-Brandón, Hogan, Navarro, ISWC 2026, arXiv 2608.03840) and writes:

  • the SPO triples of every class, as manifest.ndjson;
  • one summary per source file listing classes, bases, fields and method signatures, plus each function's callees.

PG-Ring is GPL-3.0. The example reads its source only to extract that structure; no code is copied, and the corpus is not vendored. The output feeds the clean-room idea catalogue in lance-graph astral-sh#1600.

Run it with PGRING_SRC, SDSL_INCLUDE and LIBCLANG_PATH set, as shown in the example's header.


Generated by Claude Code

… input for D-ASM-11)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 48f49249-a301-4bff-aa78-d725c40afed0
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

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.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 17, 2026 11:57
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T12:00:30.534855Z abe5d61 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

ℹ️ 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 crates/ruff_cpp_spo/examples/harvest_pgring.rs
Comment thread crates/ruff_cpp_spo/examples/harvest_pgring.rs
Comment thread crates/ruff_cpp_spo/examples/harvest_pgring.rs Outdated
Comment thread crates/ruff_cpp_spo/examples/harvest_pgring.rs Outdated

Copy link
Copy Markdown
Owner Author

CI diagnosis for PR #126 (Rust baseline 1.99 throughout, unchanged):

  • Fixed in 54e3b198: prek / typos was rewriting the intentional recursive MeTTa predicate anc to and in crates/ruff_metta_spo/tests/classify.rs. Added anc = "anc" in _typos.toml, preserving the fixture's semantics.
  • Separate release-packaging issue, still open: cargo publish --workspace --dry-run fails verifying the ruff_graph 0.0.17 tarball. The packaged dependency resolver pulls both ruff_cache/ruff_python_parser/ruff_python_ast 0.0.17 and published 0.0.18 dependencies (via ruff_linter 0.17.1), so trait/types mismatch (E0599 CacheKey, E0277 ParseOptions). See cargo publish dry-run job. This is not caused by the new PG-Ring example and is not a Rust 1.99 compiler regression.
  • The baseline rust-toolchain.toml specifies 1.99.0 and [workspace.package].rust-version = "1.99"; no version downgrade or CI bypass was introduced.

The new CI run is processing. For the publish gate, the sound follow-up is to align internal released crate versions and semver requirements (and prove the packaged tarball resolves only one mutually compatible ABI set). I deliberately did not replace verification with --no-verify or disable the failing check, which would conceal an actual release-readiness problem.

Copy link
Copy Markdown
Owner Author

Follow-up fix for the remaining cargo publish --workspace --dry-run failure:

Commit a768597e updates only root Cargo.toml: ruff and ruff_linter now specify version = "=0.17.0" (retaining their local path). Previously, the 0.17.0 semver caret requirement allowed published ruff_linter 0.17.1 to be resolved inside the packaged ruff_graph 0.0.17, pulling ruff_cache/ruff_python_ast/ruff_python_parser 0.0.18 alongside the local 0.0.17 instances. This is precisely the source of the duplicate-trait CacheKey E0599 and PySourceType/ParseOptions E0277 errors in the logs.

The 0.0.17 dependency requirements and Rust 1.99 toolchain/workspace MSRV remain unchanged. No --no-verify, disabled check or artificial pass. The new CI run is here and still needs to establish successful package verification.

… harvester's attribution

CppFunction gains file, the definition's own location. The walker reports
an inline header function in every translation unit that includes it, and
a text search for its name finds declarations and calls first, so the
harvester attributed functions to the wrong files.

harvest_pgring now:
- attributes functions by that location;
- names an out-of-line method once (Class::method, not Class::Class::method)
  and prints the callee spelling so definitions join their call edges;
- takes a class from a translation unit with parse errors only when no clean
  unit declares it, and lists the classes taken that way;
- states that methods defined inside a class body are signatures only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
@AdaWorldAPI
AdaWorldAPI merged commit ca624d2 into main Oct 19, 2026
36 of 37 checks passed
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.

2 participants