GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor(coderd/x/chatd/chattool): drop the read_skill alias fallback by ibetitsmike · Pull Request #31123 · coder/coder

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Oct 21, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

When ReadSkillOptions.ResolveAlias is nil, read_skill and read_skill_file build a workspace skill from GetSkills and serve it. Only tests leave the resolver nil. The one production caller, skillOpts in turn_environment.go, always sets it to skillspkg.Lookup over the merged personal, organization, project, and workspace skills.

This PR deletes resolveSkillAlias and that fallback. Without a resolver, both tools now return skill alias resolver is not configured, as they already do for the other unset options. The tests resolve names with the real skillspkg.MergeSkills and skillspkg.Lookup instead of hand-written fakes. read_skill_file still serves a workspace skill hidden from the model (#31147): it checks for a nil resolver before resolveSkillFileTarget, which now calls ResolveAlias directly. The PR adds 89 lines and removes 160.

Why it is safe

  • git grep 'ReadSkillOptions{' finds one non-test caller, and it sets ResolveAlias. Behavior with a resolver does not change.
  • GetSkills and findSkill stay. They still supply the pinned body, the directory, and the supporting files of a resolved workspace skill.
  • TestReadSkillTool/ModelHiddenSkill is deleted. It checked that the fallback hid a skill that disables model invocation. With the real resolver, TestModelHiddenWorkspaceSkillsLeftOutOfModelSkills checks that, and it fails when the model-invocable filter in workspaceSkillsForResolution is removed. ListedSkillServesFileThatDisablesModelInvocation now sets a resolver.

Mutants of skill.go (go test -overlay, -run TestReadSkill), on main at 27db7ac and on this branch:

Mutant Fails on main Fails on this branch
Fallback restored (skill.go from main) n/a TestReadSkillToolsRequireAliasResolver
No nil check in ReadSkill, or in ReadSkillFile n/a TestReadSkillToolsRequireAliasResolver (nil function call)
Response name is resolved.Alias nothing PersonalQualifiedAliasPreservesAlias, WorkspaceQualifiedAlias
Pinned body empty PinnedBodyFromMeta, PinnedBodyServedWhenWorkspaceUnreachable, WorkspaceQualifiedAlias the same, and CollisionAliasRoundTrip
10 others: no dir, no supporting files, empty file content, ambiguity reported as not found, resolver or loader error text returned, deleted stored skill reported as a load failure, file read allowed for a personal skill, hidden skill not matched, hidden skill meta file served at least one test each the same tests

A copy of skill.go with a syntax error fails to build in both runs, so the overlay applies.

Review focus

  • The qualified alias tests are stronger. The fakes returned the alias they got, so on main a tool that echoed resolved.Alias passed. The real lookup resolves personal/my-skill to the bare alias my-skill, so the tests now check that the tool returns the requested name.
  • CollisionAliasRoundTrip no longer calls the resolver itself. It checks each response body instead. The fake said that a bare deploy was not found; the real lookup says it is ambiguous, which AmbiguousLookupSurfacesAliases covers.
  • ResolveAliasErrorIsSanitized keeps a fake, because the real lookup returns only not-found and ambiguous errors.
  • feat: serve plugin skills in chatd #29323 (plugin skills) replaces ResolveAlias and rewrites resolveSkillAlias, so it conflicts with this PR. Whichever merges second must reconcile.

Validation

  • go test ./coderd/x/chatd/chattool/ -count=1: pass.
  • go test ./coderd/x/chatd/chattool/ -race -count=3 -run Skill: pass.
  • go test ./coderd/x/chatd/ -run Skill: pass.
  • go vet ./coderd/x/chatd/chattool/ ./coderd/x/chatd/: no issues.
  • Mutants: each fails as listed.
  • make pre-commit with CODER_HOOK_RUN_ALL=1 passed.

Xum, an AI agent, opened this PR for @ibetitsmike and wrote this description.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@github-actions github-actions Bot assigned ibetitsmike Oct 21, 2026
@ibetitsmike

ibetitsmike commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Xum, an AI agent, requested this review for @ibetitsmike.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T20:52:27.536717Z bf11ba9 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 9780d9de31

ℹ️ 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".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@linear-code

linear-code Bot commented Oct 21, 2026

Copy link
Copy Markdown

CODAGT-1445

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike

ibetitsmike commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Xum, an AI agent, requested this review for @ibetitsmike.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: d67de4d016

ℹ️ 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".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ThomasK33
ThomasK33 approved these changes Oct 27, 2026
View reviewed changes
@ibetitsmike
ibetitsmike force-pushed the mike/chattool-require-skill-resolver branch from d67de4d to 6ec828b Compare October 29, 2026 22:57
@ibetitsmike

ibetitsmike commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

Rebased onto main (31b8fd1b880) and added one commit, 6ec828b9dab. Main's #31462 added two TestReadSkillFileTool subtests, AgentRefusalIsToolError and AgentErrorsAreRewrittenForModel, that build the tool without ResolveAlias. With this PR the tool requires a resolver, so both failed with "skill alias resolver is not configured". The new commit gives them the same lookupSkills resolver the other subtests use. go test ./coderd/x/chatd/chattool passes.

Xum posted this comment for @ibetitsmike.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ibetitsmike added 2 commits October 30, 2026 15:49
@ibetitsmike
refactor(coderd/x/chatd/chattool): drop the read_skill alias fallback
ee0ccac
When ReadSkillOptions.ResolveAlias was nil, read_skill and
read_skill_file treated the name as a workspace skill from GetSkills.
Only tests relied on that: the one production caller always sets a
resolver. Both tools now return "skill alias resolver is not
configured" instead, and the tests resolve aliases with the real
MergeSkills and Lookup.
@ibetitsmike
test(coderd/x/chatd/chattool): give the new read_skill_file subtests …
bf11ba9
…an alias resolver

main added AgentRefusalIsToolError and AgentErrorsAreRewrittenForModel
without ResolveAlias. read_skill_file now requires a resolver, so both
subtests failed with "skill alias resolver is not configured" before
reaching the agent.
@ibetitsmike
ibetitsmike force-pushed the mike/chattool-require-skill-resolver branch from 6ec828b to bf11ba9 Compare October 30, 2026 15:51
@ibetitsmike
ibetitsmike marked this pull request as ready for review October 30, 2026 20:51
@ibetitsmike
ibetitsmike merged commit 0a71846 into main Oct 30, 2026
32 of 33 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike
ibetitsmike deleted the mike/chattool-require-skill-resolver branch October 30, 2026 20:52
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@ThomasK33 ThomasK33 ThomasK33 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@ibetitsmike ibetitsmike

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ibetitsmike @ThomasK33
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.