Skip to content

commit fingerprinting - #326

Merged
davidabram merged 5 commits into
otel-wiringfrom
commit-fingerprint
Oct 16, 2026
Merged

davidabram merged 5 commits into
otel-wiringfrom
commit-fingerprint

Conversation

@davidabram

Copy link
Copy Markdown
Member

No description provided.

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
davidabram added this pull request to stack #327 October 15, 2026 08:52
davidabram and others added 4 commits October 15, 2026 11:03
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>
@davidabram
davidabram merged commit 09be744 into main Oct 16, 2026
11 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.

1 participant