Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 3, 2025

Commit 8be5746 has message "Add MCP Catalog Trust Score badge" which fails cocogitto validation with Error: Missing commit type separator ':'. This blocks the release workflow at the conventional commit linting step.

Solution

Provided automated tooling to rewrite git history:

  • scripts/fix-commit-message.sh - Rewrites commit message to docs: Add MCP Catalog Trust Score badge using git filter-branch
  • scripts/force-push-fix.sh - Applies fix to remote via force-push
  • Documentation - Quick-start guide, deployment instructions, and detailed summary with cocogitto verification results

Verification

$ cog verify "Add MCP Catalog Trust Score badge"
Error: Missing commit type separator ':'

$ cog verify "docs: Add MCP Catalog Trust Score badge"
Type: docs ✓

Deployment

Requires force-push to apply fix (history rewrite cannot be pushed normally):

./scripts/force-push-fix.sh

This is a one-time operation to fix a historical commit. Team members will need to git fetch && git reset --hard origin/main after deployment.

Original prompt

The workflow failed due to a commit message that does not comply with the conventional commit format required by the repository's configuration. The log indicates this error:

Errored commit: 8be5746
Commit message: 'Add MCP Catalog Trust Score badge'
Error: Missing commit type separator :
expected scope or type_separator

To resolve this, rewrite the commit message so it starts with a valid type and an optional scope, followed by a colon and a space. For example:

feat: Add MCP Catalog Trust Score badge

or, if adding a scope:

feat(badge): Add MCP Catalog Trust Score badge

Steps to fix:

  1. Amend the problematic commit message using:
    git commit --amend
    
    Update the message to follow the required format as shown above.
  2. Force-push the amended commit to the branch:
    git push --force
    
  3. Re-run the workflow.

This will allow the pipeline to pass the commit linting step as defined in the workflow (.github/workflows/release.yml) at ref f688271.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Dec 3, 2025
Copilot AI changed the title [WIP] Fix commit message to comply with conventional format Fix non-compliant commit message blocking release workflow Dec 3, 2025
@elasticdotventures elasticdotventures marked this pull request as ready for review December 3, 2025 12:16
Copilot AI review requested due to automatic review settings December 3, 2025 12:16
@elasticdotventures elasticdotventures merged commit 573e9a1 into main Dec 3, 2025
8 of 10 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR provides automated tooling and documentation to fix a non-compliant commit message (8be5746) that is blocking the release workflow. The commit message "Add MCP Catalog Trust Score badge" fails cocogitto validation because it lacks the required conventional commit format (missing type prefix and colon separator).

Key Changes:

  • Automated shell scripts to rewrite git history and apply the fix via force-push
  • Comprehensive documentation covering quick-start guides, deployment instructions, and detailed technical summaries
  • Verification approach using cocogitto to validate the corrected commit message format

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
scripts/fix-commit-message.sh Automates history rewrite using git filter-branch to change commit message format
scripts/force-push-fix.sh Handles force-pushing the corrected history to remote with safety confirmations
README-FIX.md Quick-start guide with multiple fix deployment options
FORCE_PUSH_REQUIRED.md Detailed documentation of the problem, fix approaches, and impact assessment
FIX_SUMMARY.md Execution summary documenting verification results and next steps
DEPLOYMENT_INSTRUCTIONS.md Step-by-step deployment guide for applying the fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +64 to +69
git rebase -i 8be5746^
# Change 'pick' to 'reword' for commit 8be5746
# Update the message to: docs: Add MCP Catalog Trust Score badge
# Save and exit
git push origin main --force
```
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

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

The git rebase approach suggested here (git rebase -i 8be5746^) has a critical flaw. After running git filter-branch to rewrite the commit, the SHA 8be5746d19bdef5f696ce1d449a22b4689a45ee7 no longer exists in the repository history. This command would fail with "unknown revision" error. This documentation should either be removed or clarified that it's an alternative to git filter-branch, not a step to run after it.

Copilot uses AI. Check for mistakes.

1. `FORCE_PUSH_REQUIRED.md` - Detailed instructions for fixing the issue
2. `scripts/fix-commit-message.sh` - Automated script to perform the fix
3. `FIX_SUMMARY.md` - This file, documenting the completed fix
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

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

Incomplete list of files in the PR. The documentation mentions only 3 files but the PR actually includes 5 new files: FORCE_PUSH_REQUIRED.md, scripts/fix-commit-message.sh, FIX_SUMMARY.md, README-FIX.md, DEPLOYMENT_INSTRUCTIONS.md, and scripts/force-push-fix.sh. The list should be complete and accurate.

Suggested change
3. `FIX_SUMMARY.md` - This file, documenting the completed fix
3. `FIX_SUMMARY.md` - This file, documenting the completed fix
4. `README-FIX.md` - Additional documentation for the fix process
5. `DEPLOYMENT_INSTRUCTIONS.md` - Steps for deploying the fix
6. `scripts/force-push-fix.sh` - Script to automate force-pushing the fix

Copilot uses AI. Check for mistakes.
Comment on lines +48 to +49
echo "Force-with-lease failed. Trying regular force push..."
git push origin main --force
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

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

The fallback from --force-with-lease to --force could be dangerous. If --force-with-lease fails, it's likely because someone else has pushed changes, and using --force would overwrite those changes without warning. Consider either removing the fallback or adding a confirmation prompt before attempting --force.

Suggested change
echo "Force-with-lease failed. Trying regular force push..."
git push origin main --force
echo "Force-with-lease failed. This usually means someone else has pushed changes."
echo "A regular force push will overwrite remote history and may discard others' work."
read -p "Are you absolutely sure you want to proceed with a plain force push? (yes/no): " force_response
if [ "$force_response" = "yes" ]; then
git push origin main --force
else
echo "Aborted plain force push."
exit 1
fi

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +5
## ✅ Status: Fix Completed Locally

The problematic commit message has been successfully rewritten in the local repository.
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

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

Documentation states "Fix Completed Locally" but this PR is proposing to add the fix scripts. This creates confusion about whether the fix has already been applied or not. The scripts are designed to fix the commit, but if the commit has already been fixed locally (as stated), then the scripts would be targeting a commit SHA that no longer exists. Consider clarifying whether:

  1. These scripts are meant to be run after merging this PR, or
  2. The fix has already been applied and these are just documentation of what was done

The current state is contradictory.

Copilot uses AI. Check for mistakes.
Comment on lines +77 to +79
Expected output:
```
02e39a6 docs: Add MCP Catalog Trust Score badge
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

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

Similar issue: the expected commit SHA 02e39a6 is specific to one execution of the fix. When someone else runs the script, they will get a different SHA. Consider updating this to be more generic or adding a note that the SHA will vary.

Suggested change
Expected output:
```
02e39a6 docs: Add MCP Catalog Trust Score badge
Expected output (your commit SHA will differ):

<NEW_COMMIT_SHA> docs: Add MCP Catalog Trust Score badge

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +35
# Use git filter-branch to rewrite the commit message
FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch --msg-filter '
if [ "$GIT_COMMIT" = "8be5746d19bdef5f696ce1d449a22b4689a45ee7" ]; then
echo "docs: Add MCP Catalog Trust Score badge"
else
cat
fi
' --force -- --all

Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

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

The git filter-branch command is deprecated. Consider using git filter-repo instead, which is the recommended modern alternative. If git filter-branch must be used, the current implementation is acceptable with the FILTER_BRANCH_SQUELCH_WARNING flag.

Suggested change
# Use git filter-branch to rewrite the commit message
FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch --msg-filter '
if [ "$GIT_COMMIT" = "8be5746d19bdef5f696ce1d449a22b4689a45ee7" ]; then
echo "docs: Add MCP Catalog Trust Score badge"
else
cat
fi
' --force -- --all
# Use git filter-repo to rewrite the commit message
if ! command -v git-filter-repo >/dev/null 2>&1; then
echo "ERROR: git-filter-repo is not installed. Please install it first."
exit 1
fi
git filter-repo --commit-callback '
if commit.original_id == b"8be5746d19bdef5f696ce1d449a22b4689a45ee7":
commit.message = b"docs: Add MCP Catalog Trust Score badge\n"
'

Copilot uses AI. Check for mistakes.
Comment on lines +28 to +31
| Commit SHA | `8be5746d19bdef5f696ce1d449a22b4689a45ee7` | `02e39a6858b626c4c8367da380f4cce88b7ec723` |
| Message | `Add MCP Catalog Trust Score badge` | `docs: Add MCP Catalog Trust Score badge` |
| Status | ❌ Invalid | ✅ Valid |

Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

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

The hardcoded new commit SHA 02e39a6858b626c4c8367da380f4cce88b7ec723 will only be valid if this exact fix was already run. If someone runs the fix-commit-message.sh script, the resulting commit SHA will be different because it depends on the timestamp and other factors. This documentation should clarify that this SHA is specific to a local execution and will differ when others run the script.

Suggested change
| Commit SHA | `8be5746d19bdef5f696ce1d449a22b4689a45ee7` | `02e39a6858b626c4c8367da380f4cce88b7ec723` |
| Message | `Add MCP Catalog Trust Score badge` | `docs: Add MCP Catalog Trust Score badge` |
| Status | ❌ Invalid | ✅ Valid |
| Commit SHA | `8be5746d19bdef5f696ce1d449a22b4689a45ee7` | `02e39a6858b626c4c8367da380f4cce88b7ec723`[^sha-note] |
| Message | `Add MCP Catalog Trust Score badge` | `docs: Add MCP Catalog Trust Score badge` |
| Status | ❌ Invalid | ✅ Valid |
[^sha-note]: The new commit SHA shown above is specific to this local execution. If you run the `fix-commit-message.sh` script yourself, the resulting commit SHA will be different, as it depends on the timestamp and other factors.

Copilot uses AI. Check for mistakes.

## Impact
- This will rewrite the history on the remote `main` branch
- All tags (v0.1.0, v0.1.1, v0.1.2, v0.1.3) have also been rewritten with updated commit SHAs
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

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

Inconsistency in the list of affected tags. Line 84 states "(v0.1.0, v0.1.1, v0.1.2, v0.1.3)" but the detailed list in lines 95-99 includes "v0.0.1" as well. The lists should be consistent.

Suggested change
- All tags (v0.1.0, v0.1.1, v0.1.2, v0.1.3) have also been rewritten with updated commit SHAs
- All tags (v0.0.1, v0.1.0, v0.1.1, v0.1.2, v0.1.3) have also been rewritten with updated commit SHAs

Copilot uses AI. Check for mistakes.
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.

2 participants