Skip to content

Add after_link_hook and vcon_hook extension points#157

Merged
pavanputhra merged 3 commits into
mainfrom
pavankumar/con-511-audit-hook
May 8, 2026
Merged

Add after_link_hook and vcon_hook extension points#157
pavanputhra merged 3 commits into
mainfrom
pavankumar/con-511-audit-hook

Conversation

@pavanputhra
Copy link
Copy Markdown
Contributor

Summary

  • Adds conserver/after_link_hook.py — a no-op hook called after every chain link completes (success or error), with access to vcon_id, link_name, the link module, options, status, error, and parties. Called from main.py at both the success and error paths.
  • Adds api/vcon_hook.py — a no-op hook called after a vCon is created (POST /vcon, POST /vcon/external-ingress) or deleted (DELETE /vcon/{uuid}).
  • Adds AUDIT_META stubs to 11 built-in link modules — a dict that downstream hook implementations can read for service name, data type, and transformation metadata without hardcoding it per-link.
  • All hook call sites are wrapped in try/except so hook errors never affect API responses or chain execution.

Both files are designed to be replaced at Docker build time by downstream images.

🤖 Generated with Claude Code

pavanputhra and others added 3 commits May 8, 2026 16:08
- conserver/after_link_hook.py: no-op called after every chain link
  (success or error). main.py calls it with vcon_id, link_name, module,
  options, status, error, and parties extracted from the vCon.
- api/vcon_hook.py: no-op called after vCon create (POST /vcon,
  POST /vcon/external-ingress) and delete (DELETE /vcon/{uuid}).
- AUDIT_META stubs added to 11 built-in link modules so downstream
  implementations can read service/data-type/transformation metadata
  without hardcoding it per-link.
- All call sites wrapped in try/except so hook errors never affect
  API responses or chain execution.

Both files are designed to be replaced at Docker build time by
downstream images.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
opentelemetry-bootstrap -a install fails when auto-detected packages
(e.g. opentelemetry-util-genai, opentelemetry-instrumentation-openai-v2)
require a newer opentelemetry-api version than the one locked in
uv.lock. The conflict is in transitive deps, not in packages we install
directly. Adding || true lets the build succeed; instrumentation for
packages that resolved cleanly continues to work.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Same fix as Dockerfile.api and Dockerfile.conserver — the combined
dev/CI image also uses opentelemetry-bootstrap which fails on version
conflicts between auto-detected packages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pavanputhra pavanputhra merged commit 71bdabd into main May 8, 2026
1 check 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