Skip to content

fix(core): the unknown-tool error links a broken manifest by its declared name - #265

Merged
Max17190 merged 2 commits into
mainfrom
unknown-tool-links-broken-by-declared-name
Aug 29, 2026
Merged

fix(core): the unknown-tool error links a broken manifest by its declared name#265
Max17190 merged 2 commits into
mainfrom
unknown-tool-links-broken-by-declared-name

Conversation

@Max17190

@Max17190 Max17190 commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Why

Round-7 contract audit (F9). The unknown-tool error's "exists but did NOT load" link matched broken files by FILE STEM, while the registry keys tools on the DECLARED name, and the spec's own <name>.toml placeholder invites the hyphen-file/underscore-tool split. A model calling todo_scan after its todo-scan.toml broke got a bare unknown tool and concluded the file was never written. The refreeze receipt covers the writing turn; the gap was the resumed or externally-edited case.

Stacked on #248, which introduced the broken_tools (path, occupied name) list this match keys on.

Summary

The broken-file link tries the occupied-name match first (declared name, stem fallback: the registry's own collision key), then falls back to the existing stem and SKILL.md matchers, which still serve manifest-restored registries whose broken_tools is empty.

Test Plan

  • a_broken_manifest_is_named_when_its_declared_name_differs_from_its_stem: hyphen file declaring an underscore name, broken; calling the declared name returns the did-NOT-load error naming the file. Red against a disabled name-match (verified).
  • Full workspace green (exit 0), clippy zero warnings.

Greptile Summary

The registry now identifies unavailable tools by their declared manifest name and reports the project-level manifest when it overrides an invalid global manifest. Focused coverage confirms both diagnostic paths behave as intended.

Confidence Score: 5/5

No blocking failure remains; the project override diagnostic behaves correctly.

The focused checks exercised both invalid-manifest resolution paths and confirmed that each reports the intended manifest.

T-Rex T-Rex Logs

What T-Rex did

  • Ran the two focused tests for broken project tool manifests and broken manifest naming, and the results confirm that a broken project override is named ahead of an invalid global manifest and that a broken manifest is found through its declared tool name.
  • The regression runner captured the exact commands, working directory, and exit codes for the tests, and noted that no repository source files were modified while only executable proof artifacts were added.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (3): Last reviewed commit: "fix(core): a doubly broken name is linke..." | Re-trigger Greptile

Comment thread crates/core/src/registry.rs
@Max17190
Max17190 changed the base branch from receipt-truth-broken-not-removed to main August 29, 2026 18:00
…ared name

The did-NOT-load link matched a broken file by stem, but tools are keyed
by DECLARED name: todo-scan.toml declaring name = "todo_scan" is exactly
the file a caller of todo_scan means, and the error answered with a bare
unknown, so the model concluded the file was never written. The match now
goes through broken_tools (declared name, stem fallback - the registry's
own key); the stem and SKILL.md matchers stay for manifest-restored
registries, whose broken_tools list is empty.
broken_tools accumulates the global tier first, so a first-match lookup
named the global file when both tiers' manifests for one name are broken;
the project override is what actually withholds the tool. Reverse scan,
with a regression test.
@Max17190
Max17190 force-pushed the unknown-tool-links-broken-by-declared-name branch from 128053d to 3ae74c1 Compare August 29, 2026 18:02
@Max17190
Max17190 merged commit dce50dd into main Aug 29, 2026
4 checks passed
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