Skip to content

docs(client): Agent Skills — regenerate the export block and correct the platform note - #65

Open
XieX wants to merge 1 commit into
xie/skills-12-test-integrityfrom
xie/skills-13-docs-closeout
Open

XieX wants to merge 1 commit into
xie/skills-12-test-integrityfrom
xie/skills-13-docs-closeout

Conversation

@XieX

@XieX XieX commented Sep 17, 2026 •

Copy link
Copy Markdown

Closes out the documentation remainder of the Agent Skills code review, on top of the four remediation PRs (#61–#64).

agents.md "Public Exports"

The block had drifted from src/index.ts in both directions — it listed a ./tracking.js re-export that index.ts does not have, and omitted the whole content.js set, the judge helpers, a dozen types.js names, and the skills option/mode types (FDv2Mode, FDv2SkillStoreOptions, StoreDiagnostics, WatchSkillsOptions).

It is now generated from index.ts verbatim and in its order, with a note saying so. A hand-curated copy of a 20-statement barrel drifts again; this is the second time it has.

Pitfall 6 — the platform bound

The closing sentence still described the pre-/proc/self/fd world: that SUPPORTS_DIR_FD is false, the swap-race tests are therefore skipped, and the exposure is "real and recorded, not fixed". Since 0a15b10 that is wrong on Linux — SUPPORTS_PROC_FD addressing closes the window there and the tests run.

Records the two things a reader has to keep straight:

  • The (dev, ino) identity re-check is the macOS floor only and must not be attempted on the fast path, because lstat of /proc/self/fd/<fd> reports procfs's magic symlink rather than the directory.
  • A green macOS run says nothing about any of this. All ten capability-gated tests skip locally and execute on Linux CI alone.

Also records the third test hook — the vi.mock of mkdir/open that the root-swap races fire from — which is deliberately not part of fsOps, because those races have to fire before the root is pinned.

Verification

Check Result
tsc --noEmit clean
biome check clean, 33 files
vitest run (macOS) 905 passed, 10 skipped
vitest run (Linux CI, #64) 915 passed, 0 skipped

Docs-only; no source change. The Linux figure is the one that matters for the swap-race and /proc/self/fd work in #63/#64 — all ten of the tests that skip on macOS pass there.

🤖 Generated with Claude Code, reviewed by @XieX


Note

Overview
Updates agents.md only—no runtime changes.

Public Exports: The src/index.ts barrel listing is replaced with a verbatim, ordered copy and a warning not to hand-edit it. That fixes drift (e.g. a bogus ./tracking.js export) and adds missing surface such as content.js, judge helpers, expanded types.js names, and skills-related option types.

Pitfall 6: Documents a third test hook (vi.mock on mkdir/open for pre-pin root-swap races), kept outside fsOps so “no filesystem operation attempted” stays meaningful. Corrects the platform-bound narrative: Linux’s /proc/self/fd fast path (SUPPORTS_PROC_FD) runs swap-race tests there; (dev, ino) is macOS-only; passing tests on macOS does not prove those races are covered.

Reviewed by Cursor Bugbot for commit 49db83b. Bugbot is set up for automated code reviews on this repo. Configure here.

@XieX
XieX requested a review from andrewklatzke September 17, 2026 19:38
The "Public Exports" block had drifted from `src/index.ts` in both
directions: it listed a `./tracking.js` re-export that `index.ts` does
not have, and omitted the `content.js` set, the judge helpers, several
`types.js` names, and the skills option and mode types. It is now
generated from `index.ts` verbatim and in its order, with a note saying
so, because a hand-curated copy of a 20-statement barrel drifts again.

Pitfall 6 still described the pre-`/proc/self/fd` world — that
`SUPPORTS_DIR_FD` is `false` and the swap-race tests are therefore
skipped with the exposure "real and recorded, not fixed". Since 0a15b10
that is wrong on Linux: `SUPPORTS_PROC_FD` addressing closes the window
there and the tests run. Records the two things a reader needs to keep
straight — that the identity re-check is the macOS floor only and must
not be attempted on the fast path, and that a green macOS run says
nothing, because all ten of those tests execute on Linux CI alone.

Also records the third test hook, the `vi.mock` of `mkdir`/`open` the
root-swap races fire from, which is deliberately not part of `fsOps`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@XieX
XieX force-pushed the xie/skills-12-test-integrity branch from b3ce5e4 to f74c412 Compare September 18, 2026 19:49
@XieX
XieX force-pushed the xie/skills-13-docs-closeout branch from 274ac63 to 49db83b Compare September 18, 2026 19:49
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.

1 participant