Skip to content

[codex] Deduplicate invalid skill load warnings#21274

Draft
canvrno-oai wants to merge 1 commit intomainfrom
codex/dedupe-skill-load-warnings
Draft

[codex] Deduplicate invalid skill load warnings#21274
canvrno-oai wants to merge 1 commit intomainfrom
codex/dedupe-skill-load-warnings

Conversation

@canvrno-oai
Copy link
Copy Markdown
Contributor

Avoid repeatedly inserting identical invalid SKILL.md warnings when skills are refreshed while the same parse errors persist.

  • Track the last emitted skill-load error batch per cwd in the TUI.
  • Re-emit only when the batch changes, clears, or recurs after clearing.
  • Add focused coverage for repeated warnings and the clear/reset path.

Tests: cargo test -p codex-tui (2260 passed; 2 existing status permission-profile tests failed because /etc/codex/requirements.toml rejects DangerFullAccess).

@canvrno-oai
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d80e27f888

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if self
.skill_load_warnings_by_cwd
.get(cwd)
.is_some_and(|previous_errors| previous_errors == &errors)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Normalize skill error order before deduping

The dedupe compares the error Vec in order, but skill-load errors are produced from filesystem directory iteration, which is not guaranteed to be stable. With two invalid SKILL.md files, the same persistent batch can arrive in a different order and this check treats it as changed, re-emitting the duplicate warnings the commit intends to suppress. Sort or compare as a set by path/message before storing/comparing.

Useful? React with 👍 / 👎.

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