Repository navigation
Conversation
…uestions for multi-model review Pre-implementation design doc for #77. Covers: - Architecture: git 3-way merge → driver → diff-aware substitution → exit - .gitattributes scope: src/**/*.rs + Cargo.toml + release-please-config.json (NOT tests/, scripts/, hooks/, docs/ — each justified) - branding/rebrand.toml schema: literal + regex rules with safe_guard, scope globs, reason/issue metadata - Substitution engine: diff-aware (changed-line set only), first-match-wins, literals before regex - Driver script contract: bash skeleton, argv/exit-code/log policy, trap-based cleanup on partial-write - Single source of truth: TOML authoritative; cargo test asserts equivalence with FORBIDDEN_TOKENS (option c over codegen/shared-file) - Failure modes: F1 partial-write, F2 malformed TOML, F3 self-conflict, F4 driver-not-installed, F5 wrong-substitution — recovery procedures - Rollout: install-merge-driver.sh, CI workflow integration, UPSTREAM_REBASE.md updates - Dry-run validation against c35339e (last heavy upstream merge) Five open questions for multi-model review before implementation: 1. Shell vs Rust binary for rule application sub-script 2. Line-number stability under length-changing regex substitutions 3. Conflict-marker handling: substitute inside blocks or skip them? 4. safe_guard scope: per-rule field vs global table 5. Driver invocation cost during git rebase (per-commit replay) vs merge Refs #77. Generated by feature-dev:code-architect agent from the FORBIDDEN_TOKENS history, UPSTREAM_REBASE.md, and the c35339e last-heavy-merge audit. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
… decisions
Three artifacts:
- REBRAND_MERGE_DRIVER_REVIEW_CODEX.md — Codex/GPT-5 review
- REBRAND_MERGE_DRIVER_REVIEW_GEMINI.md — Gemini 0.42.0 review
- REBRAND_MERGE_DRIVER_DECISIONS.md — Claude consolidation, resolves all 5 open questions
Cross-model consensus on all 5 open questions:
- Q1 Rust (both) — bash too fragile given branding_lint's existing complexity
- Q2 Forbid newline-changing rules at TOML load (both)
- Q3 Skip conflict-marker blocks (both flagged design's "substitute inside" as wrong)
- Q4 Per-rule safe_guard + hardcoded global classes (Codex; design current); Gemini
dissent (hybrid) noted but Codex's structural-vs-rule split is more durable
- Q5 No rebase special-casing — compiled binary makes per-commit cost negligible
Critical fixes the reviews surfaced (NOT in original design):
- Diff-aware coordinate bug — union of two diff coordinate systems was incorrect
(Codex). Fix: derive line-number set from %A only.
- Atomic write missing in apply-rules helper (Codex). Fix: write to %A.tmp + rename.
- UTF-8 validation missing (Gemini). Fix: validate at process start; exit 0 + warn
on non-UTF-8 so file is left for human review.
- TOML schema under-specified (Codex): duplicate IDs, duplicate needles, regex
dialect, newline rules. Fix: TOML loader rejects all of these with id-referenced errors.
- Single-source-of-truth asymmetry (Codex): FORBIDDEN_TOKENS can drift downward
silently. Fix: bidirectional equivalence test + `// driver-managed` marker convention.
Implementation order revised (in decisions doc):
1. tools/branding-engine/ — standalone Rust workspace member
2. branding/rebrand.toml — initial rule set
3. scripts/branding-merge-driver.sh — thin wrapper around the binary
4. scripts/install-merge-driver.sh — builds binary + writes git config
5. .gitattributes
6. branding_lint test with bidirectional assertion
7. UPSTREAM_REBASE.md update
8. CI workflow
Refs #77. Implementation pending Hoff approval per decisions doc.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This was referenced May 26, 2026
Owner
Author
|
Closing — not pursuing a custom branding-rebrand merge driver (#77 closed too). Upstream-rebase ergonomics handled via the existing sentinel-block convention. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Design-only PR for #77. No production code in this PR — only docs/contributing/.
Three artifacts
Cross-model consensus on the 5 open questions
Critical design fixes the reviews surfaced
Implementation order (per decisions doc)
What this PR asks for
Approval of the consolidated decisions before implementation begins. The implementation PR will land separately on the same issue.
Related PRs in flight
🤖 Generated with Claude Code