Skip to content

fix: remove broken postbump script from .versionrc.json#824

Merged
carlos-alm merged 2 commits intomainfrom
fix/823-versionrc-postbump
Apr 4, 2026
Merged

fix: remove broken postbump script from .versionrc.json#824
carlos-alm merged 2 commits intomainfrom
fix/823-versionrc-postbump

Conversation

@carlos-alm
Copy link
Copy Markdown
Contributor

Summary

  • Removes the scripts.postbump entry from .versionrc.json that referenced non-existent sync-native-versions.js
  • The npm version lifecycle in package.json already handles native version sync correctly via the .ts file, making this entry both redundant and broken

Closes #823

Test plan

  • Run npm run release:dry-run to verify commit-and-tag-version still works without the postbump script

The postbump referenced non-existent sync-native-versions.js. The npm
version lifecycle in package.json already handles native version sync
correctly via the .ts file, making this entry both redundant and broken.

Closes #823
@claude
Copy link
Copy Markdown

claude bot commented Apr 4, 2026

Claude finished @carlos-alm's task —— View job


PR Review: Remove broken postbump script from .versionrc.json

Todo List:

  • Read the changed .versionrc.json file to understand the modification
  • Check if the referenced sync-native-versions.js script actually exists
  • Verify the npm lifecycle scripts in package.json
  • Apply Phase 1: Root cause analysis
  • Apply Phase 2: Configuration change detection
  • Apply Phase 3: Test integrity check
  • Apply Phase 4: Code quality review
  • Apply Phase 5: Backlog compliance assessment
  • Provide final recommendation

Root Cause Analysis

Problem Being Solved: The .versionrc.json config contained a broken postbump script that referenced a non-existent file (scripts/sync-native-versions.js). This would cause commit-and-tag-version to fail during release.

Why This Approach: The fix correctly removes the redundant broken entry. The npm version lifecycle script in package.json:99 already handles the same task correctly by calling scripts/sync-native-versions.ts and staging the necessary files.

Risk Assessment: ✅ LOW RISK - This is fixing a genuine broken configuration, not hiding symptoms. The functionality is preserved through the npm lifecycle hook.

Phase 2: Configuration Change Detection

SAFE CONFIG CHANGE - This removes a broken reference rather than relaxing rules or lowering standards. No linting rules are modified, no test thresholds are lowered.

Phase 3: Test Integrity

NO TEST ISSUES - No test files modified, no assertions weakened. The change is purely configuration cleanup.

Phase 4: Code Quality

CLEAN CHANGE - The modification is minimal and precise:

  • Removes 4 lines (the broken scripts.postbump entry)
  • Adds proper JSON formatting (trailing comma removal on tagPrefix)
  • No functional code changes

Backlog Compliance

  • Zero-dep: ✅ - No new dependencies added
  • Foundation-aligned: ✅ - Simple config fix, no principle violations
  • Problem-fit: 3/5 - Infrastructure maintenance, indirectly helps release process reliability
  • Breaking: No - This is purely a fix for broken functionality
  • Tier: 1 (zero-dep ✓ + foundation-aligned ✓)

Critical Concerns

None identified. This is a straightforward fix for broken configuration.

Verification

  • ✅ The referenced sync-native-versions.js file does not exist
  • ✅ The sync-native-versions.ts file exists and is properly invoked by npm lifecycle
  • ✅ The package.json version script handles the same functionality: "version": "node scripts/node-ts.js scripts/sync-native-versions.ts && git add package.json crates/codegraph-core/Cargo.toml"

Final Recommendation

  • Rating: ⭐⭐⭐⭐☆ (4/5)
  • Action: APPROVE
  • Reasoning: Clean fix for broken configuration. The approach is correct - removing redundant broken entry while preserving functionality through the npm lifecycle hook. No risk of regression.

Minor suggestion: The test plan mentions running npm run release:dry-run but this would require additional tooling permissions. The change is safe enough to approve without that verification step.


@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 4, 2026

Greptile Summary

This PR removes the scripts.postbump entry from .versionrc.json that referenced scripts/sync-native-versions.js, a file that does not exist in the repository (only scripts/sync-native-versions.ts exists). The version lifecycle hook in package.json already invokes the .ts file via node scripts/node-ts.js scripts/sync-native-versions.ts and stages the resulting changes, making the postbump entry both dead and broken.

Confidence Score: 5/5

Safe to merge — removes a broken reference to a non-existent file with no functional impact on the release pipeline.

The change is a four-line deletion that eliminates a postbump hook pointing to a JS file that doesn't exist; the equivalent TS script is already correctly wired through package.json's version lifecycle. No logic is altered and no regressions are possible.

No files require special attention.

Important Files Changed

Filename Overview
.versionrc.json Removes the broken postbump script entry referencing the non-existent sync-native-versions.js; the .ts equivalent is already invoked by package.json's version lifecycle hook.

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant CAT as commit-and-tag-version
    participant NPM as npm lifecycle
    participant Script as sync-native-versions.ts

    Dev->>CAT: npm run release
    CAT->>CAT: bump version in package.json
    CAT->>NPM: triggers `version` lifecycle
    NPM->>Script: node scripts/node-ts.js scripts/sync-native-versions.ts
    Script-->>NPM: syncs Cargo.toml version
    NPM->>NPM: git add package.json crates/codegraph-core/Cargo.toml
    NPM-->>CAT: lifecycle complete
    Note over CAT: postbump hook (REMOVED) would have failed here
    CAT->>CAT: commit + tag release
Loading

Reviews (1): Last reviewed commit: "fix: remove broken postbump script from ..." | Re-trigger Greptile

@carlos-alm carlos-alm merged commit ead169d into main Apr 4, 2026
12 checks passed
@carlos-alm carlos-alm deleted the fix/823-versionrc-postbump branch April 4, 2026 09:50
@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: .versionrc.json postbump references non-existent sync-native-versions.js

1 participant