Skip to content

fix: keep decompose from extracting invalid root fragments#1034

Merged
chubes4 merged 1 commit intomainfrom
fix/structural-extraction-boundaries
Mar 26, 2026
Merged

fix: keep decompose from extracting invalid root fragments#1034
chubes4 merged 1 commit intomainfrom
fix/structural-extraction-boundaries

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented Mar 25, 2026

Summary

  • keep decompose from extracting macro/template pseudo-items like the $Entity wrapper bodies in config.rs
  • keep root orchestrator and public entrypoint functions in parent files so root modules do not get hollowed out into broken leftovers
  • add focused regressions covering the exact config.rs and code_audit/mod.rs failure shapes from PR chore(ci): autofix homeboy from main #1033

Validation

  • cargo test filter_extractable_items_skips_macro_template_fragments -- --nocapture
  • cargo test identify_parent_kept_functions_keeps_root_orchestrator -- --nocapture
  • cargo test group_items_mod_rs_uses_parent_dir_not_mod_subdir -- --nocapture

@homeboy-ci
Copy link
Copy Markdown
Contributor

homeboy-ci bot commented Mar 25, 2026

Homeboy Results — homeboy

Lint

Failure Digest

Lint Failure Digest

Autofixability classification

  • Overall: human_needed
  • Autofix enabled: yes
  • Autofix attempted this run: yes
  • Human-needed failed commands:
    • lint
  • Failed commands with available automated fixes:
    • lint

Machine-readable artifacts

  • {command}.json — structured output per command (from homeboy --output)

⚡ Scope: changed files only

lint (changed files only)

Audit

⚡ Scope: changed files only

audit (changed files only)

  • Alignment score: 0.947
  • Outliers in current run: 2
  • Drift increased: no
  • Severity counts: info: 1, unknown: 2, warning: 27
  • Top actionable findings:
    1. src/core/refactor/decompose.rs — god_file — File has 2507 lines (threshold: 1000)
    2. src/core/refactor/decompose.rs — high_item_count — File has 35 top-level items (threshold: 15)
    3. src/core/refactor/move_items.rs — intra_method_duplicate — Duplicated block in move_items_with_options — 5 identical lines at line 376 and line 396
    4. src/core/refactor/decompose.rs — missing_test_method — Method 'apply_plan' has no corresponding test (expected 'test_apply_plan')
    5. src/core/refactor/decompose.rs — orphaned_test — Test method 'test_a' references 'a' which no longer exists in the source
    6. src/core/refactor/decompose.rs — orphaned_test — Test method 'test_audit_component' references 'audit_component' which no longer exists in the source
    7. src/core/refactor/decompose.rs — orphaned_test — Test method 'test_audit_internal' references 'audit_internal' which no longer exists in the source
    8. src/core/refactor/decompose.rs — orphaned_test — Test method 'test_b' references 'b' which no longer exists in the source
    9. src/core/refactor/decompose.rs — orphaned_test — Test method 'test_call_graph_clusters_related_functions' references 'call_graph_clusters_related_functions' which no longer exists in the source
    10. src/core/refactor/decompose.rs — orphaned_test — Test method 'test_call_graph_excludes_hubs_from_clusters' references 'call_graph_excludes_hubs_from_clusters' which no longer exists in the source
Audit findings (10 shown)
1. **src/core/refactor/decompose.rs** — god_file — File has 2507 lines (threshold: 1000)
2. **src/core/refactor/decompose.rs** — high_item_count — File has 35 top-level items (threshold: 15)
3. **src/core/refactor/move_items.rs** — intra_method_duplicate — Duplicated block in `move_items_with_options` — 5 identical lines at line 376 and line 396
4. **src/core/refactor/decompose.rs** — missing_test_method — Method 'apply_plan' has no corresponding test (expected 'test_apply_plan')
5. **src/core/refactor/decompose.rs** — orphaned_test — Test method 'test_a' references 'a' which no longer exists in the source
6. **src/core/refactor/decompose.rs** — orphaned_test — Test method 'test_audit_component' references 'audit_component' which no longer exists in the source
7. **src/core/refactor/decompose.rs** — orphaned_test — Test method 'test_audit_internal' references 'audit_internal' which no longer exists in the source
8. **src/core/refactor/decompose.rs** — orphaned_test — Test method 'test_b' references 'b' which no longer exists in the source
9. **src/core/refactor/decompose.rs** — orphaned_test — Test method 'test_call_graph_clusters_related_functions' references 'call_graph_clusters_related_functions' which no longer exists in the source
10. **src/core/refactor/decompose.rs** — orphaned_test — Test method 'test_call_graph_excludes_hubs_from_clusters' references 'call_graph_excludes_hubs_from_clusters' which no longer exists in the source

Auto-refactor

ℹ️ Autofix skipped — PR head is already a homeboy-ci[bot] commit, so PR autofix only runs after human commits

Failure Digest

Autofixability classification

  • Overall: human_needed
  • Autofix enabled: yes
  • Autofix attempted this run: no
  • Human-needed failed commands:
    • refactor --from all

Machine-readable artifacts

  • {command}.json — structured output per command (from homeboy --output)

⚡ Scope: changed files only

refactor --from all

  • Total fixes proposed: 27
  • Files modified: 5
  • Stages:
    • audit: 27 fix(es), 5 file(s), 28 findings detected
    • lint: 0 fix(es), 0 file(s), 0 findings detected
    • test: 0 fix(es), 0 file(s)
Changed files (5)
1. `src/core/extension/grammar.rs`
2. `src/core/refactor/decompose.rs`
3. `src/core/refactor/move_items.rs`
4. `tests/commands/deploy_test.rs`
5. `tests/core/refactor/decompose_test.rs`
Warnings (1)
Inter-stage formatter (sh '/home/runner/.config/homeboy/extensions/rust/scripts/format.sh') exited non-zero (continuing)
Tooling versions
  • Homeboy CLI: homeboy 0.86.2+163e1fe1
  • Extension: rust from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: unknown
  • Action: Extra-Chill/homeboy-action@v2

Homeboy Action v1

@chubes4 chubes4 force-pushed the fix/structural-extraction-boundaries branch from 7f4c6e8 to b8dd117 Compare March 25, 2026 23:10
@chubes4 chubes4 force-pushed the fix/structural-extraction-boundaries branch 2 times, most recently from a1576dc to 163e1fe Compare March 26, 2026 01:18
@chubes4 chubes4 merged commit 9f84580 into main Mar 26, 2026
4 of 7 checks passed
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.

1 participant