Skip to content

E2E-3: JSONL fallback when DB unavailable (N3) #90

@Cho-Geer

Description

@Cho-Geer

E2E-3: JSONL fallback when DB unavailable

Parent Epic: #87
Source: read-audit-db-migration-plan.md N3

Verify that verifyRead() and getReadEventsForSession() fall back to JSONL when DB is unavailable.

Commands

cd /home/zhaoge/workspace/opencode/work-one
# Temporarily rename DB to simulate unavailability
mv .opencode/state/framework-state.db .opencode/state/framework-state.db.bak
bun -e "
const {verifyRead, getReadEventsForSession} = require('./.opencode/lib/read-audit.ts');
// Should fall back to JSONL
const v = verifyRead('super-admin', '.task_temp/some-file.md');
console.log('Fallback works:', typeof v === 'object' ? 'PASS' : 'FAIL');
"
mv .opencode/state/framework-state.db.bak .opencode/state/framework-state.db

Metadata

Metadata

Assignees

Labels

area/framework框架代码(.opencode/)p1Priority 1 - High

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions