Skip to content

Add target lifecycle attribution - #12

Merged
C-Ross merged 4 commits into
mainfrom
c-ross-check-transition-attribution
Sep 1, 2026
Merged

C-Ross merged 4 commits into
mainfrom
c-ross-check-transition-attribution

Conversation

@C-Ross

@C-Ross C-Ross commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Why

Send target ELM lifecycle attribution so service-side metrics can clearly identify customer-initiated operations.

Change

  • 3f048d5 sends initiator: customer and one fresh UUID operation_id for each target create, pause, resume, and abort CLI or TUI action.
  • 3f048d5 uses typed pause/resume/abort request bodies and leaves source/GHES paths unchanged.
  • 3f048d5 adds focused REST, CLI, and workflow coverage for exact metadata and UUID validity/freshness.

Validation

Generated with GitHub Copilot

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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
C-Ross marked this pull request as ready for review September 1, 2026 13:46
@C-Ross
C-Ross requested a review from a team as a code owner September 1, 2026 13:46

@ismith ismith left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@C-Ross
C-Ross merged commit 427ca81 into main Sep 1, 2026
14 checks passed
@C-Ross
C-Ross deleted the c-ross-check-transition-attribution branch September 1, 2026 19:04
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.

3 participants