Guard state is not replayed on daemon restart, causing crashes when
lifecycle guard encounters events whose state transitions were lost.
Switched to checking summary.lastRole === '__abort__' which is rebuilt
from actual events every tick.
What: Tighten file scope for meta workflow coder and checker roles.
Why: Meta workflow should only modify workflow code under
$HOME/.upulse/engine/src/workflows/, not arbitrary project files.
Changes:
- meta-coder-cursor.ts: add prompt constraint to only modify src/workflows/
- meta-checker.ts: restrict allowedPrefixes from src/docs/test/ to src/workflows/ only
- meta-checker.ts: remove blacklist exemption for src/workflows/
团子 🐰
Add createSubprocessRole() to run workflow roles in isolated child
processes. Roles that crash/hang/OOM no longer affect the daemon.
- subprocess-runner.ts: child process entry, reads stdin JSON, executes role
- subprocess-role.ts: createSubprocessRole() wrapper matching Role<unknown>
- 4 test fixtures + 4 passing tests (echo, error, timeout, crash)
- Exported from workflows/index.ts and main index.ts
小橘 🍊 (NEKO Team)
- Remove durable-tick.ts and executor-sigil.ts (no more active ticking)
- Remove Durable Objects bindings from wrangler.toml
- Add CAS objects table to schema.sql
- Rewrite index.ts as pure API service:
* POST /events - push events with auto-generated occurredAt
* GET /events?kind&key&since&limit - query events
* GET /projections/:key - get latest collect event meta for key
* POST /objects - CAS store objects, return hash
* GET /objects/:hash - retrieve objects by hash
* GET /health - service health check
- No more /tick, /start, /configure, /status endpoints
- Pure passive event store, no rules engine or Sigil integration
- checker validates file scope, build, unit tests before e2e
- tester enhanced with diagnostic info on failure (event chain, last role, meta)
- tester no longer duplicates build (checker handles it)
- 6 meta workflow tests, 78 total pass
Adapter doesn't write __end__ events — moderator returns END and
tick produces executed=[]. Now tester checks: did at least one tick
execute, then quiesced = completed.
- Implement real Pulse tick logic in durable-tick.ts
- Add snapshot rebuild from D1 collect events
- Add pulse() method with demo rules (CPU spike detection, heartbeat)
- Add adaptive tick logic (30s base, up to 5min backoff)
- Add /configure endpoint for senseKeys and configuration
- Add CAS object storage in store-d1.ts
- Update index.ts with /configure route
- Persist prev snapshot in DO storage
- Execute effects through Sigil with error handling
The test was checking for 'Bug Fix' but the mock data has title: 'Fix bug' and the prompt builder uses the title directly. Remove the incorrect assertion.
Made-with: Cursor
council.test.ts and container.test.ts reference modules that were removed in a previous commit (b65e9d6). These files cannot run and cause test suite failures.
Made-with: Cursor
- Fixed await patterns in index.test.ts, objects.test.ts, scoped-store.test.ts
- Converted expect(await store.method()) patterns throughout test files
- Fixed rebuildSnapshot async calls in E2E tests
- Made test functions async where needed for store operations
- Reduced test failures from 35+ down to 6 (remaining are mostly unrelated)
Update upulse commands and UI server to await all async store methods. - Make CLI action callbacks async (workflow create, timeline, list, inspect events/object) - Make daemon status function async - Make all UI server handler functions async with awaited store calls - Fix Promise.all patterns for getObject calls in map functions - Fix scopedStore.close() calls to be awaited
Made-with: Cursor
Update all *.test.ts files to properly await the async PulseStore, ScopedStore, and defs functions. Fix gc.test.ts timing issues for async GC trigger, fix bad await assignment targets, and correct .length access on Promise objects.
Made-with: Cursor
- PulseStore/ScopedStore 接口方法返回 Promise<T>
- 所有 store 实现方法改为 async(bun:sqlite 同步调用外包 async)
- defs.ts, projection-engine.ts, gc.ts 公共函数异步化
- index.ts 中 store 调用加 await
- rules/health.ts rebuildHealth 函数异步化
- 核心异步化完成,支持 CF D1 等异步数据库运行时
Breaking Changes:
- All PulseStore methods now return Promise<T>
- Consumer code must add await for all store operations
- Tests need to be updated to use async/await patterns
- Extract core logic into testable performRollback(opts) function
- CLI action now delegates to performRollback and prints output
- Tests cover: dry-run, event export/delete, git checkout, missing
commit error, noop when already at target, dump metadata
- All tests use tmpdir, no dependency on ~/.upulse
- WorkflowCheckpoint caches lastEventId, topic summaries, and per-topic events
- First tick: full read (getAfter(0)), subsequent ticks: incremental (getAfter(lastEventId))
- Newly written role events also update checkpoint in-place
- No interface changes, no new files
- ENGINE_DIR = ~/.upulse/engine for meta coder/reviewer/tester/promoter
- REPO_DIR still used for coding workflow
- Tester accepts buildCmd/testCmd opts, no longer hardcoded to monorepo paths
- Init engine dir with package.json + tsconfig.json + git repo