Skip to content

fix: hash as last agent name#82

Merged
gusfcarvalho merged 3 commits into
mainfrom
gc-fix-hash-as-last-agent-name
May 8, 2026
Merged

fix: hash as last agent name#82
gusfcarvalho merged 3 commits into
mainfrom
gc-fix-hash-as-last-agent-name

Conversation

@gusfcarvalho
Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copilot AI review requested due to automatic review settings May 8, 2026 12:23
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 updates how the agent identifies itself in evidence labels by removing the separate _agent_config_hash label and shifting configuration hashing into the _agent label, with accompanying documentation and test updates.

Changes:

  • Remove _agent_config_hash foundational label usage and associated constant.
  • Update _agent labeling behavior in code and adjust tests to expect the new foundational label set.
  • Refresh README/configuration docs to describe the new labeling approach.

Reviewed changes

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

File Description
README.md Updates documentation for _agent labeling behavior.
docs/configuration.md Updates configuration docs for evidence label semantics and hashing.
cmd/agent.go Removes _agent_config_hash label and changes _agent identity logic.
cmd/agent_test.go Updates tests to reflect the new foundational labels and _agent hashing behavior.

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

Comment thread cmd/agent.go
Comment thread cmd/agent.go
Comment thread README.md Outdated
Comment on lines +66 to +68
The agent sets the `_agent` label to a deterministic SHA-256 hash of the runtime plugin and agent evidence configuration
(using `api.auth.client_id` when available, then `KUBERNETES_POD_NAME` or `KUBERNETES_POD`, and finally the hash).
This prevents multiple unauthenticated agents from writing to the same evidence seed when their configurations differ.
Comment thread docs/configuration.md Outdated
Comment on lines +43 to +45
deterministic SHA-256 hash of the runtime plugin and agent evidence configuration (using `api.auth.client_id` when
available, then `KUBERNETES_POD_NAME` or `KUBERNETES_POD`, and finally the hash). Because evidence UUIDs are seeded from
labels, changing either the agent identity or runtime configuration changes the evidence stream for plugin evidence.
Comment thread docs/configuration.md Outdated
Comment on lines +66 to +69
Agent evidence uses these labels: `_agent`, `tool`, and `type`. The `_agent` label contains a SHA-256 hash of plugin
names, sources, protocol versions, schedules, policies, plugin config, plugin labels, and `agent_evidence` settings
(using `api.auth.client_id` when available, then `KUBERNETES_POD_NAME` or `KUBERNETES_POD`, and finally the hash).
The hash does not include API URL, API auth, or verbosity. The `tool` label is `ccf`; the `type` label is `operations`.
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
@gusfcarvalho gusfcarvalho merged commit 7fee179 into main May 8, 2026
3 checks passed
@gusfcarvalho gusfcarvalho deleted the gc-fix-hash-as-last-agent-name branch May 8, 2026 12:46
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