Skip to content

🔩 Provide Lindsey conflict-resolution interface for Sweetiebot - #4

Merged
JFWooten4 merged 1 commit into
mainfrom
lindsey-conflict-proposal-interface-20261011
Oct 13, 2026
Merged

JFWooten4 merged 1 commit into
mainfrom
lindsey-conflict-proposal-interface-20261011

Conversation

@JFWooten4

@JFWooten4 JFWooten4 commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Summary

Introduce a secure, proposal-only integration between the locally checked out Lindsey Sync repository and Sweetiebot's Git conflict-recovery UI. The server proposes merge resolutions; the local script creates temporary previews; Sweetiebot owns diff review and the explicit approval step.

Hosted resolver (new POST /resolve-conflicts)

  • Opt-in bearer authentication with LINDSEY_RESOLVE_SECRET, independent of GitHub's commit credentials.
  • Validate version: 1, HEAD SHA, branch and 1–8 regular text conflicts; reject unsafe or duplicate paths and oversized stages.
  • Ask the configured OpenAI model for complete resolved file texts with a bounded output; treat repository code and paths as untrusted input.
  • Require a proposal for exactly each requested path; reject invalid JSON, missing/extra files, binaries and unresolved conflict markers.
  • Return JSON only; no automatic GitHub API writes, merges, commits or pushes.

Local adapter (scripts/resolve-conflicts.js)

  • Accept --repo <local-working-tree> --output <outside-repo-temp-dir>; use unresolved Git index stages 1/2/3 as base/ours/theirs.
  • Explicit LINDSEY_RESOLVE_URL and LINDSEY_RESOLVE_SECRET variables; require HTTPS except loopback.
  • Reject unsupported modes, missing stages and unsafe/binary content. Emit versioned manifest with branch, HEAD, file names, candidates and original SHA-256 digests.
  • Never modify working files or stage/commit anything. Sweetiebot's companion handles diff previews, approval and application.

Companion

pony-factor/sweetiebot-SCM#235

Dependency and merge order

Stacked on #3 (head lindsey-pony-signed-commits). Merge Lindsey Sync #1, #2, #3 in dependency order before this PR; do not squash this directly into main while ancestor PRs remain outstanding.

Tests

test/resolve.test.js covers request/response validation, model request shape, unsafe paths, local endpoint restrictions, a real unresolved Git index, preview-only execution, and unchanged HEAD/worktree. GitHub Actions runs the Node 22 suite; both PR and push checks passed after fixing the inherited leading-newline shebang in scripts/commit-as-lindsey.js from the stacked parent (#3).

Commits

f76bd04

b79246a

0af68fd

JFWooten4 added a commit to pony-factor/sweetiebot-SCM that referenced this pull request Oct 12, 2026
## Summary

Extend Sweetiebot's Git recovery UI with a distinct **merge-conflict picker**. **Resolve with Lindsey** discovers a locally installed `lindsey-sync` checkout, asks it to generate candidate file resolutions, and displays VS Code diffs for explicit approval.

### Contract with companion Lindsey PR

- Discover `scripts/resolve-conflicts.js` in a sibling `lindsey-sync` directory, VS Code workspace folder, or `LINDSEY_SYNC_REPO`.
- Invoke `node scripts/resolve-conflicts.js --repo <working-tree> --output <temporary-dir>`.
- Read the versioned JSON manifest (`version: 1`, branch, HEAD, files with original SHA-256 and named candidate files).
- Show proposals via `vscode.diff`; only the **Apply proposed resolutions** confirmation writes to the working tree.
- Recheck the active branch, HEAD, unresolved index, paths, and original content hashes before any write. Leave **git add, commit, and push entirely manual**.
- Expose **Review conflicts**, **Resolve manually**, **Show Git output**, and **Cancel** without introducing unsafe automatic stashing or force pushes.

### Tests

`tests/test_lindsey_conflicts.js` tests safe path validation, UI choices, a real unmerged index, preview/application, and stale worktree handling. **GitHub Actions test suite passed** on the current feature branch.

### Dependencies / stacking

Originally branched from #233. **That parent was squash-merged and its head branch removed while this work was underway**, so this follow-up was safely synced to updated `main` with a merge commit and targets `main` directly. Comparison against `main` now contains **only the three intended conflict-resolution files**.

**Companion Lindsey Sync PR:** pony-factor/lindsey-sync#4 — supplies the local CLI and authenticated, proposal-only resolver endpoint. Both repos must be installed locally (sibling folder, workspace folder, or `LINDSEY_SYNC_REPO`). Configure `LINDSEY_RESOLVE_URL` and `LINDSEY_RESOLVE_SECRET` to enable actual suggestions. The action gives a clear error until the companion is available.

### Commits

3056bce

0ee86d5

Co-authored-by: Codex Web <noreply@openai.com>
@JFWooten4
JFWooten4 force-pushed the lindsey-pony-signed-commits branch from 4105eab to ff407d7 Compare October 13, 2026 11:43
Replay only the proposal-only conflict-resolution interface, GitHub Actions workflow, tests, and inherited commit CLI shebang fix onto main, preserving the original feature tree.

Co-authored-by: Codex Web <noreply@openai.com>
@JFWooten4
JFWooten4 force-pushed the lindsey-conflict-proposal-interface-20261011 branch from 0af68fd to 772c10a Compare October 13, 2026 11:44
@JFWooten4
JFWooten4 changed the base branch from lindsey-pony-signed-commits to main October 13, 2026 11:45
@JFWooten4
JFWooten4 merged commit cdf79a0 into main Oct 13, 2026
1 check passed
@JFWooten4
JFWooten4 deleted the lindsey-conflict-proposal-interface-20261011 branch November 26, 2026 17:00
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