ELSEIF
Your brief EB
439 stories from 137 feeds 662 clusters Refreshed 8 minutes ago next pull 16:01

DEV TOOLS Signal 498

RealDiff early-preview tool flags runtime behavior changes a PR triggers in unedited files across six languages

RealDiff is an early-preview tool that compares test-time runtime behavior between two Git revisions to surface behavioral changes a source diff misses, with tracers for .NET, Java, Node, Go, Rust, and Python.

WHY IT MATTERS

For engineers, RealDiff targets a gap that source diffs cannot close: catching behavior changes in files the pull request never touched. It spans six language ecosystems via a shared trace contract, but ships with documented limits including structurally unobservable type/class initializers, out-of-scope Node workers, and skipped generators. The project is explicitly marked early preview, so adoption carries the usual risk of new tooling.

Written by elseif from the cluster below · every claim links back to a source

The three things worth knowing

01

RealDiff builds two Git revisions, observes their tests, learns a noise baseline from three base runs, and reports the first changed behavior in each call tree, with findings written to findings.json.

02

Architecture is a thin Rust launcher driving managed orchestration, with per-language tracers (Mono.Cecil for .NET, javaagent+ASM for Java, CJS+ESM+Babel for Node, stable AST rewriting for Go, stable syn rewrite cache for Rust, PEP 669 sys.monitoring for Python) writing to a shared realdiff.trace/1 contract consumed by a streaming Rust matching, noise, frontier, and findings engine.

03

The project is marked early preview and ships with explicit limits: type/class initializers are structurally unobservable on .NET and Java due to initialization locks, Node requires exactly one supported lockfile and skips workers and generators, and Go's dynamic interface/function boundaries and Java's Gradle dynamic source-set configuration are not inferred.

THE READ

What the cluster adds up to.

ORIGINAL ANALYSIS

RealDiff addresses a class of regression that ordinary source review cannot catch: behavior changes in code the pull request did not touch. The included demo makes the case concretely, where a one-line refactor swapping List.Sort (unstable) for OrderBy (stable) in Infrastructure.Collections changed what DiscountEngine.SelectDiscount returned in the unedited Commerce.Pricing project, and 2 of the 3 tests that executed the path did not assert on the change. The tool's working method is to build both revisions, observe their tests, learn a noise baseline from three base runs, then report the first changed behavior in each call tree. That framing turns behavior diffing from a theoretical idea into a runnable verifier with a published worked example.

The architecture is split along a clear boundary: a Rust launcher owns argument routing, repository config loading, and detection, then starts a sibling self-contained managed component for ref resolution, builds, caching, instrumentation, and posting. Per-language tracers are isolated from the analysis engine, which is the point. Each tracer writes to one language-neutral contract (realdiff.trace/1) and a single-pass streaming Rust engine performs matching, noise handling, frontier selection, and findings generation, with results emitted to findings.json and posted to GitHub, Azure DevOps, and MCP. This is the kind of split that lets the team add a new language tracer without rewriting the analyzer, and it is enforced by a documented conformance contract in TRACE-FORMAT.md plus maintained per-language gates that check identical method sets, per-key event counts and entry ordinals, source tripwires, digest proofs, and zero engine divergences from non-empty runs.

Adoption cost is concrete and per-language. The .NET demo needs Git.NET 8 SDK, and PowerShell 7; Java analysis additionally needs a JDK plus the repository's Maven/Gradle wrapper or system tool; Node analysis needs Node.js plus the package manager selected by its lockfile. The included proof script (tools/verify-diff.ps1 with -Mutate -Change sort) creates a temporary proposed-change tree, runs the base twice plus the change once, and asserts that the edited file contributes zero traced members, the frontier is Commerce.Pricing.DiscountEngine.SelectDiscount in an unedited project, two call sites changed without an assertion reacting, five diverged keys collapse to three frontier nodes, and equal-priority selection is deterministic across fresh processes. A broader run (verify-demo-fixtures.ps1) covers sort stability, retry policy, and configuration parsing, so reviewers can validate the toolchain end to end without trusting the headline claims.

The limits are documented in the same language table that lists support, which is the right place for them. On .NET and Java, type/class initializers are structurally unobservable because the hooks run under CLR/JVM initialization locks and can deadlock startup; properties, events, and operators are policy exclusions on .NET; collection shape rules on Java require java.util module access; Gradle source-set inference covers only literal srcDir/srcDirs declarations, and dynamic configuration requires explicit source_roots. Node requires exactly one supported lockfile, leaves workers out of scope, and skips generators and unsupported callables. Go's dynamic interface/function boundaries are listed as a current limit, and the table cuts off before the Rust and Python rows in the provided extract, so their specifics should be confirmed against the repository before adoption. These are real gaps that practitioners should weigh against the workload they want to test.

Status and posture matter here. The repository is explicit about being early preview, and the unified CLI detects projects from conventional root markers across .NET, Maven/Gradle Java, npm/pnpm/Yarn/Bun Node, Go modules, Cargo Rust, and Python 3.12+ repositories. Cross-language consistency is enforced through TRACE-FORMAT.md and the maintained per-language gates rather than left to convention. A maintained public .NET demo pull request with a successful hosted run is referenced as a worked example, which gives reviewers something concrete to reproduce. For teams evaluating it, the practical question is whether the documented limits map to the paths their tests actually exercise, since the tool's value proposition is strongest where test coverage already crosses the boundary between an edited helper and an unedited consumer.

Written by elseif from the cluster below · checked for specifics the sources never contained

THE CLUSTER

Same story, 1 feed.

ORDERED BY FIRST SEEN
github.com via Hacker News Show HN: RealDiff – runtime behavior diffing for pull requests (six languages) Open ↗