SkillPedia Skills Encyclopedia
中文 EN
今日更新 2026-11-17 UTC

今天还没有新提交

查看更新动态

技能 2026-10-31 22:33 UTC

open-knowledge

由提交人 nick-inkeep 提交,主要更新类型为:代码维护与功能优化。提交说明:Skip Open Knowledge Validation on skill-link-only syncs (PRD-10486) (…。

nick-inkeep fce1139 inkeep/open-knowledge

Commit提交信息原文

Skip Open Knowledge Validation on skill-link-only syncs (PRD-10486) (#8451)

* Skip OK Validation for skills-sync copies

The six-hourly cross-harness skills sync writes generated skill copies into
public/open-knowledge/.agents/skills and .codex/skills. Nothing in Open
Knowledge Validation reads them: Biome, oxlint and knip exclude them and no
test opens them. Yet any path under the subtree started lint, typecheck, the
tier guards, size, the Linux preflight, the packed CLI e2e and a11y on every
sync PR and its merge group.

detect-changes now drops those copies before any selector matches, the way
the Agents validations already do. Inertia's selector parser learns the same
filter, so Inertia stops counting a sync as material.

(cherry picked from commit d0bf0ce4a008353525d0ad38fc89c45bbd5fd886)

* Keep linked skill tests out of Open Knowledge's knip entries

knip's root workspace takes every *.uncached.test.{ts,tsx,mjs} file as a
vitest entry. The glob follows the per-skill links the cross-harness sync
writes under public/open-knowledge/.agents/skills and .codex/skills, so an
uncached test inside any synced skill became an Open Knowledge entry and its
imports were checked against Open Knowledge's package.json. A root-only
skills change could add such a file, merge green because no Open Knowledge
gate selects root skill content, and turn the next unrelated Open Knowledge
PR's lint red.

The entry now negates both link folders. The existing ignoreIssues entry
still hides their unused-file report, since the default project glob keeps
walking them, but no file under them is an entry any more, so nothing in
them can change knip's verdict.

Planted a linked zz-knip-plant.uncached.test.mjs importing an unlisted
package under .agents/skills/1on1: before this change knip exits 1 with
"Unlisted dependencies (2)" naming the copy under each link folder; after
it, knip exits 0 with the plant still present and the same seven
configuration hints as before. The plant was removed afterwards.

* Place the skills filter where both lines share the step, add two root inputs

Builds on the previous commit's filter.

The filter now sits right after the changed-file list is read and before
Inertia's comment block, rather than between that comment and the subtree
grep. research/ok-cloud rewrote the grep line itself (.openknowledgeignore
and .open-knowledge/.gitignore), so any hunk touching the lines next to it
conflicts on the next main-into-cloud merge. Only the comment's first
sentence changes, so it still says what Inertia's parser accepts. The added
prose paragraph goes; the reason for the filter lives in CI_ARCHITECTURE.md.
The skills-sync tests move a few cases down, past the point where
research/ok-cloud inserted its own cases.

The subtree grep now also selects two files Open Knowledge jobs execute
outside the subtree on their success path:

- .github/pnpm-setup/open-knowledge/package.json, which every should-run job
  passes to pnpm/setup as package-json-file;
- .github/scripts/check-fixed-versions.sh, which the lint job runs from the
  repository root. Nothing else runs it, and its own
  test-check-fixed-versions.sh is not wired into any workflow.

ok-native-crash-capture.mjs and report-playwright-harness-end.mjs stay out:
both run only after a test step has already failed, so a change to either
cannot turn a passing job red.

The parser header now names the refused negation as `! grep`, so it no
longer reads as refusing the -vE filter it accepts.

Removing either new arm reds the new detect-changes case; removing the
filter line reds the skills-sync case.

* Check the no-comments hook registration at the root, on every PR

Open Knowledge's no-comments-hook.test.mjs asserted that both the root
.claude/settings.json and the subtree copy register no-comments-guard.sh on
Edit and Write. Only the subtree's tier-guards cells run that test, behind
should-run, and the root settings file selects none of it, so a root-only
edit that dropped or narrowed the registration merged green and turned the
next Open Knowledge PR red. No root check pinned this hook.

check-hook-event-registration.mjs, which Monorepo Structural Validation runs
on every pull request and merge group, now pins the guard on PreToolUse with
the exact matcher Edit|Write, by its $CLAUDE_PROJECT_DIR/.claude/hooks path,
in the root and Open Knowledge settings. public/agents keeps a colocated copy
of the hook but does not register it, so pins may now name the settings
files they apply to; a test refuses a scope naming a file the scan never
reads, so a mistyped scope cannot switch a pin off.

The subtree test's registration case is deleted: the root pin checks the
same two files on every PR, with an exact matcher where the case accepted
any matcher containing Edit and Write, and keeps its project-dir command
assertion. Changing the root matcher to Edit makes the real checker exit 1
naming the root file and the pin.

Root package.json stays an Open Knowledge test input: two subtree tests read
its lint-staged routes. None of the root package.json commits since
2026-10-01 touched lint-staged, and every Open Knowledge commit runs those
routes through the pre-commit hook, so that edge is recorded in
CI_ARCHITECTURE.md rather than moved.

* Record why Open Knowledge Validation now skips the skill links

CI_ARCHITECTURE.md said Open Knowledge Validation keeps selecting the
generated skill links because knip read linked uncached tests through them.
It now says the step drops them like the four Agents and mirror gates, why
no Open Knowledge job reads them (Biome, oxlint, and the knip entry
negation, with the planted-test check that shows the negation is what
keeps them out as of knip 6.26), and that root skill content reaches no
Open Knowledge verdict.

A new paragraph names the two root files the selector now selects, says a
script that runs only after a failed step is not a selector input, and
records root package.json as a deliberate exception with the reason.

The check-paths runbook entry lists the filter's own refusal beside the
crossbuild ones.

* Name the skill-link exclusion and new root inputs in the OK Validation row

The workflow map row for Open Knowledge Validation still described its
heavy jobs as gated to the whole subtree. The detect-changes step now
drops the generated skill links first and also selects two root files.

* Say which settings files a scoped hook pin applies to in the drift message

The failure message asked every settings.json to carry every pinned hook,
including the no-comments guard pin that is scoped to the root and Open
Knowledge settings and deliberately skipped for public/agents.

* Read a selector rule's exclude list as the required field it is

parseSelector always sets exclude on every rule it builds, and selects
and describeRules only receive rules from it, so the empty-list fallback
covered a shape nothing produces and would hide a dropped filter.

---------

GitOrigin-RevId: 9de7075fbd2dac181bff37d658aadafd8965abab