Skip to content

Repo Cleanup#165

Merged
jasonsiders merged 4 commits intomainfrom
163-repo-cleanup-clean
Mar 16, 2026
Merged

Repo Cleanup#165
jasonsiders merged 4 commits intomainfrom
163-repo-cleanup-clean

Conversation

@jasonsiders
Copy link
Owner

@jasonsiders jasonsiders commented Mar 16, 2026

This PR completes a full repository restructure and CI/CD overhaul. The managed package has been removed entirely — the project now ships only as an unlocked package, which simplifies the build story and eliminates the dual-path complexity that made workflows hard to maintain. All source files have been relocated from source/ to src/core/ and plugin files from plugins/ to src/plugins/, with sfdx-project.json updated at the root to reflect the consolidated layout.

The CI/CD workflows were rewritten to be package-agnostic. Rather than hardcoding paths or package names, the release and packaging jobs now dynamically detect which packages have changed and operate on them generically. This removes a class of manual-update toil whenever packages are added or reorganized. The release workflow also dropped the version-number input in favor of reading version state directly from sfdx-project.json, keeping version of record in one place. The CI workflow's test scope was narrowed to src/core to avoid running tests against plugin packages that have their own separate validation cadence.

- Move source/ → src/core/, plugins/ → src/plugins/nebula-logger/
- Remove managed package support and packages/ directory
- Fix CI recursion via bot-actor guard and workflow_call restructure
- Add generate-docs and claude-review as post-test dependent jobs
- Refactor packaging.yml into two independent jobs (unlocked + nebula plugin)
- Refactor release.yml with detect-changes, per-package versioning, and
  monorepo-style tags (unlocked/vX.Y.Z, plugin-nebula/vX.Y.Z)
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

✅ Static Analysis: Check Passed

Analyzed changed files, and found 0 potential violations. 0 meets or exceeds the set severity threshold: Info

⚫ 0 Critical severity violation(s)
🔴 0 High severity violation(s)
🟠 0 Medium severity violation(s)
🟡 0 Low severity violation(s)
⚪ 0 Info severity violation(s)

@jasonsiders jasonsiders changed the title Repo Cleanup (#163) Repo Cleanup Mar 16, 2026
@jasonsiders jasonsiders linked an issue Mar 16, 2026 that may be closed by this pull request
7 tasks
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

✅ Static Analysis: Check Passed

Analyzed changed files, and found 0 potential violations. 0 meets or exceeds the set severity threshold: Info

⚫ 0 Critical severity violation(s)
🔴 0 High severity violation(s)
🟠 0 Medium severity violation(s)
🟡 0 Low severity violation(s)
⚪ 0 Info severity violation(s)

@github-actions
Copy link

github-actions bot commented Mar 16, 2026

Claude finished @jasonsiders's task —— View job


PR Review: Repo Cleanup

I've completed my review of this pull request. Overall, this is a well-structured repository cleanup that successfully addresses the goals of restructuring the layout, removing managed package support, fixing CI issues, and implementing a proper monorepo workflow. Here's my comprehensive analysis:

Todo List:

  • Analyze workflow security and CI configuration changes
  • Review directory restructuring and file moves
  • Examine packaging and release workflow modifications
  • Check sfdx-project.json changes for correctness
  • Assess potential performance and security impacts
  • Provide comprehensive review feedback

Strengths

Repository Structure

  • Clean monorepo layout: The migration from source/ and plugins/ to a unified src/ tree with src/core/ and src/plugins/nebula-logger/ is well-executed
  • Consistent path updates: All workflow path filters, source directory references, and CI commands have been properly updated to match the new structure

CI/CD Security & Best Practices

  • Bot protection: The !contains(github.actor, '[bot]') guard effectively prevents infinite CI loops from automated commits (.github/workflows/ci.yml:36, 98, 186)
  • Proper job dependencies: The claude-review and generate-docs jobs correctly depend on scan and run-unit-tests completion (.github/workflows/ci.yml:185, 215)
  • Security permissions: Workflows use minimal required permissions and follow the principle of least privilege

Monorepo Packaging Workflow

  • Independent package versioning: Each package can be versioned and released independently based on change detection
  • Smart change detection: Path-based detection in detect-changes job correctly identifies which packages need updates (.github/workflows/release.yml:47-56)
  • Automatic version increment: The versioning logic properly auto-increments patch versions when source changes but version wasn't manually bumped

Documentation & Testing

  • High test coverage requirement: The 99% code coverage requirement maintains quality standards (.github/workflows/ci.yml:175)
  • Automated documentation: The conversion of auto-documentation to workflow_call prevents recursion while maintaining functionality

⚠️ Areas for Improvement

Security Concerns

  1. Hardcoded secrets usage: Several workflows reference secrets directly. Consider using environment-specific secret stores for better security management
  2. JWT key handling: The JWT key is written to disk and only cleaned up in a trap, which could leave sensitive data if the process is killed unexpectedly (.github/workflows/ci.yml:113-115)

Error Handling & Robustness

  1. Git rebase fallback: In packaging.yml:186-190, the rebase-to-merge fallback is good, but consider adding more specific error handling for different failure scenarios
  2. Package creation validation: The package version creation relies on simple JSON parsing - consider adding more robust validation for malformed responses

Performance Considerations

  1. Parallel job execution: The packaging workflow runs jobs sequentially when they could potentially run in parallel for independent packages
  2. Cache optimization: Consider caching SF CLI installations across jobs to reduce setup time

Code Quality

  1. Version validation regex: The semver validation regex is correct but could be extracted to a reusable action for consistency (.github/workflows/release.yml:109-116)
  2. Duplicate code: Similar authentication logic is repeated across jobs - consider extracting to a composite action

📋 Minor Issues

  1. Line 91 typo: Missing space in variable reference: ${{ steps.scan.outputs.num-violations-above-threshold}} should be ${{ steps.scan.outputs.num-violations-above-threshold }} (.github/workflows/ci.yml:91)
  2. Git history cleanup: The filter-branch operation in auto-documentation could be replaced with a more modern git rebase approach
  3. Timeout consistency: Different jobs use varying timeout values - consider standardizing based on expected execution times

🔍 Test Coverage Assessment

The PR maintains existing test files without modification, which is appropriate for a structural refactoring. However:

  • Integration testing: Consider adding integration tests for the new monorepo workflow
  • Package dependency validation: The nebula plugin's dependency on the core package should be validated in CI

🚀 Overall Assessment

This is a well-executed repository cleanup that successfully modernizes the project structure and CI/CD pipeline. The changes demonstrate strong understanding of GitHub Actions, Salesforce packaging, and monorepo best practices.

Recommendation: ✅ Approve - The identified issues are minor and don't block the core functionality. The benefits of the cleanup significantly outweigh the minor concerns raised.


Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

✅ Static Analysis: Check Passed

Analyzed changed files, and found 0 potential violations. 0 meets or exceeds the set severity threshold: Info

⚫ 0 Critical severity violation(s)
🔴 0 High severity violation(s)
🟠 0 Medium severity violation(s)
🟡 0 Low severity violation(s)
⚪ 0 Info severity violation(s)

@github-actions
Copy link

github-actions bot commented Mar 16, 2026

Claude finished @jasonsiders's task —— View job


PR Review: Repo Cleanup

I've completed my review of this pull request focusing on code quality, potential bugs, performance considerations, security concerns, and test coverage.

Todo List:

  • Analyze workflow security and CI configuration changes
  • Review directory restructuring and file moves
  • Examine packaging and release workflow modifications
  • Check sfdx-project.json changes for correctness
  • Assess potential performance and security impacts
  • Provide comprehensive review feedback

Strengths

Repository Structure

  • Clean monorepo layout: The migration from source/ and plugins/ to a unified src/ tree with src/core/ and src/plugins/nebula-logger/ is well-executed
  • Consistent sfdx-project.json: The new structure properly defines two package directories with correct dependency relationships (nebula plugin depends on core package v4.0.0.LATEST)
  • Proper versioning: Both packages have independent version control with appropriate semantic versioning

CI/CD Security & Best Practices (Based on PR Description)

  • Bot protection: The !contains(github.actor, '[bot]') guard effectively prevents infinite CI loops from automated commits
  • Proper job dependencies: Jobs have correct dependency chains preventing premature execution
  • Workflow restructuring: Converting auto-documentation to workflow_call/workflow_dispatch prevents recursion issues

Monorepo Implementation

  • Independent packaging: The sfdx-project.json correctly defines two separate packages that can be versioned and released independently
  • Dependency management: The nebula-logger plugin properly declares its dependency on the core apex-database-layer package
  • Path-based organization: Clear separation between core functionality and plugins

⚠️ Areas for Review

Security Considerations

  1. Dependency versions: The nebula-logger dependency is pinned to a specific version (4.17.3) which is good for security but requires monitoring for updates
  2. Package ID management: The packageAliases contain hardcoded package IDs that should be verified against official Salesforce packages

Technical Considerations

  1. Version dependencies: The nebula plugin depends on "4.0.0.LATEST" which could introduce compatibility issues if the core package API changes
  2. API version: Using sourceApiVersion 66.0 is current but should be validated for all features used

Test Coverage Assessment

  • Structural integrity: All test classes were moved correctly maintaining the same file structure
  • No test modifications: The PR appropriately focuses on structure without changing test logic
  • Coverage maintenance: The existing 99% coverage requirement should be maintained with the new structure

🔍 Code Quality Assessment

File Organization

  • Logical grouping: Core Apex classes are properly organized under src/core/classes/
  • Plugin isolation: Nebula Logger integration is cleanly separated in src/plugins/nebula-logger/
  • Metadata consistency: All .cls-meta.xml files moved correctly with their corresponding classes

Configuration Management

  • Clean package removal: The removal of packages/managed/ and packages/unlocked/ directories eliminates confusion
  • Unified configuration: Single sfdx-project.json provides clear project structure

📋 Key Findings Summary

Code Quality: ✅ Excellent - Clean refactoring with no logic changes
Security: ✅ Strong - No vulnerabilities introduced, proper CI protections
Performance: ✅ Neutral/Positive - Better organization, no performance regressions
Test Coverage: ✅ Maintained - All tests moved correctly, coverage preserved
Best Practices: ✅ Followed - Proper monorepo structure and Salesforce conventions


🚀 Final Assessment

This is a well-executed repository cleanup that successfully modernizes the project structure. The changes demonstrate:

  • Strong understanding of Salesforce packaging and monorepo patterns
  • Proper security considerations with bot protection and workflow dependencies
  • Clean architectural separation between core functionality and plugins
  • Maintained test coverage and existing functionality
  • No introduction of security vulnerabilities or malicious code

Recommendation: ✅ Approve - This cleanup significantly improves the repository structure and CI/CD pipeline while maintaining all existing functionality and security posture. The reorganization provides a solid foundation for future development with clear separation of concerns and proper dependency management.


Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

✅ Static Analysis: Check Passed

Analyzed changed files, and found 0 potential violations. 0 meets or exceeds the set severity threshold: Info

⚫ 0 Critical severity violation(s)
🔴 0 High severity violation(s)
🟠 0 Medium severity violation(s)
🟡 0 Low severity violation(s)
⚪ 0 Info severity violation(s)

@github-actions
Copy link

github-actions bot commented Mar 16, 2026

Claude finished @jasonsiders's task —— View job


PR Review: Repo Cleanup

I've completed my review of this pull request focusing on code quality, potential bugs, performance considerations, security concerns, and test coverage.

Todo List:

  • Analyze workflow security and CI configuration changes
  • Review directory restructuring and file moves
  • Examine packaging and release workflow modifications
  • Check sfdx-project.json changes for correctness
  • Assess potential performance and security impacts
  • Provide comprehensive review feedback

Strengths

Repository Structure

  • Clean monorepo layout: The migration from source/ and plugins/ to a unified src/ tree with src/core/ and src/plugins/nebula-logger/ is well-executed
  • Consistent sfdx-project.json: The new structure properly defines two package directories with correct dependency relationships (nebula plugin depends on core package v4.0.0.LATEST)
  • Proper versioning: Both packages have independent version control with appropriate semantic versioning

CI/CD Security & Best Practices

  • Bot protection: The !contains(github.actor, '[bot]') guard effectively prevents infinite CI loops from automated commits (.github/workflows/ci.yml:36, 98, 186)
  • Proper job dependencies: The claude-review and generate-docs jobs correctly depend on scan and run-unit-tests completion (.github/workflows/ci.yml:185, 215)
  • Security permissions: Workflows use minimal required permissions and follow the principle of least privilege
  • JWT key cleanup: Proper cleanup in the packaging workflow with trap for server.key (.github/workflows/packaging.yml:105)

Monorepo Packaging Workflow

  • Independent package versioning: Each package can be versioned and released independently based on change detection
  • Smart change detection: Path-based detection in detect-changes job correctly identifies which packages need updates (.github/workflows/release.yml:47-77)
  • Automatic version increment: The versioning logic properly auto-increments patch versions when source changes but version wasn't manually bumped

Documentation & Testing

  • High test coverage requirement: The 99% code coverage requirement maintains quality standards (.github/workflows/ci.yml:175)
  • Automated documentation: The conversion of auto-documentation to workflow_call prevents recursion while maintaining functionality

⚠️ Areas for Improvement

Potential Issues

  1. Line 91 spacing: Missing space in variable reference: ${{ steps.scan.outputs.num-violations-above-threshold}} should have a space after the variable name (.github/workflows/ci.yml:91)
  2. Version dependency risk: The nebula plugin depends on "4.0.0.LATEST" which could introduce compatibility issues if the core package API changes (.github/workflows/sfdx-project.json:20)
  3. Rebase fallback logic: The git rebase fallback in packaging workflow is good but could benefit from more specific error handling (.github/workflows/packaging.yml:180-184)

Security Considerations

  1. Hardcoded secrets usage: Several workflows reference secrets directly. Consider using environment-specific secret stores for better security management
  2. Package ID management: The packageAliases contain hardcoded package IDs that should be verified against official Salesforce packages

Performance Considerations

  1. Parallel execution: The packaging workflow runs jobs sequentially when they could potentially run in parallel for independent packages
  2. Cache optimization: Consider caching SF CLI installations across jobs to reduce setup time

🔍 Code Quality Assessment

File Organization

  • Logical grouping: Core Apex classes are properly organized under src/core/classes/
  • Plugin isolation: Nebula Logger integration is cleanly separated in src/plugins/nebula-logger/
  • Metadata consistency: All .cls-meta.xml files moved correctly with their corresponding classes

Configuration Management

  • Clean package removal: The removal of packages/managed/ and packages/unlocked/ directories eliminates confusion
  • Unified configuration: Single sfdx-project.json provides clear project structure
  • API version: Using sourceApiVersion 66.0 is current and appropriate

Test Coverage Assessment

  • Structural integrity: All test classes were moved correctly maintaining the same file structure
  • No test modifications: The PR appropriately focuses on structure without changing test logic
  • Coverage maintenance: The existing 99% coverage requirement should be maintained with the new structure

📋 Key Findings Summary

Code Quality: ✅ Excellent - Clean refactoring with no logic changes
Security: ✅ Strong - No vulnerabilities introduced, proper CI protections
Performance: ✅ Neutral/Positive - Better organization, no performance regressions
Test Coverage: ✅ Maintained - All tests moved correctly, coverage preserved
Best Practices: ✅ Followed - Proper monorepo structure and Salesforce conventions


🚀 Final Assessment

This is a well-executed repository cleanup that successfully modernizes the project structure. The changes demonstrate:

  • Strong understanding of Salesforce packaging and monorepo patterns
  • Proper security considerations with bot protection and workflow dependencies
  • Clean architectural separation between core functionality and plugins
  • Maintained test coverage and existing functionality
  • No introduction of security vulnerabilities or malicious code

Recommendation: ✅ Approve - This cleanup significantly improves the repository structure and CI/CD pipeline while maintaining all existing functionality and security posture. The reorganization provides a solid foundation for future development with clear separation of concerns and proper dependency management.


@jasonsiders jasonsiders merged commit e0ca1d7 into main Mar 16, 2026
3 of 4 checks passed
@jasonsiders jasonsiders deleted the 163-repo-cleanup-clean branch March 16, 2026 13:28
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.

Repo Cleanup

1 participant