Skip to content

feat(delphi): Q12 carve-out — pin the cold-tick PCA start to ones in both replay drivers#2655

Draft
jucor wants to merge 1 commit into
spr/edge/7ae9c688from
spr/edge/6b40e1bf
Draft

feat(delphi): Q12 carve-out — pin the cold-tick PCA start to ones in both replay drivers#2655
jucor wants to merge 1 commit into
spr/edge/7ae9c688from
spr/edge/6b40e1bf

Conversation

@jucor

@jucor jucor commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Production Clojure draws an UNSEEDED random PCA start vector on the cold
tick (rand-starting-vec, pca.clj:79-82 — the original author's own
'should really throw a [seeded] random number generator in the equation
here... XXX'); with a small eigengap the fixed 100 power iterations keep
a start-dependent residual (~4e-4 on pc-smallmix-01 step 0), so even two
Clojure runs differ on cold ticks. No deterministic reference exists.

Both replay drivers now pin the cold start to the ONES vector — the
exact value power-iteration already pads new-comment columns with
(pca.clj:46-49 / pca.py _power_iteration) — by seeding the conv with a
single-element [1.0] start that the padding expands to any width
(dev/replay.clj certify-cold-start-pca; polismath/replay/driver.py).
Warm ticks take the real previous comps from tick 2 exactly as before.
Logged per run. CLOJURE_QUIRKS.md Q12.

Battery effect: pc-smallmix-01 and pc-midmix-01 went DIVERGENCE -> MATCH;
pc-revote-01's step 0 cleared (residual from step 1 = split-loop
extraction order on tie-dense 15-comment geometry, diagnosed separately).
14/15 MATCH with the five prodclone extractions in the battery.

commit-id:6b40e1bf


Stack:


⚠️ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.

This was referenced Jul 22, 2026
…both replay drivers

Production Clojure draws an UNSEEDED random PCA start vector on the cold
tick (rand-starting-vec, pca.clj:79-82 — the original author's own
'should really throw a [seeded] random number generator in the equation
here... XXX'); with a small eigengap the fixed 100 power iterations keep
a start-dependent residual (~4e-4 on pc-smallmix-01 step 0), so even two
Clojure runs differ on cold ticks. No deterministic reference exists.

Both replay drivers now pin the cold start to the ONES vector — the
exact value power-iteration already pads new-comment columns with
(pca.clj:46-49 / pca.py _power_iteration) — by seeding the conv with a
single-element [1.0] start that the padding expands to any width
(dev/replay.clj certify-cold-start-pca; polismath/replay/driver.py).
Warm ticks take the real previous comps from tick 2 exactly as before.
Logged per run. CLOJURE_QUIRKS.md Q12.

Battery effect: pc-smallmix-01 and pc-midmix-01 went DIVERGENCE -> MATCH;
pc-revote-01's step 0 cleared (residual from step 1 = split-loop
extraction order on tie-dense 15-comment geometry, diagnosed separately).
14/15 MATCH with the five prodclone extractions in the battery.

commit-id:6b40e1bf
@jucor
jucor force-pushed the spr/edge/6b40e1bf branch from 98091d8 to 63cdd5b Compare July 22, 2026 10:06
@jucor jucor changed the title feat(delphi): Q12 carve-out — pin the cold-tick PCA start to ones in both replay drivers feat(delphi): Q12 carve-out — pin the cold-tick PCA start to ones in … Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/7ae9c688 to edge July 22, 2026 11:21
@jucor jucor changed the title feat(delphi): Q12 carve-out — pin the cold-tick PCA start to ones in … feat(delphi): Q12 carve-out — pin the cold-tick PCA start to ones in both replay drivers Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/7ae9c688 July 22, 2026 11:21
@jucor jucor changed the title feat(delphi): Q12 carve-out — pin the cold-tick PCA start to ones in both replay drivers feat(delphi): Q12 carve-out — pin the cold-tick PCA start to ones in … Jul 24, 2026
@jucor
jucor changed the base branch from spr/edge/7ae9c688 to edge July 24, 2026 06:02
@jucor jucor changed the title feat(delphi): Q12 carve-out — pin the cold-tick PCA start to ones in … feat(delphi): Q12 carve-out — pin the cold-tick PCA start to ones in both replay drivers Jul 24, 2026
@jucor
jucor changed the base branch from edge to spr/edge/7ae9c688 July 24, 2026 06:02
@jucor
jucor requested a review from Copilot July 25, 2026 22:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the replay/certification harness deterministic on the cold tick by forcing the initial PCA power-iteration start vectors to expand to an all-ones vector, matching the padding behavior already used when new comments are appended. This reduces run-to-run divergence between Clojure replays and provides a stable reference point for cross-engine certification.

Changes:

  • Seed the Clojure replay driver’s initial conversation with single-element PCA comps to pin the cold-start power-iteration start vector to ones.
  • Mirror the same cold-start PCA seeding in the Python replay driver by initializing conv.pca before the first recompute.
  • Adjust proj_probe.clj to avoid unconditional auto-run and add a batch-mode probe helper.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
math/dev/replay.clj Seeds replay conv with a deterministic cold-start PCA comps vector for certification.
math/dev/proj_probe.clj Prevents unconditional script auto-run; adds a batch-mode probe that reuses replay helpers.
delphi/polismath/replay/driver.py Pins Python replay cold-start PCA by seeding conv.pca with ones-based comps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread math/dev/proj_probe.clj
Comment on lines +131 to +134
;; Auto-run only when invoked with args (clojure -M dev/proj_probe.clj ...);
;; library-style load-file (batch-probe callers) skips it.
(when (seq *command-line-args*)
(apply -main *command-line-args*))
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.

2 participants