feat(post_analysis_to_slack): make details URL a {vcon_id} template#180
Merged
pavanputhra merged 2 commits intoMay 21, 2026
Merged
Conversation
Lets each deployment own the placement and quoting of the vCon uuid,
so the same link can target Hex sheets (quoted query param) or path-
based destinations like our reporting portal. URLs without {vcon_id}
fall back to the legacy ?_vcon_id="<uuid>" suffix so existing configs
keep working unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the post_analysis_to_slack link so the configured “details” URL can be treated as a template, enabling path-based destinations (e.g., portals) while preserving legacy behavior for existing Hex-style configs.
Changes:
- Added
build_details_url()to render details URLs via{vcon_id}substitution, with a legacy fallback that appends?_vcon_id="<uuid>". - Updated the link runtime to use
build_details_url()instead of hard-coding the query suffix. - Added/updated documentation and tests covering the template behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
conserver/links/post_analysis_to_slack/__init__.py |
Introduces build_details_url() and switches run() to use it for constructing the Slack “Details” link. |
conserver/links/post_analysis_to_slack/test_post_analysis_to_slack.py |
Adds unit tests for template substitution and legacy fallback URL rendering. |
conserver/links/post_analysis_to_slack/README.md |
Documents {vcon_id} URL templating and the legacy fallback behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
str.format would raise KeyError/ValueError at runtime if the configured
URL happened to contain any other ``{...}`` segment (or a stray brace).
str.replace only touches the ``{vcon_id}`` token and leaves everything
else alone, so a config typo can't brick the link. No change for either
existing template shape (Hex's quoted query param, the portal's path).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pavanputhra
approved these changes
May 21, 2026
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
?_vcon_id="<uuid>", which works for Hex but not for path-based destinations like our reporting portal.urlconfig option is now a template: if it contains{vcon_id}, the uuid is substituted there — letting each destination own the placement and quoting.{vcon_id}fall back to the legacy?_vcon_id="<uuid>"suffix, so existing Hex configs keep working unchanged.Examples:
Test plan
poetry run python -m pytest conserver/links/post_analysis_to_slack/test_post_analysis_to_slack.py— all 7 tests pass (4 new + 3 existing){vcon_id}template form for the portal rollout🤖 Generated with Claude Code