Skip to content

des-log-phase splits execution-log across two directories #79

Description

@tburny

What happened?

des-log-phase --project-dir <relative-path> resolves the relative path against the caller's current working directory rather than the git/worktree root or the log's originally-initialized location. In a monorepo where an agent cds into a subdirectory (e.g. apps/website) partway through a DELIVER run, later des-log-phase calls silently create a second, divergent execution-log.json in that subdirectory instead of appending to the canonical log — with no warning that a new log was started instead of an existing one being found.

Steps to reproduce

  1. des-init-log at a worktree root, initializing execution-log.json at (for example) docs/feature/<slug>/deliver/.
  2. Log several phases with des-log-phase while the caller's cwd is still the worktree root.
  3. cd into a subdirectory (e.g. apps/website) as part of normal step work.
  4. Continue calling des-log-phase --project-dir . (or an otherwise-relative --project-dir) from the new cwd.
  5. Run des-verify-integrity — it reads only the canonical directory and reports the later phases as missing, even though they were logged.

Expected behaviour

Either: (a) a relative/omitted --project-dir resolves against the worktree/git root (git rev-parse --show-toplevel, which in a linked worktree returns that worktree's own root, independent of cwd) rather than the caller's cwd; or (b) des-log-phase fails loud when pointed at a directory with no initialized log, instead of silently starting a fresh one; or (c) the log location is derived from the init-recorded location plus a feature-id, making --project-dir an override rather than the primary resolution path.

Actual behaviour

This ride, the entire 9-step execution log for a DELIVER run landed at the worktree root instead of the intended docs/feature/<slug>/deliver/ location, because a relative --project-dir was passed after the agent had cd'd into apps/website. The split was discovered only at des-verify-integrity time, which reported missing steps and forced a recovery/backfill pass. Reading the tool confirms the log format is a flat events append array with no integrity chain tying entries to a specific init — so a second log silently starts with no cross-reference to the first.

Environment

  • Tool: des-log-phase / des-init-log / des-verify-integrity (DES execution-log CLI)
  • Frequency: always, whenever --project-dir is relative and cwd has changed since init
  • Regression? Not a regression — appears to be present since the CLI's initial --project-dir support

Logs / evidence

Confirmed by reading the des-log-phase implementation: a relative/omitted --project-dir is resolved via the process cwd at call time, with no worktree-root or init-location anchoring, and no existence check against a prior init before writing.

Related


surfaced during ride #49 (brand/visual system) on tobiasbrennecke-com, 2026-07-11

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions