Skip to content

Fix semantic diff handling for direct node edits#26

Closed
orban wants to merge 2 commits intonightshift/bus-factorfrom
feature/semantic-diff-fix
Closed

Fix semantic diff handling for direct node edits#26
orban wants to merge 2 commits intonightshift/bus-factorfrom
feature/semantic-diff-fix

Conversation

@orban
Copy link
Copy Markdown
Owner

@orban orban commented Apr 4, 2026

Summary

  • add the semantic diff explainer implementation on top of nightshift/bus-factor
  • fix direct AGENTS.md / CLAUDE.md changes by treating modified Intent nodes as scoped inputs to themselves
  • add a regression test covering CLAUDE.md-only diffs so node-only changes no longer abort under set -u

Assumptions and limitations

  • this stays within the narrow first version: standalone CLI script, shell tests, and docs already included in the original feature work
  • offline heuristic summaries remain intentionally shallow when ANTHROPIC_API_KEY is unset; this PR only fixes correctness for direct node edits

Validation

  • ./tests/test_explain_semantic_diff.sh
  • ./tests/test_suggest_updates.sh

Sample output

# Semantic Diff Explainer

Range: main..HEAD
Changed files: 1

## src/AGENTS.md

Summary: The diff changes executable code in this node and deserves semantic review.
Changed files: 1
Confidence: high

Behavioral impact: Behavior likely changed in code paths covered by this node, not just formatting or comments.
Contract impact: Interfaces, invariants, or caller expectations likely changed and should be reviewed against the node guidance.
Internal-only signal: No clear internal-only signal.

Review focus:
- Re-read the node entry point `src/api.ts` because the main workflow changed.
- Inspect `src/api.ts` for user-visible logic changes and edge-case handling.

orban added 2 commits April 3, 2026 23:32
Nightshift-Task: semantic-diff
Nightshift-Ref: https://github.com/marcus/nightshift
@orban
Copy link
Copy Markdown
Owner Author

orban commented Apr 15, 2026

Superseded by #27, which the PR body explicitly acknowledges ('This supersedes the earlier review state on feature/semantic-diff-fix / PR #26'). Closing to consolidate review.

@orban orban closed this Apr 15, 2026
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