Skip to content

ci: add smoke dispatch source metadata contract - #324

Merged
c-vigo merged 4 commits into
devfrom
feature/289-source-run-metadata-dispatch
Mar 16, 2026
Merged

c-vigo merged 4 commits into
devfrom
feature/289-source-run-metadata-dispatch

Conversation

@c-vigo

@c-vigo c-vigo commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

Description

Add traceability metadata to candidate repository_dispatch events sent to vig-os/devcontainer-smoke-test, and make the smoke-test receiver summarize source context with backward-compatible parsing. This also documents the dispatch payload contract and future callback direction for publish-candidate.

Type of Change

  • feat -- New feature
  • fix -- Bug fix
  • docs -- Documentation only
  • chore -- Maintenance task (deps, config, etc.)
  • refactor -- Code restructuring (no behavior change)
  • test -- Adding or updating tests
  • ci -- CI/CD pipeline changes
  • build -- Build system or dependency changes
  • revert -- Reverts a previous commit
  • style -- Code style (formatting, whitespace)

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

  • .github/workflows/release.yml
    • Extend candidate dispatch payload with event_type, source_repo, source_workflow, source_run_id, source_run_url, source_sha, and deterministic correlation_id
    • Keep client_payload[tag] as required contract key
  • assets/smoke-test/.github/workflows/repository-dispatch.yml
    • Parse optional source metadata fields and expose them as validate job outputs
    • Derive source_run_url when absent but source_repo and source_run_id are present
    • Write normalized source context to $GITHUB_STEP_SUMMARY
  • tests/bats/just.bats
    • Add regression guards for sender payload keys and receiver summary/fallback behavior
  • docs/RELEASE_CYCLE.md
    • Document required/optional dispatch payload schema, compatibility behavior, and future callback path
  • CHANGELOG.md

Changelog Entry

Changed

  • Smoke-test dispatch payload now carries source run traceability metadata (#289)
    • Candidate release dispatches now include source repo/workflow/run/SHA metadata plus a deterministic correlation_id
    • Smoke-test dispatch receiver logs normalized source context, derives source run URL when possible, and writes it to workflow summary output
    • Release-cycle docs now define required vs optional dispatch payload keys and the future callback contract path for publish-candidate

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

Manual Testing Details

  • npx bats tests/bats/just.bats
  • Verified all 12 BATS tests pass, including new dispatch metadata regression guards

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (edit docs/templates/, then run just docs)
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

No gating callback is implemented in this PR; callback wiring is intentionally documented-only for a follow-up that can report smoke-test completion back to publish-candidate.

Refs: #289

c-vigo added 3 commits March 16, 2026 10:39
Include source repository, workflow, run, sha, and correlation metadata in
candidate repository_dispatch payloads and surface normalized source context in
the smoke-test receiver summary.

Refs: #289
Add BATS assertions that release dispatch payloads keep source metadata fields
and that the smoke-test dispatch workflow keeps source summary/fallback logic.

Refs: #289
Describe required and optional repository_dispatch payload keys, backward
compatibility behavior, and the future correlation-id callback path while
recording the change under Unreleased.

Refs: #289
@c-vigo c-vigo self-assigned this Mar 16, 2026
@c-vigo
c-vigo requested a review from Copilot March 16, 2026 09:43

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.

Pull request overview

Adds a sender/receiver metadata contract for candidate smoke-test repository_dispatch events to improve traceability across repos, while keeping backward compatibility with the existing client_payload.tag requirement.

Changes:

  • Extend release.yml candidate dispatch payload with source run metadata and a correlation_id.
  • Update the smoke-test receiver workflow template to parse/normalize optional metadata (including deriving source_run_url) and write it to the workflow summary.
  • Add BATS regression checks and document the dispatch payload schema + future callback direction.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/release.yml Adds source context fields + correlation_id to the cross-repo repository_dispatch payload for candidate releases.
assets/smoke-test/.github/workflows/repository-dispatch.yml Extracts optional source metadata into outputs, derives run URL when missing, and emits normalized context to $GITHUB_STEP_SUMMARY.
docs/RELEASE_CYCLE.md Documents required vs optional dispatch payload keys, compatibility behavior, and a future callback path.
tests/bats/just.bats Adds static regression checks ensuring sender/receiver include the new metadata and summary hooks.
CHANGELOG.md Adds an Unreleased entry for issue #289 describing the new traceability metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Use the same n/a fallback format for Tag in the source context summary so
failed or missing validate outputs produce consistent diagnostics.

Refs: #289
@c-vigo
c-vigo enabled auto-merge March 16, 2026 09:51
@c-vigo
c-vigo merged commit 2b19bac into dev Mar 16, 2026
12 checks passed
@c-vigo
c-vigo deleted the feature/289-source-run-metadata-dispatch branch March 16, 2026 09:56
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.

2 participants