fix: replace silent catch blocks with warn messages#77
Open
vystartasv wants to merge 2 commits intoopen-gitagent:mainfrom
Open
fix: replace silent catch blocks with warn messages#77vystartasv wants to merge 2 commits intoopen-gitagent:mainfrom
vystartasv wants to merge 2 commits intoopen-gitagent:mainfrom
Conversation
Implements the identity layer proposed in open-gitagent#70: - New identy.yaml optional file convention for agent repos - JSON Schema (spec/schemas/identity.schema.json) - SPECIFICATION.md section 3a with field spec, example, semantics - Directory structure updated Schema maps 1:1 to Works With Agents Identity Protocol (L2, CC BY 4.0): https://workswithagents.dev/specs/identity.md Fully optional. Agents without identity.yaml continue working. Production/regulated deployments get Ed25519 key binding with signing, verification, delegation, and revocation semantics.
5 silent catch {} blocks across skill-loader, skill-discovery,
and gemini adapter now log the actual error. This matches the
CONTRIBUTING.md standard: 'Error messages should help the user
fix the problem.'
Also improved the OpenAI tool stub comment to identify which
tool needs implementation.
Changed:
- skill-loader.ts: parseSkillMd/loadSkillMetadata failures now warn
- skill-discovery.ts: skill discovery/load failures now warn
- gemini.ts: hook config parse failure now warns via console.warn
- openai.ts: tool stub comment names the specific tool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces 5 silent
catch {}blocks with proper error logging. These catch blocks were swallowing real failures — skill parse errors, hook config issues, and discovery problems — with zero visibility for the user.The CONTRIBUTING.md standard says: "Error messages should help the user fix the problem. 'Failed to load agent.yaml: file not found at /path' is great. A bare 'Error' isn't helpful." These catch blocks didn't even give a bare error — they were completely silent.
Changes
skill-loader.tsparseSkillMdfailurewarn()with path + error messageskill-loader.tsloadSkillMetadatafailurewarn()with path + error messageskill-discovery.tswarn()with path + error messageskill-discovery.tswarn()with path + error messagegemini.tsreturn nullconsole.warn()then return nullopenai.ts# TODOWhy
Debugging silent skill or hook failures is currently impossible without adding temporary console.log calls. Users see "0 skills loaded" with no indication WHY their skills didn't parse.
Tested
npm run buildpasses (pre-existing js-yaml type issue unchanged)dist/warn()pattern fromformat.ts