chore: sweep Kimi mentions from comments and notes
Some checks failed
Tests / PR mergeability (push) Successful in 19s
Tests / Base branch health (push) Successful in 10s
Tests / Detect test scope (push) Successful in 17s
Tests / lint-tests (push) Failing after 1m43s
Tests / plugin-validate (push) Successful in 1m7s
Tests / test (ubuntu-latest, 24, shard 1/3) (push) Failing after 18s
Tests / test (ubuntu-latest, 24, shard 2/3) (push) Failing after 19s
Tests / test (ubuntu-latest, 24, shard 3/3) (push) Failing after 19s
Tests / test (ubuntu-latest, 24) (push) Failing after 17s
Tests / test (inert CI) (push) Has been skipped
Tests / QA loop walk (smell ratchet) (push) Failing after 18s
Tests / Coverage gate (merged shards) (push) Has been skipped
Tests / Publish emitted-baseline artifact (push) Has been skipped
Dismiss Unauthorized PR Approvals / dismiss-unauthorized-approval (push) Successful in 8s
Tests / Required tests (push) Has been cancelled
Tests / conformance test (macos-latest, 24) (push) Has been cancelled
Tests / conformance test (windows-latest, 24, shard 1/3) (push) Has been cancelled
Tests / conformance test (windows-latest, 24, shard 2/3) (push) Has been cancelled
Tests / conformance test (windows-latest, 24, shard 3/3) (push) Has been cancelled

This commit is contained in:
Jakub Zych
2026-10-06 20:19:17 +02:00
parent 1622b66907
commit 792139b5ed
46 changed files with 452 additions and 503 deletions

View File

@@ -178,8 +178,8 @@ const REMEDIATION = Object.freeze({
/**
* Does a changed repo path satisfy a provenance `sources` entry?
*
* A trailing `/` marks a PREFIX (Phase 2's SOURCE_PREFIX_SUFFIX contract) — e.g. Kimi's
* root agent aggregates all of `agents/`. Prefix matching is SEGMENT-AWARE on purpose:
* A trailing `/` marks a PREFIX (Phase 2's SOURCE_PREFIX_SUFFIX contract) — e.g. an
* aggregate artifact built from all of `agents/`. Prefix matching is SEGMENT-AWARE on purpose:
* a bare `startsWith('agents/')` would also accept `agentsfoo/x.md` under a source of
* `agents`, and silently over-attribute. Exact entries compare exactly.
*/

View File

@@ -200,7 +200,7 @@ const RUNTIME_NOTE_FILTERED_FAMILIES = new Set(
/**
* A `sources` entry ending in `/` is a PREFIX, not a file: it means "any repo path
* under this directory legitimately explains this emitted path". Used where an
* emitted artifact aggregates a whole directory (Kimi's root agent enumerates every
* emitted artifact aggregates a whole directory (a root agent enumerating every
* staged agent). Phase 3 must honor the trailing slash when testing a changed-path
* set against these sources; a plain string is an exact path.
*/
@@ -338,8 +338,8 @@ const PROVENANCE_RULES = [
// per-runtime `kind`) and why this wholesale reclassification was chosen instead.
kind: 'derived',
roots: ['agents'],
// Excludes `msd.md`: that is Kimi's ROOT agent, built from a code literal and
// NOT a repo agent file. Without the exclusion it matched here and resolved to
// Excludes `msd.md`: that is a ROOT agent built from a code literal, NOT a
// repo agent file. Without the exclusion it matched here and resolved to
// `agents/msd.md`, which does not exist — a false attribution that still passed
// totality, i.e. the exact residual ADR-2719 records. Every repo agent is
// `msd-<name>.md`, so excluding the bare `msd.md` is precise.
@@ -441,8 +441,7 @@ const PROVENANCE_RULES = [
// Sources are scoped PER ROOT, not declared as one flat union. Each root has
// exactly one writer besides the shared marker module, and a flat list would
// attribute every root to all of them — `extensions/package.json` to the
// hooks-surface writer that never touches it, `.kimi/hooks/package.json` to
// the native-plugin writer, and so on. That matters because
// hooks-surface writer that never touches it, and so on. That matters because
// `emitted-diff.cjs` accepts the FIRST satisfied source: a flat list
// containing `bin/install.js` lets any change anywhere in that 13k-line file
// authorise marker drift for every root — the blanket escape hatch this
@@ -451,7 +450,6 @@ const PROVENANCE_RULES = [
// hooks/ (shared bundle) -> bin/install.js (installSharedHooksBundle)
// hooks/ (#2717 runtimes) -> src/runtime-hooks-surface.cts + bin/install.js
// (the codex copy block calls the exported helper)
// .kimi/hooks/ -> bin/install.js (the kimi hooks-root bundle)
// plugins/, extensions/ -> src/install-engine.cts
// (_installNativePluginIfDeclared)
//
@@ -467,7 +465,7 @@ const PROVENANCE_RULES = [
if (root === 'plugins' || root === 'extensions') {
return [COMMONJS_MARKER_SRC, INSTALL_ENGINE_SRC];
}
// Both Kimi products install the shared bundle into their own native hook
// Some products install the shared bundle into their own native hook
// root rather than under the generic Agent-Skills configDir (#2755).
if (root === '.kimi/hooks' || root === '.kimi-code/hooks') {
return [COMMONJS_MARKER_SRC, INSTALLER_SRC];
@@ -561,7 +559,7 @@ const PROVENANCE_RULES = [
// real global subdirectory those files sit outside the walked configDir,
// the rules matched nothing, and the totality guard's dead-rule arm fired
// — exactly as designed. The files are still written, still covered by the
// existence/config suites (kimi-upgrades, codex-config, install suites);
// existence/config suites (codex-config, install suites);
// they are simply no longer manifest members to attribute.
// ── Synthesized: install-time / environment state, no repo content source ──
@@ -569,10 +567,6 @@ const PROVENANCE_RULES = [
id: 'synthesized-install-metadata',
kind: 'synthesized',
roots: null,
// `.kimi/package.json` and `.kimi-code/package.json` are the same literal
// `{"type":"commonjs"}` CommonJS-mode marker as the root one, written into
// each Kimi product's separate hooks root (installSharedHooksBundle; the
// per-runtime root split is #2755).
pattern: /^(\.msd-profile|package\.json|msd-core\/VERSION|msd-core\/\.msd-runtime)$/,
sources: () => [],
},

View File

@@ -169,30 +169,16 @@ const VOLATILE_FILES = new Set([
// node-runner command as settings.json, so excluded for the same reason (#2086).
const HOOK_CONFIG_FILES = new Set(['settings.json', 'settings.local.json', 'hooks.json']);
// Kimi's native config.toml (#2095 EoS/kimi Upgrade 1) embeds the same
// platform-varying node-runner command as the HOOK_CONFIG_FILES above (via the
// same buildHookCommand/projectManagedHookCommand machinery), so it needs the
// same exclusion — but it is NOT matched by basename like HOOK_CONFIG_FILES:
// Codex's OWN config.toml (installSurface 'codex-toml') is a stable, tracked
// top-level `config.toml` entry in its golden fixture (it only ever gets a
// platform-stable `[features] hooks = true` flag — the real hook commands
// live in Codex's separate hooks.json, already excluded above). Blanket-
// excluding the 'config.toml' basename would silently blind Codex's fixture
// to any future regression there — and it would blind kimi-code's too: since
// #3547 the harness installs into each runtime's REAL global subdirectory, so
// kimi-code's hooks config.toml sits at its configDir root (rel `config.toml`)
// and is legitimately manifest-visible. Tracking it is safe now: the
// install-tree fixture carries paths only, and the ADR-2719 differential
// compares base-vs-current on the same machine, so the platform-varying
// node-runner command embedded in the TOML never crosses platforms inside a
// gate (that was a golden-content-era hazard, and the goldens are gone).
// Kimi CLI's config.toml (KIMI_SHARE_DIR root ~/.kimi) lives OUTSIDE its MSD
// configDir (~/.config/agents) and never enters the walk. The pre-#3547
// relative-path exclusions ('.kimi/config.toml', '.kimi-code/config.toml')
// existed only for the collapsed shape — where the walked root was the HOME
// itself and those HOME-level siblings were inside it; with no walker rooting
// at HOME anymore they matched nothing and were removed (#3547). kimi-code
// resolves its own root since #2755.
// Native config.toml files are deliberately NOT excluded by basename like the
// HOOK_CONFIG_FILES above: Codex's OWN config.toml (installSurface 'codex-toml') is
// a stable, tracked top-level `config.toml` entry in its golden fixture (it only
// ever gets a platform-stable `[features] hooks = true` flag — the real hook
// commands live in Codex's separate hooks.json, already excluded above).
// Blanket-excluding the 'config.toml' basename would silently blind Codex's
// fixture to any future regression there. Relative-path exclusions existed only
// for the pre-#3547 collapsed shape, where the walked root was the HOME itself
// and HOME-level siblings were inside it; with no walker rooting at HOME anymore
// they matched nothing and were removed (#3547).
const HOOK_CONFIG_RELATIVE_PATHS = new Set();
// Path prefixes excluded from the parity manifest. `msd-core/bin/lib/` holds the
@@ -637,7 +623,7 @@ function runMinimalInstall({ runtime, scope, extraArgs = [], installScript = INS
cwd = root;
// #3031: local scope reads RUNTIME_META.localDir — the SAME table the
// global branch above reads — instead of a second hand-maintained map.
// That duplicate map was missing four runtimes (hermes, kimi, kimi-code,
// That duplicate map was missing several runtimes (e.g. hermes,
// zcode), so `scope: 'local'` for any of them resolved
// `path.join(root, undefined)` and threw a bare TypeError naming neither
// the runtime nor the map at fault. #3023 fixed exactly this for `pi` by