Skip to content

feat: add bidirectional sync workflow - #14

Merged
Mearman merged 3 commits into
mainfrom
exadev-bidirectional-sync
Feb 17, 2026
Merged

Mearman merged 3 commits into
mainfrom
exadev-bidirectional-sync

Conversation

@Mearman

@Mearman Mearman commented Feb 17, 2026

Copy link
Copy Markdown
Member

Improves workflow security, adds markdown formatting consistency, and fixes git hook coverage:

  • Moves secrets into environment variables to prevent log exposure
  • Formats self-improvement prompt table for consistency
  • Adds post-rewrite hook to catch lint issues on git commit --amend (pre-commit doesn't run on amends)
  • Includes non-functional -o ci.skip flag that needs removal (GitHub doesn't support this push option)

Note: The -o ci.skip approach won't work and creates an infinite loop risk. Needs loop prevention mechanism.

@Mearman
Mearman force-pushed the exadev-bidirectional-sync branch from 6c12aaf to 3e5fecd Compare February 17, 2026 11:04
Adds workflow to sync changes between ExaDev and adpeak repos.
Rebases on push; creates PR for manual conflict resolution.
Adds workflow to sync changes between ExaDev and adpeak repos.
Rebases on push; creates PR for manual conflict resolution.
@claude

claude Bot commented Feb 17, 2026

Copy link
Copy Markdown

Previous review superseded by force push. Reviewing current changes.

Git commit --amend doesn't always trigger pre-commit hooks.
Add post-rewrite hook that runs lint-staged after amends/rebases
to catch formatting issues that would otherwise slip through.
@Mearman
Mearman force-pushed the exadev-bidirectional-sync branch from 0c1251a to c8654ed Compare February 17, 2026 11:24
@claude
claude Bot dismissed a stale review February 17, 2026 11:25

Superseded by force push

@Mearman
Mearman merged commit 7b3ade1 into main Feb 17, 2026
2 checks passed
@Mearman
Mearman deleted the exadev-bidirectional-sync branch February 17, 2026 11:25

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mixed changes with one critical issue that must be fixed.

Security fix (good): Environment variables prevent secret leakage in logs.

Husky hook (good): Post-rewrite hook correctly catches lint issues on amends since pre-commit doesn't run on git commit --amend.

Critical bug: The -o ci.skip flag doesn't exist. Without loop prevention, this creates infinite workflow triggers between repos.

# Rebase successful - push directly to main
git push target HEAD:main
# Rebase successful - push with ci.skip to prevent triggering workflow loop
git push target HEAD:main -o ci.skip

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The -o ci.skip push option doesn't exist in GitHub. To skip workflow triggers, include [skip ci], [ci skip], [no ci], [skip actions], or [actions skip] in commit messages instead.

However, you can't modify commit messages during git rebase of others' commits. This workflow will create an infinite loop: ExaDev pushes → triggers adpeak workflow → adpeak pushes → triggers ExaDev workflow.

You need loop prevention. Options:

  1. Check commit messages for a sync marker (e.g., skip if any commit contains [sync from)
  2. Check if commits were authored by github-actions[bot]
  3. Use a repository variable or separate sync token to detect sync commits
Suggested change
git push target HEAD:main -o ci.skip
# Rebase successful - push directly to main
git push target HEAD:main


- name: Verify required configuration
env:
SYNC_PRIVATE_KEY: ${{ secrets.SYNC_PRIVATE_KEY }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good security fix. Moving secrets into environment variables prevents them from appearing in logs if the script encounters errors that echo the command.

Comment thread .husky/post-rewrite
#!/bin/sh
# Run lint-staged after git commit --amend or rebase
# This catches formatting issues that pre-commit missed
npx lint-staged

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Correct solution. The pre-commit hook does not run on git commit --amend, so formatting issues can slip through. The post-rewrite hook runs after amends and rebases, catching these issues.

One consideration: this will run lint-staged after every rewritten commit during an interactive rebase, which could slow down multi-commit rebases. This is standard behavior and acceptable.

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