Skip to content

feat: diff module breadcrumb#32

Merged
rickliujh merged 4 commits into
mainfrom
feat/diff-module-breadcrumb
Jul 23, 2026
Merged

feat: diff module breadcrumb#32
rickliujh merged 4 commits into
mainfrom
feat/diff-module-breadcrumb

Conversation

@rickliujh

Copy link
Copy Markdown
Owner

No description provided.

rickliujh and others added 4 commits July 23, 2026 15:53
Bulk-run items share one source, and thus one metadata.name, so a
diff headed by that name cannot say which item it belongs to. The
instance name that does distinguish them already labels the logs but
never reaches the diff.

Add the shared primitive the fix needs: RunOptions.ModulePath carries
the instance breadcrumb (root name -> this instance name), extended as
each child is dispatched and copied into every ExecutionContext. A
DirLabels registry maps each local clone dir to its breadcrumb so
full-mode diff — which reads changes back from the clone dirs, not the
in-memory collector — can head diffs with the same identity.

Initialize the numbered-clone counter once at the run's root so the
per-child opts copies share one monotonic sequence instead of each
subtree restarting at 00.

No output change yet; the diff headers still key off the metadata name.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A bulk run fans one child source out to many items that share a
metadata name, so heading every diff with that name left them
indistinguishable. Head each diff with the instance breadcrumb instead
— the run's root name, then the item's own instance name — keeping the
repo URL and branch on their own line beneath for context.

The root segment renders as an inverted chip, wrapped in "≡ … ≡" and
trailed by muted " › " steps when the run fanned out, matching the log's
root marker. Quick mode reads the breadcrumb from the threaded
ExecutionContext; full mode reads it from the clone-dir registry the
executor now populates. Both share one action.DiffHeader renderer,
retiring cmd's duplicate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
With several modules nested in one run, every chip sat in the same
left gutter, so nothing showed who ran under whom. The pretty handler
already counts a record's module depth; use it to indent each line one
step per level of nesting. Depth 1 — the root, or a flat single module
— stays flush left; a child's lines (and their attribute bullets) sit
one step in beneath the parent that dispatched them.

A section header's leading blank line stays flush so it reads as a gap
rather than a line of trailing spaces.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A "child (N/M)" batch header is emitted by the parent that dispatches
it, but only a depth-1 root got the "≡ … ≡" chip — a nested
orchestrator's dispatch rendered as a plain leaf chip, so a deep batch
counter floated free of the module that owns it.

Tag every dispatch header (KeyDispatch) and, when it is nested (depth >
1), render it as "▸ parent › child (N/M)": a hand-off marker plus the
dispatching module's name, indented at the parent's level so the child's
own lines nest one step beneath. The run's root keeps its "≡ … ≡" chip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rickliujh
rickliujh merged commit aa37a5a into main Jul 23, 2026
2 checks passed
rickliujh added a commit that referenced this pull request Jul 23, 2026
* origin/main:
  feat: diff module breadcrumb (#32)
  fix(diff): report the error before the diff on a failed run (#31)
  fix(diff): head each deferred diff with its module and target (#29)
  feat: loom diff command (#28)

# Conflicts:
#	pkg/module/executor.go
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