Skip to content

fix: preserve proxy identity across worktrees - #199

Merged
codekiln merged 1 commit into
mainfrom
codex/189-proxy-worktree-identity
Oct 7, 2026
Merged

codekiln merged 1 commit into
mainfrom
codex/189-proxy-worktree-identity

Conversation

@codekiln

@codekiln codekiln commented Oct 6, 2026

Copy link
Copy Markdown
Owner

A proxy first imported from the registered garden could not refresh from an issue-named source worktree: the worktree directory name changed its Logseq source identity. Sync now reads the chosen worktree while deriving the graph name from the primary checkout at the same repository-relative graph path. Worktree forge URLs name its branch (or commit for detached HEAD), and imports keep their existing ownership across branches.

The repository-relative manifest storage requested by #189 is already on main. This change completes the remaining graph identity behavior and documents how to review dependent source and destination PRs, retain the portable manifest with imported tasks, and refresh source links after merge. Today’s journal already lists both updated definitions.

Validation: python3 -m unittest discover -s mise-tasks/logseq/entity/proxy/page/tests -q passes 20 tests. New integration coverage exercises root and nested source graphs, linked source and destination worktrees, changed task content, repeat sync, relocated source/destination clones with tracked manifest/tasks, competing repository rejection, and detached source URLs. The Gitpa PR #12 worker also imported the fixed sync task into its existing proxy garden with stable graph identity and accepted ownership. Commit hooks passed.

Closes #189

Dependent consumer: codekiln/gitpa#12

'task-owner:: [[Owner]]\ntask-config-root:: .\ntask-name:: example\n'
'task-entrypoint:: mise-tasks/example\n'
'task-files:: {"mise-tasks/example":"mise-tasks/example"}\n'
f'source-link:: https://github.com/owner/{name}/blob/main/mise-tasks/example\n'

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

where did source-link:: frontmatter enter into the system?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

The source-link:: task property was introduced by 1ade5324 define Mise Task entities and references. It is specified in the Mise Task entity Frontmatter section: the executable file or TOML definition, using a review branch/commit during review and the default branch for the maintained implementation.

--AI(gpt-6-unspecified Proxy task import review)

(source / 'pages/Example.md').write_text(
'task-owner:: [[Owner]]\ntask-config-root:: .\ntask-name:: example\n'
'task-entrypoint:: mise-tasks/example\n'
'task-files:: {"mise-tasks/example":"mise-tasks/example"}\n'

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Where is the purpose of task-files explained?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

The purpose is specified by the Mise Task companion-file contract. task-files:: maps each source repository-relative implementation file to a destination graph-relative path under mise-tasks/, including the entrypoint and runtime helpers. That contract was added by PR #186 companion task contract.

--AI(gpt-6-unspecified Proxy task import review)

~~~
- Invoking the source checkout's script imports the current sync implementation along with the entity definition. The destination can then run its imported task for other pages from the same source worktree.
- The source worktree supplies content while the primary checkout supplies the logical graph name. Code forge URLs point to the selected source branch, or to the commit for a detached worktree. The portable manifest keeps the same source ownership across branches and checkouts.
- Commit the manifest with the imported pages and task files. Push the source branch and link the source PR as a dependency of the destination PR. After the source PR merges, re-sync with the primary checkout selected as `--source` to update the source URLs to the default branch.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Is this where the idea of the "manifest" entered into the system?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Yes, your PR #186 pointer identifies the earlier documentation introduction: 96b332c7 define proxy companion task contract describes the manifest in the Proxy Page entity and sync task reference. PR #188 supplies the task-import implementation. PR #199 then fixes source worktree identity. The illustrated manifest explanation now lists its sections and explains ownership and onward imports.

--AI(gpt-6-unspecified Proxy task import review)

@codekiln
codekiln merged commit cc44b35 into main Oct 7, 2026
@codekiln
codekiln deleted the codex/189-proxy-worktree-identity branch October 7, 2026 10:39
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.

Keep proxy manifests portable across clones and worktrees

1 participant