Repository navigation
commit fingerprinting - #326
Merged
Merged
Conversation
Add migration 007 and thread nullable commit_patch_id through repository Agent Trace inserts, preserving existing rows on upgrade and rejecting pre-migration schemas in hook and doctor paths. Add setup, idempotence, and persistence coverage, and document the schema and lifecycle changes. Plan: agent-trace-commit-patch-id (T01) Co-authored-by: SCE <sce@crocoder.dev>
davidabram
added this pull request to stack #327
October 15, 2026 08:52
Agent Trace commit records need a stable patch-equivalence fingerprint independent of commit messages, object IDs, and user Git diff configuration. Add a bounded async Git subprocess pipeline for canonical patch-ID computation, including root, binary, rename-only, empty, merge, SHA-1, and SHA-256 handling with strict output validation and child cleanup. Document the pinned invocation and cover the helper with temporary-repository tests; leave runtime wiring for the next plan task. Plan: agent-trace-commit-patch-id (T02) Co-authored-by: SCE <sce@crocoder.dev>
Persist the best-effort canonical Git patch ID alongside post-commit Agent Trace rows without changing trace JSON. Resolve failures to NULL with a sanitized warning while preserving existing validation and persistence failures, and add coverage for successful, empty, and failed fingerprints. Ref: context/plans/agent-trace-commit-patch-id.md (T03) Co-authored-by: SCE <sce@crocoder.dev>
Preserve each nullable local `commit_patch_id` through the existing `agent_traces` export stream so the Control Plane can associate traces with equivalent patch fingerprints without adding a stream or cursor. Keep raw trace JSON and authoritative server-cursor behavior unchanged, including no replay of acknowledged rows. Completes plan `agent-trace-commit-patch-id`, task T04. The Control Plane receiver must accept and persist `commitPatchId` before release; historical rows remain null and are not backfilled. Co-authored-by: SCE <sce@crocoder.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.