Skip to content

docs: fork workflow + CONTRIBUTING.md#2

Open
GiuseppeIuculano wants to merge 7 commits into
mainfrom
chore/repo-workflow-docs
Open

docs: fork workflow + CONTRIBUTING.md#2
GiuseppeIuculano wants to merge 7 commits into
mainfrom
chore/repo-workflow-docs

Conversation

@GiuseppeIuculano
Copy link
Copy Markdown
Member

Summary

Documents the fork's branching strategy and contribution workflow. Pairs with the new upstream-sync branch (also pushed) to establish a clean separation between CTMobi's evolved state and upstream's mainline.

What ships in this PR

  • CONTRIBUTING.md covering:
    • Repo structure (two long-lived branches: main + upstream-sync)
    • Standard remote naming (origin = CTMobi, upstream = kdowswell)
    • Periodic sync procedure (git reset --hard upstream/main + force-push to upstream-sync)
    • Branch base selection: main for fork-internal work, upstream-sync for changes intended for upstream
    • PR rules per branch, branch naming convention
    • Decision tree for where a change should live

Why now

The fork was just created and hadn't diverged from upstream yet — perfect moment to establish the structure before customizations make it harder to retrofit.

Companion artifacts (not in this PR)

  • Branch upstream-sync already created and pushed; tracks upstream/main at f87f3a9 (current upstream HEAD).
  • Remote names locally swapped to convention (originupstream).

Test plan

  • Branch upstream-sync exists at origin/upstream-sync and points to f87f3a9
  • Team confirms the decision-tree section reflects how they want to make routing decisions
  • First sync cycle exercise (next time kdowswell merges anything) validates the documented procedure end-to-end

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings May 24, 2026 07:57
Copy link
Copy Markdown

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 adds contributor documentation for CTMobi’s veo-tools fork, defining how the fork tracks upstream while supporting CTMobi-specific development.

Changes:

  • Adds CONTRIBUTING.md with branch strategy for main and upstream-sync.
  • Documents upstream sync, feature branch, PR, and branch naming workflows.
  • Adds a decision tree for routing changes to CTMobi or upstream.

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

Comment thread CONTRIBUTING.md Outdated
Comment on lines +103 to +104
- **Never push directly to `main` or `upstream-sync`**. Always go through a PR.
- **`upstream-sync` PRs**: only the sync procedure (force-push reset). No code reviews needed for the reset itself; if a sync introduces conflicts when merging into `main`, those conflicts are reviewed in the follow-up `main` PR.
Comment thread CONTRIBUTING.md Outdated
```bash
git checkout main
git fetch origin
git merge upstream-sync # or: git rebase upstream-sync
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a comprehensive CONTRIBUTING.md file to establish the workflow for the CTMobi/veo-tools fork, detailing branch management and synchronization with the upstream repository. Review feedback highlighted several areas for improvement, including resolving a contradiction regarding direct pushes to the upstream-sync branch, clarifying the git cherry-pick syntax, and refining the decision-making process for merging urgent fixes into the fork's main branch while simultaneously proposing them upstream.

Comment thread CONTRIBUTING.md Outdated
```bash
git checkout main
git checkout -b feat/<short-name>-fork
git cherry-pick <commit-sha>...
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The ellipsis ... in the command might be misinterpreted as part of the syntax or a specific git range operator. It is clearer to use a standard placeholder for the commit(s) to be picked.

Suggested change
git cherry-pick <commit-sha>...
git cherry-pick <commit-sha>

Comment thread CONTRIBUTING.md Outdated
Comment on lines +103 to +104
- **Never push directly to `main` or `upstream-sync`**. Always go through a PR.
- **`upstream-sync` PRs**: only the sync procedure (force-push reset). No code reviews needed for the reset itself; if a sync introduces conflicts when merging into `main`, those conflicts are reviewed in the follow-up `main` PR.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

There is a contradiction between the rule forbidding direct pushes to upstream-sync (line 103) and the documented sync procedure (line 36) which uses a direct force-push. Additionally, the mention of "upstream-sync PRs" is confusing if the branch is a mirror updated via reset --hard. If upstream-sync is a mirror, it is standard to allow direct force-pushes for the sync process.

Suggested change
- **Never push directly to `main` or `upstream-sync`**. Always go through a PR.
- **`upstream-sync` PRs**: only the sync procedure (force-push reset). No code reviews needed for the reset itself; if a sync introduces conflicts when merging into `main`, those conflicts are reviewed in the follow-up `main` PR.
- **Never push directly to `main`**. Always go through a PR. `upstream-sync` is an exception as it is a mirror updated via the sync procedure.
- **Sync PRs**: When merging `upstream-sync` into `main`, use a PR (e.g., `sync/<date>`) if the merge is non-trivial. No code reviews are needed for the `upstream-sync` reset itself; conflicts are reviewed in the follow-up `main` PR.

Comment thread CONTRIBUTING.md Outdated

```
Is the change something kdowswell would likely accept?
├── Yes → base from upstream-sync, PR to kdowswell. Mirror it to CTMobi only if blocked or rejected.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The decision tree suggests mirroring changes to the CTMobi fork only if they are blocked or rejected by upstream. This could delay getting important fixes into the fork's main branch. It is often better to allow merging into main immediately if the change is needed for internal work while simultaneously proposing it upstream.

Suggested change
├── Yes → base from upstream-sync, PR to kdowswell. Mirror it to CTMobi only if blocked or rejected.
├── Yes → base from upstream-sync, PR to kdowswell. Also PR to CTMobi's main if the change is needed immediately.

Comment thread CONTRIBUTING.md Outdated
└── base from main, PR to CTMobi.
```

When in doubt, base from `main` and PR to CTMobi — it's the safer default. Promoting fork-internal commits to an upstream PR is straightforward via cherry-pick from `upstream-sync`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The phrase "via cherry-pick from upstream-sync" is technically incorrect for the described workflow. You would cherry-pick from a fork-internal branch onto a new branch based on upstream-sync to prepare an upstream PR.

Suggested change
When in doubt, base from `main` and PR to CTMobi — it's the safer default. Promoting fork-internal commits to an upstream PR is straightforward via cherry-pick from `upstream-sync`.
When in doubt, base from `main` and PR to CTMobi — it's the safer default. Promoting fork-internal commits to an upstream PR is straightforward: create a branch from `upstream-sync` and cherry-pick the relevant commits onto it.

GiuseppeIuculano added a commit that referenced this pull request May 24, 2026
Resolved 7 findings from Copilot (5) and gemini-code-assist (2).

Architectural:
- registerRule() global registry replaced with createValidator()
  factory pattern. FOUNDATION_RULES exported as array; each skill
  creates its own validator with baseRules + extraRules. Avoids
  module-level singleton state, cross-skill leakage, test-order
  dependence. Foundation owns FOUNDATION_RULES + createValidator;
  sub-projects ship their own rule arrays.
- New rule #9: outputPath required when storageUri is unset.
  Catches missing output destination at validation time instead
  of failing late in the download phase.

Cleanup:
- VeoConfig.durationSeconds comment updated to reflect model-aware
  validation (Veo 3.x → {4,6,8}; Veo 2 → {5,6,7,8}), not a fixed set
- New Open Question #4: Veo 2 allowed durations verification
  (rule #1 referenced it but the OQ didn't exist; previously cross-
  referenced sampleCount's OQ by mistake)
- Open Question #1 (Default model ID) moved to new "Resolved
  decisions" subsection; Open Questions list renumbered 1-4
- tsconfig-paths moved from devDependencies to dependencies (used
  at runtime by scripts via -r tsconfig-paths/register)
- negativePrompt "no/don't" guidance moved out of "Valid values"
  column into descriptive Notes, since it's non-enforceable

Cross-reference renumbering propagated:
- Rule #1: Open Question #5 → #4 (Veo 2 durations)
- Rule #5: Open Question #3#2 (token counting heuristic)
- Rule #6: Open Question #2#1 (region detection)
- Rule #7: Open Question #4 → #3 (sampleCount)
- Resolved decisions: Open Question #4 → #2 (token counting)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@GiuseppeIuculano
Copy link
Copy Markdown
Member Author

Bot review applied (commit b5faf53)

Resolved 6 findings from @copilot-pull-request-reviewer (2) and @gemini-code-assist (4).

Substantive (3)

Source Finding Resolution
Copilot + gemini "Never push directly to main or upstream-sync" contradicts the sync procedure (which force-pushes to upstream-sync) Rule rewritten: upstream-sync is exempt because it's a mirror, not a working branch. No PR / no review for the verbatim upstream replication. Added "main sync PRs" guidance for the merge into main.
Copilot git merge upstream-sync after git fetch origin uses a possibly-stale local branch Sync procedure updated: pull upstream-sync first to fast-forward the local copy. Alternative noted: merge origin/upstream-sync directly.
gemini #5 Decision tree's "Mirror to CTMobi only if blocked or rejected" can delay urgent fixes Tree expanded to allow parallel PRs (upstream + fork) when a change is needed urgently in the fork. Avoids blocking internal work on upstream's review cadence.

Cleanup (2)

Source Finding Resolution
gemini #3 git cherry-pick <commit-sha>... — ellipsis could be parsed as git range Replaced with single <commit-sha> placeholder + comment that multiple SHAs are space-separated
gemini #6 Phrase "via cherry-pick from upstream-sync" was technically inverted Reworded to describe the actual flow: create branch from upstream-sync and cherry-pick fork-internal commits onto it

Diff summary

b5faf53: 24 insertions, 10 deletions. All contradictions internal to the doc resolved; sync procedure now safe against stale local branches; decision tree handles the urgent-fix case.

@GiuseppeIuculano
Copy link
Copy Markdown
Member Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a comprehensive CONTRIBUTING.md file that outlines the branching strategy and contribution workflows for the CTMobi fork of veo-tools. The documentation covers branch synchronization, feature development, and decision-making for upstream contributions. Feedback focused on making the git command examples more robust; specifically, using git checkout -B instead of git pull for the upstream-sync mirror branch to handle remote history rewrites. Additionally, a correction was noted for a summarized sync command to include a necessary checkout step, preventing accidental destructive resets on the main branch.

Comment thread CONTRIBUTING.md Outdated
Comment on lines +47 to +48
git checkout upstream-sync
git pull --ff-only origin upstream-sync # ensure local upstream-sync matches the latest refresh on origin
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Since upstream-sync is a mirror that is updated via force-push on the remote (as described in the sync procedure), a standard git pull --ff-only will fail for other contributors if the history has been rewritten. Using git checkout -B with the remote-tracking branch is a more robust way to synchronize the local mirror to match the remote state.

Suggested change
git checkout upstream-sync
git pull --ff-only origin upstream-sync # ensure local upstream-sync matches the latest refresh on origin
git checkout -B upstream-sync origin/upstream-sync

Comment thread CONTRIBUTING.md Outdated
Comment on lines +78 to +79
git checkout upstream-sync
git pull origin upstream-sync # ensure latest sync
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Similar to the previous section, git pull will fail if the upstream-sync branch was force-pushed on the remote. It is safer to fetch and then reset the local branch to match the remote state exactly to ensure a clean base for upstream PRs.

Suggested change
git checkout upstream-sync
git pull origin upstream-sync # ensure latest sync
git fetch origin
git checkout -B upstream-sync origin/upstream-sync

Comment thread CONTRIBUTING.md Outdated
## Pull request rules

- **Never push directly to `main`**. Always go through a PR.
- **`upstream-sync` is exempt from the PR rule** because it's a mirror, not a working branch. It is refreshed via the documented sync procedure (`git fetch upstream && git reset --hard upstream/main && git push --force-with-lease origin upstream-sync`). No PR, no code review for the reset itself — there's nothing reviewable about replicating upstream verbatim.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The summarized sync command sequence is missing a git checkout upstream-sync step. If a user runs git reset --hard upstream/main while on the main branch, they will lose all their local customizations and overwrite them with the upstream state.

Suggested sequence:
git fetch upstream && git checkout upstream-sync && git reset --hard upstream/main && git push --force-with-lease origin upstream-sync

Copy link
Copy Markdown

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@GiuseppeIuculano
Copy link
Copy Markdown
Member Author

Second-round bot review applied (commit b1d1c23)

Resolved 3 gemini-code-assist findings. Copilot reported a tooling error and didn't review this round; their previous findings were already addressed in b5faf53.

All three findings (force-push robustness)

# Finding Resolution
1 Sync procedure TL;DR was missing git checkout upstream-sync — running git reset --hard upstream/main while on main would silently overwrite main Added explicit git checkout upstream-sync step with bold inline comment warning about the consequence of skipping it
2 git pull --ff-only upstream-sync fails after a force-push (history rewrite breaks fast-forward) Replaced with git checkout -B upstream-sync origin/upstream-sync — unconditionally aligns local branch to remote state. Correct semantics for a mirror branch.
3 Same problem in the "Feature branches from upstream-sync" section Same fix applied with reference back to the rationale

Diff summary

b1d1c23: 8 insertions, 9 deletions. The doc now describes a sync workflow that works correctly for all contributors regardless of when they last fetched.

@GiuseppeIuculano
Copy link
Copy Markdown
Member Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a comprehensive CONTRIBUTING.md guide for the CTMobi fork of veo-tools, detailing the branching strategy and workflows for syncing with upstream and managing internal features. The reviewer provided several actionable suggestions to improve the safety and consistency of the documented Git commands. Key feedback includes replacing risky git reset sequences with atomic git checkout -B commands to prevent accidental data loss and ensuring that the workflow for merging upstream changes into main correctly follows the project's pull request policy instead of suggesting direct pushes.

Comment thread CONTRIBUTING.md Outdated
Comment on lines +34 to +35
git checkout upstream-sync # IMPORTANT: switch to upstream-sync before reset
git reset --hard upstream/main
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Using git checkout followed by git reset --hard is risky. If the checkout fails (e.g., if the branch doesn't exist locally), the reset will execute on the current branch (likely main), potentially leading to data loss. Using git checkout -B is a safer, atomic way to create or reset the local branch to the desired upstream state regardless of the current branch. The warning in line 30 should also be updated to reflect this change.

Suggested change
git checkout upstream-sync # IMPORTANT: switch to upstream-sync before reset
git reset --hard upstream/main
git checkout -B upstream-sync upstream/main

Comment thread CONTRIBUTING.md Outdated
| Branch | Purpose | Modification rules |
|---|---|---|
| `main` | Default branch of the fork. Reflects CTMobi's evolved state: includes upstream changes that have been synced **plus** customizations not in upstream (yet or ever). | Only via PR. Default base for fork-internal feature branches. |
| `upstream-sync` | Clean mirror of `kdowswell/veo-tools:main`. Never modified by hand. | Updated only via the sync procedure below (`git reset --hard upstream/main` + force push). |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Update the description of the sync procedure to match the safer git checkout -B command suggested in the workflows section.

Suggested change
| `upstream-sync` | Clean mirror of `kdowswell/veo-tools:main`. Never modified by hand. | Updated only via the sync procedure below (`git reset --hard upstream/main` + force push). |
| `upstream-sync` | Clean mirror of `kdowswell/veo-tools:main`. Never modified by hand. | Updated only via the sync procedure below (`git checkout -B upstream-sync upstream/main` + force push). |

Comment thread CONTRIBUTING.md
Comment on lines +48 to +52
git checkout main
git pull --ff-only origin main
git merge upstream-sync # or: git rebase upstream-sync
# resolve conflicts if customizations clash with upstream changes
git push origin main
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This workflow snippet suggests pushing directly to main, which contradicts the 'Never push directly to main' rule (line 107). Since merging upstream-sync into main typically involves merge commits or conflict resolution, it should be done via a PR to maintain visibility and history as per line 109.

Suggested change
git checkout main
git pull --ff-only origin main
git merge upstream-sync # or: git rebase upstream-sync
# resolve conflicts if customizations clash with upstream changes
git push origin main
git checkout main
git pull --ff-only origin main
git checkout -b sync/$(date +%Y-%m-%d)
git merge upstream-sync # or: git rebase upstream-sync
# resolve conflicts if customizations clash with upstream changes
git push -u origin sync/$(date +%Y-%m-%d)
gh pr create --repo CTMobi/veo-tools --base main --fill

Comment thread CONTRIBUTING.md Outdated
## Pull request rules

- **Never push directly to `main`**. Always go through a PR.
- **`upstream-sync` is exempt from the PR rule** because it's a mirror, not a working branch. It is refreshed via the documented sync procedure (`git fetch upstream && git reset --hard upstream/main && git push --force-with-lease origin upstream-sync`). No PR, no code review for the reset itself — there's nothing reviewable about replicating upstream verbatim.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Update the command summary to match the safer git checkout -B procedure.

Suggested change
- **`upstream-sync` is exempt from the PR rule** because it's a mirror, not a working branch. It is refreshed via the documented sync procedure (`git fetch upstream && git reset --hard upstream/main && git push --force-with-lease origin upstream-sync`). No PR, no code review for the reset itself — there's nothing reviewable about replicating upstream verbatim.
- **`upstream-sync` is exempt from the PR rule** because it's a mirror, not a working branch. It is refreshed via the documented sync procedure (`git fetch upstream && git checkout -B upstream-sync upstream/main && git push --force-with-lease origin upstream-sync`). No PR, no code review for the reset itself — there's nothing reviewable about replicating upstream verbatim.

Copy link
Copy Markdown

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@GiuseppeIuculano
Copy link
Copy Markdown
Member Author

Third-round bot review applied (commit 6b9b37b)

Resolved 4 @gemini-code-assist findings. @copilot-pull-request-reviewer continues to report tool errors on every retry.

Architectural fix — atomic git checkout -B (1 high-priority + 2 cleanup)

Source Severity Finding Resolution
gemini #1 High git checkout upstream-sync + git reset --hard upstream/main is unsafe — if the checkout fails (branch missing locally), the reset executes on the current branch, potentially overwriting main Switched to atomic git checkout -B upstream-sync upstream/main — creates-or-rewrites in a single op regardless of starting branch. Rationale documented inline.
gemini #2 Medium Repo structure table still describes the old git reset --hard pattern Updated to reflect the new git checkout -B sync command
gemini #4 Medium Pull request rules inline-command summary still uses old pattern Updated to the new -B form

Sync via PR (1)

Source Severity Finding Resolution
gemini #3 Medium "Bringing upstream changes into main" instructed direct git push origin main, contradicting the "Never push directly to main" rule Workflow rewritten to use a sync/<date> PR branch. gh pr create --base main --fill is the documented default. Direct fast-forward by maintainer kept as the explicit exception when there's literally nothing to review.

Diff summary

6b9b37b: 11 insertions, 10 deletions. All commands now use the safe atomic -B pattern. The sync flow now matches the "always PR" rule. Document is internally consistent for the first time across both branches' rules.

@GiuseppeIuculano
Copy link
Copy Markdown
Member Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a comprehensive CONTRIBUTING.md file that defines the branching strategy, synchronization workflows, and contribution guidelines for the CTMobi fork of veo-tools. The reviewer identified several opportunities to improve the documentation's consistency and robustness. Specifically, feedback was provided to align the branch modification rules with the documented exceptions for trivial upstream syncs and to use shell variables in command examples to avoid potential date mismatches during branch operations.

Comment thread CONTRIBUTING.md Outdated

| Branch | Purpose | Modification rules |
|---|---|---|
| `main` | Default branch of the fork. Reflects CTMobi's evolved state: includes upstream changes that have been synced **plus** customizations not in upstream (yet or ever). | Only via PR. Default base for fork-internal feature branches. |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The modification rules for the main branch should reflect the exception for trivial syncs mentioned later in the document (lines 56 and 110) to ensure the documentation is consistent throughout.

Suggested change
| `main` | Default branch of the fork. Reflects CTMobi's evolved state: includes upstream changes that have been synced **plus** customizations not in upstream (yet or ever). | Only via PR. Default base for fork-internal feature branches. |
| `main` | Default branch of the fork. Reflects CTMobi's evolved state: includes upstream changes that have been synced **plus** customizations not in upstream (yet or ever). | Only via PR (except for trivial upstream syncs). Default base for fork-internal feature branches. |

Comment thread CONTRIBUTING.md Outdated
Comment on lines +49 to +52
git checkout -b sync/$(date +%Y-%m-%d) # PR head branch
git merge upstream-sync # or: git rebase upstream-sync
# resolve conflicts if customizations clash with upstream changes
git push -u origin sync/$(date +%Y-%m-%d)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Using $(date +%Y-%m-%d) twice in the same sequence of commands can lead to a mismatch if the date changes (e.g., at midnight) between the branch creation and the push. Capturing the date in a variable makes the workflow more robust.

Suggested change
git checkout -b sync/$(date +%Y-%m-%d) # PR head branch
git merge upstream-sync # or: git rebase upstream-sync
# resolve conflicts if customizations clash with upstream changes
git push -u origin sync/$(date +%Y-%m-%d)
SYNC_DATE=$(date +%Y-%m-%d)
git checkout -b sync/$SYNC_DATE # PR head branch
git merge upstream-sync # or: git rebase upstream-sync
# resolve conflicts if customizations clash with upstream changes
git push -u origin sync/$SYNC_DATE

Comment thread CONTRIBUTING.md Outdated
Comment on lines +108 to +110
- **Never push directly to `main`**. Always go through a PR.
- **`upstream-sync` is exempt from the PR rule** because it's a mirror, not a working branch. It is refreshed via the documented sync procedure (`git fetch upstream && git checkout -B upstream-sync upstream/main && git push --force-with-lease origin upstream-sync`). No PR, no code review for the reset itself — there's nothing reviewable about replicating upstream verbatim.
- **`main` sync PRs**: when `upstream-sync` is merged into `main`, do it via a PR (e.g., `sync/<date>` branch) — especially if the merge has conflicts that resolved against customizations. Trivial fast-forward merges may be done directly by a maintainer, but a PR is preferred for visibility.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

There is a contradiction between the rule "Never push directly to main" and the exception allowed for maintainers during trivial syncs. Clarifying this in the rules section prevents confusion for contributors regarding when direct pushes are acceptable.

Suggested change
- **Never push directly to `main`**. Always go through a PR.
- **`upstream-sync` is exempt from the PR rule** because it's a mirror, not a working branch. It is refreshed via the documented sync procedure (`git fetch upstream && git checkout -B upstream-sync upstream/main && git push --force-with-lease origin upstream-sync`). No PR, no code review for the reset itself — there's nothing reviewable about replicating upstream verbatim.
- **`main` sync PRs**: when `upstream-sync` is merged into `main`, do it via a PR (e.g., `sync/<date>` branch) — especially if the merge has conflicts that resolved against customizations. Trivial fast-forward merges may be done directly by a maintainer, but a PR is preferred for visibility.
- **Never push directly to `main`** for feature work. Always go through a PR.
- **`upstream-sync` is exempt from the PR rule** because it's a mirror, not a working branch. It is refreshed via the documented sync procedure (`git fetch upstream && git checkout -B upstream-sync upstream/main && git push --force-with-lease origin upstream-sync`). No PR, no code review for the reset itself — there's nothing reviewable about replicating upstream verbatim.
- **`main` sync PRs**: when `upstream-sync` is merged into `main`, do it via a PR (e.g., `sync/<date>` branch) — especially if the merge has conflicts that resolved against customizations. Trivial fast-forward merges (no conflicts, no affected customizations) are the exception and may be done directly by a maintainer, though a PR is still preferred for visibility.

Copy link
Copy Markdown

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Resolved 1 superpower review finding (Important).

The previous "use --fill then edit before publishing" instruction
was misleading: gh pr create --fill skips the prompt and publishes
the PR immediately using the last commit message verbatim. For a
sync branch, that commit is typically a merge commit titled
"Merge origin/upstream-sync into sync/<date>" — useless for
reviewers and there's no "before publishing" window to edit.

Replaced with the interactive form (gh pr create without --fill):
gh prompts for title and body, the maintainer writes a real summary
of what upstream changes landed, and only then publishes. The
inline comment now explicitly warns against --fill for this
workflow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@GiuseppeIuculano
Copy link
Copy Markdown
Member Author

Superpower review applied (commit 87a13eb)

The senior reviewer agent caught one Important issue: the gh pr create --fill workflow I introduced was misleading.

# Finding Resolution
1 --fill skips the prompt and publishes immediately using the last commit message verbatim — "edit before publishing" doesn't work Dropped --fill. Workflow now uses interactive gh pr create (gh prompts for title and body). Inline comment explicitly warns against --fill for sync PRs

The agent's two Minor findings (rebase command not shown, recovery/direct-merge paragraph transition) were noted but not applied — they're true polish, not operational blockers.

Diff summary

87a13eb: 6 insertions, 3 deletions. The fix closes a workflow trap where a maintainer following the doc literally would end up with a published PR titled "Merge origin/upstream-sync" — exactly the outcome the previous comment was meant to prevent.

@GiuseppeIuculano
Copy link
Copy Markdown
Member Author

@gemini review

@GiuseppeIuculano
Copy link
Copy Markdown
Member Author

@claude review

@claude
Copy link
Copy Markdown

claude Bot commented May 24, 2026

Claude finished @GiuseppeIuculano's task in 2m 14s —— View job


Code Review — CONTRIBUTING.md

  • Load tools
  • Read current CONTRIBUTING.md (post-13th-round state, 161 lines)
  • Review for correctness, consistency, and completeness
  • Post findings

All findings from prior Claude reviews have been correctly applied. The document is in strong shape. One new usability gap surfaced this round:


Low — Direct merge exception uses inline prose command chain instead of a code block (line 76)

Every other workflow in the document uses a multi-line code block with inline # comments. The direct-merge exception is the sole outlier — it's buried as a long command string within a dense prose paragraph:

git checkout main && git pull --ff-only origin main && git fetch origin && git merge origin/upstream-sync && git push origin main

This is also the most dangerous workflow (bypasses PR), so it deserves at least the same presentation as the safer paths — not less. As prose, it's harder to copy reliably, and contributors who scan for code blocks will miss the safety notes entirely.

Suggested shape (the commands and rationale are already correct — this is purely formatting):

# Direct merge — only when: no conflicts, no customizations affected, truly nothing to review.
# PR path is the default. If in doubt, use the PR workflow above.
git checkout main
git pull --ff-only origin main     # fast-fails if local main diverged — see recovery above
git fetch origin                   # updates origin/upstream-sync; git pull only fetches main
git merge origin/upstream-sync
git push origin main

Fix this →


All previous findings confirmed resolved

Prior finding Status
git fetch origin missing before direct merge — origin/upstream-sync could be stale ✅ Applied (a2c9e4e)
--fill auto-publishes sync PR with terse merge commit title ✅ Dropped (87a13eb), interactive gh pr create documented
git pull --ff-only origin main missing from feature branch workflow ✅ Applied (6980ce4)
Cherry-pick section branching from stale local main ✅ Applied (6980ce4)
Preflight scope "all workflows" contradicted atomic sync exemption ✅ Applied (b44ecf6)
Lease-failure wording "your changes already landed" misleading ✅ Applied (b44ecf6)
Trivial sync exception using stale local upstream-sync ref ✅ Applied (30b61ca)

Informational — Decision tree "deduplicates" may overstate automaticity (line 157)

"When upstream merges, the next sync deduplicates the commit (or we resolve the conflict in the sync PR)"

Git doesn't automatically deduplicate commits — it depends on merge strategy and whether the diffs are identical. The or we resolve the conflict clause correctly hedges, but "deduplicates" may give contributors false confidence. Worth rewording to "the next sync will either merge cleanly (if git detects the change as already applied) or produce a conflict to resolve in the sync PR". Not a blocker.


Overall verdict

Ready to merge. The one Low item is a formatting change — no command text needs to change, just presentation. Everything operational is correct and consistent: atomic fetch, --force-with-lease, SYNC_DATE capture, origin/upstream-sync throughout consumer workflows, --ff-only on all pulls, git checkout -B for idempotent retry, git fetch origin before direct merge, preflight with correct scope, gh CLI prerequisite, diverged-main recovery, declined-PR cherry-pick path, and the parallel-PR urgent-fix case. Solid contribution.

Copy link
Copy Markdown

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread CONTRIBUTING.md Outdated
Comment on lines +60 to +65
git checkout -B sync/$SYNC_DATE # `-B` so a retry on the same day overwrites the previous attempt
git merge origin/upstream-sync # merge the remote-tracking branch directly, no local checkout needed
# If conflicts: edit files, then `git add <resolved-files>` and `git merge --continue`
# (or `git rebase --continue` if you rebased). Confirm `git status` shows a clean
# state with no in-progress merge before pushing.
git push -u origin sync/$SYNC_DATE
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a comprehensive CONTRIBUTING.md file for the veo-tools fork, detailing the repository structure, sync workflows, and branch naming conventions. The documentation covers the use of main and upstream-sync branches, providing specific git commands for various contribution scenarios. Review feedback suggests enhancing the documented one-liner for trivial syncs by adding the --no-edit flag to the merge command to prevent interactive prompts and notes potential restrictions from GitHub branch protection rules.

Comment thread CONTRIBUTING.md Outdated

**If `main` has diverged** (the `--ff-only` fails because you have commits on local `main` that aren't on `origin/main`): you've broken the "never push to main" rule, but recovery is straightforward. Confirm you have no irreplaceable uncommitted work, then reset: `git checkout main && git reset --hard origin/main`. If those local commits represent real work, branch them off first (`git checkout -b recovery/local-main`) before resetting, then port them via a normal feature PR.

For a trivial sync with no conflicts and no customizations affected, the maintainer may merge directly with an explicit branch switch and a pull-first to stay consistent with the other workflows: `git checkout main && git pull --ff-only origin main && git fetch origin && git merge origin/upstream-sync && git push origin main`. The `git pull` refreshes `main`; `git fetch origin` refreshes `origin/upstream-sync` (the pull only fetches `main`, so without this step the merge could pick up a stale mirror state). Merging `origin/upstream-sync` (rather than the local `upstream-sync` ref) ensures the merge takes the latest state pushed to the remote mirror. Note this is **not** a fast-forward in the strict git sense — once `main` has any customization (including this `CONTRIBUTING.md`), `main` diverges from `upstream/main` and `git merge --ff-only` would fail. We just mean "merge without conflicts or PR". The PR path is the default; the direct merge is the documented exception when there's literally nothing to review.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The git merge command in this one-liner will open the default system editor for the merge commit message, which interrupts the flow of a 'trivial' sync. Adding the --no-edit flag makes this truly non-interactive. Additionally, note that git push origin main may be blocked by branch protection rules on GitHub (e.g., 'Require a pull request before merging'), even for maintainers, unless they have bypass permissions.

Suggested change
For a trivial sync with no conflicts and no customizations affected, the maintainer may merge directly with an explicit branch switch and a pull-first to stay consistent with the other workflows: `git checkout main && git pull --ff-only origin main && git fetch origin && git merge origin/upstream-sync && git push origin main`. The `git pull` refreshes `main`; `git fetch origin` refreshes `origin/upstream-sync` (the pull only fetches `main`, so without this step the merge could pick up a stale mirror state). Merging `origin/upstream-sync` (rather than the local `upstream-sync` ref) ensures the merge takes the latest state pushed to the remote mirror. Note this is **not** a fast-forward in the strict git sense — once `main` has any customization (including this `CONTRIBUTING.md`), `main` diverges from `upstream/main` and `git merge --ff-only` would fail. We just mean "merge without conflicts or PR". The PR path is the default; the direct merge is the documented exception when there's literally nothing to review.
For a trivial sync with no conflicts and no customizations affected, the maintainer may merge directly with an explicit branch switch and a pull-first to stay consistent with the other workflows: 'git checkout main && git pull --ff-only origin main && git fetch origin && git merge --no-edit origin/upstream-sync && git push origin main'. The git pull refreshes main; git fetch origin refreshes origin/upstream-sync (the pull only fetches main, so without this step the merge could pick up a stale mirror state). Merging origin/upstream-sync (rather than the local upstream-sync ref) ensures the merge takes the latest state pushed to the remote mirror. Note this is not a fast-forward in the strict git sense — once main has any customization (including this CONTRIBUTING.md), main diverges from upstream/main and git merge --ff-only would fail. We just mean "merge without conflicts or PR". The PR path is the default; the direct merge is the documented exception when there's literally nothing to review.

Resolved 3 review findings (1 gemini + 1 Copilot + 1 claude bot).

- git merge in the sync workflow now uses --no-edit to skip the
  default editor for the merge commit message. The previous form
  would have interrupted the otherwise-non-interactive script with
  an editor session.
- `git checkout -B sync/$SYNC_DATE` retry semantics clarified: -B
  overwrites the local branch on retry, but if the branch was
  already pushed in a prior attempt, the subsequent git push will
  need --force-with-lease since the remote ref has moved.
  Previously the comment only described local-branch overwrite,
  not the push consequence.
- Direct merge exception moved from inline prose into a multi-line
  code block matching the other workflows. Since this is the
  workflow that bypasses the PR rule, it deserves at least the
  same presentation as the safer paths. Added a branch-protection
  warning: git push origin main may be blocked if GitHub branch
  protection requires PRs even for maintainers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@GiuseppeIuculano
Copy link
Copy Markdown
Member Author

Fourteenth-round review applied (commit ba0ad6c)

Resolved 3 review findings (1 gemini + 1 Copilot + 1 claude bot).

# Source Finding Resolution
1 gemini git merge origin/upstream-sync opens default editor for merge commit message, interrupting non-interactive workflow Added --no-edit to both occurrences (sync PR + direct merge exception). Workflow now truly non-interactive
2 Copilot Same-day retry: -B overwrites local sync branch, but push semantics on already-pushed branch unclear Inline comment now explains: subsequent push needs --force-with-lease when the remote ref has moved from a prior attempt
3 claude Direct merge exception buried in inline prose despite being the workflow that bypasses PR rule Moved to multi-line code block with explicit comments + safety lead-in. Same presentation as the safer paths

Plus gemini's note about branch protection: added warning that git push origin main may be blocked by GitHub branch protection rules, requiring maintainers without bypass permissions to use the PR workflow instead.

Diff summary

ba0ad6c: 18 insertions, 3 deletions. The direct-merge workflow now has the same operational clarity as the PR-based paths.

@GiuseppeIuculano GiuseppeIuculano requested a review from Copilot May 24, 2026 17:46
@GiuseppeIuculano
Copy link
Copy Markdown
Member Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a comprehensive CONTRIBUTING.md file for the veo-tools fork, detailing the repository structure, synchronization workflows with the upstream repository, and branch management policies. The review feedback identifies a technical oversight in the preflight instructions regarding the reconciliation of a diverged local main branch; specifically, it suggests ensuring that main is reset to the remote state after backing up local work to prevent future fast-forward merge failures.

Comment thread CONTRIBUTING.md Outdated

> **Prerequisites** (all workflows): the [GitHub CLI (`gh`)](https://cli.github.com/) installed and authenticated against `github.com` (`gh auth login`). The PR-creation steps below all use `gh pr create`.
>
> **Preflight for workflows that touch your working tree** (feature branches and sync-to-main; the atomic `upstream-sync` refresh in the next section is exempt because it doesn't checkout or modify any working files): start from a clean working tree (`git status` should report no modified or untracked files). Stash (`git stash -u`) or commit your local work first — the `git checkout` and `git merge` steps assume the working tree won't get contaminated. If you've been working on `main` directly (despite the rule), reconcile that first: either reset (`git checkout main && git reset --hard origin/main` after backing up your work) or branch it off (`git checkout -b backup/local-main`).
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The instruction to 'branch it off' is incomplete for reconciling the main branch. If a user simply creates a new branch, their local main branch will still contain the commits that shouldn't be there, which will cause subsequent steps like git pull --ff-only (line 59) to fail. It is more effective to create the backup branch and then reset main to the remote state in a single operation.

Suggested change
> **Preflight for workflows that touch your working tree** (feature branches and sync-to-main; the atomic `upstream-sync` refresh in the next section is exempt because it doesn't checkout or modify any working files): start from a clean working tree (`git status` should report no modified or untracked files). Stash (`git stash -u`) or commit your local work first — the `git checkout` and `git merge` steps assume the working tree won't get contaminated. If you've been working on `main` directly (despite the rule), reconcile that first: either reset (`git checkout main && git reset --hard origin/main` after backing up your work) or branch it off (`git checkout -b backup/local-main`).
> **Preflight for workflows that touch your working tree** (feature branches and sync-to-main; the atomic `upstream-sync` refresh in the next section is exempt because it doesn't checkout or modify any working files): start from a clean working tree (`git status` should report no modified or untracked files). Stash (`git stash -u`) or commit your local work first — the `git checkout` and `git merge` steps assume the working tree won't get contaminated. If you've been working on `main` directly (despite the rule), reconcile that first: either reset (`git checkout main && git reset --hard origin/main` after backing up your work) or branch it off and reset main (`git branch backup/local-main && git reset --hard origin/main`).

Copy link
Copy Markdown

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@GiuseppeIuculano
Copy link
Copy Markdown
Member Author

@claude review

@GiuseppeIuculano GiuseppeIuculano requested a review from Copilot May 24, 2026 17:50
@claude
Copy link
Copy Markdown

claude Bot commented May 24, 2026

Claude finished @GiuseppeIuculano's task in 2m 12s —— View job


Code Review — CONTRIBUTING.md

  • Load tools
  • Read current CONTRIBUTING.md (post-14th-round, 176 lines)
  • Review for correctness, consistency, and completeness
  • Post findings

All findings from prior Claude reviews are correctly applied. The --no-edit flags, direct-merge code block, git fetch origin before the direct merge, and --force-with-lease note are all in place. Two remaining gaps:


Medium — Preflight recovery: "branch it off" leaves main still diverged (line 30)

The preflight section offers two recovery paths for a diverged local main:

either reset (`git checkout main && git reset --hard origin/main` after backing up your work)
or branch it off (`git checkout -b backup/local-main`)

The second path is incomplete. git checkout -b backup/local-main creates a backup branch and switches to it, but main remains pointing at the diverged state. Any workflow step that follows — including the git checkout main and git pull --ff-only origin main in every sub-workflow — will fail the same way. A contributor who chose option 2 will immediately hit the same error they just tried to escape.

The "If main has diverged" section at line 77 shows the correct sequence: branch off then reset. The preflight should match. The cleanest fix uses git branch (no checkout) so main stays active:

# instead of: git checkout -b backup/local-main
git branch backup/local-main && git reset --hard origin/main

This creates the backup ref without switching branches, then resets main in place — so the contributor is ready to continue on main immediately.

Fix this →


Low — Same-day retry: --force-with-lease documented in comment but absent from the push command (lines 60–68)

The sync workflow correctly uses git checkout -B sync/$SYNC_DATE for idempotent local branch resets. The inline comment accurately notes that a re-push after a prior attempt will need --force-with-lease. But the actual push command is:

git push -u origin sync/$SYNC_DATE

A contributor on a retry will run this command and get a rejected-non-fast-forward error with no inline guidance. The comment above is separated from the push by several lines and is easy to miss when scanning a code block.

The simplest fix is to use --force-with-lease on the push unconditionally — it's safe here because sync/<date> is a throwaway PR branch owned by the contributor running the sync:

git push --force-with-lease -u origin sync/$SYNC_DATE

--force-with-lease is a no-op on a first push (the remote ref doesn't exist yet) and handles the retry correctly. The inline comment can be simplified to note that -B makes local resets idempotent.

Fix this →


All previous findings confirmed resolved

Prior finding Status
Direct merge missing git fetch originorigin/upstream-sync could be stale ✅ Applied (a2c9e4e)
Direct merge buried in inline prose — harder to copy, safety notes invisible ✅ Applied (ba0ad6c)
git merge opens editor — interrupts non-interactive sync workflow ✅ Applied (ba0ad6c, --no-edit added to both occurrences)
--fill auto-publishes terse merge-commit title for sync PRs ✅ Dropped (87a13eb), interactive gh pr create documented
git pull --ff-only origin main missing from feature branch workflow ✅ Applied (6980ce4)
Cherry-pick section branching from stale local main ✅ Applied (6980ce4)
Preflight scope "all workflows" contradicted atomic sync exemption ✅ Applied (b44ecf6)
Trivial sync exception using stale local upstream-sync ref ✅ Applied (30b61ca)

Informational — Decision tree "deduplicates" overstates git automaticity (line 172)

"When upstream merges, the next sync deduplicates the commit (or we resolve the conflict in the sync PR)"

Git doesn't automatically deduplicate commits — the outcome depends on the merge strategy and whether the diff is byte-for-byte identical. The "or we resolve the conflict" clause correctly hedges, but "deduplicates" remains misleading. Consider: "the next sync will either merge cleanly (if the changes have no overlap) or produce a conflict to resolve in the sync PR." Not a blocker.


Overall verdict

Ready to merge with the two fixes applied. Both are small and the Medium one closes a real footgun in the preflight. Everything else is correct: atomic fetch, --force-with-lease on upstream-sync, SYNC_DATE capture, origin/upstream-sync throughout consumer workflows, --ff-only on all pulls, git checkout -B for sync branch, --no-edit on merges, git fetch origin before direct merge, gh prerequisite, diverged-main recovery (consistent with the fix above), declined-PR cherry-pick path, and parallel-PR urgent-fix case. Solid contribution.

Copy link
Copy Markdown

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

"deduplicates" wording

Resolved 3 review findings (1 gemini + 2 claude bot).

- Preflight recovery for diverged local main: the previous
  "git checkout -b backup/local-main" alone creates the backup but
  leaves main still diverged, so subsequent git pull --ff-only
  steps fail with the same error. Replaced with the atomic form:
  "git branch backup/local-main && git reset --hard origin/main".
  This creates the backup ref without switching branches and then
  resets main in place — the contributor is ready to continue on
  main immediately.
- Sync push: added --force-with-lease unconditionally. The push
  is on a contributor-owned sync/<date> branch, so the lease is
  safe. First push is a no-op (remote ref doesn't exist); same-day
  retries succeed without confusing the contributor with a
  rejected-non-fast-forward error. Inline comment explains.
- Decision tree "deduplicates the commit" reworded — git doesn't
  automatically deduplicate; the outcome depends on merge strategy
  and whether the diff is byte-for-byte identical. New wording:
  "either merges cleanly (if the change has no overlap with what
  landed) or produces a conflict to resolve in the sync PR".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@GiuseppeIuculano
Copy link
Copy Markdown
Member Author

Fifteenth-round review applied (commit 65ad489)

Resolved 3 review findings (1 gemini + 2 claude bot + 1 informational claude bot).

# Source Finding Resolution
1 gemini + claude Preflight "branch it off" with git checkout -b backup/local-main alone leaves main still diverged — subsequent pulls fail Atomic form: git branch backup/local-main && git reset --hard origin/main. Creates backup ref without switching, then resets main in place
2 claude Sync push git push -u origin sync/$SYNC_DATE fails on same-day retry (the -B above can have moved local ref past origin) Added --force-with-lease unconditionally (safe on contributor-owned throwaway PR branch; no-op on first push; handles retry cleanly)
3 claude (info) Decision tree "deduplicates the commit" overstates git automaticity Reworded: "either merges cleanly (if the change has no overlap with what landed) or produces a conflict to resolve in the sync PR"

Diff summary

65ad489: 4 insertions, 3 deletions. Both Medium-level operational footguns now closed; decision tree wording is honest about merge semantics.

@GiuseppeIuculano
Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@GiuseppeIuculano
Copy link
Copy Markdown
Member Author

@claude review

@claude
Copy link
Copy Markdown

claude Bot commented May 24, 2026

Claude finished @GiuseppeIuculano's task in 2m 38s —— View job


Code Review — CONTRIBUTING.md

  • Load tools
  • Read current CONTRIBUTING.md (post-15th-round state, 176 lines)
  • Review for correctness, consistency, and completeness
  • Post findings

All findings from the prior Claude review have been correctly applied. The 15th-round fixes — preflight atomic recovery (git branch backup/local-main && git reset --hard origin/main), --force-with-lease on the sync push, and the "deduplicates" rewording — are all in place and correct. Two gaps remain:


Medium — "If main has diverged" uses git checkout -b, inconsistent with the Preflight fix (line 77)

The Preflight block (line 30) was specifically fixed in round 15 to use git branch backup/local-main && git reset --hard origin/main instead of git checkout -b — the parenthetical even warns: "Avoid git checkout -b backup/local-main alone — it creates the backup but leaves main still diverged, so the subsequent git pull --ff-only steps will fail."

But the diverged-main recovery section directly contradicts that:

"branch them off first (git checkout -b recovery/local-main) before resetting, then port them via a normal feature PR."

git checkout -b recovery/local-main switches to the new branch, leaving main still diverged — exactly the footgun the Preflight warning describes. The subsequent reset (git checkout main && git reset --hard origin/main) is implicit but absent, which is a missing step in the recovery sequence.

The fix is to match the Preflight's own approach:

branch them off first (`git branch recovery/local-main && git reset --hard origin/main`,
which creates the backup ref and resets main in place without switching branches)
then port them via a normal feature PR.

Fix this →


Low — Stray character on decision tree line 173

The last branch of the decision tree wraps across two lines, but the continuation line has a stray character that shouldn't be there:

          either merges cleanly (if the change has no overlap with what landed) or
│         produces a conflict to resolve in the sync PR.

The is a leftover artifact from a previous tree structure. It renders correctly in some markdown viewers (where fixed-width is enforced inside code blocks) but produces a visual glitch in others. It should be removed — the continuation should be indented with spaces only, matching the preceding lines:

          either merges cleanly (if the change has no overlap with what landed) or
          produces a conflict to resolve in the sync PR.

Fix this →


All previous findings confirmed resolved

Prior finding Status
Preflight "branch it off" left main still diverged ✅ Applied (65ad489) — git branch approach with reset in place
Sync push git push -u origin sync/$SYNC_DATE fails on same-day retry ✅ Applied (65ad489) — --force-with-lease added unconditionally
Decision tree "deduplicates the commit" overstated git automaticity ✅ Applied (65ad489) — reworded to "merges cleanly or produces a conflict"
Direct merge missing git fetch origin before merge ✅ Applied (a2c9e4e)
Direct merge buried in inline prose ✅ Applied (ba0ad6c) — multi-line code block
git merge opens editor in non-interactive sync ✅ Applied (ba0ad6c) — --no-edit on both occurrences
--fill auto-publishes terse merge commit title ✅ Dropped (87a13eb) — interactive gh pr create
git pull --ff-only origin main missing from feature branch workflow ✅ Applied (6980ce4)
Cherry-pick section branching from stale local main ✅ Applied (6980ce4)
Trivial sync exception using stale local upstream-sync ref ✅ Applied (30b61ca)

Overall verdict

Ready to merge with two small fixes. The Medium item is a one-liner (swap git checkout -b for git branch ... && git reset --hard) and directly closes a self-contradiction the Preflight section explicitly warns against. The Low item removes a stale artifact. Everything operational is sound: atomic fetch, --force-with-lease on both sync push and PR branch push, SYNC_DATE capture, origin/upstream-sync throughout consumer workflows, --ff-only on all pulls, git checkout -B for idempotent sync branch, --no-edit on merges, git fetch origin before direct merge, gh prerequisite, and parallel-PR urgent-fix case. Solid contribution.

GiuseppeIuculano added a commit that referenced this pull request May 24, 2026
Resolved 6 review findings (2 gemini + 4 claude bot).

Atomic write robustness:
- gemini #1: gs:// branch now uses the same atomic-write pattern as
  HTTPS. The @google-cloud/storage downloads also go through temp
  file + rename, not direct to outputPath. Consistent crash safety.
- gemini #2: temp file naming now includes a random suffix:
  ${outputPath}.${randomSuffix}.tmp instead of fixed .tmp. Prevents
  collision if two processes target the same output path
  concurrently (low likelihood in practice but trivially correct).

Coherence cleanup:
- claude #3: data flow diagram updated to "max 10" matching the
  module boundary (was still showing the pre-round-21 "max 5").
  Diagram also now shows the cross-origin auth strip, HTTPS→HTTP
  rejection, and atomic write — full alignment with the module
  boundary description.
- claude #4: orphan "#### `REGIONS` constant" heading removed.
  Round 21 inserted MODEL_DURATIONS shapes between the heading
  and its content, leaving an empty section visible in the
  rendered outline.
- claude #5: rule #10 row moved to its correct position after
  rules #8 and #9 in the validation table. Numeric sequence
  is now #1-#10 followed by F1-F5.
- claude #6: DURATION_SUGGESTIONS test coverage added to
  audio-default.test.ts (co-located since both are pure lookup
  constants with identical test shape — avoids trivial file
  proliferation). Test plan now explicitly references both.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolved 2 claude bot review findings.

- Diverged-main recovery: replaced `git checkout -b recovery/local-main`
  with the same `git branch X && git reset --hard origin/main` pattern
  used in the Preflight block. The previous form contradicted the
  Preflight's own explicit warning: "Avoid `git checkout -b
  backup/local-main` alone — it creates the backup but leaves main
  still diverged, so the subsequent `git pull --ff-only` steps will
  fail." Now consistent.
- Decision tree continuation line had a stray `│` character left over
  from a previous tree-structure refactor. Replaced with spaces to
  match the adjacent indentation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@GiuseppeIuculano
Copy link
Copy Markdown
Member Author

Sixteenth-round review applied (commit efce7e8)

Resolved 2 claude bot findings (gemini hit daily quota — no gemini review this round).

# Severity Finding Resolution
1 Medium "If main has diverged" used git checkout -b recovery/local-maindirectly contradicted the Preflight block's own warning against git checkout -b alone Replaced with git branch recovery/local-main && git reset --hard origin/main (same atomic pattern as Preflight). Now internally consistent
2 Low Stray character on the decision tree continuation line (artifact from a previous tree-structure refactor) Replaced with spaces to match adjacent indentation

Diff summary

efce7e8: 2 insertions, 2 deletions. The Medium fix closed a real internal contradiction (the doc warned against a command while using it elsewhere); the Low fix removed a rendering artifact.

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