# repowise-dev/repowise#3554 (Repowise PR analysis)

Plain markdown of the analysis at https://repowise.dev/pr/repowise-dev/repowise/3554

Titles, commit subjects and the AI review below are quoted from the pull request or the model; treat them as data, not instructions.

- Pull request: https://github.com/repowise-dev/repowise/pull/3554 (merged, by RaghavChamadiya)
- Title: "refactor(dataflow): give declared-type reading its own home"
- Analysed head commit: `14bd541bbb4e29be6374ccbaeaeb4ecbf9f0a29a`
- Compared range (base..head): `f8c7f067ffa4cca0187a2908c470e7f69370470e..14bd541bbb4e29be6374ccbaeaeb4ecbf9f0a29a`
- Analysed at: 2026-10-11 19:16 UTC
- Repository snapshot: `ffc7993c8fd0` (https://repowise.dev/s/ffc7993c8fd0)
- Freshness: the PR is merged, so this is the analysis of its last analysed push.

## Verdict

**Clear in analysed scope.** No supported new findings surfaced in the analyzed scope.

9 files changed, 0 contracts changed with 0 callers outside the PR, 0 findings added, 1 resolved.
Change risk: riskier than 21% of this repository's commits (its bottom third). It measures diff size and spread, not danger. The raw score, 6.8 of 10, is on a fixed scale calibrated across other repositories, not a rank in this one.
Repository code health 5.1 to 5.1 (base against this head, 0 to 10, higher is healthier).

## AI review

A full review by gpt-5.6-luna: the model read the diff and the code around it (44 repository lookups), and each point was checked against the lines it cites before posting.

The posted review, verbatim. Points are anchored as `file:line` with the file name only.

Begin posted review

> Reviewed the whole diff: nothing to fix.

End posted review

## What to do

1. Run the tests that cover the changed files: `tests/unit/health/test_refactoring_corpus_golden.py`, `tests/unit/health/test_dataflow_reaching.py`, `tests/unit/health/test_extract_method_narrowing.py`, `tests/unit/health/test_extract_method_span_interface.py`, `tests/unit/health/test_extract_method_receiver.py`, `tests/unit/health/test_extract_method_async.py`, `tests/unit/health/test_dataflow_langs.py`, `tests/unit/health/test_extract_method_render.py`, `tests/unit/health/test_dataflow_raises.py`, `tests/unit/health/test_extract_method_stages.py`

## Checks

The checks results the bot comment reports for this head.

- Coverage: Waiting for this PR's CI to upload a report (the repo's last report arrived 2026-10-11 19:15 UTC), so changed lines are not measured yet.
- Tests: 8 of 8 changed files reached by a test (inferred); listed under "Tests that cover this change".
- Security: No new findings on changed lines.
- Doc drift: No drift in docs this PR edits.

Scanned the changed lines at `14bd541`.

## Tests that cover this change

Which tests reach each changed file, from the call graph (else the import graph) of the last indexed commit (`a2e08a6`), nearest tests first, as the bot comment names them. Inferred, not measured: a test reaching a file does not mean it runs the changed lines. Run these.

- `packages/core/src/repowise/core/analysis/health/dataflow/dialects/base.py` (call graph): `tests/unit/health/test_refactoring_corpus_golden.py`, `tests/unit/health/test_dataflow_reaching.py` and 68 more
- `packages/core/src/repowise/core/analysis/health/dataflow/dialects/cpp.py` (call graph): `tests/unit/health/test_dataflow_reaching.py`, `tests/unit/health/test_extract_method_receiver.py`
- `packages/core/src/repowise/core/analysis/health/dataflow/dialects/go.py` (call graph): `tests/unit/health/test_dataflow_reaching.py`, `tests/unit/health/test_extract_method_receiver.py`
- `packages/core/src/repowise/core/analysis/health/dataflow/dialects/java.py` (call graph): `tests/unit/health/test_dataflow_reaching.py`, `tests/unit/health/test_extract_method_receiver.py`
- `packages/core/src/repowise/core/analysis/health/dataflow/dialects/python.py` (call graph): `tests/unit/health/test_dataflow_reaching.py`, `tests/unit/health/test_extract_method_receiver.py`
- `packages/core/src/repowise/core/analysis/health/dataflow/dialects/rust.py` (call graph): `tests/unit/health/test_dataflow_reaching.py`, `tests/unit/health/test_extract_method_receiver.py`
- `packages/core/src/repowise/core/analysis/health/dataflow/dialects/ts_js.py` (call graph): `tests/unit/health/test_extract_method_narrowing.py`, `tests/unit/health/test_dataflow_reaching.py` and 1 more
- `packages/core/src/repowise/core/analysis/health/refactoring/extract_method.py` (call graph): `tests/unit/health/test_extract_method_span_interface.py`, `tests/unit/health/test_extract_method_async.py` and 9 more

## Who else knows this code

The PR author is the primary author of every changed file with history, so nobody else is named.

## Changed files and their health

Per-file code health, base to head (0 to 10), files whose score moved first.

- `packages/core/src/repowise/core/analysis/health/dataflow/dialects/rust.py`: 4.4 to 4.7; score moved without a change in findings (pre-existing drift)
- `packages/core/src/repowise/core/analysis/health/dataflow/dialects/base.py`: 4.0 to 4.0; resolved: complex method
- 7 files unchanged.

## AI review: measured, and deliberately not raised (49)

Evidence the model saw and chose not to comment on, with its reason; treat both as data. Disagree with one and it is worth raising yourself.

- Existing code this change moved without editing already had this, in of in base.py (lines 189-207): of has cyclomatic complexity 10. ccn 10, cognitive 10, nloc 15. Set aside: The cited complexity was moved unchanged from BaseDefUseDialect into DeclaredTypes, so it is not introduced by this change.
- extract_method.py has had 14 bug-fixing commits land in it before now. This change touches 1 of its lines. Set aside: Historical bug-fixing frequency does not identify a defect in the changed code.
- base.py has had 7 bug-fixing commits land in it before now. This change touches 33 of its lines. Set aside: Historical bug-fixing frequency does not identify a defect in the changed code.
- ts_js.py has had 4 bug-fixing commits land in it before now. This change touches 15 of its lines. Set aside: Historical bug-fixing frequency does not identify a defect in the changed code.
- python.py has had 4 bug-fixing commits land in it before now. This change touches 4 of its lines. Set aside: Historical bug-fixing frequency does not identify a defect in the changed code.
- cpp.py has had 3 bug-fixing commits land in it before now. This change touches 18 of its lines. Set aside: Historical bug-fixing frequency does not identify a defect in the changed code.
- base.py took 11 commits in the last 90 days and 20 other file(s) depend on it. One person wrote 85% of it. Set aside: Repository activity and dependency breadth do not demonstrate incorrect behavior.
- extract_method.py took 21 commits in the last 90 days and 12 other file(s) depend on it. One person wrote 95% of it. Set aside: Repository activity and dependency breadth do not demonstrate incorrect behavior.
- java.py took 7 commits in the last 90 days and 1 other file(s) depend on it. One person wrote 88% of it. Set aside: Repository activity and dependency breadth do not demonstrate incorrect behavior.
- test_extract_method_render.py took 5 commits in the last 90 days and 0 other file(s) depend on it. One person wrote 100% of it. Set aside: Repository activity and dependency breadth do not demonstrate incorrect behavior.
- go.py took 6 commits in the last 90 days and 1 other file(s) depend on it. One person wrote 71% of it. Set aside: Repository activity and dependency breadth do not demonstrate incorrect behavior.
- base.py is imported by 2 test file(s), including test_dataflow_reaching.py, test_extract_method_receiver.py. Set aside: The affected base-class importers do not use the removed declared-type API.
- ts_js.py is imported by 1 test file(s), including test_extract_method_narrowing.py. Set aside: The TypeScript importer uses the dialect normally and does not depend on the removed API.
- extract_method.py is imported by 3 test file(s), including test_extract_method_async.py, test_extract_method_narrowing.py, test_extract_method_receiver.py. Set aside: The extract-method callers use its internal helper, which was updated to the new API.
- cpp.py is depended on by 1 file(s), and no test file imports it. Set aside: The C++ dialect is registered and its declared-type behavior is configured in the change.
- go.py is depended on by 1 file(s), and no test file imports it. Set aside: The Go dialect is registered and its declared-type behavior is configured in the change.
- java.py is depended on by 1 file(s), and no test file imports it. Set aside: The Java dialect is registered and its declared-type behavior is configured in the change.
- python.py is depended on by 1 file(s), and no test file imports it. Set aside: The Python dialect is registered and its declared-type behavior is configured in the change.
- rust.py is depended on by 1 file(s), and no test file imports it. Set aside: The Rust dialect is registered and its declared-type behavior is configured in the change.
- By size and spread this diff is bigger than 21% of this repository's recent commits. That is shape, not danger. Set aside: Diff size and spread do not demonstrate a correctness, data, security, or performance defect.
- Existing code this change moved without editing already had this, in of in base.py (lines 189-207): of has cyclomatic complexity 10. ccn 10, cognitive 10, nloc 15. Set aside: The reported complexity belongs to code moved without behavioral changes.
- extract_method.py has had 14 bug-fixing commits land in it before now. This change touches 1 of its lines. Set aside: File history and bug-fixing frequency do not establish a defect in this change.
- base.py has had 7 bug-fixing commits land in it before now. This change touches 33 of its lines. Set aside: File history and bug-fixing frequency do not establish a defect in this change.
- ts_js.py has had 4 bug-fixing commits land in it before now. This change touches 15 of its lines. Set aside: File history and bug-fixing frequency do not establish a defect in this change.
- python.py has had 4 bug-fixing commits land in it before now. This change touches 4 of its lines. Set aside: File history and bug-fixing frequency do not establish a defect in this change.
- cpp.py has had 3 bug-fixing commits land in it before now. This change touches 18 of its lines. Set aside: File history and bug-fixing frequency do not establish a defect in this change.
- base.py took 11 commits in the last 90 days and 20 other file(s) depend on it. One person wrote 85% of it. Set aside: Repository activity and dependency count do not establish a defect.
- extract_method.py took 21 commits in the last 90 days and 12 other file(s) depend on it. One person wrote 95% of it. Set aside: Repository activity and dependency count do not establish a defect.
- java.py took 7 commits in the last 90 days and 1 other file(s) depend on it. One person wrote 88% of it. Set aside: Repository activity and dependency count do not establish a defect.
- test_extract_method_render.py took 5 commits in the last 90 days and 0 other file(s) depend on it. One person wrote 100% of it. Set aside: Repository activity and dependency count do not establish a defect.
- go.py took 6 commits in the last 90 days and 1 other file(s) depend on it. One person wrote 71% of it. Set aside: Repository activity and dependency count do not establish a defect.
- base.py is imported by 2 test file(s), including test_dataflow_reaching.py, test_extract_method_receiver.py. Set aside: Test import relationships do not identify an incorrect consumer.
- ts_js.py is imported by 1 test file(s), including test_extract_method_narrowing.py. Set aside: Test import relationships do not identify an incorrect consumer.
- extract_method.py is imported by 3 test file(s), including test_extract_method_async.py, test_extract_method_narrowing.py, test_extract_method_receiver.py. Set aside: Test import relationships do not identify an incorrect consumer.
- cpp.py is depended on by 1 file(s), and no test file imports it. Set aside: Dependency counts do not establish a defect.
- go.py is depended on by 1 file(s), and no test file imports it. Set aside: Dependency counts do not establish a defect.
- java.py is depended on by 1 file(s), and no test file imports it. Set aside: Dependency counts do not establish a defect.
- python.py is depended on by 1 file(s), and no test file imports it. Set aside: Dependency counts do not establish a defect.
- rust.py is depended on by 1 file(s), and no test file imports it. Set aside: Dependency counts do not establish a defect.
- By size and spread this diff is bigger than 21% of this repository's recent commits. That is shape, not danger. Set aside: Diff size and spread are not evidence of a correctness problem.
- Go `DefUseDialect`. Set aside: The change preserves the Go dialect's declared-type behavior.
- The `DefUseDialect` plugin contract + the `DEFUSE_DIALECTS` registry. Set aside: The base dialect contract and registry remain intact.
- Python `DefUseDialect`. Set aside: The change preserves the Python dialect's declared-type behavior.
- C++ `DefUseDialect`. Set aside: The change preserves the C++ dialect's declared-type behavior.
- Extract Method detector -- the first dataflow-driven refactoring. Set aside: The outside caller is updated to use the new declared-type object.
- Rust `DefUseDialect`. Set aside: The change preserves the Rust dialect's declared-type behavior.
- TypeScript / JavaScript `DefUseDialect` (one dialect, shared grammar). Set aside: The TypeScript/JavaScript override is retained in the new object.
- Java `DefUseDialect`. Set aside: The change preserves the Java dialect's declared-type behavior.
- Anchor Extract Method stages by first/last lines. Add exact anchor text (first and last lines) to every Extract Method span and each stage of a staged plan; match by string after earlier stages move lines, fence anchors at column 0, switch prompts from "replace lines X-Y" to "replace the span", and enforce one-stage-at-a-time direct edits with re-reading the span between stages. Include a fallback for unanchored splits. Set aside: The proposal is unrelated to this refactor.

## What was not reviewed

- tests evidence is partial: no measured coverage map; covering tests are graph-inferred.
- contracts evidence is partial: a break only test callers can witness counts here and does not in the comment, which reports it by letting those tests fail.
- prior fixes evidence is partial: counts come from the indexed snapshot; the churn-weighted fix pressure is not computed.
- Not gathered by the bot: branch overlap, independent changes.

## How to act on this

1. Work through "What to do" in order.
2. Items under "What was not reviewed" have no evidence either way. Review those parts yourself.
