Stamp CoT _flow-tags_ with COT_HOST_ID#14
Open
ampledata wants to merge 1 commit into
Open
Conversation
ais_to_cot re-used gen_cot_xml's default-host-id flow tag, so COT_HOST_ID never reached the CoT _flow-tags_ (it only fed remarks). Generate the flow tag from COT_HOST_ID when set, falling back to pytak's default host id otherwise. Matches the behavior adsbcot adopted upstream. Co-Authored-By: Claude Opus 4.8 (1M context) <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
ais_to_cotbuilt the CoT viapytak.gen_cot_xml()and then grafted thatevent's default
_flow-tags_(which uses pytak'sDEFAULT_HOST_ID=pytak@<hostname>) onto the detail. As a result,COT_HOST_IDnever reachedthe CoT flow tags — it only flowed into the remarks.
This regenerates the flow tag from
COT_HOST_IDwhen set, falling back topytak's default host id otherwise:
pytak-<hostname>-pytak(unchanged, backward compatible)COT_HOST_ID=snstac-pve-docker-aiscot→snstac-pve-docker-aiscot-pytakThis matches the behavior adsbcot already adopted upstream (it passes
flow_tag_host_id=cot_host_idintopytak.cot_detail). Done here as a minimalchange that keeps the current
pytak>=5.4.0pin.Testing
pytest— 14 passed.ais_to_cotoutput: flow tag carriesCOT_HOST_IDwhen set, and isunchanged when unset.
🤖 Generated with Claude Code