Resync with graphify-py @ 6d3c959 (v0.8.49)#26
Conversation
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
|
Warning Review limit reached
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 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. 📝 WalkthroughWalkthroughThis 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. ChangesWorkspace feature updates
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
Estimated code review effort🎯 5 (Critical) | ⏱️ ~90+ minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
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
Advances the
graphify-pysubmodule fromv0.8.44(dce54a0) tov0.8.49(
6d3c959) and ports every applicable change into the Rust workspace. Bumpsworkspace.package.versionto0.8.49in lockstep with the submodule pointer.Ported
New feature — work-memory reflection
graphify-reflectcrate +graphify reflectcommand: aggregatesgraphify-out/memory/outcomes into a deterministicgraphify-out/reflections/LESSONS.md(time-decayed scoring, preferred/tentative/contested buckets, dead-ends/corrections, community grouping).
graphify save-resultgains--outcome useful|dead_end|correctedand--correctionwork-memory signals (out-of-set outcome rejected). (#1441)LESSONS.mdafter each rebuild,and honour
GRAPHIFY_OUTin their scan-root recovery. (#1423, #1441)Extraction & LLM
ClassName.method()calls to the class-qualified nodeacross files. (#1446)
.cu/.cuhsources through the C++ extractor.--max-concurrency/--batch-sizeonlabelandcluster-only(Ollama/claude-cli pinned to one worker). (#1390)Install & hooks
agents/skillsinstall platform (cross-framework Agent-Skills →~/.agents/skills/graphify/SKILL.md). (#1432)%LOCALAPPDATA%skill path. (#1403)Correctness / parity fixes
validate: report non-hashable node ids / edge endpoints instead of asilent skip. (#1447)
build_from_json: relativize hyperedgesource_filelike nodes/edges. (#1418)export: guard punctuation-only Obsidian/Canvas filenames →unnamed. (#1409)watch: file-aware shrink-guardrebuilt_sourcesaccounting. (#1116)serve: surface the community name inget_community. (#1448)GRAPHIFY_OUTresolution intographify-securityand routecli/cache/watch/detect/html through it. (#1423)
Dependencies & docs
lopdf0.42,markdownlint-cli0.49) andrefresh
Cargo.lock.behavioural callouts); doc-comments updated on changed modules.
Skipped (not applicable to Rust)
already present in the Rust extractor.
OSErrorguard — already handled viaCargoIntrospectError::Io.GRAPH_REPORT.mdscan-root header / portablemanifest.jsonskill-runbookedits — documentation-only / Python-internal.
Verification
cargo fmtclean.cargo clippy --all-targets --all-features --workspacewarning-free.cargo nextest run --workspace: 2192 passed, 2 skipped (net_tests).hk checkpasses.--base master --type committed): final review reportsfindings: 0. Two valid findings (defaultGRAPHIFY_OUTparity tests notserialized) fixed in
27aeb6c; six were disputed as false positives thatmirror
graphify-pybyte-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 forreflect, the agents/skills platform, and the
GRAPHIFY_OUTwrite path.Summary by CodeRabbit
graphify reflectto deterministically aggregate memory outcomes intoreflections/LESSONS.mdwith--if-stale, plus--half-life-daysand--min-corroboration.agentsplatform installs andskillsalias.--max-concurrency/--batch-sizefor community labeling andlabel, and extendedsave-resultwith--outcome/--correction..cu/.cuh) detection and Python qualified class-method resolution across files.GRAPHIFY_OUTand prevented punctuation-only export filenames.hyperedgessource paths and improved robustness for malformed IDs/endpoints.