Skip to content

Fix created/last updated dates picked up by the walker - #31

Merged
rumblefrog merged 1 commit into
masterfrom
claude/eager-fermat-2rzp0a
Sep 25, 2026
Merged

rumblefrog merged 1 commit into
masterfrom
claude/eager-fermat-2rzp0a

Conversation

@rumblefrog

Copy link
Copy Markdown
Member

Symbol created / last_updated metadata was wrong in several ways. Some bugs were in libwalker, others in how chumbucket merged symbols.

libwalker

  • Root commit skipped. Only commits with exactly one parent were diffed, so anything in the initial commit was first "created" at its next modification. The root commit is now diffed against an empty tree.
  • Merges skipped, side branches interleaved. The walk visited every commit sorted by committer time and skipped merges. Side-branch commits were applied between mainline commits that didn't contain them, so symbols were added, then "deleted", and dated wrong, and anything that only landed via a merge was never seen at that point. The walk now follows first-parent history and diffs merges against their first parent, so a symbol is dated when it landed on the branch.
  • Incremental resume by time. It now resumes from the bundle's last commit hash, falling back to committer time if that commit isn't in the history.
  • count was the 0-based index in a time-sorted walk. It is now the real git rev-list --count for that commit, which is the SourceMod build number.
  • An unreadable entry (for example a submodule) or a commit with no readable blobs used to end the walk silently. Those are now skipped.

chumbucket / schema

  • The <<= operator on methodmaps, enum structs, enums and typesets replaced their nested members wholesale. So whenever a container changed, every method, property, field, entry or type was reset to created = last_updated = current commit. Nested members are now merged individually, keeping their metadata.
  • Entries without metadata now get it even when they differ. Additions and removals count as diffs again, so a commit that only adds or removes symbols writes the bundle.

Verification

  • New libwalker/tests/history.rs builds a repo with a root commit, a merge with an out-of-order side branch, and a checkpoint. It checks the commits, paths, contents and rev-list counts. Added it to CI.
  • End-to-end run of chumbucket on a synthetic repo, full and incremental (with -b). Metadata was correct for top-level and methodmap members. The old binary misdated the root-commit symbols and took "last updated" from an unmerged side commit.
  • Full SourceMod run (7457 commits, about 5s in release): GetClientAuthId is created at a7cdf17 (the PR #147 merge, count 4830), and the head count is 7457. Both match git log --first-parent -S and git rev-list --count.

Existing bundles hold the old dates and counts, so they should be regenerated from scratch (without -b).

🤖 Generated with Claude Code

https://claude.ai/code/session_01UmDZ8MBYNvgeQ52tpsJe3t


Generated by Claude Code

libwalker:
- Include the root commit (diffed against an empty tree); files added in
  it were previously first seen at their next modification
- Walk first-parent history instead of all commits sorted by time, and
  diff merges against their first parent. Merges were skipped entirely,
  and side-branch commits were interleaved with mainline commits, so their
  contents got applied and then reverted, producing wrong dates
- Resume from the bundle's last commit hash rather than committer time,
  falling back to time if the commit is not in the history
- Compute count as the real rev-list count (was the 0-based index in a
  time-sorted walk)
- Skip unreadable entries instead of silently ending the walk

chumbucket / schema:
- Container symbols (methodmaps, enum structs, enums, typesets) no longer
  replace their nested members on change, which reset every member's
  created/last updated to the current commit
- Set metadata on entries that lack it even when they differ, and count
  additions/removals as diffs so those bundles get written

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UmDZ8MBYNvgeQ52tpsJe3t
@rumblefrog
rumblefrog merged commit 3ce478e into master Sep 25, 2026
6 checks passed
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