Skip to content

Document the test setup, and the mise-in-sandbox investigation - #463

Merged
sysread merged 4 commits into
mainfrom
claude/memory-worker-spinner-17uqm1
Jul 30, 2026
Merged

Document the test setup, and the mise-in-sandbox investigation#463
sysread merged 4 commits into
mainfrom
claude/memory-worker-spinner-17uqm1

Conversation

@sysread

@sysread sysread commented Jul 30, 2026

Copy link
Copy Markdown
Owner

SYNOPSIS

Adds docs/dev/testing.md, a CLAUDE.md pointer to it, and an open investigation into why cloud sessions cannot run mise run check. Docs only - no code changes.

PURPOSE

The vitest environment split had no home in the docs tree. jsdom appeared once in all of docs/ (incidentally, in offline-cache.md) and environmentMatchGlobs appeared nowhere - the only record was an inline comment plus a commit message. The same held for the rest of the test infrastructure: the Deno island's two-task split, the postcss and markdownlint guardrails, integration gating, and the __test convention were scattered or unwritten.

This surfaced concretely: a branch that forked before the env split landed added a component test, passed locally, rebased clean, and would have failed only in CI.

DESCRIPTION

How it was. Test infra knowledge lived in vite.config.ts comments, .mise.toml task descriptions, and CLAUDE.md's "Running the checks locally".

What this adds.

  • docs/dev/testing.md - the three test islands, the env split, tests/setup.ts and its three shims, the two guardrail tests, integration gating, the Deno split, Playwright, __test exports. Feature-doc shape w/ Contracts / Interactions / Gotchas; linked from the dev index and reciprocated from build-deploy.md.
  • CLAUDE.md - a pointer, not a copy. The one rule stated outright is the jsdom registration, because it is actionable while writing a test rather than while reading a doc.
  • docs/dev/in-progress/mise-in-cloud-sandbox.md - research on the mise failure, marked open, no plan by request.

The mise finding, since the error lies. mise run check dies with no versions found matching date filter. There is no date filter - mise settings has no such key. mise resolves the entire [tools] set before dispatching any task; two entries float on latest; latest forces a GET api.github.com/repos/<owner>/<repo>/releases that the sandbox proxy 403s for repos outside the session's scope. aqua:supabase/cli is the control - pinned, no list call, installs fine - which also proves release-asset downloads are not blocked. Two dead ends are recorded so nobody re-walks them, along with a probe that gives a false pass (mise ls-remote exits 0 on an empty list).

Notes:

  • Three stale things fixed in passing: the manual pnpm fallback omitted knip (now gates); the Rollup chunk warning was quoted at 500 kB where vite.config.ts sets chunkSizeWarningLimit: 750; and functions-test was described as covering _shared when the suite is 48 files spanning agents and GC entrypoints too.
  • One commit is a self-correction. An earlier commit in this branch misdiagnosed the mise failure; a later one corrects it. Kept separate rather than rewritten so the reasoning is legible - squash-merge collapses it.
  • in-progress/ placement is deliberate - the work is genuinely open, and the doc leads with Status: open. It is not a shipped-milestone doc left behind.

Gate green: 2147 vitest, svelte-check, lint, build, knip.

The Deno island was not run - deno is only reachable via mise, which is what this PR documents as broken here. No Deno code is touched, and the base commit's Deno tests were CI-verified on their own merge.


Generated by Claude Code

claude added 4 commits July 30, 2026 02:40
The vitest environment split had no home in the docs tree. `jsdom`
appeared once in all of docs/ (incidentally, in offline-cache.md) and
`environmentMatchGlobs` appeared nowhere - the only record was an
inline comment in vite.config.ts plus a commit message. Same for the
other test infrastructure: the Deno island's two-task split, the
postcss and markdownlint guardrail tests, integration-test gating on
VENICE_INFERENCE_KEY, the Playwright specs, and the __test namespace
convention were scattered or unwritten.

The new doc collects all of it, following the feature-doc shape
(Files / Contracts / Interactions / Gotchas). CLAUDE.md gets a
pointer rather than a copy: it is read at session start but attention
to it decays over a long session, while the dev docs are what a
session consults when it is unsure.

The one thing CLAUDE.md states outright is the jsdom trap, because it
is actionable at the moment of writing a test rather than at the
moment of reading a doc. The existing inline comment in
vite.config.ts is reactive - it tells you to add your file to the
list once you see `document is not defined`. That is the right
instruction for a fresh branch and useless for one that forked before
the split, where the old jsdom default makes the test pass locally,
the rebase stays clean, the files stay disjoint, and only CI fails.

Two stale figures fixed while in the neighbourhood: the manual pnpm
fallback omitted knip, which now gates, and the Rollup chunk warning
was quoted at 500 kB where vite.config.ts sets
chunkSizeWarningLimit to 750.
The gotcha as written pointed at "no versions found matching date
filter" as though a version cutoff were configured somewhere. It is
not, and `mise settings` has no such setting - the next session to
read that would go hunting for a knob that does not exist.

The real cause is authorization. aqua reads its version lists from the
GitHub releases API, and a session whose GitHub access is scoped to
this repository alone gets denied for charmbracelet/gum and cli/cli;
mise renders the resulting empty list with that misleading phrasing.

Also records the part that makes the blast radius wider than the two
tools involved: mise resolves the entire [tools] set before running
any task, so gum and gh block the gate even though no gate task uses
either, and both already degrade gracefully when missing. Removing one
would not unblock anything while the other remains.

And notes the limit of the raw pnpm fallback - it skips the Deno
island, so it does not fully cover a change under
supabase/functions/.
Cloud sessions cannot run the gate through mise, and the error names
the wrong cause: "no versions found matching date filter" when no date
filter exists anywhere. Two further plausible readings are also wrong -
that the aqua backend is broken in the sandbox, and that the session
cannot reach GitHub. Written down so the next session does not re-walk
any of the three.

The confirmed mechanism: mise resolves the whole [tools] set before
dispatching any task, two entries float on `latest`, and `latest`
forces a GitHub releases-list call that the sandbox proxy refuses with
403 for repositories outside the session's scope. The pinned
aqua:supabase/cli is the control - same backend, same host, exact
version, no list call, installs fine. Which also proves release-asset
downloads are not blocked, only the api.github.com version query.

Also records a probe that lies: checking resolution by the exit code
of `mise ls-remote` reports success on the failing tools, because it
exits 0 with an empty list.

Deliberately stops at research. The open questions - whether pinning
would unblock it, whether mise can scope tools per task, and whether
the denial is intentional egress policy - are listed unanswered, and
no remediation is proposed. The ccr proxy README's guidance on 403s
is to report a blocked host rather than route around it, which may
make "make aqua work" the wrong frame entirely.
Rebasing onto the wiki-agent context-bounding work added Deno tests
over venice/agents/_accumulator.ts, which made the new testing doc
wrong on its first day: it described functions-test as covering "the
pure logic in _shared", inherited from the mise task's own
description. The suite is 48 files spanning _shared, the agent
modules, and the GC entrypoints. Says so, and notes that the task
description undersells itself so the next reader does not trust it
over the directory listing.
@sysread
sysread merged commit a3e666a into main Jul 30, 2026
1 check passed
@sysread
sysread deleted the claude/memory-worker-spinner-17uqm1 branch July 30, 2026 02:43
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.

2 participants