ccfb08f4d5
Follow-up to #20, which was merged before this landed. bot-agents has no `package.json` `imports` aliases (`src/` is flat and everything imports relatively), so no code changes. This records the new rule in the docs: - `.agents/memory/imports-aliases-barrels.md`: aliases may target only a direct subfolder of `src/` (its `index.ts` or a `#x/*` pattern); nothing outside `src/`, not `src/` itself, not deeper folders; such code imports relatively. - `.agents/memory/tests-layout-vitest.md`: `tests/` reach the public entry through a relative import, not a `#plugin` alias. - `.agents/skills/migrate-deno-repo/SKILL.md` and `AGENTS.md`: same rule. `vp check`, `vp test`, and `damem doctor` pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed-on: #21 Reviewed-by: bot <noreply@capsulizers.com> Co-authored-by: Danny Kim <temeddix@gmail.com> Co-committed-by: Danny Kim <temeddix@gmail.com>
1.4 KiB
1.4 KiB
description
| description |
|---|
| Isolation and credential tests need root and use test.skipIf(!IS_ROOT); locally 5 skip, CI runs as root so all 61 run; verify isolation changes in node:24-bookworm as root |
Some tests exercise real UID isolation, process cleanup, and prepare.ts
credential cleanup. They need root and are written as
test.skipIf(!IS_ROOT)(...) (IS_ROOT from #testing), so they show
as skipped instead of silently passing.
- As a normal user
vp testpasses 56 and skips 5. In CI (self-hosted runner, root) all 61 run. - When changing
isolation.ts,runtime.ts,credentials.ts,prepare.ts, orcommand.ts, run the suite as root innode:24-bookworm(e.g. a container with the repo mounted) before pushing; a green non-root run proves nothing about those paths. - The migration also ran an end-to-end smoke as root with fake
codex/claude/npxbinaries and a fake Gitea throughprotect-source.sh->prepare.ts->run.ts->post.ts; repeat that for changes to the phase flow (bot-agents-runtime-no-build). src/testing/index.tsholds the shared test helpers (user IDs, temp dirs,runCommand) behind the#testingalias. Every test imports it as#testing. It imports no source module, sotests/(which may not use../) never reaches internals. Tests follow tests-layout-vitest (unit tests insrc/*.test.ts, repo-level ones intests/).