Title: feat(forge-analyzer): Python import graph extractor, module resolver & cycle detector · Issue #151 · elcode-id/elcode-forge · GitHub
Open Graph Title: feat(forge-analyzer): Python import graph extractor, module resolver & cycle detector · Issue #151 · elcode-id/elcode-forge
X Title: feat(forge-analyzer): Python import graph extractor, module resolver & cycle detector · Issue #151 · elcode-id/elcode-forge
Description: Description Implement deterministic Python import graph extraction, logical module resolution, and circular dependency detection in crates/forge-analyzer/src/python_imports.rs. Detailed Requirements Import Syntax Extraction: Single and m...
Open Graph Description: Description Implement deterministic Python import graph extraction, logical module resolution, and circular dependency detection in crates/forge-analyzer/src/python_imports.rs. Detailed Requirement...
X Description: Description Implement deterministic Python import graph extraction, logical module resolution, and circular dependency detection in crates/forge-analyzer/src/python_imports.rs. Detailed Requirement...
Opengraph URL: https://github.com/elcode-id/elcode-forge/issues/151
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(forge-analyzer): Python import graph extractor, module resolver & cycle detector","articleBody":"## Description\nImplement deterministic Python import graph extraction, logical module resolution, and circular dependency detection in `crates/forge-analyzer/src/python_imports.rs`.\n\n## Detailed Requirements\n1. **Import Syntax Extraction:**\n - Single and multiple direct imports: `import os`, `import sys, json`, `import fastapi as app`.\n - From imports: `from typing import Optional, List, Dict`, `from app.models import User`.\n - Relative imports: `from . import utils`, `from ..services import user_service`, `from ...core.db import session`.\n - Multiline parenthesized imports: `from app.schemas import (\\n Item,\\n ItemCreate\\n)`.\n2. **Standard Library Filtering:**\n - Embed an immutable lookup table of Python standard library modules (e.g. `os`, `sys`, `json`, `math`, `pathlib`, `typing`, `dataclasses`, `asyncio`, `urllib`, `collections`, `itertools`, etc.).\n - Distinguish standard library imports vs local relative/internal package imports vs third-party PyPI packages.\n3. **Module Resolution & Architecture Graph:**\n - Map Python files to directory-based `Module` boundaries (e.g. `app/services`, `app/routers`, `app/models`).\n - Connect inter-module dependencies via `ArchitectureGraph`.\n - Run Tarjan's SCC cycle detection algorithm to emit `arch/circular-dependencies` findings when Python circular import loops exist.\n\n## Verification\n- Unit test suite covering absolute, relative, multiline imports, and cycle detection.\n- Selective CI: Tier 1 (`cargo clippy -p forge-analyzer` & `cargo test -p forge-analyzer`).\n\nPart of #149\n","author":{"url":"https://github.com/luksluki","@type":"Person","name":"luksluki"},"datePublished":"2026-10-21T05:57:21Z","url":"https://github.com/elcode-id/elcode-forge/issues/151"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ee8cfd3a-b9a4-731c-3056-9d80647f6ce2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E646:3E158A:1EB7E1:29B15A:6B059982 |
| html-safe-nonce | 5270415464aa19009143531bd34c51fc65d2113885a65558ca74413b2653f5df |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjQ2OjNFMTU4QToxRUI3RTE6MjlCMTVBOjZCMDU5OTgyIiwidmlzaXRvcl9pZCI6IjQ5NzI1MjAyMzI5NDMxOTY1NDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5a3932e721f59c2d8705f2a6df8af0a46643365f480b941f5d587432bf6242a9 |
| hovercard-subject-tag | issue:5955195687 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/elcode-id/elcode-forge/151/issue_layout |
| twitter:image | https://opengraph.githubassets.com/09d4efb731bc5dd7512792318201999bb0d16288279df637e8b58d583bfc8cf2/elcode-id/elcode-forge/issues/151 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/09d4efb731bc5dd7512792318201999bb0d16288279df637e8b58d583bfc8cf2/elcode-id/elcode-forge/issues/151 |
| og:image:alt | Description Implement deterministic Python import graph extraction, logical module resolution, and circular dependency detection in crates/forge-analyzer/src/python_imports.rs. Detailed Requirement... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | luksluki |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8bd54b96ae4db60ce608a145a6b2fb16216749fbdb431d9879aabfa7459f1139 |
| turbo-cache-control | no-preview |
| go-import | github.com/elcode-id/elcode-forge git https://github.com/elcode-id/elcode-forge.git |
| octolytics-dimension-user_id | 337957755 |
| octolytics-dimension-user_login | elcode-id |
| octolytics-dimension-repository_id | 1423983661 |
| octolytics-dimension-repository_nwo | elcode-id/elcode-forge |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1423983661 |
| octolytics-dimension-repository_network_root_nwo | elcode-id/elcode-forge |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cda4791073b4da3005eb3d470dc0aef3956bbe34 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width