Skip to content

scan: store the activity readings in plain units (commits 365/90 d, days since last change, authors, top-author share) - #8585

Merged
squid-shepherd[bot] merged 2 commits into
mainfrom
sensors/activity-persist
Nov 17, 2026
Merged

squid-shepherd[bot] merged 2 commits into
mainfrom
sensors/activity-persist

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Summary

This changes the scan database (not any report): file_data gets five columns. Every scan of a git checkout now records, per file, in plain units: commits_365d, commits_90d, days_since_last_change, authors_365d, top_author_share_365d (the readings of gitgalaxy activity, wiki 08-27). They come from a new Chronometer pass over the year before HEAD's commit time (never the wall clock), so the same history gives the same numbers on every machine and day. NULL means not measured: no usable history (not git, shallow clone, GITGALAXY_DISABLE_GIT_HISTORY), the pass cut by its cap, or a dormant file the dating pass did not reach. Follows #8575 (the command) and #8566; tracking issue #8534.

Why a new pass instead of reusing the churn pass

The existing pass halts when it has mapped 50% of the files (or 5,000) or after the time budget, so on an active repository (curl: 666 of 699 source files change in a year) its counts are partial; and raw_churn_freq is commits divided by the square root of weeks since the last change, not a count. The new pass has no coverage or time halting and is cut only by a commit count (CHRONOMETER_CONFIG: ACTIVITY_MAX_COMMITS 150,000, past which every reading is NULL rather than partial; ACTIVITY_DATING_MAX_COMMITS 250,000 for files untouched all year). It reads the log a second time: 0.4 s to 1.9 s for the whole Chronometer on curl, libgit2 and redis (full clones). The churn and stability inputs and risk_churn / risk_stability are untouched and stay as deprecated aliases.

Safe for scan output

crucible_check.py: both legs PASS without a re-bless (the pinned-corpus scans set GITGALAXY_DISABLE_GIT_HISTORY, so the columns are NULL there). No report, brief, SARIF or SBOM changes. The keys reach the recorder only when measured, through one helper (SignalProcessor._history_columns) spliced into the four telemetry dicts that already carried change_entropy.

Tests and checks

  • tests/core_engine/test_chronometer_activity.py (6): counts against the HEAD-anchored year of a decade-old repository (3 / 1 / 2 authors / 0.667 / 40.0 days, and a file the year missed dated 765.0 days), as-of mode gives identical readings, a cut window reports nothing rather than a partial count, a cut dating pass leaves only the undated file unmeasured, no readings without usable history.
  • Record-keeper round trip with neighbours unmoved; column list in the families contract; real two-commit scan read back from the database. audit_check clean; chronometer, record-keeper, CLI-contract tests pass (95).
  • Docs: docs/vectors.md no longer claims the history gauges are ablated in every scan (they are neutral only where history is disabled; the v2.12.0 population database has them non-neutral for a large share of files); wiki 02-15, 08-06, 08-10 and 08-27 updated.

Not here (next)

Age since the first commit, lifetime commits and "is the top author still active" need the whole history, not a year; a rename-following variant (the command follows renames, the columns do not); showing the readings in the LLM brief; removing the old gauges.

Type of change

  • Other: scan database (five columns); no parsing change, no report change

Class / Sibling gaps

Class: history readings the scan computes in a non-comparable form or not at all. Handled: five plain readings. Sibling gaps: (1) age, lifetime commits, owner-active (whole-history pass); (2) renames are not followed, so a file moved within the year has its history cut at the move; (3) revisions in .git-blame-ignore-revs are left out, as the churn pass does, so a mass-reformat does not count; (4) the second log read is not shared with the churn pass; (5) brief and gitgalaxy activity still compute their own numbers rather than reading the columns.

Lessons for agents

  • A reading that must not depend on machine speed is bounded by a count, not by the Chronometer's coverage and time guards (ACTIVITY_* keys); and a new optional telemetry key is added only when measured (python-test-traps), so downstream .get gives NULL for "not measured".

🤖 Generated with Claude Code

https://claude.ai/code/session_018srRveGdV73aUiuqkipAic

…90 days, days since last change, authors, top-author share)

file_data gets five columns, from a new complete Chronometer pass over the year before HEAD's commit time: commits_365d, commits_90d,
days_since_last_change, authors_365d, top_author_share_365d. NULL = not measured (no usable history, the pass cut by its commit cap, or a file the
dating pass did not reach). The pass has no coverage or time halting (those make the churn pass partial on active repositories) and is cut only by a commit
count (CHRONOMETER_CONFIG ACTIVITY_MAX_COMMITS, ACTIVITY_DATING_MAX_COMMITS), so the numbers depend on the history and never on machine speed or the day.
risk_churn / risk_stability are untouched and kept as deprecated aliases. docs/vectors.md no longer says the history gauges are ablated in every scan.
Part of #8534.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018srRveGdV73aUiuqkipAic
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 17, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

1 similar comment
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #8585 @ c1c3b88: 2 failed check(s)

== full-suite (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/44172584033/job/134362348120
repro: python -m pytest -q tests
errors:
##[error]Process completed with exit code 1.
log tail:
Commit: 15dbd9ccb5dbf34fae002b6ed1a2670f52df37bc
Build Date: 2026-11-03T17:26:59Z
Worker ID: {5f75f49f-ca35-4fa5-b315-1604a28e1d53}
Region: centralus
Cloud: Azure
##[endgroup]
##[group]Operating System
Ubuntu
26.04.1
LTS
##[endgroup]
##[group]Runner Image
Image: ubuntu-26.04
Version: 20261111.196.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu26/20261111.196/images/ubuntu/Ubuntu2604-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu26%2F20261111.196
##[endgroup]
##[group]GITHUB_TOKEN Permissions
Contents: read
Metadata: read
##[endgroup]
Secret source: Actions
Cache mode: write
Prepare workflow directory
Prepare all required actions
Complete job name: full-suite
##[group]Run echo "full-suite parts: $PARTS (tested-tree skip: $SKIP, suite plan: $PLAN)"
echo "full-suite parts: $PARTS (tested-tree skip: $SKIP, suite plan: $PLAN)"
# #4935: "skipped" is a pass only when the gate proved this tree green on the PR; otherwise it is a failure.
# #6278: or when the suite plan proved the PR changes only prose no test or engine code opens (mode skip).
test "$PARTS" = "success" || { test "$PARTS" = "skipped" && { test "$SKIP" = "true" || test "$PLAN" = "skip"; }; }
shell: /usr/bin/bash -e {0}
env:
PARTS: failure
SKIP:
PLAN: full
##[endgroup]
full-suite parts: failure (tested-tree skip: , suite plan: full)
##[error]Process completed with exit code 1.
Cleaning up orphan processes

== full-suite part 1/3 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/44172584033/job/134355662009
repro: python -m pytest -q tests/tools/test_maven_exe_4939.py::test_no_bare_launcher_argv_in_tests_tools
failing tests: tests/tools/test_maven_exe_4939.py::test_no_bare_launcher_argv_in_tests_tools
errors:
fail-on-cache-miss: false
[--ai-guardrails] [--fail-on-secrets]
[--fail-on-malware]
--fail-on-secrets CI/CD Gate: Fail build if hardcoded secrets are
--fail-on-malware CI/CD Gate: Fail build if ML threat inference flags
CI/CD Gate: Fail build if any file exceeds this risk
CI/CD Gate: fail the build if any file's structural
E AssertionError: assert ['ci_network_inventory.py:40'] == []
tests/tools/test_maven_exe_4939.py:115: AssertionError
FAILED tests/tools/test_maven_exe_4939.py::test_no_bare_launcher_argv_in_tests_tools - AssertionError: assert ['ci_network_inventory.py:40'] == []
##[error]Process completed with exit code 1.
log tail:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
OMP_NUM_THREADS: 1
pythonLocation: /opt/hostedtoolcache/Python/3.12.16/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib
PYTEST_ADDOPTS: --ignore=tests/cobol_mainframe
##[endgroup]
Multiple search paths detected. Calculating the least common ancestor of all paths
The least common ancestor is /home/runner/work/_temp. This will be the root directory of the artifact
With the provided path, there will be 2 files uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-part-1.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 1049561
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 5a9783c8ab4c37e2e7df71de5938bb2ddc9c04fd10d67fc1d03d5508089853a6
Finalizing artifact upload
Artifact test-times-part-1 successfully finalized. Artifact ID 14368917087
Artifact test-times-part-1 has been successfully uploaded! Final size is 1049561 bytes. Artifact ID is 14368917087
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/44172584033/artifacts/14368917087
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.1
Temporarily overriding HOME='/home/runner/work/_temp/27fa8c68-345d-4a3a-a820-d8bdf01155f0' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 17, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #8585 @ c1c3b88: 2 failed check(s)

== full-suite (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/44172584033/job/134362348120
repro: python -m pytest -q tests
errors:
##[error]Process completed with exit code 1.
log tail:
Commit: 15dbd9ccb5dbf34fae002b6ed1a2670f52df37bc
Build Date: 2026-11-03T17:26:59Z
Worker ID: {5f75f49f-ca35-4fa5-b315-1604a28e1d53}
Region: centralus
Cloud: Azure
##[endgroup]
##[group]Operating System
Ubuntu
26.04.1
LTS
##[endgroup]
##[group]Runner Image
Image: ubuntu-26.04
Version: 20261111.196.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu26/20261111.196/images/ubuntu/Ubuntu2604-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu26%2F20261111.196
##[endgroup]
##[group]GITHUB_TOKEN Permissions
Contents: read
Metadata: read
##[endgroup]
Secret source: Actions
Cache mode: write
Prepare workflow directory
Prepare all required actions
Complete job name: full-suite
##[group]Run echo "full-suite parts: $PARTS (tested-tree skip: $SKIP, suite plan: $PLAN)"
echo "full-suite parts: $PARTS (tested-tree skip: $SKIP, suite plan: $PLAN)"
# #4935: "skipped" is a pass only when the gate proved this tree green on the PR; otherwise it is a failure.
# #6278: or when the suite plan proved the PR changes only prose no test or engine code opens (mode skip).
test "$PARTS" = "success" || { test "$PARTS" = "skipped" && { test "$SKIP" = "true" || test "$PLAN" = "skip"; }; }
shell: /usr/bin/bash -e {0}
env:
PARTS: failure
SKIP:
PLAN: full
##[endgroup]
full-suite parts: failure (tested-tree skip: , suite plan: full)
##[error]Process completed with exit code 1.
Cleaning up orphan processes

== full-suite part 1/3 (failure) -- main
https://github.com/squid-protocol/gitgalaxy/actions/runs/44172584033/job/134355662009
repro: fails on main too: fix main (then merge origin/main here)
failing tests: tests/tools/test_maven_exe_4939.py::test_no_bare_launcher_argv_in_tests_tools
errors:
fail-on-cache-miss: false
[--ai-guardrails] [--fail-on-secrets]
[--fail-on-malware]
--fail-on-secrets CI/CD Gate: Fail build if hardcoded secrets are
--fail-on-malware CI/CD Gate: Fail build if ML threat inference flags
CI/CD Gate: Fail build if any file exceeds this risk
CI/CD Gate: fail the build if any file's structural
E AssertionError: assert ['ci_network_inventory.py:40'] == []
tests/tools/test_maven_exe_4939.py:115: AssertionError
FAILED tests/tools/test_maven_exe_4939.py::test_no_bare_launcher_argv_in_tests_tools - AssertionError: assert ['ci_network_inventory.py:40'] == []
##[error]Process completed with exit code 1.
log tail:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
OMP_NUM_THREADS: 1
pythonLocation: /opt/hostedtoolcache/Python/3.12.16/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib
PYTEST_ADDOPTS: --ignore=tests/cobol_mainframe
##[endgroup]
Multiple search paths detected. Calculating the least common ancestor of all paths
The least common ancestor is /home/runner/work/_temp. This will be the root directory of the artifact
With the provided path, there will be 2 files uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-part-1.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 1049561
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 5a9783c8ab4c37e2e7df71de5938bb2ddc9c04fd10d67fc1d03d5508089853a6
Finalizing artifact upload
Artifact test-times-part-1 successfully finalized. Artifact ID 14368917087
Artifact test-times-part-1 has been successfully uploaded! Final size is 1049561 bytes. Artifact ID is 14368917087
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/44172584033/artifacts/14368917087
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.1
Temporarily overriding HOME='/home/runner/work/_temp/27fa8c68-345d-4a3a-a820-d8bdf01155f0' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-shepherd squid-shepherd Bot added shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md and removed shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md labels Nov 17, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 17, 2026 22:32
@squid-shepherd squid-shepherd Bot removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md labels Nov 17, 2026
@squid-shepherd
squid-shepherd Bot merged commit 19f4983 into main Nov 17, 2026
66 checks passed
@squid-shepherd
squid-shepherd Bot deleted the sensors/activity-persist branch November 17, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant