Skip to content

Stamp CoT _flow-tags_ with COT_HOST_ID#14

Open
ampledata wants to merge 1 commit into
mainfrom
flow-tag-host-id
Open

Stamp CoT _flow-tags_ with COT_HOST_ID#14
ampledata wants to merge 1 commit into
mainfrom
flow-tag-host-id

Conversation

@ampledata

Copy link
Copy Markdown
Collaborator

Summary

ais_to_cot built the CoT via pytak.gen_cot_xml() and then grafted that
event's default _flow-tags_ (which uses pytak's DEFAULT_HOST_ID =
pytak@<hostname>) onto the detail. As a result, COT_HOST_ID never reached
the CoT flow tags
— it only flowed into the remarks.

This regenerates the flow tag from COT_HOST_ID when set, falling back to
pytak's default host id otherwise:

  • unset → pytak-<hostname>-pytak (unchanged, backward compatible)
  • COT_HOST_ID=snstac-pve-docker-aiscotsnstac-pve-docker-aiscot-pytak

This matches the behavior adsbcot already adopted upstream (it passes
flow_tag_host_id=cot_host_id into pytak.cot_detail). Done here as a minimal
change that keeps the current pytak>=5.4.0 pin.

Testing

  • pytest — 14 passed.
  • Verified ais_to_cot output: flow tag carries COT_HOST_ID when set, and is
    unchanged when unset.

🤖 Generated with Claude Code

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>
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