Skip to content

Fix @depends-on / @id resolution across lint, check-links, and CLI (#14–#19) - #20

Merged
fohara merged 5 commits into
mainfrom
fix/dependency-id-resolution
Jul 14, 2026
Merged

fohara merged 5 commits into
mainfrom
fix/dependency-id-resolution

Conversation

@fohara

@fohara fohara commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Fixes a cluster of @depends-on / @id resolution bugs (GitHub issues #14–#19).

Root cause

Three divergent resolution paths β€” the linter rule, an unused graph resolver, and DB full-id lookup β€” plus a resolver that only understood the undocumented file-id#fragment-slug form. Explicit @depends-on edges were also never inserted into the index, so check-links (which queries the DB) never saw them.

The central fix is a single shared resolver (lash-core::dependency::reference::resolve_reference) that lint, check-links, and complete all route through, so the surfaces agree.

Fixes

Testing

Unit tests added for every reference form, comma splitting, line-number reporting, check-links agreement, @id command resolution (unique/ambiguous/missing), and the completion gate. Verified all six issue repros end-to-end via the CLI. Full workspace test suite passes (0 failures).

Closes #14
Closes #15
Closes #16
Closes #17
Closes #18
Closes #19

πŸ€– Generated with Claude Code

fohara and others added 5 commits July 14, 2026 07:53
Add a shared reference resolver (dependency::reference) that understands
bare @id, #task:id, file-id#task:id, path#task:id, and file-level forms,
and route the linter's DependencyExistsRule through it so all documented
and natural reference forms resolve. Split comma-separated @depends-on
lists into multiple refs, and report E_LINK_NOT_FOUND at the offending
@depends-on: line instead of :0:0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Explicit @depends-on edges are not stored as NULL-target rows, so the DB
query behind check-links never saw them and reported clean while lint
flagged the same references. Reparse the tree and resolve each reference
through the shared resolver, merging broken ones into the report.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
show/start/complete now accept a task's @id (its local_id), not just the
file-id#slug full id, via a shared task_target resolver backed by a new
TaskRepository::get_by_local_id. Ambiguous @ids list candidate full ids.
show now reports a missing task as a not-found diagnostic (exit 5) instead
of the miscategorized E_INTERNAL.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
lash complete now refuses when a task has a resolvable @depends-on target
that isn't done or waived, listing the unmet dependencies (E_DEP_UNMET).
Pass --force to override. Dependencies are resolved from the current
Markdown via the shared resolver, since explicit edges aren't indexed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Update references/dependencies.md to document the natural @depends-on forms
(bare @id, file-id#task:id, comma lists) and the completion gate. Record
the work in devlog.md and the tasks index.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@fohara
fohara merged commit fa9ff7d into main Jul 14, 2026
13 of 15 checks passed
@fohara
fohara deleted the fix/dependency-id-resolution branch July 14, 2026 14:38
fohara added a commit that referenced this pull request Aug 6, 2026
#19) (#20)

* Fix @depends-on reference resolution in linter (#15, #16, #18)

Add a shared reference resolver (dependency::reference) that understands
bare @id, #task:id, file-id#task:id, path#task:id, and file-level forms,
and route the linter's DependencyExistsRule through it so all documented
and natural reference forms resolve. Split comma-separated @depends-on
lists into multiple refs, and report E_LINK_NOT_FOUND at the offending
@depends-on: line instead of :0:0.

* Make check-links validate @depends-on like lint (#19)

Explicit @depends-on edges are not stored as NULL-target rows, so the DB
query behind check-links never saw them and reported clean while lint
flagged the same references. Reparse the tree and resolve each reference
through the shared resolver, merging broken ones into the report.

* Resolve bare @id as a command target (#14)

show/start/complete now accept a task's @id (its local_id), not just the
file-id#slug full id, via a shared task_target resolver backed by a new
TaskRepository::get_by_local_id. Ambiguous @ids list candidate full ids.
show now reports a missing task as a not-found diagnostic (exit 5) instead
of the miscategorized E_INTERNAL.

* Enforce @depends-on on complete with --force override (#17)

lash complete now refuses when a task has a resolvable @depends-on target
that isn't done or waived, listing the unmet dependencies (E_DEP_UNMET).
Pass --force to override. Dependencies are resolved from the current
Markdown via the shared resolver, since explicit edges aren't indexed.

* Document dependency-resolution fixes and update skill docs

Update references/dependencies.md to document the natural @depends-on forms
(bare @id, file-id#task:id, comma lists) and the completion gate. Record
the work in devlog.md and the tasks index.

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