Skip to content

Extend rebase to work on .dazzlelink JSON files #15

@djdarcy

Description

@djdarcy

Extend rebase to work on .dazzlelink files

Problem

dazzlelink rebase only operates on filesystem symlinks (os.readlink()). When .dazzlelink JSON files are moved, their stored relative paths become stale. There is no built-in way to fix this -- users must manually edit the JSON.

DazzleLink can manage other tools' symlinks but cannot manage its own format.

Proposed solution

rebase_dazzlelinks() scans for .dazzlelink files and synchronizes their paths:

  • Absolute valid, relative stale -> recompute relative from (dazzlelink_dir, absolute)
  • Relative valid, absolute broken -> recompute absolute from (dazzlelink_dir, relative)
  • Both broken -> report error (future: use fixpath search)

The CLI rebase command runs both rebase_links() and rebase_dazzlelinks() automatically.

Implementation status

Implemented in monolith dazzlelink.py. Needs porting to modular package dazzlelink/operations/batch.py.

Acceptance criteria

  • rebase_dazzlelinks() implemented in monolith
  • CLI dispatches to both symlink and dazzlelink rebase
  • Tested: Taleb folder move, 1 stale path correctly recomputed
  • Port to modular package (batch.py)
  • Unit tests

Related issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions