Skip to content

Resync with graphify-py @ 6d3c959 (v0.8.49)#26

Merged
rblaine95 merged 7 commits into
masterfrom
resync/graphify-py/6d3c959
Jun 27, 2026
Merged

Resync with graphify-py @ 6d3c959 (v0.8.49)#26
rblaine95 merged 7 commits into
masterfrom
resync/graphify-py/6d3c959

Conversation

@rblaine95

@rblaine95 rblaine95 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Advances the graphify-py submodule from v0.8.44 (dce54a0) to v0.8.49
(6d3c959) and ports every applicable change into the Rust workspace. Bumps
workspace.package.version to 0.8.49 in lockstep with the submodule pointer.

Ported

New feature — work-memory reflection

  • New graphify-reflect crate + graphify reflect command: aggregates
    graphify-out/memory/ outcomes into a deterministic
    graphify-out/reflections/LESSONS.md (time-decayed scoring, preferred/
    tentative/contested buckets, dead-ends/corrections, community grouping).
  • graphify save-result gains --outcome useful|dead_end|corrected and
    --correction work-memory signals (out-of-set outcome rejected). (#1441)
  • Post-commit / post-checkout hooks refresh LESSONS.md after each rebuild,
    and honour GRAPHIFY_OUT in their scan-root recovery. (#1423, #1441)

Extraction & LLM

  • Resolve Python ClassName.method() calls to the class-qualified node
    across files. (#1446)
  • Route CUDA .cu/.cuh sources through the C++ extractor.
  • Hyperedge guidance + populated schema example in the extraction prompt. (#1418)
  • Parallel community labeling via --max-concurrency / --batch-size on
    label and cluster-only (Ollama/claude-cli pinned to one worker). (#1390)

Install & hooks

  • New agents/skills install platform (cross-framework Agent-Skills →
    ~/.agents/skills/graphify/SKILL.md). (#1432)
  • Hermes Windows %LOCALAPPDATA% skill path. (#1403)
  • Strip backticks from the opencode plugin reminder. (#1413)

Correctness / parity fixes

  • validate: report non-hashable node ids / edge endpoints instead of a
    silent skip. (#1447)
  • build_from_json: relativize hyperedge source_file like nodes/edges. (#1418)
  • export: guard punctuation-only Obsidian/Canvas filenames → unnamed. (#1409)
  • watch: file-aware shrink-guard rebuilt_sources accounting. (#1116)
  • serve: surface the community name in get_community. (#1448)
  • Consolidate GRAPHIFY_OUT resolution into graphify-security and route
    cli/cache/watch/detect/html through it. (#1423)

Dependencies & docs

  • Upgrade dependencies to latest (lopdf 0.42, markdownlint-cli 0.49) and
    refresh Cargo.lock.
  • README/USAGE updated (CLI reference, formats, workspace tree, output schema,
    behavioural callouts); doc-comments updated on changed modules.

Skipped (not applicable to Rust)

  • Per-language extractor split (#1212) and the type-annotation fix (#1402) —
    already present in the Rust extractor.
  • Cargo OSError guard — already handled via CargoIntrospectError::Io.
  • GRAPH_REPORT.md scan-root header / portable manifest.json skill-runbook
    edits — documentation-only / Python-internal.

Verification

  • cargo fmt clean.
  • cargo clippy --all-targets --all-features --workspace warning-free.
  • cargo nextest run --workspace: 2192 passed, 2 skipped (net_ tests).
  • hk check passes.
  • CodeRabbit (--base master --type committed): final review reports
    findings: 0. Two valid findings (default GRAPHIFY_OUT parity tests not
    serialized) fixed in 27aeb6c; six were disputed as false positives that
    mirror graphify-py byte-for-byte (documented in that commit).

New parity tests added across graphify-reflect, graphify-detect,
graphify-export, graphify-extract, graphify-hooks, graphify-ingest,
graphify-llm, graphify-security, graphify-serve, graphify-validate,
and graphify-watch, plus CLI integration tests for reflect, the agents/
skills platform, and the GRAPHIFY_OUT write path.

Summary by CodeRabbit

  • New Features
    • Added graphify reflect to deterministically aggregate memory outcomes into reflections/LESSONS.md with --if-stale, plus --half-life-days and --min-corroboration.
    • Added agents platform installs and skills alias.
    • Added --max-concurrency / --batch-size for community labeling and label, and extended save-result with --outcome / --correction.
  • Bug Fixes
    • Improved CUDA (.cu/.cuh) detection and Python qualified class-method resolution across files.
    • Fixed output-path handling for custom GRAPHIFY_OUT and prevented punctuation-only export filenames.
    • Normalized hyperedges source paths and improved robustness for malformed IDs/endpoints.

Port the v0.8.44..v0.8.49 changes into the Rust workspace and bump the
workspace version to 0.8.49.

- Add the `graphify-reflect` crate and `reflect` command, aggregating
  `graphify-out/memory/` outcomes into a deterministic `LESSONS.md`
- Extend `save-result` with `--outcome`/`--correction` work-memory
  signals (#1441)
- Refresh `LESSONS.md` from the post-commit/post-checkout hooks and
  honour `GRAPHIFY_OUT` in their scan-root recovery (#1423, #1441)
- Resolve Python `ClassName.method()` calls to the class-qualified node
  across files (#1446)
- Route CUDA `.cu`/`.cuh` sources through the C++ extractor
- Parallelise community labeling with `--max-concurrency` and
  `--batch-size` on `label` and `cluster-only` (#1390)
- Add the `agents`/`skills` install platform and the Hermes Windows
  `%LOCALAPPDATA%` skill path (#1432, #1403)
- Strip backticks from the opencode plugin reminder (#1413)
- Relativise hyperedge `source_file` in `build_from_json` (#1418)
- Report non-hashable node ids and edge endpoints in `validate` (#1447)
- Guard punctuation-only Obsidian/Canvas filenames (#1409)
- Add the file-aware shrink-guard `rebuilt_sources` to `watch` (#1116)
- Surface the community name in `serve` `get_community` (#1448)
- Add hyperedge guidance to the extraction prompt (#1418)
- Consolidate `GRAPHIFY_OUT` resolution into `graphify-security` (#1423)
- Upgrade dependencies to latest (`lopdf` 0.42, `markdownlint-cli` 0.49)
  and refresh `Cargo.lock`

Glory to the Omnissiah
Address CodeRabbit review of `99ddc70`.

Fixed (2):
- `parity_sensitive.rs`: add `noise_dir_flags_default_graphify_out`
  to the `graphify_out_env` serial group so it cannot race the
  override test under single-process `cargo test`.
- `graphify-security/tests/parity.rs`: same for
  `validate_graph_path_default_base_discovers_output_dir`, which
  depends on `GRAPHIFY_OUT` being unset.

Disputed as false positives (the Rust mirrors `graphify-py`
byte-for-byte and parity is the bar):
- `aggregate.rs` `record_node` date compare: `reflect.py:304` also
  compares date strings lexicographically (dates are ISO-8601).
- `aggregate.rs` `dedupe_by_question`: `reflect.py:331-342` is
  last-write-wins on oldest-first input, then sorts by (date,
  question) - identical logic.
- `aggregate.rs` `community_out` order: `reflect.py:399-404` builds
  it in `by_community` insertion order; output is deterministic
  because `render_lessons_md` sorts topic keys (`reflect.py:490-492`,
  mirrored in `render.rs`).
- `render.rs` value insertion: `reflect.py:420-462` inserts node
  labels, questions, and corrections raw; escaping would diverge.
- `graphify-reflect/Cargo.toml` `serde_json`: the workspace dep
  already enables `preserve_order` (inherited via `workspace = true`)
  and the crate emits Markdown, not JSON.
- `graphify-llm/tests/parity.rs`: the compact-JSON schema assertions
  intentionally guard byte-stability against the Python prompt;
  normalizing whitespace would weaken the parity check.

Ave Deus Mechanicus
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

More reviews will be available in 35 minutes and 43 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 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 see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f36f9336-3e31-463b-bca0-7efbc9e1b1fe

📥 Commits

Reviewing files that changed from the base of the PR and between 5c1996a and 21b2ea1.

📒 Files selected for processing (1)
  • Cargo.toml
📝 Walkthrough

Walkthrough

This PR adds work-memory reflection, shared output-path resolution, CUDA and Python extraction updates, parallel community labeling, sanitized display names, and new platform install aliases.

Changes

Workspace feature updates

Layer / File(s) Summary
Workspace manifest and docs
Cargo.toml, README.md, USAGE.md, graphify-py, mise.toml
The workspace adds the reflect crate, updates the package version, and revises README and usage text for the new crate and CLI behaviors.
Shared output paths
crates/graphify-security/..., crates/graphify-cache/..., crates/graphify-detect/..., crates/graphify-html/src/callflow/loader.rs, crates/graphify-watch/..., src/cli/mod.rs, tests/cli_commands.rs
The security crate introduces shared output-path helpers, and cache, detect, HTML, watch, and CLI code switch to those helpers.
Work memory reflection
crates/graphify-ingest/..., crates/graphify-reflect/..., src/cli/args.rs, src/cli/dispatch.rs, src/cli/mod.rs, src/cli/reflect.rs, src/cli/save_result.rs, crates/graphify-hooks/src/constants.rs, crates/graphify-hooks/tests/parity.rs, README.md, USAGE.md, tests/cli_commands.rs
The ingest schema, reflect crate, CLI wiring, hooks, docs, and end-to-end tests add deterministic lessons aggregation and refresh flows.
Extraction contract, validation, and CUDA routing
crates/graphify-llm/src/constants.rs, crates/graphify-build/src/build_fn.rs, crates/graphify-validate/src/validate.rs, crates/graphify-extract/src/..., crates/graphify-detect/..., crates/graphify-build/tests/parity.rs, crates/graphify-validate/tests/parity.rs, crates/graphify-llm/tests/parity.rs, README.md, USAGE.md
The extraction prompt emits hyperedges, build and validation handle malformed identifiers, Python member-call resolution crosses files, and CUDA files are classified and routed through the C++ extractor.
Parallel community labeling
crates/graphify-llm/src/labeling.rs, src/cli/args.rs, src/cli/cluster_only.rs, src/cli/dispatch.rs, tests/cli_commands.rs, README.md, USAGE.md, crates/graphify-llm/tests/labeling.rs
Community labeling accepts concurrency and batch-size controls, runs batches in parallel, and the CLI plus tests pass through the new arguments.
Filename fallback and community headers
crates/graphify-export/src/{canvas.rs,obsidian.rs}, crates/graphify-serve/src/tools.rs, crates/graphify-export/tests/parity.rs, crates/graphify-serve/tests/tool_handlers.rs
Exported filenames and community headers now avoid punctuation-only names, and the parity tests check the sanitized outputs.
Platform install aliases and skill destinations
crates/graphify-hooks/src/platform/..., src/cli/install.rs, src/cli/dispatch.rs, src/cli/args.rs, tests/cli_install.rs, crates/graphify-hooks/tests/parity.rs, USAGE.md
Hermes and agents skill destinations are expanded, skills routes to agents, and install/uninstall tests cover the new command paths.

Sequence Diagram(s)

sequenceDiagram
  participant CmdReflect as src/cli/reflect::cmd_reflect
  participant LessonsFresh as graphify_reflect::lessons_fresh
  participant Reflect as graphify_reflect::reflect
  participant Aggregate as graphify_reflect::aggregate_lessons
  participant Render as graphify_reflect::render_lessons_md
  CmdReflect->>LessonsFresh: check output freshness
  CmdReflect->>Reflect: load memory docs and graph inputs
  Reflect->>Aggregate: compute AggResult
  Reflect->>Render: render LESSONS.md
  Reflect-->>CmdReflect: return output path and stats
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~90+ minutes

Possibly related PRs

  • bunkerlab-net/graphify#23: The Python cross-file member-call resolution builds on the same raw-call receiver plumbing updated there.
  • bunkerlab-net/graphify#9: The watch rebuild shrink-guard changes extend the same check_shrink path updated in that PR.
  • bunkerlab-net/graphify#14: Both PRs extend crates/graphify-detect/src/extensions.rs to classify additional file extensions as code.

Poem

I hop through paths with whisker-light care,
and stash bright lessons everywhere.
CUDA twinkles, labels sing,
and LESSONS.md gets its spring.
🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: resyncing with graphify-py at the specified commit and version.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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[bot]

This comment was marked as resolved.

Second CodeRabbit round on the resync branch.

Fixed (4):
- `args.rs`: the `reflect` CLI `--half-life-days` /
  `--min-corroboration` defaults now reference
  `graphify_reflect::DEFAULT_HALF_LIFE_DAYS` and
  `DEFAULT_MIN_CORROBORATION` instead of hardcoded `30.0` / `2`, so the
  CLI and the aggregator stay in sync.
- `graphify-security/tests/parity.rs`: add `EnvGuard::unset` and clear
  any ambient `GRAPHIFY_OUT` in
  `validate_graph_path_default_base_discovers_output_dir`, so default
  discovery is deterministic regardless of the inherited environment.
- `cli_commands.rs`: `env_remove("GRAPHIFY_OUT")` on the `reflect`
  end-to-end and cold-start subprocesses so the `graphify-out/` path
  assertions hold even under an inherited override.
- `labeling.rs`: `#[must_use]` on the pure `label_at_concurrency`
  helper.

Skipped (with reason):
- `memory.rs` correction guard: Python `save_query_result` validates
  only `outcome` against `OUTCOMES` and never gates `correction` on a
  `corrected` outcome (`ingest.py`); adding the guard would diverge
  from the reference.
- `rebuild_pipeline.rs` serial mark: `cargo nextest` isolates each test
  in its own process, no `graphify-watch` test mutates `GRAPHIFY_OUT`,
  and `serial` would not address ambient-env exposure that every
  `graphify-out`-asserting test shares.
- `parity.rs` / `tool_handlers.rs` `expect` to `?`: `AGENTS.md`
  sanctions `#![allow(clippy::expect_used)]` at the top of test files,
  and both files use `.expect("...")` throughout; converting one
  function is churn against the established convention.

By the will of the Machine God
CodeRabbit asked for in-code notes on two findings skipped in the
previous round but left undocumented at the source.

- `memory.rs`: note that `correction` is intentionally accepted with
  any `outcome`, mirroring graphify-py `save_query_result` (only
  `outcome` is validated against `OUTCOMES`); the aggregator ignores
  `correction` for non-`corrected` docs, so no extra guard is added.
- `rebuild_pipeline.rs`: module-level note on why the rebuild tests do
  not isolate `GRAPHIFY_OUT` — `cargo nextest` runs each test in its
  own process, no test in this crate mutates `GRAPHIFY_OUT`, and
  `serial` would not guard against an ambient override.

Comments only; no behaviour change.

Glory to the Omnissiah
The two `expect` -> `?` nitpicks were deliberately skipped but lacked
an in-code rationale (the other skips already carry one).

- `graphify-export/tests/parity.rs`
- `graphify-serve/tests/tool_handlers.rs`

Both now note, beside the file-top `#![allow(clippy::expect_used)]`,
that `.expect(...)` is the AGENTS.md-sanctioned style for test files
and is kept consistent across every crate's `parity.rs`. Comments
only; no behaviour change.

By the will of the Machine God
The `[workspace.dependencies]` table declared three crates that no
member crate references via `workspace = true`:

- `petgraph`: the workspace hand-rolls its own `Graph` plus the
  Louvain/Leiden/centrality algorithms, so it was never pulled in.
- `once_cell`: fully superseded by `std::sync::LazyLock` and
  `OnceLock`, already used across the workspace.
- `idna`: never referenced directly; `url` still pulls it
  transitively.

These were declaration-only and never entered the build graph, so
`Cargo.lock` is unchanged and `cargo build --workspace` stays green.

By the will of the Machine God
@rblaine95 rblaine95 merged commit 5b79e25 into master Jun 27, 2026
4 of 8 checks passed
@rblaine95 rblaine95 deleted the resync/graphify-py/6d3c959 branch June 27, 2026 08:36
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