Skip to content

Export workflow source in gh aw list --json output - #77866

Merged
pelikhan merged 2 commits into
mainfrom
pelikhan/list-json-export-source
Nov 14, 2026
Merged

pelikhan merged 2 commits into
mainfrom
pelikhan/list-json-export-source

Conversation

@pelikhan

Copy link
Copy Markdown
Collaborator

Workflows managed from an upstream bundle declare a source: frontmatter entry, but gh aw list --json did not expose it, so tooling could not tell which workflows are upstream-managed without re-parsing each file.

This adds a source field to WorkflowListItem, read from the workflow frontmatter alongside on and labels. It is JSON-only (hidden from the table) and omitted when unset. Remote listings (--repo) only see file names, so source is not populated there.

Adds TestRunListWorkflows_SourceField covering present and absent source.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review November 14, 2026 21:59
Copilot AI adaptive review requested due to automatic review settings November 14, 2026 21:59
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~3 AIC · ⌖ ~2 AIC · ⊞ 6.6K · ◷

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by Ponytail Reviewer for #77866 · codex · routed: gpt61 medium · ~4 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by PR Specification Reviewer for #77866 · copilot · gpt56 · ~2 AIC · ⌖ ~2 AIC · ⊞ 1.6K · ◷

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.5K · ◷

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

Design Decision Gate 🏗️

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 8.6K · ◷

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-11-14T22:02:16Z
review_event: COMMENT
top_themes:
  - test assertions should verify JSON key omission semantics
files_reviewed:
  - pkg/cli/list_workflows_command.go
  - pkg/cli/list_workflows_command_test.go
comment_count: 1
History

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.5K · ◷
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Found one non-blocking test coverage gap: the new absent-source assertion does not verify that the JSON key is omitted rather than present with a null value. The implementation otherwise correctly extracts the string source and keeps it out of table output.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again

Comment thread pkg/cli/list_workflows_command_test.go Resolved
@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-fa82b604-c7a2-49da-bb31-2237891de1ce","parents":[],"payload":{"id":"ldg-8da05420-e3f3-4ce9-add2-e5ae7bc87205","operation":"append","value":{"finding_count":1,"head_sha":"21b09f2654ef642aedfb3daaf0f0b865aec65ffc","outcome":"findings"}},"sha":"sha256:21ba7c122bf822567adb25bc6d412ccde5fc47998d17b5b3c48379e9b6367bc8","timestamp":"2026-11-14T22:05:44.830Z","type":"ledger_append","version":1}
History

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-ff61a2d5-ead8-4b4a-8c0b-9c5de4da38c5","parents":[],"payload":{"id":"ldg-c49f43e4-9d12-45d5-885a-09e46230b917","operation":"append","value":{"finding_count":0,"head_sha":"21b09f2654ef642aedfb3daaf0f0b865aec65ffc","outcome":"aligned"}},"sha":"sha256:4563226d41a71db541995d01de18c43cb5e7cd6d8ebdade2ab69967b1554a684","timestamp":"2026-11-14T22:06:24.621Z","type":"ledger_append","version":1}
History

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported, and the change includes focused tests for exporting present source metadata while omitting absent values.

No open issues 🎉

What changed in this PR

This PR exposes upstream workflow provenance through gh aw list --json by reading the source frontmatter field for local workflows, while omitting it when unset and leaving remote listings unpopulated.

Changes:

  • Added an optional, table-hidden source field to WorkflowListItem.
  • Extracted source from local workflow frontmatter.
  • Added tests covering present and absent source values.
File Description
pkg/​cli/​list_workflows_command.go Adds and populates the optional workflow source metadata field for local JSON listings.
pkg/​cli/​list_workflows_command_test.go Verifies source metadata is exported when present and omitted when absent.

Review effort: Lite (dynamic)

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Skills-Based Review 🧠

Applied /tdd and /codebase-design. The change is small, correct, and well-scoped. go test ./pkg/cli passes and gofmt is clean. Nothing here blocks merge, but there are three items worth addressing.

📋 Key Themes & Highlights

Key Themes

  • Test edge cases: only the absent-source and happy-path string cases are asserted. Non-string and empty values are untested.
  • Table-hidden claim unverified: the test only exercises --json, so console:"-" is not checked.
  • Status parity: gh aw status --json reuses WorkflowListItem but does not populate Source, so the two commands disagree.

Positive Highlights

  • ✅ Reuses the existing frontmatter read path rather than adding a second parser.
  • ✅ omitempty plus the non-string-safe type assertion (source, _ :=) fail closed.
  • ✅ Remote listings are explicitly documented as not populating source.

@copilot please address the review comments above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~3 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again

Comment thread pkg/cli/list_workflows_command.go Resolved
Comment thread pkg/cli/list_workflows_command_test.go Resolved
Comment thread pkg/cli/list_workflows_command_test.go Resolved
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan

Copy link
Copy Markdown
Collaborator Author

Acknowledging the automated reviewer notices (6884846781, 6884847081, 6884847699, 6884847790, 6884849781, 6884851197, 6884910167, 6884917398, 6884925417): these are run-status and comment-memory records with no additional actionable findings. The inline findings from these runs were addressed in 0fb42e7 (shared frontmatter helper so status --json also exports source, plus stronger source omission and table-output tests), so no further code change is needed.

@pelikhan
pelikhan merged commit 0440b8e into main Nov 14, 2026
76 checks passed
@pelikhan
pelikhan deleted the pelikhan/list-json-export-source branch November 14, 2026 22:17
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.3.0

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