mirror of
https://github.com/anthropics/claude-plugins-official.git
synced 2026-06-11 10:43:34 +00:00
Compare commits
46 Commits
bump/base4
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9eae436aa2 | ||
|
|
ee7ce490f9 | ||
|
|
460bc2b3a4 | ||
|
|
1a7db730cb | ||
|
|
3ebb9c7a85 | ||
|
|
9ef08d32aa | ||
|
|
b8e4462957 | ||
|
|
2f9c3234ab | ||
|
|
c5660ed060 | ||
|
|
9ecfe41bdd | ||
|
|
d5265b0377 | ||
|
|
c7f3eb4b8f | ||
|
|
3b46b04964 | ||
|
|
a379ddd580 | ||
|
|
8a0797c1eb | ||
|
|
447aef7de0 | ||
|
|
7e9d5e46d1 | ||
|
|
14e6461b03 | ||
|
|
634ea8dfdf | ||
|
|
fa5b2907d3 | ||
|
|
f0a6e581ab | ||
|
|
820c25f30e | ||
|
|
62e1eee8ba | ||
|
|
1266fa54fe | ||
|
|
662eb2a84d | ||
|
|
b9fcf71aa3 | ||
|
|
276c66d983 | ||
|
|
96627692d8 | ||
|
|
2dad4fb0e9 | ||
|
|
764c85b81b | ||
|
|
0fc58e49d1 | ||
|
|
14207a6858 | ||
|
|
51081f898a | ||
|
|
c6cd307f91 | ||
|
|
1f41ee16b7 | ||
|
|
0590b22bed | ||
|
|
c0e06a05f0 | ||
|
|
cb3f6930c7 | ||
|
|
481d531f7d | ||
|
|
9d53eaee3b | ||
|
|
887f70cb5d | ||
|
|
a96db3dd4d | ||
|
|
5a4b44267a | ||
|
|
627d4dd3c4 | ||
|
|
4902efd113 | ||
|
|
43fcf6d513 |
@@ -19,7 +19,7 @@
|
||||
"url": "https://github.com/42Crunch-AI/claude-plugins.git",
|
||||
"path": "plugins/api-security-testing",
|
||||
"ref": "v1.5.5",
|
||||
"sha": "b7e131e30ff033be2176faf796c94c151a68c63a"
|
||||
"sha": "5cfa510f7ea4d940f0ff5f6688a21e4ea0db0a18"
|
||||
},
|
||||
"homepage": "https://42crunch.com"
|
||||
},
|
||||
@@ -150,7 +150,7 @@
|
||||
"url": "https://github.com/awslabs/agent-plugins.git",
|
||||
"path": "plugins/amazon-location-service",
|
||||
"ref": "main",
|
||||
"sha": "b13ce7f008c52be10c3fcccce25d64ec614e76be"
|
||||
"sha": "58373593c6ed2e4684181f81369c0b7a4c916423"
|
||||
},
|
||||
"homepage": "https://github.com/awslabs/agent-plugins"
|
||||
},
|
||||
@@ -161,7 +161,7 @@
|
||||
"url": "https://github.com/amplitude/mcp-marketplace.git",
|
||||
"path": "plugins/amplitude",
|
||||
"ref": "main",
|
||||
"sha": "e9b4e15193666e1b513b5652ded23fab160bdc4e"
|
||||
"sha": "fb22979da93d27dcb17b832dbd473e6b0caf2ca8"
|
||||
},
|
||||
"description": "Use Amplitude as an expert analyst — instrument Amplitude, discover product opportunities, analyze charts, create dashboards, manage experiments, and understand users and accounts.",
|
||||
"category": "monitoring",
|
||||
@@ -304,7 +304,7 @@
|
||||
"url": "https://github.com/awslabs/agent-plugins.git",
|
||||
"path": "plugins/aws-amplify",
|
||||
"ref": "main",
|
||||
"sha": "b13ce7f008c52be10c3fcccce25d64ec614e76be"
|
||||
"sha": "58373593c6ed2e4684181f81369c0b7a4c916423"
|
||||
},
|
||||
"homepage": "https://github.com/awslabs/agent-plugins"
|
||||
},
|
||||
@@ -365,7 +365,7 @@
|
||||
"url": "https://github.com/awslabs/agent-plugins.git",
|
||||
"path": "plugins/aws-serverless",
|
||||
"ref": "main",
|
||||
"sha": "b13ce7f008c52be10c3fcccce25d64ec614e76be"
|
||||
"sha": "58373593c6ed2e4684181f81369c0b7a4c916423"
|
||||
},
|
||||
"homepage": "https://github.com/awslabs/agent-plugins"
|
||||
},
|
||||
@@ -502,7 +502,7 @@
|
||||
"url": "https://github.com/carta/plugins.git",
|
||||
"path": "plugins/carta-cap-table",
|
||||
"ref": "main",
|
||||
"sha": "4b60ca6616ce614dacb306c2e3433aeca6ce3b5b"
|
||||
"sha": "fd503bbc698b89c6f88828acb2be2eaae71c6754"
|
||||
},
|
||||
"homepage": "https://carta.com"
|
||||
},
|
||||
@@ -518,7 +518,7 @@
|
||||
"url": "https://github.com/carta/plugins.git",
|
||||
"path": "plugins/carta-crm",
|
||||
"ref": "main",
|
||||
"sha": "4b60ca6616ce614dacb306c2e3433aeca6ce3b5b"
|
||||
"sha": "4b5796517b62c4aeaac1a0bb6ccdaebeb73475a5"
|
||||
},
|
||||
"homepage": "https://carta.com"
|
||||
},
|
||||
@@ -534,7 +534,7 @@
|
||||
"url": "https://github.com/carta/plugins.git",
|
||||
"path": "plugins/carta-investors",
|
||||
"ref": "main",
|
||||
"sha": "4b60ca6616ce614dacb306c2e3433aeca6ce3b5b"
|
||||
"sha": "fd503bbc698b89c6f88828acb2be2eaae71c6754"
|
||||
},
|
||||
"homepage": "https://carta.com"
|
||||
},
|
||||
@@ -804,7 +804,7 @@
|
||||
"source": {
|
||||
"source": "url",
|
||||
"url": "https://github.com/CodSpeedHQ/codspeed.git",
|
||||
"sha": "c6112f168b405df8e7310b12a9b80484cd01ac14"
|
||||
"sha": "7e86f11b2e0dee673f621c80271d8dae4893df73"
|
||||
},
|
||||
"homepage": "https://codspeed.io"
|
||||
},
|
||||
@@ -872,7 +872,7 @@
|
||||
"source": {
|
||||
"source": "url",
|
||||
"url": "https://github.com/CrowdStrike/foundry-skills.git",
|
||||
"sha": "0a651a1472e4c03603780517374c654236bcce8b"
|
||||
"sha": "2f34384c9892753690abfac5fd7771f30809ca96"
|
||||
},
|
||||
"homepage": "https://github.com/CrowdStrike/foundry-skills"
|
||||
},
|
||||
@@ -918,7 +918,7 @@
|
||||
"source": {
|
||||
"source": "url",
|
||||
"url": "https://github.com/dash0hq/dash0-agent-plugin.git",
|
||||
"sha": "5ff7aa5b8e52e10d10e45ea8e2f7cbebc86758bf"
|
||||
"sha": "37fd498b0775d98fcd27ff3c0fe3f68e412482a4"
|
||||
},
|
||||
"homepage": "https://dash0.com/"
|
||||
},
|
||||
@@ -966,7 +966,7 @@
|
||||
"url": "https://github.com/awslabs/agent-plugins.git",
|
||||
"path": "plugins/databases-on-aws",
|
||||
"ref": "main",
|
||||
"sha": "b13ce7f008c52be10c3fcccce25d64ec614e76be"
|
||||
"sha": "f985fddc69953f103d9c16fa9e97096d2bc29b02"
|
||||
},
|
||||
"homepage": "https://github.com/awslabs/agent-plugins"
|
||||
},
|
||||
@@ -1048,7 +1048,7 @@
|
||||
"url": "https://github.com/awslabs/agent-plugins.git",
|
||||
"path": "plugins/deploy-on-aws",
|
||||
"ref": "main",
|
||||
"sha": "b13ce7f008c52be10c3fcccce25d64ec614e76be"
|
||||
"sha": "f985fddc69953f103d9c16fa9e97096d2bc29b02"
|
||||
},
|
||||
"homepage": "https://github.com/awslabs/agent-plugins"
|
||||
},
|
||||
@@ -1150,7 +1150,7 @@
|
||||
"url": "https://github.com/expo/skills.git",
|
||||
"path": "plugins/expo",
|
||||
"ref": "main",
|
||||
"sha": "c38860242118df93d4ec4381a34f4144fff61928"
|
||||
"sha": "1a5693e0acc95a0829ff1656b4426fee2f2c1167"
|
||||
},
|
||||
"homepage": "https://github.com/expo/skills/blob/main/plugins/expo/README.md"
|
||||
},
|
||||
@@ -1198,7 +1198,7 @@
|
||||
"source": {
|
||||
"source": "url",
|
||||
"url": "https://github.com/figma/mcp-server-guide.git",
|
||||
"sha": "54ad156019d7362a56d8024b9adbe99952aa29b6"
|
||||
"sha": "2efd0e37d10c35c4a7cf6d2b7381c9dc1a569bd4"
|
||||
},
|
||||
"homepage": "https://github.com/figma/mcp-server-guide"
|
||||
},
|
||||
@@ -1230,7 +1230,7 @@
|
||||
"source": {
|
||||
"source": "url",
|
||||
"url": "https://github.com/gemini-cli-extensions/firestore-native.git",
|
||||
"sha": "f88103bd0ccfe9e1e7a3a7d849de26d197978c9a"
|
||||
"sha": "d7f42424cfddfb567efbae100023b94dfb4571be"
|
||||
},
|
||||
"homepage": "https://github.com/gemini-cli-extensions/firestore-native"
|
||||
},
|
||||
@@ -1361,7 +1361,7 @@
|
||||
"source": {
|
||||
"source": "url",
|
||||
"url": "https://github.com/heygen-com/hyperframes.git",
|
||||
"sha": "81416ab3c9b04ca87d399e9b558ec7227b7d641c"
|
||||
"sha": "868c56fdbbe8d65caceb1933a781477f93dc1d81"
|
||||
},
|
||||
"homepage": "https://hyperframes.heygen.com"
|
||||
},
|
||||
@@ -1540,7 +1540,7 @@
|
||||
"url": "https://github.com/pydantic/skills.git",
|
||||
"path": "plugins/logfire",
|
||||
"ref": "main",
|
||||
"sha": "ddc7d00569458f3838c6cf489f5be6c59afaf8c1"
|
||||
"sha": "1e7a4567d8375e8ef07ad078d7f38bc03ce5e944"
|
||||
},
|
||||
"homepage": "https://github.com/pydantic/skills/tree/main/plugins/logfire"
|
||||
},
|
||||
@@ -1759,7 +1759,7 @@
|
||||
"url": "https://github.com/neondatabase/agent-skills.git",
|
||||
"path": "plugins/neon-postgres",
|
||||
"ref": "main",
|
||||
"sha": "9695a225d56ea55569a8b3a0b7294fb01c23b4ff"
|
||||
"sha": "58b84dfb0815cca6dbb2f40bfdb23ddf934d2b5f"
|
||||
},
|
||||
"homepage": "https://github.com/neondatabase/agent-skills/tree/main/plugins/neon-postgres"
|
||||
},
|
||||
@@ -1770,7 +1770,7 @@
|
||||
"source": {
|
||||
"source": "url",
|
||||
"url": "https://github.com/netlify/context-and-tools.git",
|
||||
"sha": "22025ef6c9dc9ef88d0c9c047980c10cacb178ee"
|
||||
"sha": "99b990ce96a00160142ef1154f1db09708f3449c"
|
||||
},
|
||||
"homepage": "https://github.com/netlify/context-and-tools"
|
||||
},
|
||||
@@ -1885,7 +1885,7 @@
|
||||
"url": "https://github.com/growthxai/output.git",
|
||||
"path": "coding_assistants/claude/plugins/outputai",
|
||||
"ref": "main",
|
||||
"sha": "83742db514fc4ab1d18b1277cd9cc1e28a95e732"
|
||||
"sha": "be9352cb3cb4bd7c204be0150db8c205dd939d9e"
|
||||
},
|
||||
"homepage": "https://output.ai"
|
||||
},
|
||||
@@ -1995,7 +1995,7 @@
|
||||
"source": {
|
||||
"source": "url",
|
||||
"url": "https://github.com/PostHog/ai-plugin.git",
|
||||
"sha": "db4a86632293ca66eec9a6d278786ddb22c1787e"
|
||||
"sha": "f674efefafeff7152294642f8559906eed885210"
|
||||
},
|
||||
"homepage": "https://posthog.com/docs/model-context-protocol"
|
||||
},
|
||||
@@ -2050,7 +2050,7 @@
|
||||
"url": "https://github.com/pydantic/skills.git",
|
||||
"path": "plugins/ai",
|
||||
"ref": "main",
|
||||
"sha": "ddc7d00569458f3838c6cf489f5be6c59afaf8c1"
|
||||
"sha": "1e7a4567d8375e8ef07ad078d7f38bc03ce5e944"
|
||||
},
|
||||
"homepage": "https://github.com/pydantic/skills/tree/main/plugins/ai"
|
||||
},
|
||||
@@ -2113,7 +2113,7 @@
|
||||
"source": {
|
||||
"source": "url",
|
||||
"url": "https://github.com/TheQtCompanyRnD/agent-skills.git",
|
||||
"sha": "a7189a7bc17e616b725e7ce4e46a4f5ebd50d94f"
|
||||
"sha": "2be55aaf050cf0e5d92d62966c473d2c5f6d780a"
|
||||
},
|
||||
"homepage": "https://www.qt.io/"
|
||||
},
|
||||
@@ -2300,7 +2300,7 @@
|
||||
"url": "https://github.com/awslabs/agent-plugins.git",
|
||||
"path": "plugins/sagemaker-ai",
|
||||
"ref": "main",
|
||||
"sha": "d8243e5f8f3933d656b3bdfe09cd658a5d9b9fac"
|
||||
"sha": "58373593c6ed2e4684181f81369c0b7a4c916423"
|
||||
},
|
||||
"homepage": "https://github.com/awslabs/agent-plugins"
|
||||
},
|
||||
@@ -2314,7 +2314,7 @@
|
||||
"source": {
|
||||
"source": "url",
|
||||
"url": "https://github.com/sanity-io/agent-toolkit.git",
|
||||
"sha": "66f0ec5d9167b3ccb8b3450e5ec34f3b523d4139"
|
||||
"sha": "2d7b7c08a31a6e5b613e33a9edc76456e4d7c052"
|
||||
},
|
||||
"homepage": "https://www.sanity.io"
|
||||
},
|
||||
@@ -2348,7 +2348,7 @@
|
||||
"url": "https://github.com/SAP/open-ux-tools.git",
|
||||
"path": "packages/fiori-mcp-server",
|
||||
"ref": "main",
|
||||
"sha": "81b88637563446eb747ac93a31b8b3faee44a78d"
|
||||
"sha": "67ad23a4670a26c0fb0e1560601e8eb6ddcb43ad"
|
||||
},
|
||||
"homepage": "https://github.com/SAP/open-ux-tools/tree/main/packages/fiori-mcp-server"
|
||||
},
|
||||
@@ -2380,14 +2380,14 @@
|
||||
"url": "https://github.com/spotify/save-to-spotify.git",
|
||||
"path": "plugin",
|
||||
"ref": "main",
|
||||
"sha": "cd4ea68111d96769b09c0b0d2199e692cf00a73c"
|
||||
"sha": "a62408bcfb5e5be686e1fdcc361398493b8c4160"
|
||||
},
|
||||
"homepage": "https://github.com/spotify/save-to-spotify"
|
||||
},
|
||||
{
|
||||
"name": "security-guidance",
|
||||
"description": "Security review for Claude-generated code. Pattern-based warnings on edits, LLM-powered diff review on Stop, and an agentic commit reviewer that catches injection, XSS, SSRF, hardcoded secrets, and 25+ other vulnerability classes.",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"author": {
|
||||
"name": "Anthropic",
|
||||
"email": "support@anthropic.com"
|
||||
@@ -2431,7 +2431,7 @@
|
||||
"url": "https://github.com/getsentry/cli.git",
|
||||
"path": "plugins/sentry-cli",
|
||||
"ref": "main",
|
||||
"sha": "18111b95ac8819d58e4f0334d4b8ee8f72513d1e"
|
||||
"sha": "a5f26c3398ddfa458e32e2f139eb80ee3d9a8abf"
|
||||
},
|
||||
"homepage": "https://sentry.io"
|
||||
},
|
||||
@@ -2534,7 +2534,7 @@
|
||||
"url": "https://github.com/Snowflake-Labs/snowflake-ai-kit.git",
|
||||
"path": "plugins/cortex-code",
|
||||
"ref": "main",
|
||||
"sha": "7d2c7e7e0788e255019a64a8690aa5f85d073a2c"
|
||||
"sha": "5a8f277f623394838ee76399261f4704c19eaba7"
|
||||
},
|
||||
"homepage": "https://docs.snowflake.com/en/user-guide/cortex-code"
|
||||
},
|
||||
@@ -2707,7 +2707,7 @@
|
||||
"source": {
|
||||
"source": "url",
|
||||
"url": "https://github.com/togethercomputer/skills.git",
|
||||
"sha": "8aa08ca126a50d5e76f6d378f47386cee4267984"
|
||||
"sha": "86bdd6627675eac3f2055f028e4acdd4d1b03fb0"
|
||||
},
|
||||
"homepage": "https://www.together.ai"
|
||||
},
|
||||
@@ -2787,7 +2787,7 @@
|
||||
"url": "https://github.com/UI5/plugins-coding-agents.git",
|
||||
"path": "plugins/ui5-typescript-conversion",
|
||||
"ref": "main",
|
||||
"sha": "6d72751f0b2983c379aaa457fe4c7cf4a075a66d"
|
||||
"sha": "80f2d93287054f9d30dd990e842e15bcfca581c9"
|
||||
},
|
||||
"homepage": "https://github.com/UI5/plugins-coding-agents"
|
||||
},
|
||||
@@ -2803,7 +2803,7 @@
|
||||
"url": "https://github.com/val-town/plugins.git",
|
||||
"path": "plugin",
|
||||
"ref": "main",
|
||||
"sha": "02631f998eda9b88d73d699703b062db059d506b"
|
||||
"sha": "1f7928397349f2ccb228302d8b062c7f20745871"
|
||||
},
|
||||
"homepage": "https://val.town"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "security-guidance",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"description": "Security review for Claude-generated code. Pattern-based warnings on edits, LLM-powered diff review on Stop, and an agentic commit reviewer that catches injection, XSS, SSRF, hardcoded secrets, and 25+ other vulnerability classes.",
|
||||
"author": {
|
||||
"name": "David Dworken",
|
||||
|
||||
@@ -102,6 +102,41 @@ SDK_BOOTSTRAP_ERR_CODES = {
|
||||
"_uncategorized": 99,
|
||||
}
|
||||
|
||||
# Exception-type encoding for the "exc:<TypeName>" err_kinds (the generic
|
||||
# `except Exception` path — venv/pip raised a Python exception rather than
|
||||
# a CalledProcessError with categorizable stderr).
|
||||
#
|
||||
# #2154 telemetry surfaced that the dominant remaining venv BUILD_FAILED
|
||||
# bucket (phase=venv, err=99) is ~99% `exc:` with stderr_sig=NULL — i.e.
|
||||
# exceptions, not stderr-bearing subprocess failures — so the stderr_sig
|
||||
# hash couldn't distinguish them. This maps the exception TYPE to a stable
|
||||
# code so BQ can tell FileNotFoundError (python/venv binary missing) from
|
||||
# PermissionError (read-only home) from a bare OSError, etc.
|
||||
#
|
||||
# All the FileNotFoundError/PermissionError/etc. entries are OSError
|
||||
# subclasses, so they ALSO carry an errno (see _encode_errno) — the type
|
||||
# code gives the Python class, errno gives the OS-level cause. APPEND-ONLY.
|
||||
SDK_BOOTSTRAP_EXC_CODES = {
|
||||
"FileNotFoundError": 1, # interpreter/venv path component missing
|
||||
"PermissionError": 2, # read-only home, sandboxed FS
|
||||
"NotADirectoryError": 3,
|
||||
"IsADirectoryError": 4,
|
||||
"FileExistsError": 5, # (sentinel race is handled separately; this
|
||||
# is FileExistsError from elsewhere in venv)
|
||||
"OSError": 6, # bare OSError — errno carries the real cause
|
||||
"BlockingIOError": 7,
|
||||
"BrokenPipeError": 8,
|
||||
"ConnectionError": 9,
|
||||
"TimeoutError": 10, # distinct from subprocess.TimeoutExpired
|
||||
"InterruptedError": 11,
|
||||
"MemoryError": 12,
|
||||
"UnicodeDecodeError": 13,
|
||||
"ValueError": 14,
|
||||
"RuntimeError": 15,
|
||||
# 16–98 reserved; APPEND-ONLY.
|
||||
"_other_exc": 99, # an exception type not in this map
|
||||
}
|
||||
|
||||
|
||||
def _encode_phase(s):
|
||||
"""Map err_phase string to its telemetry integer code, or 0 if unset.
|
||||
@@ -158,6 +193,55 @@ def _encode_stderr_sig(err_kind):
|
||||
return int.from_bytes(h[:2], "big") % 1000
|
||||
|
||||
|
||||
def _encode_exc_kind(err_kind):
|
||||
"""Map an "exc:<TypeName>[:errno]" err_kind to its exception-type code
|
||||
(SDK_BOOTSTRAP_EXC_CODES). Returns 0 for non-exc err_kinds (so the
|
||||
sdk_bootstrap_exc field auto-omits on stderr/categorized failures).
|
||||
Unmapped exception types → 99 (_other_exc)."""
|
||||
if not err_kind or not err_kind.startswith("exc:"):
|
||||
return 0
|
||||
# "exc:OSError:28" → "OSError"; "exc:RuntimeError" → "RuntimeError"
|
||||
name = err_kind[len("exc:"):].split(":", 1)[0].strip()
|
||||
if not name:
|
||||
return 0
|
||||
return SDK_BOOTSTRAP_EXC_CODES.get(name, SDK_BOOTSTRAP_EXC_CODES["_other_exc"])
|
||||
|
||||
|
||||
def _encode_errno(err_kind):
|
||||
"""Extract the OS errno from an "exc:<TypeName>:<errno>" err_kind.
|
||||
OSError-family exceptions embed their errno (ENOENT=2, EACCES=13,
|
||||
ENOSPC=28, …) — the OS-level cause is far more actionable than the
|
||||
Python class alone. Returns 0 when absent/non-numeric (field omitted)."""
|
||||
if not err_kind or not err_kind.startswith("exc:"):
|
||||
return 0
|
||||
parts = err_kind.split(":")
|
||||
if len(parts) < 3:
|
||||
return 0
|
||||
try:
|
||||
return int(parts[2])
|
||||
except (ValueError, IndexError):
|
||||
return 0
|
||||
|
||||
|
||||
def _probe_has_pip() -> bool:
|
||||
"""True iff the current interpreter can run pip (`-m pip --version`).
|
||||
|
||||
Probed only on the venv_ensurepip_fail path (see __main__), NOT on the
|
||||
happy path — it's an extra subprocess we only want when diagnosing a
|
||||
failure. The result decides whether a `pip install --target` fallback
|
||||
(Option A) is even viable for this machine: ensurepip/venv missing but
|
||||
pip present → --target would work; pip also missing → it wouldn't, and
|
||||
the user needs a system package (python3-venv / a complete Python)."""
|
||||
try:
|
||||
r = subprocess.run(
|
||||
[sys.executable, "-m", "pip", "--version"],
|
||||
capture_output=True, timeout=10,
|
||||
)
|
||||
return r.returncode == 0
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
def _sdk_on_syspath() -> bool:
|
||||
# find_spec is ~10ms; actually importing the SDK pulls in
|
||||
# transitive deps and costs ~800ms — too heavy for a
|
||||
@@ -364,6 +448,13 @@ def main() -> tuple[int, str, str]:
|
||||
except subprocess.TimeoutExpired:
|
||||
return BUILD_FAILED, err_phase, "subprocess_timeout"
|
||||
except Exception as e:
|
||||
# Embed errno for OSError-family exceptions ("exc:OSError:28") so
|
||||
# telemetry can decode the OS-level cause (ENOENT/EACCES/ENOSPC/…),
|
||||
# not just the Python class. #2154 follow-up: this is the dominant
|
||||
# remaining venv BUILD_FAILED bucket. See _encode_exc_kind/_encode_errno.
|
||||
errno = getattr(e, "errno", None)
|
||||
if isinstance(errno, int):
|
||||
return BUILD_FAILED, err_phase, f"exc:{type(e).__name__}:{errno}"
|
||||
return BUILD_FAILED, err_phase, f"exc:{type(e).__name__}"
|
||||
finally:
|
||||
# Only remove the sentinel if THIS process created it. The
|
||||
@@ -467,6 +558,30 @@ if __name__ == "__main__":
|
||||
sig = _encode_stderr_sig(err_kind)
|
||||
if sig:
|
||||
metrics["sdk_bootstrap_stderr_sig"] = sig
|
||||
# Exception-type + errno for the "exc:" bucket (the dominant
|
||||
# remaining venv BUILD_FAILED mode per #2154 telemetry). Both
|
||||
# auto-omit (0) on stderr/categorized failures.
|
||||
exc = _encode_exc_kind(err_kind)
|
||||
if exc:
|
||||
metrics["sdk_bootstrap_exc"] = exc
|
||||
exc_errno = _encode_errno(err_kind)
|
||||
if exc_errno:
|
||||
metrics["sdk_bootstrap_errno"] = exc_errno
|
||||
# venv_ensurepip_fail (code 11) is the top categorizable venv
|
||||
# failure, and telemetry shows it's NOT just Debian — macOS has the
|
||||
# most distinct affected users. Probe whether this interpreter has
|
||||
# pip so we know if a `pip install --target` fallback (Option A)
|
||||
# would actually help, vs the user needing a system package. Probed
|
||||
# only here (not on the happy path) to avoid an extra subprocess
|
||||
# per healthy session.
|
||||
if _encode_err_kind(err_kind) == 11:
|
||||
metrics["sdk_has_pip"] = _probe_has_pip()
|
||||
# Interpreter version (major*100 + minor, e.g. 309 / 312), emitted on
|
||||
# every bootstrap. Disambiguates the macOS cohort (Apple 3.9 vs a 3.10+
|
||||
# with broken ensurepip) for both venv_ensurepip_fail AND
|
||||
# HOOK_PY_INCOMPATIBLE (whose "py_3.9" err_kind otherwise collapses to
|
||||
# err=99, losing the version). Cheap — no subprocess, just sys.version_info.
|
||||
metrics["sdk_hook_py"] = sys.version_info[0] * 100 + sys.version_info[1]
|
||||
pv = _plugin_version_int()
|
||||
if pv:
|
||||
metrics["pv"] = pv
|
||||
|
||||
Reference in New Issue
Block a user