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
{{ message }}
Repository navigation
chronometer: subdirectory scans lose all temporal data — the git gate checks (root/.git).exists() #2976
Chronometer._initialize_history_scan enables git only when (self.root / ".git").exists() (gitgalaxy/metrics/chronometer.py:110). .git only exists at the repository ROOT, so any scan rooted at a subdirectory of a repo — galaxyscope path/to/repo/src, or every keyword-rosetta corpus scan (data/<lang>/) — silently loses the entire temporal pipeline: the mtime fallback fires, a fresh checkout's uniform mtimes trip the TEMPORAL COLLAPSE guard, and every file reads the neutral (stability 50, churn 0). This is why the rosetta corpus reports risk_stability flat 50 and risk_churn 0 in all 46 languages despite the files having real git history (keyword-rosetta bias_data.json, risk_churn.calc: null).
A second latent mismatch bites as soon as the gate is fixed: with cwd=<subdir>, git ls-files emits cwd-relative paths but git log --name-only emits repo-relative paths, so the churn/mtime maps would be keyed differently from both the tracked-files denominator and the scanner's scan-root-relative rel_path (galaxyscope.py:1627, :2363) — every lookup would still miss.
Fix (one layer, chronometer only):
Gate on git -C <root> rev-parse --is-inside-work-tree == true (resolves upward from any subdir; a worktree's .git file pointer passes identically).
Scope the history stream to the subtree and its cwd-relative names: git log --since=1.year --name-only --relative ... -- . — keys then match ls-files and rel_path, and the guards spend their 15s budget on the scanned subtree instead of the whole monorepo's log.
Both changes are no-ops for a scan rooted at the repo root (--relative -- . at root is today's output), so existing root scans, the crucible, and the golden masters are unaffected; non-git temp dirs keep the exact (50, 0) fallback. Corpus effect after the fix: churn/stability read real values in the never-gated commit-age context group (keyword-rosetta side is regen-only).
Activity
fix(chronometer): declare DISABLE_GIT_HISTORY + ruff format (#2976 CI)
fix(chronometer): resolve git history for subdirectory scans (#2977)
docs: rosetta copy — 56 metrics, the secrets expansion proof, tempora…
fix(#2978): run the security lens on inert data formats (#3009)