Skip to content

fix: honesty sweep (fail-closed attestation, honest docs, implement straightforward stubs)#3133

Draft
liamcrumm wants to merge 4 commits into
mainfrom
liamcrumm/honesty-sweep-placeholders
Draft

fix: honesty sweep (fail-closed attestation, honest docs, implement straightforward stubs)#3133
liamcrumm wants to merge 4 commits into
mainfrom
liamcrumm/honesty-sweep-placeholders

Conversation

@liamcrumm

@liamcrumm liamcrumm commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Honesty sweep. Closes one fail-open security bug, aligns overclaimed stub
docs with reality, and implements the previously-stubbed capabilities that
were straightforward to complete.

Problem

  1. Fail-open attestation. iatp/attestation.py._verify_signature
    returned True (valid) when cryptography was absent, accepting any
    signature.
  2. Overclaiming stub docs. agent-hypervisor README and a few docs sold
    reserved or stubbed capabilities as shipped features.
  3. Stubbed-but-implementable features. Several methods raised
    NotImplementedError even though the real logic existed nearby or was
    trivial to add.

Changes

Area What changed
agent-os/modules/iatp/iatp/attestation.py _verify_signature fails closed (returns False) when cryptography is unavailable; regression test added
agent-hypervisor/README.md, root README.md, api-reference, mcp-kernel-server README, a2a/iatp docs Stub-status notes; "commitment anchoring" to "in-memory commitment tracking"; honest flag descriptions
agent-mesh/.../governance/_shadow_impl.py Implemented 12 stubbed ShadowMode/CanaryRollout fallback methods + _record_event, ported from canonical agent_sre.delivery.rollout (identical data models)
agent-os/modules/emk/emk/store.py Implemented ChromaDBAdapter.update/delete (metadata-only update to avoid a re-embed); dropped a pre-existing unused json import
agent-os/modules/emk/tests/test_chroma_adapter.py Hermetic regression tests (skip without chromadb; explicit embeddings, no model download)

enable_blockchain_commitment is left in place; it is a reserved
SessionConfig field asserted by the hypervisor conformance spec.

Deliberately NOT implemented (still raise, by design)

  • GovernedRetriever / GovernedQueryEngine async/batch/stream methods
    (agent-rag-governance): raising is a security guard since the
    governance pipeline is synchronous and a passthrough would silently
    bypass ACL/rate-limit/scan/audit.
  • gRPC transport, MCP HTTP invoke, nexus remote-mode DMZ: genuine feature
    work, left unimplemented and labelled as such (no lifecycle wording).

Testing

  • iatp: 25 passed (incl. fail-closed regression)
  • agent-hypervisor: 805 passed, 60 skipped
  • _shadow_impl fallback: direct functional check (match/confidence/rollback/promote)
  • agent-mesh governance: 36 passed
  • emk ChromaDBAdapter: 4 new tests passed (0.94s); 2 pre-existing emk
    failures (version banner, semantic-rule immutability) confirmed unrelated
  • ruff E,F,W clean on all touched files; no-stubs gate passes

…tub docs

Honesty sweep across the Python packages: align overclaiming docs with the
Public Preview stub reality, and fix one real fail-open security bug.

Security fix (agent-os/iatp):
- AttestationValidator._verify_signature returned True (signature valid) when
  the cryptography library was missing, while the README claims Ed25519
  cryptographic proof. That is fail-open: any unsigned or forged attestation
  would be accepted. Verify now fails closed (returns False) without crypto, and
  a regression test (test_verification_fails_closed_without_crypto_library)
  covers it. The iatp README now states cryptography>=42.0.0 is required.

Doc honesty (no behavior change):
- agent-hypervisor README + docs/api-reference: enable_blockchain_commitment is a
  reserved no-op in Public Preview (blockchain anchoring not implemented, stored
  in memory only), not 'commit audit hashes to blockchain'. Added a Public
  Preview status note listing the documented stubs (liability ledger always
  admits, slashing/quarantine record but do not enforce, vouching no bonding,
  no saga replay). Kept the field because conformance spec S17 asserts it.
- Root README: 'commitment anchoring' -> 'in-memory commitment tracking'.
- mcp-kernel-server README: the MCP message adapter is functional but the
  standalone server transport (MCPServer.start) is a Public Preview placeholder.
- a2a_adapter docstring: drop 'All A2A communications are now governed!' next to
  a placeholder start(); note the transport is a preview placeholder.

Verified honest and left as-is: agent-sre has a real replay engine (the feature
matrix claim is accurate), nexus README already discloses placeholder crypto,
and the hypervisor liability stubs are honestly labeled with no contrary doc.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Liam Crumm <liamcrumm@gmail.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation tests agent-hypervisor agent-hypervisor package size/S Small PR (< 50 lines) labels Jun 22, 2026
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
🤖 AI Agent: test-generator — `agent-os/modules/iatp/iatp/attestation.py`

AI-generated review output. Treat it as untrusted analysis and verify before acting.

agent-os/modules/iatp/iatp/attestation.py

  • test_invalid_signature_handling -- Add a test to ensure that invalid signatures are correctly rejected when _CRYPTO_AVAILABLE is True.
  • test_missing_key_behavior -- Validate behavior when the public key is missing or malformed during signature verification.

agent-os/modules/iatp/iatp/tests/test_ed25519_attestation.py

  • test_partial_attestation_data -- Test behavior when attestation data is incomplete or missing required fields.
  • test_edge_case_key_lengths -- Verify handling of edge cases with non-standard or invalid key lengths during signature verification.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
🤖 AI Agent: security-scanner — Security Review

AI-generated review output. Treat it as untrusted analysis and verify before acting.

Security Review

Severity Finding Fix
High _verify_signature previously returned True when the cryptography library was unavailable, allowing forged or unsigned attestations to be accepted. The fix correctly changes the behavior to fail closed (return False) when the library is unavailable. Ensure this change is thoroughly tested and documented.
Medium Placeholder functionality in agent-hypervisor and agent-os modules (e.g., enable_blockchain_commitment, MCPServer.start()) could mislead users into assuming security features are operational when they are not. Ensure all placeholder features are clearly documented as non-functional in both code comments and user-facing documentation, as partially addressed in this PR.

No other security issues found.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
🤖 AI Agent: breaking-change-detector — API Compatibility

AI-generated review output. Treat it as untrusted analysis and verify before acting.

API Compatibility

Severity Change Impact
High _verify_signature in iatp/attestation.py now fails closed (returns False) when the cryptography library is unavailable, instead of returning True. This is a breaking change for any users relying on the previous behavior where the function would return True even if the cryptography library was missing. Such users will now experience different behavior, as unsigned or unverifiable attestations will be rejected.
Low Documentation updates clarify that certain features (e.g., enable_blockchain_commitment) are placeholders or non-functional in the current Public Preview. While the code itself is unchanged, users relying on these features based on prior documentation may need to adjust their expectations or implementations.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
🤖 AI Agent: docs-sync-checker — Docs Sync

AI-generated review output. Treat it as untrusted analysis and verify before acting.

Docs Sync

  • Documentation is in sync.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
🤖 AI Agent: code-reviewer — Action items:

AI-generated review output. Treat it as untrusted analysis and verify before acting.

TL;DR: 1 blocker, 0 warnings. The PR addresses a critical security issue but requires further clarification on the fail-closed behavior.

# Sev Issue Where
1 High The fail-closed behavior for _verify_signature when cryptography is unavailable needs clearer documentation. agent-os/modules/iatp/iatp/attestation.py, agent-os/modules/iatp/README.md

Action items:

  1. Clarify in the code comments and README that the fail-closed behavior for _verify_signature applies to all cases where the cryptography library is unavailable, and explicitly state the implications for users relying on attestation verification.

No warnings.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

PR Review Summary

Check Status Details
🔍 Code Review ⚠️ Missing No current-run comment
🛡️ Security Scan ⚠️ Missing No current-run comment
🔄 Breaking Changes ⚠️ Missing No current-run comment
📝 Docs Sync ⚠️ Missing No current-run comment
🧪 Test Coverage ⚠️ Missing No current-run comment

Verdict: ⚠️ AI review incomplete; ready for human review

AI review comments are untrusted advisory output. The summary reports workflow-generated completion status only, not model-authored pass/fail claims.

cspell flags the alpha hex literal 'aabbccdd' on the changed line; use
digit-only hex (test value is arbitrary).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Liam Crumm <liamcrumm@gmail.com>
@liamcrumm liamcrumm marked this pull request as draft June 22, 2026 23:15
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file agent-mesh agent-mesh package agent-sre agent-sre package security Security-related issues integration/copilot-governance integration/adk-agentmesh integration/mastra-agentmesh scripts/ci/cd size/XL Extra large PR (500+ lines) and removed size/S Small PR (< 50 lines) labels Jun 22, 2026
@liamcrumm liamcrumm changed the title fix(iatp): fail closed on attestation verify without crypto; align stub docs with reality fix: honesty sweep for fail-closed attestation, honest stub docs, lifecycle wording Jun 22, 2026
@github-actions

Copy link
Copy Markdown

📦 Dependency diff (SBOM)

Comparing mainliamcrumm/honesty-sweep-placeholders.

✅ No dependency changes detected.

@liamcrumm liamcrumm force-pushed the liamcrumm/honesty-sweep-placeholders branch from 8c63d08 to 0214688 Compare June 22, 2026 23:33
@liamcrumm liamcrumm changed the title fix: honesty sweep for fail-closed attestation, honest stub docs, lifecycle wording fix(iatp): fail closed on attestation verify without crypto; align stub docs with reality Jun 22, 2026
@github-actions github-actions Bot added size/S Small PR (< 50 lines) and removed dependencies Pull requests that update a dependency file agent-mesh agent-mesh package agent-sre agent-sre package security Security-related issues integration/copilot-governance integration/adk-agentmesh integration/mastra-agentmesh scripts/ci/cd size/XL Extra large PR (500+ lines) labels Jun 22, 2026
liamcrumm and others added 2 commits June 22, 2026 23:49
The standalone _shadow_impl fallback (used by agentmesh.governance.shadow
when agent_sre is not installed) left 12 ShadowMode and CanaryRollout
methods raising NotImplementedError, so any deployment without agent_sre
lost shadow comparison and canary rollout entirely.

Port the real implementations from the canonical agent_sre.delivery.rollout
(set_similarity_function, compare, is_passing, finish; start, advance,
check_rollback, analyze_step, rollback, pause, resume, promote) plus the
missing _record_event helper. The two files already share identical data
models, so the bodies port verbatim. Verified the fallback end to end:
match detection, confidence scoring, rollback to rolled_back, and promote
to complete.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Liam Crumm <liamcrumm@gmail.com>
ChromaDBAdapter inherited the VectorStoreAdapter base defaults for update
and delete, which raise NotImplementedError, so the ChromaDB-backed
episodic store silently could not update or remove episodes (FileAdapter
already implements both).

Implement both using the ChromaDB collection API, returning False when the
id is absent to match FileAdapter semantics. update writes metadata only
(get_by_id and retrieve reconstruct episodes from metadata, not the
document), which avoids forcing a re-embed when no embedding is supplied.
Add hermetic regression tests that skip when chromadb is absent and pass
explicit embeddings so no model download is triggered. Also drop a
pre-existing unused json import flagged by ruff F401 on the touched file.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Liam Crumm <liamcrumm@gmail.com>
@github-actions github-actions Bot added the agent-mesh agent-mesh package label Jun 22, 2026
@liamcrumm liamcrumm changed the title fix(iatp): fail closed on attestation verify without crypto; align stub docs with reality fix: honesty sweep (fail-closed attestation, honest docs, implement straightforward stubs) Jun 22, 2026
@github-actions github-actions Bot added size/L Large PR (< 500 lines) and removed size/S Small PR (< 50 lines) labels Jun 22, 2026
adapter = _adapter(tmp_path)
eid = adapter.store(_episode(), embedding=np.zeros(8, dtype=np.float32))

assert adapter.delete(eid) is True

def test_delete_missing_returns_false(tmp_path):
adapter = _adapter(tmp_path)
assert adapter.delete("does-not-exist") is False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-hypervisor agent-hypervisor package agent-mesh agent-mesh package documentation Improvements or additions to documentation size/L Large PR (< 500 lines) tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant