fix(metadata): stop schema changes churning generated skill evidence (#1075)

This commit is contained in:
Ysopwnable
2026-10-08 22:21:30 +08:00
committed by GitHub
parent e2f03786f4
commit d52f66d62a
11 changed files with 98 additions and 18 deletions
+6 -7
View File
@@ -19,13 +19,12 @@ const withCount = current.replace(
/^\s{2}tool_count:\s*\d+\s*$/mu,
` tool_count: ${String(CATALOG_IDENTITY.counts.mcp_tools)}`,
);
const digestLine = ` catalog_digest: "${CATALOG_IDENTITY.digests.combined_sha256}"`;
const source = /^\s{2}catalog_digest:/mu.test(withCount)
? withCount.replace(
/^\s{2}catalog_digest:\s*"[a-f0-9]{64}"\s*$/mu,
digestLine,
)
: withCount.replace(/^(\s{2}tool_count:\s*\d+\s*)$/mu, `$1\n${digestLine}`);
// Skill identity follows the installed instruction bundle. Runtime schema identity
// is still reported independently by doctor and binary_session.
const source = withCount.replace(
/^ {2}catalog_digest:[^\r\n]*(?:\r?\n|$)/mu,
"",
);
await ensureGeneratedFile({
path,
+1 -1
View File
@@ -58,7 +58,7 @@ export const createProductCatalog = async (root) => {
runtime_catalog: {
counts: sources.catalogIdentity.CATALOG_IDENTITY.counts,
digests: {
...sources.catalogIdentity.CATALOG_IDENTITY.digests,
// Full runtime schema digests belong to server identity, not this facts projection.
providers_sha256: providerCatalogDigest(providers),
},
},