Jordan-Hall / Jordan-Hall/browser

[P0][CORE-02] Durable state, outbox and artifacts

Open
#3 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Parent: #1

## Objective
Make task/workspace state durable enough that crashes, restarts and external side effects never reduce the system to guessing from a chat transcript.

## Scope
- SQLite transactional state for workspaces, tasks, grants, operations and migrations.
- Event journal plus transactional outbox/inbox/consumer cursors.
- Unique operation IDs before externally significant dispatch.
- Content-addressed artifact store for evidence, patches, files, snapshots and protocol fixtures.
- Retention/GC that respects references, privacy scope and legal deletion.
- Atomic state + pending-dispatch persistence where required.

## Design requirements
- A worker must be able to resume from durable state without provider conversation history being authoritative.
- Side-effect intent is persisted before dispatch; observations/results are appended, not retroactively invented.
- Artifact hashes are immutable references; mutable metadata lives separately.

## Acceptance criteria
- [ ] Crash between state transition and dispatch leaves an unambiguous recoverable operation record.
- [ ] Crash after dispatch but before result recording produces an explicit uncertain/reconciliation state where appropriate.
- [ ] Database migrations are reversible/restore-tested for supported upgrade paths.
- [ ] Artifact integrity is checked by hash and corrupt/missing blobs fail visibly.
- [ ] Concurrent consumers cannot double-apply one journal event.
- [ ] Retention does not delete referenced evidence or leak deleted private derivatives.

## Tests
Crash/fault injection around every transaction boundary; duplicate-delivery tests; migration fixtures; disk-full/corruption simulations; artifact hash mismatch cases.

## Dependencies
- CORE-01

**First phase:** P0
**Maturity target:** P1
**Workstream:** Runtime and contracts

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the CORE-01 dependency and the stated scope for SQLite state, the event journal, transactional outbox/inbox, and the artifact store. Run the listed crash and fault-injection tests, duplicate-delivery tests, migration fixtures, disk-full and corruption simulations, and hash-mismatch cases. Done means the acceptance criteria hold across recovery, migrations, concurrency, retention, and artifact integrity.

Written by the indexing model from the issue text.

Assessment

Tech stack
sqlite
Domain
backend, databases, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.