Add after_link_hook and vcon_hook extension points#157
Merged
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
conserver/after_link_hook.py— a no-op hook called after every chain link completes (success or error), with access tovcon_id,link_name, the link module, options, status, error, and parties. Called frommain.pyat both the success and error paths.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}).AUDIT_METAstubs 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.try/exceptso 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