Skip to content

feat(impact): prototype MergeField change consequence calculus - #122

Merged
CodeWithJuber merged 9 commits into
masterfrom
agent/mergefield-impact-calculus
Aug 10, 2026
Merged

feat(impact): prototype MergeField change consequence calculus#122
CodeWithJuber merged 9 commits into
masterfrom
agent/mergefield-impact-calculus

Conversation

@CodeWithJuber

Copy link
Copy Markdown
Owner

Experiment

Prototype a new change-centric merge-impact algorithm and benchmark it against real ForgeKit history before wiring it into forge impact or forge precommit.

Why this is different from the current blast radius

The current impact engine is intentionally scalar and graph-centric: max-product reverse propagation plus SCC and hazard-aware thresholds. MergeField starts from the semantic meaning of each changed atom and propagates a 7-dimensional consequence vector:

  • runtime
  • contract
  • verification
  • docs
  • config
  • delivery
  • merge

Relations use sparse transfer matrices, so a verified_by relation creates a test obligation while a documented_by relation creates documentation drift without pretending either is a runtime dependency.

For one changed root, max-path propagation prevents cycle inflation. Across independent changed roots, noisy-OR combines evidence so multi-file interactions can be stronger than any one edit.

Real-history probes

  • 98ce7ece: one-file formatting-only test change stays low-risk.
  • d0f11aa: docs renderer/check changes fan out to generated MDX surfaces and the regression test.
  • One-line public API probe on the real src/atlas.js surface reaches its real consumers, test, and docs when those relations are supplied.

Safety boundary

This PR does not replace the existing impact engine yet. It is deliberately an isolated pure module plus tests and research documentation. The next step, only if this survives CI and historical evaluation, is an adapter from existing Forge evidence channels (atlas, docs impact, git diff, test prediction, package/workflow metadata, rank/history) into MergeField.

Validation

  • Local Node 22: 7/7 new tests pass
  • Git blob SHA verification matches local tested bytes
  • Node 20/22 CI
  • Windows/Git Bash suite
  • Biome check
  • Typecheck
  • Docs drift
  • npm pack dry-run

@CodeWithJuber
CodeWithJuber marked this pull request as ready for review August 10, 2026 04:09
@CodeWithJuber
CodeWithJuber merged commit f97571a into master Aug 10, 2026
11 of 12 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.

1 participant