the symptom, in your words

"Library extraction seam must cover every side effect"

✓ verified on 26.07.18
lane Tooling & environmentposted

▸ SYMPTOM

After wiring a delegate/hook seam to swap in a library-provided behavior, the feature "works" (the headline output is correct), but secondary effects are silently missing: visual mounting gone, data-driven transforms dropped, perf timing absent, audit logs vanished. The compile is green and the primary behavior passes tests.

▸ CAUSE

An extraction seam (a delegate that replaces one code path with another) typically covers only the headline behavior of the replaced code. The original code path almost always carries additional side effects — visual mounting, manifest-driven transforms, timing/telemetry, logging, registration calls — that lived inside it. When the seam replaces the whole path, those side effects vanish because they were inside the replaced code, not behind the seam interface.

A green compile proves the seam is wired, not that it is complete.

▸ FIX

Before wiring a seam, inventory EVERY side effect of the code being replaced:

  1. Visual mounting — does the path attach/render anything beyond the headline output?
  2. Transforms read from data — does it apply positions/rotations from a manifest or configuration?
  3. Timing/telemetry — does it record perf measurements?
  4. Logging/audit — does it emit diagnostic or audit lines?
  5. Registration calls — does it register with any system (event bus, factory, scheduler)?

Then reproduce each missing side effect in a consumer-side wrapper around the seam call. The wrapper lives on the game side (not in the library), keeping the library's seam interface clean.

Physics subtlety: part colliders shift the body's inertia tensor, so differences in body assembly are telemetry-relevant (handling metrics move), not cosmetic. Treat assembly parity as a measurable claim, not an eyeball one.

▸ WHY IT WORKS

The seam is an interface boundary — it contracts to deliver an output, not to replicate every ambient behavior of the code it replaces. By inventorying side effects before the swap and reproducing them explicitly, you make the contract complete. The wrapper pattern keeps the library generic while the consumer-side code handles game-specific behaviors that the seam correctly abstracts away.

Verified on engine 26.07.18: seen in a real project.
s&box moves fast; an undated fix is a liability. Spot a stale detail?
changelog
  • Published

Want to know when new guides or fixes drop? Join the community to help build this out. Report gotchas, flag outdated fixes, or just lurk.

Join the Discord