Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .claude/agent-memory/test-qa-engineer/MEMORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [project_testing_infra.md](./project_testing_infra.md) — Vitest/Playwright setup, config locations, Ponder virtual module gotcha, no jsdom/testing-library
- [project_testing_stack.md](./project_testing_stack.md) — E2E patterns: direct viem contract calls, event-based ID extraction, MeetingComponentsFactory API change
29 changes: 29 additions & 0 deletions .claude/agent-memory/test-qa-engineer/project_testing_infra.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Testing infrastructure overview
description: Vitest/Playwright setup, config locations, test patterns across the monorepo
type: project
---

Vitest v2.1.9 is hoisted at workspace root. No @testing-library/react or jsdom anywhere in the workspace — component testing requires Playwright only.

Per-package Vitest configs:

- `apps/hola-modern/vitest.config.ts` — node env, `include: ["src/**/*.test.ts"]`
- `apps/hollab-indexing/vitest.config.ts` — node env, `include: ["test/**/*.spec.ts"]` (added 2026-04-13)
- `packages/indexing-client` — `test/**/*.spec.ts`, has `@` alias to `src/`
- `packages/agent-sdk` — `test/**/*.test.ts` (no separate vitest.config — uses `vitest run --passWithNoTests`)
- `packages/viem-extension` — `test/**/*.spec.ts`

Playwright config (`apps/hola-modern/playwright.config.ts`):

- Requires live Anvil + deployed contracts (global-setup.ts boots anvil and runs forge script)
- baseURL is anvil RPC (not the Vite dev server) — NOT suitable for offline testing
- Tests in `apps/hola-modern/e2e/`

**Why:** Ponder virtual modules (`ponder:api`, `ponder:schema`) only exist at Ponder runtime — to test hollab-indexing logic, extract pure functions that take plain row objects (see `src/api/manifest.ts` pattern). Do NOT import from `ponder:api` in test files. The hollab-indexing vitest.config has no aliases for Ponder virtual modules, so `src/api/index.ts` (Hono routes) cannot be tested without invasive config changes — skip route tests.

`hono/testing` is available at `hono@4.12.10` (in workspace pnpm store), but mocking `db` and `schema` from `ponder:api`/`ponder:schema` is not viable without vitest alias config changes. Defer route tests until a test helper or mock module is established.

**BigInt regression pattern:** `organization.id` and `orgId` FK columns in Ponder schema are BigInt — GraphQL variables must be `BigInt!` not `String!`. This regressed twice (commits 10824bb, sprint WS2 Day 3). A string-assertion test in `packages/indexing-client/test/queries.spec.ts` guards the four known BigInt params: `GET_ORGANIZATION.$id`, `LIST_ROLES_BY_ORG.$orgId`, `LIST_CIRCLES_BY_ORG.$orgId`, `LIST_MEETING_COMPONENTS_BY_ORG.$orgId`.

**How to apply:** When asked to test hollab-indexing handlers, always extract pure assembly functions first. Component tests for hola-modern require Playwright (offline option is not viable without installing @testing-library). When adding new queries that filter by `organization.id` or any `orgId` FK, add an assertion to `queries.spec.ts`.
33 changes: 33 additions & 0 deletions .claude/agent-memory/test-qa-engineer/project_testing_stack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Testing stack and conventions
description: Test frameworks, configs, and patterns used across the monorepo
type: project
---

Vitest for TS SDK / frontend unit tests; Playwright for E2E in hola-modern.

**Vitest (hola-modern):**

- Config: `apps/hola-modern/vitest.config.ts` — `globals: true`, `environment: node`, `include: src/**/*.test.ts`
- Import style: `import { describe, it, expect } from "vitest"` (globals also work without import since globals:true)
- No mocking infrastructure needed for pure encoding tests — viem's `decodeAbiParameters` is the round-trip oracle

**Playwright E2E (hola-modern):**

- Config: `apps/hola-modern/playwright.config.ts`
- Global setup: `e2e/global-setup.ts` — starts Anvil on port 8545, runs `forge script DeployLocal.s.sol`, writes addresses to `e2e/.addresses.json`
- Pattern: direct contract calls via viem `createWalletClient` / `createPublicClient`, NOT browser UI interaction
- Accounts: `ANVIL_ACCOUNTS[0-3]` from `@wonderland/walletless` (FOUNDER, ALICE, BOB, CAROL)
- `parseAbi([...])` for minimal ABI slices per describe block
- `decodeEventLog` to extract event args from receipts
- Each `test.describe` uses `test.beforeAll` to deploy/setup, then individual `test()` calls for assertions

**Key facts:**

- `MeetingComponentsFactory.deploy` API changed to `(string _subname, address _orgFactory)` — existing tests in journey.spec.ts use the OLD 4-arg API; new tests must use the new 2-arg API with separate ABI const
- Per-org `MeetingFactory` clone (governance process) is discovered by parsing `MeetingComponentsDeployed` event from the deploy receipt
- `anchorCircleId` from `getOrganization()` is the target circle for creating roles via governance proposals
- ChangeType values: CreateRole=0, AmendRole=1, RemoveRole=2, ..., ExpandRoleToCircle=12

**Why:** Learned while writing Journey 6 tests for governance proposal lifecycle + ExpandRoleToCircle.
**How to apply:** When adding more E2E tests, define fresh ABI consts if the existing shared ones use stale signatures. Always parse events from receipts to get IDs rather than predicting them.
1 change: 1 addition & 0 deletions .claude/agent-memory/web3-ai-product-owner/MEMORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [project_proposal_lifecycle_shipped.md](./project_proposal_lifecycle_shipped.md) — Proposal lifecycle live on-chain; P0 refined to per-tension public/private; both next-bet PRDs exist on disk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Proposal lifecycle shipped + next-bet PRDs
description: State of the feat/governance-proposal-lifecycle branch as of 2026-04-15 and where the two shaped PRDs live
type: project
---

Proposal lifecycle (createProposal / adoptProposal / discardProposal / raiseObjection / resolveObjection) is live end-to-end on `feat/governance-proposal-lifecycle`: contracts, Ponder indexer handlers, indexing-client + agent-sdk write methods, `PublicProposalView` permalink `#/o/:orgId/p/:proposalId`, and seeded demo data on the `lantern` org.

**Why:** Closed the Day-2 sprint gap where `openProposals` was always empty. Public permalinks now have real on-chain data; agents can drive the full lifecycle via `examples/propose-tension.ts`.

**How to apply:** Treat proposal/objection on-chain surface as done. Next bets are the three in `docs/sprint-agent-native-mvp.md` post-sprint section. Two have been shaped into PRDs:

- **P0 — Public/private tensions** (refined from the original "readable tensions always-public"). Author picks visibility per tension at propose-time. Envelope `{ v, visibility, contentType, body }` stored off-chain under existing `tensionHash`; on-chain hash binds to the whole envelope so the visibility choice is tamper-evident. Zero contract changes. PRD: `docs/prds/public-private-tensions.md`.
- **P1 — Objection from public permalink.** Progressive wallet-connect inline in the objections section of `PublicProposalView`, reusing the same envelope for concerns. Key product decision made: **org-member advisory gate on the frontend** (contract remains authoritative). Rejected alternatives: any-wallet (Sybil risk), token-holder (wrong model), strict circle-member (too much plumbing for MVP). PRD: `docs/prds/public-objection-flow.md`.
- **P1 — Agent proposal firehose.** Still on roadmap, not yet shaped.

Both PRDs link from `docs/sprint-agent-native-mvp.md` post-sprint section. Both avoid contract changes and reuse `hollab-sdk` 0G/encryption primitives that were built for the v2 Aztec narrative but went unused on the write path.
Loading
Loading