Skip to content

Design the Logseq proxy records so unrelated pull requests don't conflict #210

Open

Description

@codekiln

Since the garden proxy manifest was added to gitpa, nearly every gitpa pull request conflicts in gitp-garden/.logseq-proxy/manifest.json. This was the main objection to the single-manifest design when it was proposed. Redesign the Logseq proxy system so that two pull requests that proxy different pages are unlikely to conflict.

Example

codekiln/gitpa#24 Proxy Microfreak guides, presets and references is conflicting again. Its branch already has a Merge origin/main into codex/18-microfreak-namespace commit, and the conflict is back after one more pull request landed.

codekiln/gitpa#23 Import the public Launchpad namespace with repeatable sync has the same problem. Every gitpa pull request since #12 has changed manifest.json: #12, #15, #17, #21, #22, #23, #24 and #25.

Why it conflicts

  • One file holds every proxied page. manifest.json is about 500 lines covering 31 pages and 2 tasks. Any sync rewrites it.
  • One page touches four places. Proxying a page adds or changes entries in declarations, imports and pages, and often files too. Two pull requests therefore overlap in several places, not one.
  • Sorted keys put new entries next to each other. New sessions sort next to each other (for example GitP/A/Session/26/10/06-… and 26/10/07-…). Git sees two insertions at the same spot as a conflict even when the entries are unrelated.
  • Sync rewrites unrelated entries. gitpa#25's sync rewrote the source link and sync date on three proxies whose content hadn't changed. Any other branch that touches those proxies then conflicts too.
  • The removal is manual. #205's plan includes hand-deleting keys from declarations, imports and pages for a renamed session. A hand edit to the same file as a sync is another source of conflicts.

Request

Design the proxy records so that changes to different pages land in different files, or on lines that never touch each other. Pick the design after comparing options, for example:

  • One small record file per proxied page or task, named from the page the way asset filenames are, so two pages never share a file.
  • Storing the proxy record on the proxy page itself as properties, with any index derived at build time and not committed.
  • Keeping a committed index only if it can be regenerated, with a merge driver or a regenerate step that resolves conflicts automatically.

Acceptance

  • Two branches that each proxy or re-sync a different page merge in either order without a conflict. A test reproduces this with two sibling branches.
  • Re-syncing a page writes nothing for pages whose source is unchanged. No rewritten dates or links on unrelated proxies.
  • Renaming or removing a proxied page is a sync task operation, not a hand edit.
  • gitpa's existing manifest migrates to the new layout, and the RSS build, site checks and proxy docs on Logseq/Entity/Proxy/Page are updated to match.
  • gitpa#23 and gitpa#24 can be rebased onto the new layout without hand-resolving manifest conflicts.

Activity

  1. added
    priority:highCurrent Ghost in the Patch priority or prerequisite
    in-progressA worker is actively handling this issue
    on Oct 8, 2026
  2. codekiln commented on Oct 8, 2026

    @codekiln
    OwnerAuthor

    Worker proxy_worktrees is implementing the proxy-record conflict redesign on branch codex/210-proxy-records, worktree /Users/Myer/ghq/github.com/codekiln/logseq-encode-garden/.worktrees/210-proxy-records, session 01a110f1-45c5-7633-ad92-c6f9f7f131d8.

    Source ownership covers the shared sync planner, task importer, CLI operations, meaningful branch-merge tests and proxy documentation. A separate worker owns Gitpa migration/build integration; the design auditor is read-only. The source contract will be agreed before consumer changes. Validation will include sibling branch merges in both orders, unchanged sync, legacy migration, explicit rename/remove and atomic safety.

    --AI(gpt-6-unspecified proxy record redesign)

  3. codekiln commented on Oct 8, 2026

    @codekiln
    OwnerAuthor

    Source implementation is ready for review in PR216: #216 . HEAD 0a8405f6, branch codex/210-proxy-records, retained worktree /Users/Myer/ghq/github.com/codekiln/logseq-encode-garden/.worktrees/210-proxy-records, session 01a110f1-45c5-7633-ad92-c6f9f7f131d8.

    The source worker is now idle awaiting review and Gitpa issue27 consumer integration. The consumer worker has the pushed source path/HEAD and is validating migration/replay of PR23/24; issue210 remains open until that consumer acceptance is established.

    Validation: 34 tests pass, including real Git merges in both orders for independent imports and refreshes, atomic v1 migration, repeated migration safety, two onward-forwarding hops, stale file/directory preview guards, delete rollback, source rename with stable destination publication identity and block IDs, and live-reference removal rejection. Actual Mise migration/apply flags passed. Independent runtime review passed at bb126e0; final follow-up adds bounded Unicode names, path validation, and storage/migration documentation.

    Public integration API: records.migration_plan(destination) returns an atomic guarded Plan; task_imports.extend_plan(plan, migrate=True) combines migration with sync. Existing Plan APIs remain; Plan.deletes previews removed paths. CLI supports --migrate-records, --rename-to, --remove, and --refresh-provenance. The imported task bundle declares records.py.

    No merge or deployment performed. Source worktree is retained for the consumer and review.

    --AI(gpt-6-unspecified proxy-records)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in-progressA worker is actively handling this issuepriority:highCurrent Ghost in the Patch priority or prerequisite

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions