← All posts
engineering#github#structural-law#game-engines#databases#architecture#hub-persistencearXiv:2604.23639

Why Game Engines Confirm the Law and Databases Deny It

Godot scores r = 0.925. PostgreSQL scores r = -0.120. Both are large, mature, well-maintained open-source codebases. The difference is not code quality — it is governance and commit discipline.

The numbers

From the 18-repository community dataset:

    Game engines and graphics frameworks (avg r ≈ 0.77):
  • godotengine/godot: r = 0.925
  • raysan5/raylib: r = 0.881
  • pixijs/pixijs: r = 0.809
  • blender/blender: r = 0.459
    Databases and infrastructure (avg r ≈ -0.16):
  • postgres/postgres: r = -0.120
  • mysql/mysql-server: r = -0.246
  • nginx/nginx: r = -0.133
  • redis/redis: r = 0.278 (borderline — flat layout)

The gap between categories spans nearly a full point on the r scale. This is not sampling noise.

Why game engines confirm the law

Game engines are organized around deliberate functional subsystems: rendering, physics, scripting, audio, input, scene graph, platform abstraction. Each subsystem lives in its own directory. When a developer works on the physics engine, they touch modules/godot_physics_3d/ and that is where the co-change signal lands. Directory structure predicts co-change because the subsystem boundaries are enforced by architecture and convention.

Godot’s 0.925 is nearly perfect correlation. The 7 universal hubs identified by IRDME are the integration points that every subsystem touches — the scene tree, the object system, the variant type. These files appear as hubs in both the directory layer and the co-change layer simultaneously. The architecture declared in the directory tree matches the architecture revealed by git history.

Why databases deny the law

Database engines implement features that require coordinated changes across multiple internal layers: parser, planner, executor, storage, catalog, replication. A single PostgreSQL feature like logical replication touches src/backend/replication/, src/backend/storage/, src/include/, and contrib/ in the same commit.

This produces a negative r. The files that co-evolve most are not the ones that share a directory — they are the ones that span the execution stack. Directory structure organizes code by type (headers, backend, frontend). The actual change dynamic follows feature boundaries, which cut across that organization vertically.

The negative r is not a defect in PostgreSQL’s codebase. It is an accurate structural description of how relational database development works: every feature is a vertical cut through a horizontal directory layout.

Redis: the flat-repo case

Redis scores r = 0.278, just below the confirmation threshold. Redis has a famously flat layout: nearly everything lives in src/. When directory depth is near zero, the directory_coupling layer loses signal — every file appears co-located with every other. This compresses the correlation artificially. A topology-aware metric that normalizes for flat repos would likely place Redis higher.

What this means for the structural law

The IRDME structural law (arXiv:2604.23639) is not a claim that every codebase will confirm. The pre-registered hypothesis is that hub structure tends to persist across layers when those layers share a common organizing principle. When directory structure reflects genuine module boundaries, co-change follows. When directory structure is a historical artifact that the development process has outgrown, the correlation breaks.

    The game engine vs. database split is the law working correctly in both directions:
  • Godot at 0.925: structure organizes behavior.
  • PostgreSQL at -0.120: behavior has decoupled from structure.

Both results are informative. A negative r is not a failed experiment. It identifies codebases where the declared architecture no longer predicts how the system actually evolves — a signal worth knowing before a migration or a large refactor.

Run your own codebase

The GitHub analyzer is open to any public repository, or any private repository with a personal access token (repo scope). Results are optionally saved to the community page. The current dataset has 18 repos. Add yours.