You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jacobian has three major code duplication zones that together produce the largest merge conflict surface in the repository, drive inconsistent policy enforcement, and create a maintenance burden far exceeding the duplicated code's value.
Root cause
1. verifier_support.py duplicated 233 times (#885)
233 physical copies of the same 466-line file across benchmark datasets
Only 9 unique content hashes — 194 are byte-identical copies
Drift-prone duplication: Each copy can independently diverge, creating policy inconsistencies
Hand-rolled reimplementations: Duplicating algorithms that maintained backends already provide
Best practices
Single source of truth: One human-edited source deterministically generates task-local runtime copies
Generated artifacts, not committed copies: CI verifies generated output matches source; it does not silently rewrite files
Shared packages: Extract shared code into a package that is vendored or available hermetically inside the build context
Content-addressable evidence: Use content-addressable evidence where the checksum is derived from the evidence itself, not from a pre-computed baseline
Reuse maintained backends: Do not reimplement linear algebra, combinatorics, or graph algorithms when SymPy, NetworkX, or other maintained backends provide them
Recommended architecture
Short-term: Create a sync script that automatically propagates code changes to all verifier_support.py copies
Medium-term: Investigate whether Docker multi-stage builds or build-time ADD <url> can fetch shared verifier code from a content-addressable location
Long-term: Create a benchmark scaffolding tool that generates task directories from a template, stamping the correct verifier_support.py at generation time
For capability helpers: Extract shared validation and conversion logic into domain-owned utility modules with explicit __all__ exports
For reimplemented algorithms: Replace hand-rolled implementations with calls to maintained backends (SymPy, NetworkX, etc.)
Summary
Jacobian has three major code duplication zones that together produce the largest merge conflict surface in the repository, drive inconsistent policy enforcement, and create a maintenance burden far exceeding the duplicated code's value.
Root cause
1.
verifier_support.pyduplicated 233 times (#885)COPY)2. ~30,000 lines of duplicated verifier and spike code (#717)
3. Duplicated capability helper code across domain contracts (#695, #696, #699)
Evidence
verifier_support.pyImpact
verifier_support.pyAnti-patterns
Best practices
Recommended architecture
verifier_support.pycopiesADD <url>can fetch shared verifier code from a content-addressable locationverifier_support.pyat generation time__all__exportsRelated