Add target lifecycle attribution - #12
Merged
Merged
Conversation
Stamp customer initiator metadata and a fresh operation UUID on target create, pause, resume, and abort requests from CLI and TUI workflows. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
All target mutation paths are updated consistently and covered by focused tests.
This review doesn't count toward merge requirements.
Review tier: Balanced
Findings: None
What changed in this PR
Adds customer attribution and unique operation IDs to target migration lifecycle mutations across REST, CLI, and TUI workflows.
Changes:
- Introduces typed transition metadata with fresh UUID generation.
- Sends attribution for target create, pause, resume, and abort actions.
- Adds API, workflow, and CLI coverage for metadata and UUID freshness.
| File | Description |
|---|---|
internal/elmapi/target_migrations.go |
Defines and sends lifecycle attribution. |
internal/elmapi/target_migrations_test.go |
Tests REST payloads and UUID generation. |
internal/workflow/service.go |
Adds attribution to TUI-backed workflows. |
internal/workflow/service_test.go |
Verifies workflow metadata and freshness. |
internal/cmd/target/migration.go |
Adds attribution to CLI mutations. |
internal/cmd/target/migration_test.go |
Tests CLI payloads and fresh IDs. |
go.mod |
Adds the UUID dependency. |
go.sum |
Records UUID dependency checksums. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Use the customer initiator constant directly and generate only the operation ID at each lifecycle invocation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f16596bc-066c-4b27-80d6-6860b9063bab
Construct typed lifecycle request metadata in elmapi while retaining public initiator and operation ID helpers for create requests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f16596bc-066c-4b27-80d6-6860b9063bab
C-Ross
marked this pull request as ready for review
September 1, 2026 13:46
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.
Why
Send target ELM lifecycle attribution so service-side metrics can clearly identify customer-initiated operations.
Change
3f048d5sendsinitiator: customerand one fresh UUIDoperation_idfor each target create, pause, resume, and abort CLI or TUI action.3f048d5uses typed pause/resume/abort request bodies and leaves source/GHES paths unchanged.3f048d5adds focused REST, CLI, and workflow coverage for exact metadata and UUID validity/freshness.Validation
make auditGenerated with GitHub Copilot