Skip to content

fix: deploy from clean tag clones — preserve remote_path, inherit extensions, stabilize component IDs#933

Merged
chubes4 merged 1 commit intomainfrom
fix/deploy-clean-clone
Mar 23, 2026
Merged

fix: deploy from clean tag clones — preserve remote_path, inherit extensions, stabilize component IDs#933
chubes4 merged 1 commit intomainfrom
fix/deploy-clean-clone

Conversation

@chubes4
Copy link
Member

@chubes4 chubes4 commented Mar 23, 2026

Summary

Fixes #932 — three gaps in homeboy core that broke deploying from clean GitHub tag clones.

Changes

1. Preserve remote_path on re-attach (attachments.rs)

When attach_component_path updates an existing component's local_path, it now checks whether the new path's homeboy.json would blank the remote_path. If so, it auto-creates a project-level component_overrides entry to preserve the existing value.

Root cause: discover_from_portable defaults remote_path to empty string when the repo's homeboy.json omits it. Clean tag clones intentionally omit remote_path (it's deploy config, not source config), so re-attaching a clone path silently blanked the deploy target.

2. Inherit project-level extensions (resolution.rs)

When a discovered component has no extensions field (or it's empty), resolve_project_component now inherits the project's extensions map.

Root cause: Older tag releases may predate the extensions field in homeboy.json. Without extensions, resolve_build_command can't find a build-capable extension, and the build fails.

3. Stabilize component ID on attach (attachments.rs)

When attach_discovered_component_path infers a component ID that doesn't match any existing project component, it now checks for version-stamped directory patterns (e.g., data-machine-v0402-clean) and matches against existing component IDs by prefix.

Root cause: infer_portable_component_id falls back to the directory name when homeboy.json has no id field. Clone directories like /tmp/data-machine-v0.40.2-clean get slugified to data-machine-v0402-clean, creating a phantom component instead of updating the existing data-machine.

Tests

  • Added 6 unit tests for find_prefix_match covering version suffixes, numeric suffixes, non-version suffixes, exact matches, longest-prefix preference, and empty project.
  • cargo check passes clean (pre-existing warnings only).
  • Pre-existing broken auto-generated tests in conventions.rs, wrapper_inference.rs, version_overrides.rs prevent cargo test from compiling — unrelated to this PR.

…ensions, stabilize component IDs (#932)

Three fixes for deploying from clean GitHub tag clones:

1. Preserve remote_path on reattach: when attach-path updates an existing
   component's local_path, and the new path's homeboy.json omits remote_path,
   automatically store the current remote_path as a project override. This
   prevents clean clones from blanking the deploy target.

2. Inherit project extensions: when a component's homeboy.json (at the checked-out
   tag) doesn't declare extensions, inherit the project-level extensions map.
   This ensures build script resolution works even with older tags that predate
   the extensions field in homeboy.json.

3. Stabilize component ID on attach: when the inferred ID from a clone directory
   doesn't match an existing project component, check for version-stamped
   directory name patterns (e.g. 'data-machine-v0402-clean') and match against
   existing component IDs by prefix. Prevents identity mutation from clone paths.
@homeboy-ci
Copy link
Contributor

homeboy-ci bot commented Mar 23, 2026

Homeboy Results — homeboy

Audit

Failure Digest

Audit Failure Digest

  • Alignment score: 0.921
  • Severity counts: info: 1, unknown: 3, warning: 8
  • Outliers in current run: 3
  • Parsed outlier entries: 3
  • Drift increased: yes
  • New findings since baseline: 7
    1. test_coverage — Method 'attach_component_path' has no corresponding test (expected 'test_attach_component_path') (test_coverage::src/core/project/component/attachments.rs::MissingTestMethod)
    2. test_coverage — Method 'attach_discovered_component_path' has no corresponding test (expected 'test_attach_discovered_component_path') (test_coverage::src/core/project/component/attachments.rs::MissingTestMethod)
    3. test_coverage — Method 'clear_component_attachments' has no corresponding test (expected 'test_clear_component_attachments') (test_coverage::src/core/project/component/attachments.rs::MissingTestMethod)
    4. test_coverage — Method 'project_component_ids' has no corresponding test (expected 'test_project_component_ids') (test_coverage::src/core/project/component/attachments.rs::MissingTestMethod)
    5. test_coverage — Method 'remove_components' has no corresponding test (expected 'test_remove_components') (test_coverage::src/core/project/component/attachments.rs::MissingTestMethod)
  • Top actionable findings:
    1. src/core/project/component/attachments.rs — unreferenced_export — Public function 'attach_component_path' is not referenced by any other file
    2. src/core/project/component/attachments.rs — missing_test_method — Method 'attach_component_path' has no corresponding test (expected 'test_attach_component_path')
    3. src/core/project/component/attachments.rs — missing_test_method — Method 'attach_discovered_component_path' has no corresponding test (expected 'test_attach_discovered_component_path')
    4. src/core/project/component/attachments.rs — missing_test_method — Method 'clear_component_attachments' has no corresponding test (expected 'test_clear_component_attachments')
    5. src/core/project/component/attachments.rs — missing_test_method — Method 'project_component_ids' has no corresponding test (expected 'test_project_component_ids')
All parsed audit findings (12)
1. **src/core/project/component/attachments.rs** — unreferenced_export — Public function 'attach_component_path' is not referenced by any other file
2. **src/core/project/component/attachments.rs** — missing_test_method — Method 'attach_component_path' has no corresponding test (expected 'test_attach_component_path')
3. **src/core/project/component/attachments.rs** — missing_test_method — Method 'attach_discovered_component_path' has no corresponding test (expected 'test_attach_discovered_component_path')
4. **src/core/project/component/attachments.rs** — missing_test_method — Method 'clear_component_attachments' has no corresponding test (expected 'test_clear_component_attachments')
5. **src/core/project/component/attachments.rs** — missing_test_method — Method 'project_component_ids' has no corresponding test (expected 'test_project_component_ids')
6. **src/core/project/component/attachments.rs** — missing_test_method — Method 'remove_components' has no corresponding test (expected 'test_remove_components')
7. **src/core/project/component/attachments.rs** — missing_test_method — Method 'set_component_attachments' has no corresponding test (expected 'test_set_component_attachments')
8. **src/core/project/component/attachments.rs** — orphaned_test — Test method 'test_project_with_components' references 'project_with_components' which no longer exists in the source
9. **src/core/project/component/resolution.rs** — missing_test_file — No test file found (expected 'tests/core/project/component/resolution_test.rs') and no inline tests
10. **src/commands/docs.rs** — outlier — (outlier)
11. **tests/commands/deploy_test.rs** — outlier — (outlier)
12. **src/core/engine/undo/rollback.rs** — outlier — (outlier)
- Full audit log: https://github.com/Extra-Chill/homeboy/actions/runs/23416568178

Autofixability classification

  • Overall: auto_fixable
  • Autofix enabled: yes
  • Autofix attempted this run: no
  • Auto-fixable failed commands:
    • audit
  • Failed commands with available automated fixes:
    • audit

Machine-readable artifacts

  • homeboy-lint-summary.json
  • homeboy-test-failures.json
  • homeboy-audit-summary.json
  • homeboy-autofixability.json

⚡ Scope: changed files only

audit (changed files only)

Auto-refactor

ℹ️ Autofix enabled, but no fixable file changes were produced

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

  • homeboy-lint-summary.json
  • homeboy-test-failures.json
  • homeboy-audit-summary.json
  • homeboy-autofixability.json

⚡ Scope: changed files only

refactor --from all

Tooling versions
  • Homeboy CLI: homeboy 0.85.3+68ba43b
  • Extension: rust from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: unknown
  • Action: Extra-Chill/homeboy-action@v2

Homeboy Action v1

@chubes4 chubes4 merged commit cd8402b into main Mar 23, 2026
3 of 5 checks passed
@chubes4 chubes4 deleted the fix/deploy-clean-clone branch March 23, 2026 00:58
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.

Deploy from clean GitHub tag clones: attach-path blanks remote_path, build.sh not detected

1 participant