feat(ci): enrich architecture drift report with actionable details#30
Open
tuannx wants to merge 2 commits into
Open
feat(ci): enrich architecture drift report with actionable details#30tuannx wants to merge 2 commits into
tuannx wants to merge 2 commits into
Conversation
The drift report posted on PRs was too sparse to be actionable: - All baseline metric columns showed '—' (metrics never persisted) - Entity movements were a bare count with no details - No component breakdown, no diagram, no smell guidance Changes: 1. Baseline now persists metrics alongside architecture (backwards compatible — old baselines without metrics still load fine). 2. Metric table shows real Baseline→Current deltas with direction indicators (🟢 improved / �� degraded / ⚪ unchanged). 3. Entity movements list top-15 individual moves (entity → component). 4. Component breakdown table (name, entity count, responsibility). 5. Mermaid component dependency diagram for visual orientation. 6. Smell entries include actionable 💡 recommendations. Breaking change: load_architecture() now returns (Architecture, dict) tuple. All callers updated.
Contributor
Architecture Drift ReportAlgorithm: PKG | Entities: 673 | Components: 7 Drift from Baseline
Changes
Components
Architecture Diagramgraph LR
Scripts["Scripts"]
ArcadeAgent["ArcadeAgent"]
Tests["Tests"]
Fixtures["Fixtures"]
TestAlgorithms["TestAlgorithms"]
TestParsers["TestParsers"]
TestTools["TestTools"]
Scripts --> ArcadeAgent
Scripts --> Fixtures
Tests --> ArcadeAgent
Tests --> Fixtures
Smells (1)
Generated by arcade-agent |
Contributor
🤖 Architecture Analysis SummaryPowered by arcade-agent — automatic architectural self-analysis 📈 Metric EvolutionBaseline commit: Legend: 🟢 better · 🔴 worse · 🟡 low impact · ⚪ no change
🏛️ Current Architecture
🧭 Principle Signals
🎯 Score DriversBiggest risks
Strongest areas
🕸️ High-Level Designgraph TD
Algorithms["Algorithms\n39 entities\n5 classes / 3 methods"]
Budget["Budget\n3 entities\n0 classes / 0 methods"]
Cache["Cache\n4 entities\n0 classes / 0 methods"]
Ci["Ci\n5 entities\n0 classes / 0 methods"]
Exporters["Exporters\n14 entities\n1 classes / 0 methods"]
Incremental["Incremental\n2 entities\n1 classes / 2 methods"]
Parsers["Parsers\n17 entities\n11 classes / 27 methods"]
Serialization["Serialization\n8 entities\n0 classes / 0 methods"]
Tools["Tools\n23 entities\n4 classes / 2 methods"]
Cache --> Serialization
Ci --> Algorithms
Ci --> Exporters
Ci --> Serialization
Ci --> Tools
Serialization --> Algorithms
Serialization --> Parsers
Tools --> Algorithms
Tools --> Cache
Tools --> Exporters
Tools --> Parsers
🏗️ Components breakdown
🚨 Architectural Smells
📈 Evolution vs BaselineBaseline commit: Architecture-to-Architecture (A2A) Comparison
Component matching detailsMatched:
High-level component statistics
Before/After Mermaid diagramsBaseline graph TD
Algorithms["Algorithms\n39 entities\n5 classes / 3 methods"]
Budget["Budget\n3 entities\n0 classes / 0 methods"]
Cache["Cache\n4 entities\n0 classes / 0 methods"]
Ci["Ci\n5 entities\n0 classes / 0 methods"]
Exporters["Exporters\n14 entities\n1 classes / 0 methods"]
Incremental["Incremental\n2 entities\n1 classes / 2 methods"]
Parsers["Parsers\n17 entities\n11 classes / 27 methods"]
Serialization["Serialization\n8 entities\n0 classes / 0 methods"]
Tools["Tools\n23 entities\n4 classes / 2 methods"]
Cache --> Serialization
Ci --> Algorithms
Ci --> Exporters
Ci --> Serialization
Ci --> Tools
Serialization --> Algorithms
Serialization --> Parsers
Tools --> Algorithms
Tools --> Cache
Tools --> Exporters
Tools --> Parsers
Current graph TD
Algorithms["Algorithms\n39 entities\n5 classes / 3 methods"]
Budget["Budget\n3 entities\n0 classes / 0 methods"]
Cache["Cache\n4 entities\n0 classes / 0 methods"]
Ci["Ci\n5 entities\n0 classes / 0 methods"]
Exporters["Exporters\n14 entities\n1 classes / 0 methods"]
Incremental["Incremental\n2 entities\n1 classes / 2 methods"]
Parsers["Parsers\n17 entities\n11 classes / 27 methods"]
Serialization["Serialization\n8 entities\n0 classes / 0 methods"]
Tools["Tools\n23 entities\n4 classes / 2 methods"]
Cache --> Serialization
Ci --> Algorithms
Ci --> Exporters
Ci --> Serialization
Ci --> Tools
Serialization --> Algorithms
Serialization --> Parsers
Tools --> Algorithms
Tools --> Cache
Tools --> Exporters
Tools --> Parsers
Component dependency delta
💡 CI/CD Insights
📄 View HTML reports and artifacts This comment is auto-generated by the self-dogfooding CI job. It updates on every push to this PR. |
Previously the detailed '🤖 Architecture Analysis Summary' comment (metric evolution, principle signals, score drivers, Mermaid diagram, A2A comparison) only appeared on PRs targeting main because ci.yml had 'pull_request: branches: [main]'. PRs targeting feature branches (e.g. codex/rust-parser) only got the sparse arch-drift.yml comment. Remove the branch filter so every PR receives the full analysis. The baseline artifact is still sourced from the last successful main push, so comparisons remain meaningful.
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.
Problem
The Architecture Drift Report posted on PRs (e.g. #29 comment) was too sparse to be actionable:
—— metrics were never persisted inbaseline.json, so no delta could ever be computedcodex/rust-parser) never got the rich "🤖 Architecture Analysis Summary" becauseci.ymlhadpull_request: branches: [main]Solution
1. Baseline persists metrics (backwards compatible)
save_architecture()now accepts an optionalmetricsdict.load_architecture()returns(Architecture, dict[str, float]). Old baselines without metrics still load fine (empty dict).Once
--update-baselineruns with this code, all future PR reports will show real deltas with direction indicators:2. Entity movement details
Top-15 individual entity movements listed as
entity → Component, with "… and N more" overflow.3. Component breakdown table
4. Mermaid component dependency diagram
5. Actionable smell recommendations
Each smell now includes a 💡 recommendation (split component, break cycle, reduce fan-in, stabilize interface).
6. Self-dogfooding runs on ALL PRs
Removed
branches: [main]filter fromci.yml'spull_requesttrigger. Now every PR (including those targeting feature branches) receives the full "🤖 Architecture Analysis Summary" with metric evolution, principle signals, score drivers, Mermaid diagram, and A2A comparison. Baseline is still sourced from the last successfulmainpush.Breaking change
load_architecture()signature changed from-> Architectureto-> tuple[Architecture, dict[str, float]]. All internal callers updated.Validation