Skip to content

fix(sdk): repair two pre-existing test failures in packages/brain - #324

Open
sebbsssss wants to merge 6 commits into
stagingfrom
claude/friendly-rubin-ccacec
Open

fix(sdk): repair two pre-existing test failures in packages/brain#324
sebbsssss wants to merge 6 commits into
stagingfrom
claude/friendly-rubin-ccacec

Conversation

@sebbsssss

Copy link
Copy Markdown
Owner

Summary

Fixes the two test failures that have been present on `origin/main` (verified failing with a clean tree on 2026-07-02, unrelated to any in-flight branch).

1. `setup-zero-config.test.ts` — stale MCP args expectation

`installMcpConfig` emits `['@clude/sdk', 'mcp-serve']` and has since the 3.0.1 package rename (`2b0d9ac7`). `@clude/sdk@3.2.0` is the published npm package; `clude` is a 404 on the registry, so the code is correct and the test expectation was stale. Fix: updated the test expectation.

2. `memory-integrity.test.ts` — internal-source nudge cancelled by concept bonus

Not a rounding issue: `inferConcepts` grants `reflection`/`emergence` a `self_insight` concept purely from the source, so an auto-scored internal write earns the +0.05 concepts bonus, which exactly cancelled the −0.05 internal nudge (0.70 base + 0.014 length + 0.05 − 0.05 = 0.714 on both sides — an exact float tie). Fix: raised the internal-source penalty to 0.08 so it strictly dominates the concept bonus internal sources can self-trigger; internal writes now always score below the equivalent external write. The existing test is kept unchanged — it now guards exactly this cancellation case.

Behavioral note: auto-scored internal writes (dream/reflection/etc.) drop by a further 0.03; explicit `importance` still always wins.

Test plan

  • `npx vitest run src/cli/tests/setup-zero-config.test.ts src/memory/tests/memory-integrity.test.ts` — 20/20 pass
  • Full `packages/brain` suite with `SITE_ONLY=true`: 30 files / 285 tests pass (the `wallet-migration` suite requires `SITE_ONLY`, pre-existing env behavior)
  • `tsc --noEmit` clean

🤖 Generated with Claude Code

sebbsssss and others added 6 commits June 30, 2026 23:06
Promote: login status position (#fix/dashboard-login-status-position)
Implement the Clude neural design homepage (index.html) with a full
mobile-responsive pass: collapsing nav, fluid hero type scale, single
-column memory/feature grids, restacked benchmark bars (full-width on
phones), and tighter code blocks. Adds required assets (memory-net.js
particle sphere + logos).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(web): mobile-responsive Clude neural homepage
installMcpConfig has emitted ['@clude/sdk', 'mcp-serve'] since the 3.0.1
package rename (2b0d9ac); the published npm package is @clude/sdk and
'clude' does not exist on the registry. The test expectation was stale.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
scoreImportanceOnWrite nudged internal sources (dream/reflection) down by
0.05, but inferConcepts grants reflection/emergence a self_insight concept
purely from the source, adding a +0.05 concepts bonus that exactly cancels
the nudge. An auto-scored reflection write tied its external equivalent
(0.714 == 0.714) instead of scoring below it.

Raise the penalty to 0.08 so internal writes always land strictly below
the same external write, per the source-monitoring design intent.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cluude Ready Ready Preview, Comment Jul 2, 2026 2:16pm

Request Review

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