Skip to content

fix: address post-merge review findings (#876, #900, #875) — type safety, YAML escaping#929

Closed
tamirdresher wants to merge 3 commits intobradygaster:insiderfrom
tamirdresher:fix/876-type-safety
Closed

fix: address post-merge review findings (#876, #900, #875) — type safety, YAML escaping#929
tamirdresher wants to merge 3 commits intobradygaster:insiderfrom
tamirdresher:fix/876-type-safety

Conversation

@tamirdresher
Copy link
Copy Markdown
Collaborator

Addresses post-merge review findings from PRs #876, #900, and #875.

Changes

  • YAML value escaping — Added escapeYamlValue() helper that wraps values containing :, #, ', ", or newlines in single quotes (with internal quote doubling). Applied in skill.ts publish and init.ts generateApmYml.
  • catch (err: unknown) — Replaced all catch (err: any) with catch (err: unknown) + instanceof Error narrowing in skill.ts, init.ts, and plugin.ts (4 instances).
  • Type guards — Added isNamedPath() type guard to replace unsafe as { name: string; path: string } assertions in skill.ts (3 instances).
  • Deprecation messages — Standardized copilot to gh copilot in start and rc deprecation messages (cli-entry.ts).
  • Unsafe exports cast — Replaced as Record<string, Record<string, string>> with Record<string, unknown> + runtime type narrowing in cross-package-exports.test.ts.
  • Grep audit one-liner — Added the grep audit command referenced in the test header comment.

Closes #924, #925, #926

…#900, bradygaster#875)

- Add YAML value escaping helper for skill metadata
- Replace catch(err: any) with catch(err: unknown) + narrowing
- Add type guards to replace unsafe type assertions
- Standardize deprecation messages on `gh copilot`
- Fix unsafe exports type cast in cross-package test

Closes bradygaster#924, bradygaster#925, bradygaster#926

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tamirdresher tamirdresher added the skip-version-check Skip prerelease version guard for this PR label Apr 8, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tamirdresher tamirdresher changed the title fix: address post-merge review findings (#876, #900, #875) fix: address post-merge review findings (#876, #900, #875) — type safety, YAML escaping Apr 9, 2026
@tamirdresher
Copy link
Copy Markdown
Collaborator Author

Closing to re-open as fresh PR — CI not triggering.

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

Labels

skip-version-check Skip prerelease version guard for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant