Skip to content

Conversation

@shivasurya
Copy link
Owner

Summary

Major refactoring to rename the core directory from sourcecode-parser to sast-engine for better clarity and alignment with the project's purpose as a Static Application Security Testing (SAST) engine.

This is part two of a staged refactoring approach:

Breaking Changes

Go module import path changed:

- import "github.com/shivasurya/code-pathfinder/sourcecode-parser/graph"
+ import "github.com/shivasurya/code-pathfinder/sast-engine/graph"

Directory structure:

- sourcecode-parser/
+ sast-engine/

Version bumped: v1.0.0 → v1.1.0

Changes

Core Refactoring (222 files changed)

  • Go module: Updated go.mod module declaration
  • Import statements: Updated all 174+ Go files with new import paths
  • Playground: Updated playground/go.mod and 2 playground Go files

Build & CI/CD (4 workflow files)

  • .github/workflows/build.yml - Updated working-directory, path filters, ldflags
  • .github/workflows/release.yml - Updated 28 references (cd commands, artifact paths, ldflags)
  • .github/workflows/docker-publish.yml - Updated VERSION file path
  • .github/workflows/stdlib-r2-upload.yml - Updated tools directory path

Docker Configuration (2 files)

  • Dockerfile - Updated COPY paths and ldflags
  • playground-Dockerfile - Updated COPY paths

Build Configuration

  • build.gradle - Updated ldflags with new module path
  • codecov.yml - Updated ignore paths

Documentation (3 files)

  • CLAUDE.md - Updated 8 references
  • CONTRIBUTING.md - Updated build instructions
  • perf_tools/README.md - Updated 6 references

Versioning

  • sast-engine/VERSION - Bumped to 1.1.0
  • package.json - Bumped to 1.1.0

Additional

  • Added DeepWiki badge to README.md

Testing Completed ✅

All local tests passed before commit:

# Build verification
$ gradle buildGo
✅ Binary builds successfully
✅ Version: 1.1.0
✅ Binary location: sast-engine/build/go/pathfinder

# Test suite
$ gradle testGo
✅ All 19 packages pass
✅ 185 Python DSL tests (99% coverage)
✅ All integration tests pass

# Code quality
$ gradle lintGo
✅ 0 linting issues

# Docker build
$ docker build -t code-pathfinder:test-rename .
✅ Image builds successfully
✅ Container runs correctly

GitHub Actions Verification Required 🔍

Important: After merging, monitor all GitHub Actions workflows for potential issues:

Workflows to Watch:

  1. build.yml - May trigger on this PR merge

    • Verify working-directory changes work correctly
    • Verify path filters (sast-engine/**) work as expected
    • Verify Go build with new ldflags
  2. release.yml - Will trigger on next version tag

    • Verify all cd sast-engine commands work
    • Verify artifact paths (sast-engine/pathfinder-*)
    • Verify ldflags reference correct module path
  3. docker-publish.yml - May trigger on tag/push

    • Verify VERSION file path (sast-engine/VERSION)
    • Verify Docker build context
  4. stdlib-r2-upload.yml - May trigger on related changes

    • Verify tools directory path (sast-engine/tools)

Known Risks:

  • ⚠️ Path filters in workflows may not trigger correctly on first run
  • ⚠️ Artifact upload/download paths may need adjustment
  • ⚠️ ldflags injection may fail if paths are incorrect

Migration Impact

External Impact: ❌ None

  • No external Go module consumers exist
  • NPM package downloads pre-built binaries (no import changes)

Internal Impact: ✅ Fully Tested

  • All Go imports updated
  • All documentation updated
  • All build scripts updated
  • All CI/CD workflows updated
  • Related documentation repository (cpf_plans) updated

Rollback Plan

If GitHub Actions workflows fail critically:

  1. Revert this PR
  2. Fix workflow issues in a new branch
  3. Test workflow changes separately
  4. Re-attempt rename with fixed workflows

Checklist

  • All Go imports updated
  • All workflow files updated
  • All Dockerfiles updated
  • All documentation updated
  • Version bumped to 1.1.0
  • gradle buildGo passes
  • gradle testGo passes
  • gradle lintGo passes
  • Docker build passes
  • No .claude/* files committed
  • Related repositories updated (cpf_plans)
  • GitHub Actions workflows verified (post-merge)

shivasurya and others added 2 commits November 28, 2025 20:05
Major refactoring to rename the core directory for better clarity:
- Rename sourcecode-parser → sast-engine
- Update Go module path in all 174+ files
- Update GitHub Actions workflows (4 files)
- Update Docker configurations (2 files)
- Update build.gradle, codecov.yml
- Update documentation (CLAUDE.md, CONTRIBUTING.md, perf_tools/README.md)
- Update playground module dependencies
- Bump version to 1.1.0

Breaking change: Go module import path changed from
github.com/shivasurya/code-pathfinder/sourcecode-parser
to
github.com/shivasurya/code-pathfinder/sast-engine

No external impact (no external Go module consumers).

Testing:
- ✅ gradle buildGo - Binary works, version 1.1.0
- ✅ gradle testGo - All 19 packages pass
- ✅ gradle lintGo - 0 issues
- ✅ Docker build - Image builds and runs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@safedep
Copy link

safedep bot commented Nov 29, 2025

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

Package Details
Package Malware Vulnerability Risky License Report
icon github.com/shivasurya/code-pathfinder/sast-engine @ v0.0.0-20251019001255-25ad474e19a3
playground/go.mod
ok icon
ok icon
ok icon
🔗

This report is generated by SafeDep Github App

@shivasurya shivasurya self-assigned this Nov 29, 2025
@codecov
Copy link

codecov bot commented Nov 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.44%. Comparing base (32ab395) to head (ca5c8e5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #414      +/-   ##
==========================================
- Coverage   80.47%   80.44%   -0.03%     
==========================================
  Files          77       77              
  Lines        7763     7763              
==========================================
- Hits         6247     6245       -2     
- Misses       1269     1270       +1     
- Partials      247      248       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shivasurya shivasurya merged commit 3004338 into main Nov 29, 2025
4 of 5 checks passed
@shivasurya shivasurya deleted the refactor/rename-to-sast-engine branch November 29, 2025 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants