Skip to content

Only report known Databricks skills in skill/ user agent pairs - #8118

Open
chrisst wants to merge 4 commits into
mainfrom
filter-unknown-skills-telemetry
Open

chrisst wants to merge 4 commits into
mainfrom
filter-unknown-skills-telemetry

Conversation

@chrisst

@chrisst chrisst commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Why

The experimental skill/<name> user agent pairs (#7730, #7783) report whatever the agent passes to --skills-invoked / DATABRICKS_SKILLS_INVOKED. Agents pass every skill they loaded, not only Databricks ones, so the CLI can end up sending the names of third-party or user-written skills. We only want to report Databricks skills.

A databricks- prefix check isn't enough, because users name their own skills that way too.

Changes

A name is reported only if it matches one of two lists. Anything else is dropped, and the dropped name isn't logged.

  1. Static list (knownSkills). Every skill name in the history of databricks/databricks-agent-skills, including renamed and retired names (databricks → databricks-core, databricks-bundles → databricks-dabs, ...), plus databricks-quickstart. The retired names have to stay here, because no current release lists them.
  2. Bundled skills release. The skill names in the snapshot compiled into the binary (libs/skills NewBundledSource). Once Fill the bundled skills snapshot when release binaries are built #8075 fills the snapshot at release build time, new skills are reported with no edit to the static list.

The bundled lookup:

  • Starts only when a name misses the static list, and runs once per process. Commands whose skills are all in the static list never pay for it.
  • Has a deadline. A parseSkills call waits at most 5ms for it in total, shared across all names. A name with no match by then is dropped silently. With a filled snapshot, the read takes about 0.2ms.
  • Reads only the compiled-in snapshot. No network call, and not DATABRICKS_SKILLS_DIR either, because that can point at a folder of the user's own skills.

Development builds have an empty snapshot, so they fall back to the static list alone.

Possible follow-up: once the disk cache in #8076 lands, its newest catalog could be added as a third source. That would cover skills released between CLI releases for users who have run a databricks skills command. The cache is already disabled when DATABRICKS_SKILLS_REF or DATABRICKS_SKILLS_BASE_URL is set, so it only ever holds official releases.

Tests

  • Unit tests: unknown names are dropped, including ones with the databricks- prefix. Every static name survives. A name only in the released skills is reported. A slow lookup drops the unmatched names within the deadline while static matches still go through. Static matches never start the lookup. All run with -race.
  • Acceptance: added a case to acceptance/cmd/skills-invoked, and moved the existing flag-vs-env case to real skill names.

This pull request and its description were written by Isaac.

chrisst and others added 2 commits November 27, 2026 13:19
Agents pass every skill they loaded to --skills-invoked, not only Databricks
ones, so third-party and customer-written skill names were reaching our usage
logs. Drop any name that is not on an allowlist of every skill Databricks has
published (current and retired names from databricks-agent-skills, plus
databricks-quickstart). A prefix check isn't enough: customers name their own
skills databricks-<something> too.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@chrisst
chrisst requested review from a team as code owners November 27, 2026 13:25

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review at b204236. Each finding was verified against the code.

No blocking issues found. 2 non-blocking comment(s) below.

This PR limits the experimental skill/<name> user agent pairs to a hand-kept list of published Databricks skill names, so names of third-party or customer skills are dropped instead of sent. The filtering does what it says, and flag precedence, dedup, the byte budget and the telemetry opt-out still work. Two smaller things remain. The invalid-entry branch still writes the raw name to the debug log, which goes against the "not logged" intent. And because the pattern and length checks now run only for test-injected names, the tests for them pass even with those checks removed.

Comment thread cmd/root/user_agent_skills.go Outdated
@@ -63,6 +64,9 @@ func parseSkills(ctx context.Context, raw string) []string {
case name == "":
case len(name) > maxSkillLength || !skillNamePattern().MatchString(name):
log.Debugf(ctx, "dropping invalid skill entry %q", entry)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[nice to have] The pattern/length check runs before isKnownSkill, and this branch still logs the raw entry with %q. So a customer skill like DATABRICKS_SKILLS_INVOKED='Acme Payroll Reconciler' (spaces) or acme:payroll-agent ends up verbatim in --log-level debug / --log-file output, which is what the new comment on line 68 says must not happen. Every known name already passes the pattern (TestKnownSkillsAreValid checks this), so can we check !isKnownSkill(name) first, or drop entry from this message?

// 64-, 64-, 64- and 22-byte pairs make 214 bytes, so " skill/abcd" (11)
// lands exactly on 225 and nothing more fits.
exact := []string{strings.Repeat("a", 57), strings.Repeat("b", 57), strings.Repeat("c", 57), "databricks-core", "abcd"}
root.AllowSkillsForTest(t, slices.Concat(sixTooMany, exact,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[nice to have] With the allowlist in place, the cases "drops disallowed skill-name characters" (bad name, a:b, ...), "drops leading punctuation" (-a, .b, _c) and "drops entry longer than 64 bytes" use names that aren't on the allowlist. They would still pass if maxSkillLength or skillNamePattern were removed. In production, those checks only decide which debug message an unknown name gets. Could you add those exact names to AllowSkillsForTest so the pattern and length checks are what drop them? Or, if the allowlist alone is meant to decide, drop the runtime checks and rely on TestKnownSkillsAreValid.

@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: c6157ace3 | Workflow run

Selected 1 changed tests (limit=20, 0 not selected)

1 tests: regression=1 unreleased=0 coverage=0 failing=0
test branch main (901da84) latest (v1.28.0)
TestAccept/cmd/skills-invoked ✅ ❌ ❌
TestAccept/cmd/skills-invoked: branch ✅ | main (901da84) ❌ | latest (v1.28.0) ❌

main (901da84):

acceptance_test.go:1402: Diff:
        --- cmd/skills-invoked/output.txt
        +++ /tmp/TestAcceptcmdskills-invoked1852785958/002/output.txt
        @@ -28,40 +28,8 @@
         >>> [CLI] current-user me
         
         >>> print_requests.py --get //scim/v2/Me
        +contains error: 'skill/my-team-skill' was not expected: '"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/linux cmd/current-user_me cmd-exec-id/[UUID] interactive/none skill/my-team-skill skill/databricks-core skill/databricks-my-team-tool skill/acme-databricks auth/pat cicd/github"'
        +contains error: 'skill/databricks-my-team-tool' was not expected: '"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/linux cmd/current-user_me cmd-exec-id/[UUID] interactive/none skill/my-team-skill skill/databricks-core skill/databricks-my-team-tool skill/acme-databricks auth/pat cicd/github"'
        +contains error: 'skill/acme-databricks' was not expected: '"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/linux cmd/current-user_me cmd-exec-id/[UUID] interactive/none skill/my-team-skill skill/databricks-core skill/databricks-my-team-tool skill/acme-databricks auth/pat cicd/github"'
         
        -=== No skills when unset
        -
        ->>> [CLI] current-user me
        -
        ->>> print_requests.py --get //scim/v2/Me
        -
        -=== No skills when telemetry is disabled
        -
        ->>> [CLI] current-user me
        -
        ->>> print_requests.py --get //scim/v2/Me
        -
        -=== Hidden flag adds the skills, so commands still start with databricks
        -
        ->>> [CLI] current-user me --skills-invoked databricks-core,databricks-jobs
        -
        ->>> print_requests.py --get //scim/v2/Me
        -
        -=== Flag wins over env var
        -
        ->>> [CLI] current-user me --skills-invoked databricks-jobs
        -
        ->>> print_requests.py --get //scim/v2/Me
        -
        -=== No skills from the flag when telemetry is disabled
        -
        ->>> [CLI] current-user me --skills-invoked databricks-core
        -
        ->>> print_requests.py --get //scim/v2/Me
        -
        -=== Flag is hidden from help and completion
        -
        ->>> [CLI] current-user me --help
        -
        ->>> [CLI] __complete current-user me --sk
        -Completion ended with directive: ShellCompDirectiveNoFileComp
        +Exit code: 1
        
    acceptance_test.go:1180: 
        LOG.api: {
        LOG.api:   "headers": {
        LOG.api:     "User-Agent": [
        LOG.api:       "cli/1.29.0-dev databricks-sdk-go/0.204.0 go/1.27.4 os/linux cmd/api_get cmd-exec-id/6ccaddb7-e851-41c0-a9ce-1fa484404978 interactive/none skill/databricks-core auth/pat cicd/github"
        LOG.api:     ]
        LOG.api:   },
        LOG.api:   "method": "GET",
        LOG.api:   "path": "/api/2.1/clusters/list"
        LOG.api: }
    acceptance_test.go:1180: 
        LOG.bundle: {
        LOG.bundle:   "headers": {
        LOG.bundle:     "User-Agent": [
        LOG.bundle:       "cli/1.29.0-dev databricks-sdk-go/0.204.0 go/1.27.4 os/linux cmd/bundle_validate cmd-exec-id/5ba7954b-192d-4a11-b245-5cb3a31469ca interactive/none skill/databricks-dabs auth/pat cicd/github"
        LOG.bundle:     ]
        LOG.bundle:   },
        LOG.bundle:   "method": "GET",
        LOG.bundle:   "path": "/api/2.0/preview/scim/v2/Me"
        LOG.bundle: }
    acceptance_test.go:1180: 
        LOG.me: {
        LOG.me:   "headers": {
        LOG.me:     "User-Agent": [
        LOG.me:       "cli/1.29.0-dev databricks-sdk-go/0.204.0 go/1.27.4 os/linux cmd/current-user_me cmd-exec-id/f10cfaf1-fa3b-4e19-9720-436ed83eddb5 interactive/none skill/databricks-core skill/databricks-jobs auth/pat cicd/github"
        LOG.me:     ]
        LOG.me:   },
        LOG.me:   "method": "GET",
        LOG.me:   "path": "/api/2.0/preview/scim/v2/Me"
        LOG.me: }
    acceptance_test.go:1180: 
        LOG.normalized: {
        LOG.normalized:   "headers": {
        LOG.normalized:     "User-Agent": [
        LOG.normalized:       "cli/1.29.0-dev databricks-sdk-go/0.204.0 go/1.27.4 os/linux cmd/current-user_me cmd-exec-id/ae063f68-36cd-4c89-99bf-eb6004897302 interactive/none skill/databricks-core auth/pat cicd/github"
        LOG.normalized:     ]
        LOG.normalized:   },
        LOG.normalized:   "method": "GET",
        LOG.normalized:   "path": "/api/2.0/preview/scim/v2/Me"
        LOG.normalized: }
    acceptance_test.go:1180: 
        LOG.unknown: {
        LOG.unknown:   "headers": {
        LOG.unknown:     "User-Agent": [
        LOG.unknown:       "cli/1.29.0-dev databricks-sdk-go/0.204.0 go/1.27.4 os/linux cmd/current-user_me cmd-exec-id/d9191e04-eb88-438b-97f8-b75855190d84 interactive/none skill/my-team-skill skill/databricks-core skill/databricks-my-team-tool skill/acme-databricks auth/pat cicd/github"
        LOG.unknown:     ]
        LOG.unknown:   },
        LOG.unknown:   "method": "GET",
        LOG.unknown:   "path": "/api/2.0/preview/scim/v2/Me"
        LOG.unknown: }
FAIL

latest (v1.28.0):

acceptance_test.go:1402: Diff:
        --- cmd/skills-invoked/output.txt
        +++ /tmp/TestAcceptcmdskills-invoked3236399898/002/output.txt
        @@ -28,40 +28,8 @@
         >>> [CLI] current-user me
         
         >>> print_requests.py --get //scim/v2/Me
        +contains error: 'skill/my-team-skill' was not expected: '"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/linux cmd/current-user_me cmd-exec-id/[UUID] interactive/none skill/my-team-skill skill/databricks-core skill/databricks-my-team-tool skill/acme-databricks auth/pat cicd/github"'
        +contains error: 'skill/databricks-my-team-tool' was not expected: '"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/linux cmd/current-user_me cmd-exec-id/[UUID] interactive/none skill/my-team-skill skill/databricks-core skill/databricks-my-team-tool skill/acme-databricks auth/pat cicd/github"'
        +contains error: 'skill/acme-databricks' was not expected: '"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/linux cmd/current-user_me cmd-exec-id/[UUID] interactive/none skill/my-team-skill skill/databricks-core skill/databricks-my-team-tool skill/acme-databricks auth/pat cicd/github"'
         
        -=== No skills when unset
        -
        ->>> [CLI] current-user me
        -
        ->>> print_requests.py --get //scim/v2/Me
        -
        -=== No skills when telemetry is disabled
        -
        ->>> [CLI] current-user me
        -
        ->>> print_requests.py --get //scim/v2/Me
        -
        -=== Hidden flag adds the skills, so commands still start with databricks
        -
        ->>> [CLI] current-user me --skills-invoked databricks-core,databricks-jobs
        -
        ->>> print_requests.py --get //scim/v2/Me
        -
        -=== Flag wins over env var
        -
        ->>> [CLI] current-user me --skills-invoked databricks-jobs
        -
        ->>> print_requests.py --get //scim/v2/Me
        -
        -=== No skills from the flag when telemetry is disabled
        -
        ->>> [CLI] current-user me --skills-invoked databricks-core
        -
        ->>> print_requests.py --get //scim/v2/Me
        -
        -=== Flag is hidden from help and completion
        -
        ->>> [CLI] current-user me --help
        -
        ->>> [CLI] __complete current-user me --sk
        -Completion ended with directive: ShellCompDirectiveNoFileComp
        +Exit code: 1
        
    acceptance_test.go:1180: 
        LOG.api: {
        LOG.api:   "headers": {
        LOG.api:     "User-Agent": [
        LOG.api:       "cli/1.28.0 databricks-sdk-go/0.203.0 go/1.27.4 os/linux cmd/api_get cmd-exec-id/8bc899d4-6026-4d06-82fe-2c61cf43bb9e interactive/none skill/databricks-core auth/pat cicd/github"
        LOG.api:     ]
        LOG.api:   },
        LOG.api:   "method": "GET",
        LOG.api:   "path": "/api/2.1/clusters/list"
        LOG.api: }
    acceptance_test.go:1180: 
        LOG.bundle: {
        LOG.bundle:   "headers": {
        LOG.bundle:     "User-Agent": [
        LOG.bundle:       "cli/1.28.0 databricks-sdk-go/0.203.0 go/1.27.4 os/linux cmd/bundle_validate cmd-exec-id/6db408f3-0077-4f92-a021-f6a80b4f7351 interactive/none skill/databricks-dabs auth/pat cicd/github"
        LOG.bundle:     ]
        LOG.bundle:   },
        LOG.bundle:   "method": "GET",
        LOG.bundle:   "path": "/api/2.0/preview/scim/v2/Me"
        LOG.bundle: }
    acceptance_test.go:1180: 
        LOG.me: {
        LOG.me:   "headers": {
        LOG.me:     "User-Agent": [
        LOG.me:       "cli/1.28.0 databricks-sdk-go/0.203.0 go/1.27.4 os/linux cmd/current-user_me cmd-exec-id/6d32a634-6c7a-4ce9-b4b2-4d8fb53592d4 interactive/none skill/databricks-core skill/databricks-jobs auth/pat cicd/github"
        LOG.me:     ]
        LOG.me:   },
        LOG.me:   "method": "GET",
        LOG.me:   "path": "/api/2.0/preview/scim/v2/Me"
        LOG.me: }
    acceptance_test.go:1180: 
        LOG.normalized: {
        LOG.normalized:   "headers": {
        LOG.normalized:     "User-Agent": [
        LOG.normalized:       "cli/1.28.0 databricks-sdk-go/0.203.0 go/1.27.4 os/linux cmd/current-user_me cmd-exec-id/cf04bea1-f802-452b-bedc-ab5ab963e97a interactive/none skill/databricks-core auth/pat cicd/github"
        LOG.normalized:     ]
        LOG.normalized:   },
        LOG.normalized:   "method": "GET",
        LOG.normalized:   "path": "/api/2.0/preview/scim/v2/Me"
        LOG.normalized: }
    acceptance_test.go:1180: 
        LOG.unknown: {
        LOG.unknown:   "headers": {
        LOG.unknown:     "User-Agent": [
        LOG.unknown:       "cli/1.28.0 databricks-sdk-go/0.203.0 go/1.27.4 os/linux cmd/current-user_me cmd-exec-id/0182f791-cd42-47d3-ad04-8b7d8e43c1e2 interactive/none skill/my-team-skill skill/databricks-core skill/databricks-my-team-tool skill/acme-databricks auth/pat cicd/github"
        LOG.unknown:     ]
        LOG.unknown:   },
        LOG.unknown:   "method": "GET",
        LOG.unknown:   "path": "/api/2.0/preview/scim/v2/Me"
        LOG.unknown: }
FAIL

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: c6157ac

Run: 46019420008

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 176 18 4:34
💚​ aws-windows-latest-4core-16gb 1 176 18 3:32
💚​ azure linux-2core-8gb 1 175 18 4:00
💚​ azure-windows-latest-4core-16gb 1 175 18 3:37
💚​ gcp linux-2core-8gb 1 176 18 4:15
💚​ gcp-windows-latest-4core-16gb 1 176 18 3:40
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 6 slowest tests (at least 2 minutes):
duration env testname
3:44 azure linux-2core-8gb TestAccept
3:39 gcp-windows-latest-4core-16gb TestAccept
3:35 azure-windows-latest-4core-16gb TestAccept
3:35 aws linux-2core-8gb TestAccept
3:31 aws-windows-latest-4core-16gb TestAccept
3:26 gcp linux-2core-8gb TestAccept

@simonfaltum simonfaltum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤖 Automated review from simonfaltum's review agent (pr-review skill) at b204236. Each finding was verified against the code; simonfaltum may follow up.

No blocking issues found, approving.

This PR limits the experimental skill/ user agent pairs to a fixed list of Databricks-published skill names, so third-party and customer skill names are no longer sent. The list covers every skill currently in databricks-agent-skills, and the filtering, flag precedence, dedup and byte budget all behave correctly. CI is green. Only the two non-blocking points already raised in open threads remain: the raw entry in the invalid-entry debug log, and pattern/length tests that the allowlist now short-circuits.

Accepted answers

  • Hand-kept list drifts from published skills

Agreeing with existing threads

  • [nice to have] Invalid-entry debug log still prints the raw skill name: #8118 (comment)
  • [nice to have] Pattern and length tests no longer exercise those checks: #8118 (comment)

A name that is not in the static list is checked against the skills release
compiled into the binary, so new skills are reported without editing the
list. The lookup starts only when a name misses the static list, runs once
per process, and a parseSkills call waits at most 5ms for it in total. A name
that has no match by then is dropped. Only the bundled snapshot is read: no
network call, and not DATABRICKS_SKILLS_DIR, which can point at a customer's
own skills.

Co-authored-by: Isaac <no-reply@databricks.com>
@chrisst
chrisst requested a review from simonfaltum November 27, 2026 14:47
Co-authored-by: Isaac <no-reply@databricks.com>

@simonfaltum simonfaltum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤖 Automated review from simonfaltum's review agent (pr-review skill) at c6157ac. Each finding was verified against the code; simonfaltum may follow up.

No blocking issues found, approving. 5 non-blocking comment(s) and 1 question(s) below.

This PR limits the experimental skill/ user agent pairs to published Databricks skill names: a static list, plus the names in the bundled skills snapshot behind a 5ms deadline. Rejected names are no longer logged. The filtering is correct, the static list covers every skill currently in databricks-agent-skills, and CI is green. What's left is non-blocking: one open question about whether the async released-skills lookup should wait for #8075 or become a synchronous read, a comment that overstates what the lookup does today, and a few test and style nits.

Questions

  1. The released-skills lookup (goroutine, done channel, shared 5ms deadline, skipLookup, timeout test hook) can't match anything until #8075 fills the bundled snapshot, and #8075 is still open. Once the snapshot is filled, the lookup only parses an embedded manifest, with no I/O. With a fixed 5ms deadline, a skill that is only in the release gets reported on some runs and dropped on others when the machine is loaded. Could this part move into #8075? Or could the snapshot be read synchronously once per process (for example sync.OnceValues(loadBundledSkillNames))? That would be deterministic and still lazy. (non-blocking)

Comments outside the changed lines

  • [nit] .github/PULL_REQUEST_TEMPLATE.md: .agents/skills/pr-checklist/SKILL.md asks for the template sections ## Changes, ## Why, ## Tests in that order, and for the agent disclosure as a single italicized last line. The description puts ## Why before ## Changes, and the disclosure line is not italicized. Reorder the sections and italicize the disclosure.

Agreeing with existing threads

  • [nice to have] Pattern and length test cases pass without the pattern and length checks: #8118 (comment)

Comment on lines +29 to +30
// A skill that is not listed here is still reported when it is in the skills
// release bundled with the binary (see releasedSkills), so new skills need no

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[nice to have] This comment says a skill missing from knownSkills is still reported through the bundled release, "so new skills need no edit here". The loadBundledSkillNames comment also says the release build fills the snapshot. Today libs/skills/snapshot/manifest.json is {"skills": {}} and #8075 is still open. So the lookup always returns ErrSourceUnreachable, and every binary drops a skill published after this list. A maintainer who trusts this comment won't add the new name. Could you say that this depends on the release build filling the snapshot (#8075), and that new skills must be added here until then?

// Static matches still go through; the slow lookup only drops the rest.
assert.Equal(t, []string{"databricks-core"}, got)
// Both unmatched names share one deadline, so the wait is not doubled.
assert.Less(t, elapsed, 500*time.Millisecond)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[nit] The comment says both unmatched names share one deadline, so the wait is not doubled. But with a 5ms timeout and elapsed < 500ms, a per-name deadline (10ms total) still passes. Use a longer timeout, such as 100ms, and assert below twice that value, such as < 190ms, so the test fails if each name gets its own deadline.

log.Debugf(ctx, "dropping invalid skill entry %q", entry)
// Don't log the entry: it may be a customer's own skill name.
log.Debugf(ctx, "dropping invalid skill entry")
case !matcher.isKnown(ctx, name):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[nit] !matcher.isKnown runs before slices.Contains(skills, name) and the size check. If the 225-byte budget is already full, a later unknown name still starts the released-skills lookup and can wait up to releasedSkillsTimeout, even though it could never be added. Only known names are ever appended, so moving the dedup and budget cases above isKnown gives the same result without the wait.

Comment on lines +146 to +149
// newSkillMatcher returns a matcher for one parseSkills call. The deadline
// starts at the first name that is not in knownSkills and is shared by every
// later name, so a slow lookup costs at most releasedSkillsTimeout in total.
func newSkillMatcher() *skillMatcher {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[nit] newSkillMatcher only returns &skillMatcher{}, but its doc comment describes the deadline behaviour, which isKnown implements. Use &skillMatcher{} directly, or keep the constructor, and move the deadline comment onto isKnown, where a reader will look for it.

This branch has not been deployed

No deployments
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.

3 participants