Skip to content

fix: adds config hash label as unique seeding label#81

Merged
gusfcarvalho merged 8 commits into
mainfrom
gc-fix-hash-label-for-agent-evidence
May 8, 2026
Merged

fix: adds config hash label as unique seeding label#81
gusfcarvalho merged 8 commits into
mainfrom
gc-fix-hash-label-for-agent-evidence

Conversation

@gusfcarvalho
Copy link
Copy Markdown
Contributor

@gusfcarvalho gusfcarvalho commented May 8, 2026

The goal of this PR is to ONLY implement the extra label to evidence sent by the agent -- ONLY.

Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copilot AI review requested due to automatic review settings May 8, 2026 10:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a deterministic runtime-configuration hash label (_agent_config_hash) and incorporates it into evidence label sets/UUID seeding to reduce evidence-stream collisions when multiple agents fall back to the same _agent=ccf identity.

Changes:

  • Add _agent_config_hash label to both agent foundational labels and plugin evidence labels, computed as a SHA-256 hash over a normalized runtime configuration subset.
  • Seed agent-run evidence UUIDs from the full foundational label set (now including _agent_config_hash).
  • Seed plugin evidence UUIDs from merged labels at submission time, and add/expand unit tests plus documentation describing the new label.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
runner/result.go Seeds evidence UUIDs from merged labels during evidence creation.
cmd/agent.go Computes _agent_config_hash, adds it to foundational/plugin labels, and uses it for agent evidence UUID seeding.
cmd/agent_test.go Updates label expectations and adds tests for hash stability and UUID/label behavior.
README.md Documents the new _agent_config_hash label and rationale.
docs/configuration.md Documents _agent_config_hash contents and its effect on evidence streams.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread runner/result.go Outdated
Comment thread cmd/agent.go
Comment thread cmd/agent.go
Comment thread README.md
Comment thread docs/configuration.md
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread runner/result.go
Comment thread cmd/agent.go
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Comment thread cmd/agent.go
Comment thread cmd/agent.go
Comment thread runner/result.go Outdated
Comment thread runner/result.go Outdated
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Comment thread cmd/agent.go
Comment thread cmd/agent.go Outdated
Comment thread runner/result.go Outdated
Comment thread cmd/agent.go
@gusfcarvalho gusfcarvalho requested a review from Copilot May 8, 2026 11:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Comment thread cmd/agent.go
Comment thread cmd/agent.go Outdated
Comment thread cmd/agent.go
Comment thread runner/result.go Outdated
Comment thread runner/result.go Outdated
Comment thread cmd/agent.go
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Comment thread README.md Outdated
Comment thread docs/configuration.md Outdated
Comment thread cmd/agent.go
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Comment thread cmd/agent.go
Comment thread docs/configuration.md
Comment thread docs/configuration.md
Comment thread README.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread cmd/agent.go
Comment thread README.md
@gusfcarvalho gusfcarvalho merged commit 4f7826b into main May 8, 2026
7 checks passed
@gusfcarvalho gusfcarvalho deleted the gc-fix-hash-label-for-agent-evidence branch May 8, 2026 11:58
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