Conversation
| Thanks I will take a look at this asap. |
| Replied on the discussion with more context on how this relates to inspect and the broader roadmap. The Going to review the code in detail. Main things I want to check: how the signature detection interacts with sem-core's existing |
There was a problem hiding this comment.
Great feature set — review, changelog, and log are solid additions. Left some inline comments. The two I'd want addressed before merge are the signature breaking classification (return type changes + language-aware param handling) and the entity name collision in log history tracking. The rest are suggestions for follow-ups.
Also we could discuss more on what should stay here vs in inspect as @rs545837 mentioned above
| pub fn is_breaking(&self) -> bool { | ||
| matches!( | ||
| self, | ||
| SignatureChangeKind::ParamsRemoved { .. } |
There was a problem hiding this comment.
I think ReturnTypeChanged should be in here too — changing a return type will break every caller that depends on the old type. Right now it silently gets classified as non-breaking, which means changelog/semver will miss real breakage.
| pub fn get_log(&self, limit: usize) -> Result<Vec<CommitInfo>, GitError> { | ||
| /// Walk commits lazily from `to` (or HEAD) backward, stopping at `from`. | ||
| /// The callback returns `true` to continue or `false` to stop early. | ||
| pub fn for_each_commit( |
There was a problem hiding this comment.
Nice API — the lazy callback with early-stop is a good design for entity log. One thing to consider for later: the callback receives CommitInfo with sha as a String, but callers like build_entity_log immediately re-resolve that SHA back into trees via resolve_tree. Passing richer data (or at least the Oid + parent) would avoid that round-trip.
| I'll have more time to digest and reflect this evening, thank you for your eyes and input. |
| Hey @antiartificial did you get some time to check them out? |
| I've had some guests from out of town. Catching up! |
Thank you, the idea with the
As far as some of the feedback: targeted single-entity parsing instead of computing a full semantic diff for all changed files in a commit parse only the tracked file and compare only the tracked entity and shared "analyzed change" structure when calling build_review and reclassifying everything into changelog categories and using an intermedia structure. I'm happy to tackle these in this effort if you don't mind it, or happy to do a follow up PR for each. |
Groups entity-level changes into API surface (cross-file dependents), internal (body-only, deletions, no cross-file refs), and config/data categories. Includes approximate dependent counts from the entity graph and a risk heuristic (low/medium/high). Supports terminal and JSON output.
Classifies entity-level changes into Keep-a-Changelog categories (Breaking, Added, Changed, Removed, Internal) with semver bump suggestion. Includes Conventional Commits parsing from commit messages and supports terminal, markdown, and JSON output formats. Also adds get_log_range() to GitBridge for commit message access.
Re-parses before/after entity content with tree-sitter to extract parameter lists and classify changes as breaking (params removed or reordered) vs non-breaking (params added, body-only). Supports TypeScript, JavaScript, Python, Rust, Go, Java, C, C++, and more. Integrated into `sem changelog` for automatic breaking change detection.
Add README sections for entity history tracking, semantic review, and changelog generation. Update language table with Swift, Elixir, Bash, and Vue. Document sem diff file comparison mode.
19 new tests covering risk assessment, config classification, entity resolution, changelog generation, and modification classification. All 83 tests pass.
- ReturnTypeChanged now classified as breaking (breaks callers) - ParamsAdded label changed to "signature changed" (can't verify defaults) - Entity log matches file_path + entity_name to prevent cross-file misattribution - Replace --follow (always true, no way to disable) with --no-follow flag - Remove aggressive has_breaking_commits && dependent_count >= 5 heuristic - compute_semver considers removed public entities with dependents as MAJOR - Add --full flag to sem changelog and sem review to show all changes
…s diff.rs, review.rds, changelog.rs consolidated normalize_extts. Config changesi n risk assessment, now considers modified config/data as medium risk instead of silently falling through to low. Richer CommitInfo.
bd90753 to a8cd8b1 Compare …ommon::open_git_or_exit(). Replaces raw ANSI escapes with colored crate for consistency. Simplifies resolve_file_changes match bloxes to a git_or_exit helper. find_conventional_type now uses prebuilt HashMap<&str, &str> for o(1)instead of o(n)
| Hey @antiartificial, sorry for the slow reply! Took another look and the signature classification and entity disambiguation are both handled nicely, good work on those. Here's what I'd like to do: let's merge Could you split out the |
| @rs545837 no problem, we are all busy, certainly I can proceed with sem log and changelog sans review. |
| Awesome sounds great. |
Adds a few new features:
sem reviewandsem logwork with historical state whereassem graphandsem impactwork with current state. Signature change detection (new capability, powers the [signature changed] / [body only] labels in review and changelog).sem logfull history of any function (entity), following it through renames and moves across commitssem changelogauto-categorized release notes from a commit range with a suggested semver bumpsem reviewgroups changes by impact (API surface, internal, config) with dependency counts and a risk assessmentOther items in this PR:
Example usage/output
Example usages:
sem log --entity authenticateUser # finds all references to entity (ex. a function)
sem log --entity login --file src/auth.ts # constrains search to specific file
Example output:
Example usages:
sem changelog --from v1.2.0 --to HEAD # ex changes spanning a tag range (or commits)
sem changelog --from v1.0.0 --to v2.0.0 --format markdown
Example output: