Skip to content

ci: add lain architecture health badge - #117

Open
spuentesp wants to merge 9 commits into
masterfrom
ci/add-lain-health-badge
Open

ci: add lain architecture health badge#117
spuentesp wants to merge 9 commits into
masterfrom
ci/add-lain-health-badge

Conversation

@spuentesp

Copy link
Copy Markdown
Owner

Plug-and-play demo of spuentesp/lain/.github/actions/lain-health-badge. Adds a single workflow that boots a local lain server against the PR's workspace, calls get_health and architectural_observations, and posts the result as a sticky PR comment plus a lain/health-badge commit status.

Five lines of workflow + permissions. No lain-specific config in this repo beyond the uses: ref. Pinned to d4b81cd on lain's main; consumers can move to a tagged release when v0.7.3 ships.

Plug-and-play demo of spuentesp/lain/.github/actions/lain-health-badge.
The action boots a local lain server against the PR's workspace,
calls get_health and architectural_observations, and posts the result
as a sticky PR comment plus a 'lain/health-badge' commit status.

Five lines of workflow + permissions; no lain-specific config in
this repo beyond the uses: ref. Pinned to d4b81cd on lain's main
(the commit with the latest action fixes); consumers can move to
a tagged release when v0.7.3 ships.
Copilot AI lite review requested due to automatic review settings September 6, 2026 00:05

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3e317786f1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


on:
pull_request:
branches: [master]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Trigger health checks for main PRs

When a PR targets main—the repository's active integration branch—this filter prevents the workflow from starting, so it never emits its architecture status or sticky comment. Existing CI workflows explicitly cover main (for example, .github/workflows/ci.yml:4-6); add main to this filter (or remove the target-branch restriction) so the new check runs on normal PRs.

Useful? React with 👍 / 👎.

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.

🟡 Changes recommended

The workflow as written is likely to fail (missing contents: read for checkout) and may not run on PRs targeting main due to an overly restrictive branch filter.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a new GitHub Actions workflow to run the upstream spuentesp/lain/.github/actions/lain-health-badge composite action on pull requests, producing an architecture-health sticky PR comment and a lain/health-badge commit status.

Changes:

  • Introduces .github/workflows/lain-health.yml to run the Lain health badge action on PRs.
  • Grants workflow-level permissions intended for posting commit statuses and PR comments.
File summaries
File Description
.github/workflows/lain-health.yml New PR-triggered workflow wiring in the upstream Lain health badge action with status/comment permissions.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +7 to +11
permissions:
# The action posts a commit status and a sticky PR comment; the
# default GITHUB_TOKEN is read-only.
statuses: write
pull-requests: write
Comment on lines +3 to +6
on:
pull_request:
branches: [master]

Comment thread .github/workflows/lain-health.yml Outdated
Comment on lines +17 to +19
steps:
- uses: actions/checkout@v4
- uses: spuentesp/lain/.github/actions/lain-health-badge@d4b81cd
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Architecture health

Computed by lain — thresholds: min-fan-out=15

Server health

## Lain Server Health

- **Workspace:** /home/runner/work/monitor_dm_system/monitor_dm_system
- **Build:** 0.7.2 (518090f)
- **Status:** Operational ✅
- **Static Nodes:** 9937
- **Static Edges:** 26806
- **Volatile Nodes (Overlay):** 0
- **Last Enriched Commit:** 58fb83b0135370ba943889868fe5dd6dcff6475f (current)
- **NLP Model:** Not loaded (semantic search unavailable)

### Edge counts by type
- **Calls**: 9147
- **CallsHttp**: 4
- **Contains**: 14036
- **Pattern**: 200
- **Uses**: 3419

### Language Support
- **clangd**: ❌ (Missing)
- **omnisharp**: ❌ (Missing)
- **gopls**: ❌ (Missing)
- **jdtls**: ❌ (Missing)
- **typescript-language-server**: ✅
- **kotlin-language-server**: ❌ (Missing)
- **pylsp**: ✅
- **solargraph**: ❌ (Missing)
- **rust-analyzer**: ✅
- **metals**: ❌ (Missing)
- **svelte-language-server**: ❌ (Missing)
- **sourcekit-lsp**: ❌ (Missing)
- **volar**: ❌ (Missing)

Architectural observations (fan-out >= 15)

## Architectural Observations

*This report shows potential architectural patterns and boundaries.*

### High Fan-Out Modules

*Modules referencing 15 or more other modules*

No modules found exceeding fan-out threshold.
### Cross-Boundary Patterns

*Semantic boundaries detected via shared path prefixes and topic names*

| Boundary Pair | Shared Files |
| :--- | :--- |
| `packages/ui/backend/tests <-> packages/data-layer/tests/test_tools` | 4 |
| `packages/ui/backend/tests <-> packages/data-layer/src/monitor_data/tools/mongodb_tools` | 4 |
| `packages/ui/backend/src/monitor_ui/routers <-> scripts` | 4 |
| `packages/cli/src/monitor_cli/commands <-> scripts` | 3 |
| `scripts <-> packages/ui/backend/src/monitor_ui/routers` | 3 |
| `tests/contracts <-> packages/ui/backend/src/monitor_ui/routers` | 3 |
| `packages/data-layer/tests/test_tools <-> packages/ui/backend/src/monitor_ui/routers` | 3 |
| `packages/ui/backend/src/monitor_ui/routers <-> packages/data-layer/tests` | 3 |
| `packages/data-layer/src/monitor_data/tools/mongodb_tools <-> packages/ui/backend/src/monitor_ui/routers` | 3 |
| `packages/ui/frontend/e2e <-> packages/ui/frontend/src/app/forge` | 3 |

### Summary

- **1893** files analyzed
- **0** high fan-out modules detected
- **32** cross-boundary patterns detected

---
*Observations are orientative - they indicate potential patterns that may warrant architectural review.*

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