Skip to content

fix(sessions): distinguish produced and observed commits#369

Merged
ScriptedAlchemy merged 1 commit into
masterfrom
codex/session-attribution-v2
Jul 9, 2026
Merged

fix(sessions): distinguish produced and observed commits#369
ScriptedAlchemy merged 1 commit into
masterfrom
codex/session-attribution-v2

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Adds transactional git-correlation schema migration, explicit produced versus observed commit evidence, direct host commit attribution, and truthful MCP/session filtering. Root cause: overlap-based correlation was presented as authorship. Validated with focused correlation, host-event, MCP, and backfill tests plus formatting and structured diagnostics.

@changeset-bot

changeset-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 92515d5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy ScriptedAlchemy merged commit 25a376e into master Jul 9, 2026
12 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 92515d5383

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

let mut sql = "SELECT provider, session_id, branch, worktree,
commit_sha, committed_at, span_overlap_kind
commit_sha, committed_at, span_overlap_kind,
relation, evidence, confidence, evidence_message_id

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guard commit reads against pre-v3 read-only stores

When tracedecay_sessions_for runs through MCP it opens sessions.db read-only, so an existing v2 store is not migrated before this query runs. In that case commit_sessions exists but does not have the newly added relation/evidence columns, and commit lookups fail with no such column instead of returning a graceful empty/legacy result until the next writable sync migrates the DB. Please detect the v3 schema/columns on the read path (or avoid selecting these columns unless present).

Useful? React with 👍 / 👎.

}
matches!(
subcommand,
Some("commit" | "cherry-pick" | "revert" | "merge")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid treating fast-forward merges as produced commits

For successful commands such as git merge --ff-only origin/main && git rev-parse HEAD, this classifies the segment as commit-producing and then records the reported HEAD as direct produced evidence, even though a fast-forward merge only moves the branch to an existing commit made elsewhere. That reintroduces false authorship for merge/abort/no-op merge flows that report HEAD after the command; only merge commands that actually create a merge commit should feed produced candidates.

Useful? React with 👍 / 👎.

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