Skip to content

Clojure math: cold-tick PCA start is unseeded-random (Q12) — fixed by the Python math cutover #2661

Description

@jucor

On a conversation's first math tick (cold start), the Clojure worker's PCA power iteration begins from an unseeded random start vector (rand-starting-vec, pca.clj:79-82 — the original author's own XXX comment flags it). With a small eigengap, 100 power iterations retain a start-dependent residual: two Clojure runs of the same cold tick differ, and warm-start chaining propagates the difference forward.

Ledgered as Q12 in delphi/docs/CLOJURE_QUIRKS.md. The R1 replay certification had to pin both drivers' cold start to the ones vector to obtain a comparable reference at all.

Resolution: the Python math cutover fixes this. The Python engine's cold-start PCA is deterministic; replays are bit-reproducible (test_driver.py::test_determinism_bit_identical_except_wall_clock; R1 battery pass-pair bit-comparisons, 20/20 MATCH ×4 pairs).

No Clojure-side fix is planned: the component is being replaced.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions