Skip to content

[codex] Add release-packaged CI analysis action#11

Open
tuannx wants to merge 2 commits into
mainfrom
codex/release-ci-action
Open

[codex] Add release-packaged CI analysis action#11
tuannx wants to merge 2 commits into
mainfrom
codex/release-ci-action

Conversation

@tuannx

@tuannx tuannx commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Package CI analysis helpers under arcade_agent.ci and expose released CLI entry points.
  • Add actions/analyze so consumer repositories can use lemduc/arcade-agent/actions/analyze@v0.1.1 with arcade-agent-version.
  • Update self-dog/reusable/legacy workflows and docs to install released package versions instead of checking out this repo source.

Validation

  • ruby -e 'require "yaml"; %w[actions/analyze/action.yml examples/workflows/arcade-agent-analysis.yml .github/workflows/architecture-analysis-reusable.yml .github/workflows/ci.yml .github/workflows/arch-drift.yml].each { |f| YAML.load_file(f) }; puts "yaml ok"'\n- uv run ruff check src/ tests/\n- uv run pytest --tb=short\n\n## Notes\n- This PR intentionally excludes unrelated local CLAUDE.md, AGENTS.md, and CALL_PREP_DUC_2026-04-24.md changes.\n- External consumers still need the v0.1.1 action tag and matching package release before using the documented snippet.

@tuannx tuannx marked this pull request as ready for review June 8, 2026 15:13
Copilot AI review requested due to automatic review settings June 8, 2026 15:13

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

This PR packages the repository’s CI analysis tooling under arcade_agent.ci, exposes them as released CLI entry points, and adds a distributable composite GitHub Action (actions/analyze) so consumer repos can run architecture analysis by installing arcade-agent from PyPI rather than checking out this repo.

Changes:

  • Add packaged CI CLIs (arcade-self-analysis, arcade-compare-baseline, arcade-log-analysis-summary, arcade-arch-diff) and bump the project version to 0.1.1.
  • Introduce a composite action (actions/analyze/action.yml) plus a standalone copyable workflow example to simplify adoption in external repositories.
  • Update internal workflows/docs/tests to validate the distribution model and to install released packages instead of using pip install -e on a tooling checkout.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/test_tools/test_self_analysis.py Adds regression coverage around self-analysis behavior defaults (helper filtering).
tests/test_github_action_distribution.py Adds distribution/regression tests ensuring workflows/docs use released packages and the composite action API.
src/arcade_agent/ci/run_self_analysis.py New packaged self-analysis CLI with optional helper filtering for self-dogfooding.
src/arcade_agent/ci/log_analysis_summary.py New packaged CLI to print an inline CI log summary from results JSON.
src/arcade_agent/ci/compare_baseline.py New packaged CLI to compare current vs baseline results and generate PR comment + HTML report.
src/arcade_agent/ci/arch_diff.py New packaged CLI for drift detection and optional baseline updates.
src/arcade_agent/ci/__init__.py Defines the arcade_agent.ci package for CI entry points.
scripts/run_self_analysis.py Converts legacy script into a thin wrapper around the packaged CLI.
scripts/log_analysis_summary.py Converts legacy script into a thin wrapper around the packaged CLI.
scripts/compare_baseline.py Converts legacy script into a thin wrapper around the packaged CLI (re-exporting symbols).
scripts/arch_diff.py Converts legacy script into a thin wrapper around the packaged CLI.
README.md Updates CI/CD integration docs to recommend the composite action / standalone template and released installs.
pyproject.toml Bumps version to 0.1.1 and adds new [project.scripts] entry points.
examples/workflows/arcade-agent-analysis.yml Adds a copyable standalone workflow template for consumer repos.
actions/analyze/action.yml Adds the distributable composite action implementing the analysis + baseline + PR comment flow.
.github/workflows/ci.yml Updates self-dogfooding CI to use the reusable workflow with a released package version.
.github/workflows/architecture-analysis-reusable.yml Refactors reusable workflow to install from PyPI and support default-branch baselines and helper filtering.
.github/workflows/arch-drift.yml Updates legacy workflow to use released installs and default-branch behavior.

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

lines.append(f"- **Trend**: {trend}")

# A2A insight
a2a_result = _run_a2a_comparison(baseline, current)
Comment on lines +1243 to +1254
report = build_report_payload(
current,
baseline,
run_url=args.run_url,
baseline_note=args.baseline_note,
)
comment = build_comment(
current,
baseline,
run_url=args.run_url,
baseline_note=args.baseline_note,
)
)
print(f" HTML report → {html_out}")
print("Done.")
from arcade_agent.ci.run_self_analysis import _filter_non_architectural_entities, main
Usage:
python scripts/log_analysis_summary.py results.json
"""
from arcade_agent.ci.log_analysis_summary import main
Comment thread scripts/arch_diff.py
# 6. Print report
report = build_report(current, graph, metrics, smells, drift, baseline)
print(report)
from arcade_agent.ci.arch_diff import build_report, main
Comment on lines +4 to +5
from arcade_agent.ci.compare_baseline import * # noqa: F403
from arcade_agent.ci.compare_baseline import main

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

Copilot reviewed 18 out of 18 changed files in this pull request and generated 6 comments.

Comment on lines +1028 to +1030
# Run A2A comparison via arcade-agent's compare tool
a2a_result = _run_a2a_comparison(baseline, current)

Comment on lines +1158 to +1160
# A2A insight
a2a_result = _run_a2a_comparison(baseline, current)
if a2a_result:
Comment on lines +1281 to +1283
# A2A comparison
a2a_result = _run_a2a_comparison(baseline, current)
if a2a_result:
Comment on lines +1243 to +1254
report = build_report_payload(
current,
baseline,
run_url=args.run_url,
baseline_note=args.baseline_note,
)
comment = build_comment(
current,
baseline,
run_url=args.run_url,
baseline_note=args.baseline_note,
)
)
print(f" HTML report → {html_out}")
print("Done.")
from arcade_agent.ci.run_self_analysis import _filter_non_architectural_entities, main
Comment thread scripts/arch_diff.py
# 6. Print report
report = build_report(current, graph, metrics, smells, drift, baseline)
print(report)
from arcade_agent.ci.arch_diff import build_report, main
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