Skip to content

test: green the unit suite + add blocking CI unit-test job#461

Merged
webdevtodayjason merged 3 commits into
devfrom
fix/docpanel-token-prefer-config
Jul 2, 2026
Merged

test: green the unit suite + add blocking CI unit-test job#461
webdevtodayjason merged 3 commits into
devfrom
fix/docpanel-token-prefer-config

Conversation

@webdevtodayjason

Copy link
Copy Markdown
Contributor

Summary

Drives vitest.unit.config.ts from 39–40 failed → 0 failed (7806 passed, exit 0) and adds a blocking unit-test job to the checks matrix so a red unit suite can never ship silently again. tsgo 189 → 187. No new failures.

Root-cause fixes (never masked)

code:

  • pi_only transcript persistence (prod bug): the default runtime mode drove the argent loop, which discarded a non-ArgentSessionManager and wrote turns to a throwaway file. Now opens ArgentSessionManager.open(sessionFile).
  • session-fork lazy-write (pi 0.74 createBranchedSession); intent-validation createRequire→ESM; skills source-stamp (peekaboo allowlist leak); selectCancelKey.escape; channel-config anyOf→array; tool-result synthesis gate; 8 service-key tools sync→async resolveServiceKeyAsync.
  • keychain: short-circuit shell-outs under VITEST — kills the macOS "Keychain Not Found — ArgentOS" modal that stole focus on every test run.

test (stale expectations vs deliberately-advanced source): telegram address-prefix, cooldown formula, app-forge view kinds, load-profile, onboarding (TUI hatch moved to installer), web-tools de-US locale, doctor mock, model-auth ENOTEMPTY flake (fs.rm maxRetries).

ci/infra: unit-test task (pnpm test:unit); quarantine executive-shadow-client.integration (spawns Rust argent-execd, absent in CI); it.skip the memory-recall kernel-continuity test (explicit non-goal).

Also

Verify

pnpm test:unit                                # 0 failed, exit 0
npx tsgo --noEmit 2>&1 | grep -c "error TS"   # 187

🤖 Generated with Claude Code

webdevtodayjason and others added 2 commits June 17, 2026 12:15
…unit-test job

40 -> 0 failures. Root-cause fixes (code or test), never masked.

code:
- pi_only transcript persistence: pi_only drives the argent loop, which discarded
  a non-ArgentSessionManager and wrote turns to a throwaway file. Open
  ArgentSessionManager.open(sessionFile) so the default runtime mode persists.
- session-fork: write the branch header when absent (pi 0.74 createBranchedSession
  flushes lazily).
- intent-validation: createRequire(".js") -> static ESM import (only resolved in dist/).
- skills: stamp `source` back onto loaded skills (bundled-allowlist peekaboo leak).
- TUI select lists: selectCancel -> Key.escape (pi 0.74 action-id rename).
- channel-config tool: Union -> Array (drop forbidden anyOf in tool schema).
- pi-embedded sanitize: gate tool-result synthesis on allowSyntheticToolResults.
- 8 service-key tools: sync resolveServiceKey -> async resolveServiceKeyAsync.
- keychain: short-circuit shell-outs under VITEST (kills the macOS "Keychain Not
  Found" modal that stole focus on every test run).

test (stale expectations vs deliberately-advanced source):
- telegram address-prefix, cooldown formula, app-forge view kinds, load-profile,
  onboarding (TUI hatch moved to installer), web-tools de-US locale, doctor mock.
- model-auth ENOTEMPTY cleanup flake -> fs.rm maxRetries.

ci/infra:
- add `unit-test` task to the checks matrix (pnpm test:unit).
- quarantine executive-shadow-client.integration (spawns the Rust argent-execd daemon,
  absent in CI).
- skip the memory-recall kernel-continuity test (explicit non-goal).

tsgo 189 -> 187. No new failures.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A literal `~/.argentos/memory.db{,-shm,-wal}` folder was swept into the repo in
#436 (a `~` that never expanded into $HOME). These are NOT the real personal
memory DB (~/.argentos/memory.db) — just churning throwaway WAL state that showed
as perpetually-modified and would pollute every "commit everything". Remove from
tracking (working copies already parked) and gitignore the literal `/~/` folder
so they can't be re-committed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b2ea2d54-0e4d-46c7-a82b-e3addbd7d794

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/docpanel-token-prefer-config

Comment @coderabbitai help to get the list of available commands and usage tips.

…atch candidates

The `build` job runs tsc-since (plain tsc), which flagged 7 net-new errors
tsgo accepted: the upstream pi `Skill` type declares no `source` property
(it's stamped at runtime by loadSkillEntries), and the `satisfies` +
Boolean() predicate pair broke narrowing. Widen toSkillSourceLabel to take
`skill: unknown` with an explicit cast, and return an explicitly-typed
SkillMatchCandidate with a `!== null` predicate.

tsc-since: 7 net-new → 0 (189 baseline). Skills suite: 72 passed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T3dkQzz2mSrSNtGBE9cmXr
@webdevtodayjason
webdevtodayjason merged commit 4f63c9f into dev Jul 2, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant