Repository navigation
feat(agent): add host-owned SQLCipher local storage - #1204
Conversation
a8c227e to
392ed4f
Compare
|
Maple Auth development preview: https://ac39bcf6.maple-auth-dev.pages.dev Commit: Uses development services. Cloudflare Access applies. Provider OAuth is not configured for PR URLs; use the stable Auth Dev host for OAuth rehearsal. |
|
Maple development preview: https://b89b09c1.maple-ca8.pages.dev Commit: Uses development API, billing, flags and PCR configuration. Cloudflare Access applies. |
392ed4f to
6a7716a
Compare
|
Published head The provider build adaptation moved into the public revision-pinned rusqlite fork: one signed patch, no copied dependency tree in Maple and no SQLCipher/OpenSSL C modifications. The review entry is now Pi's ordinary events retain their upstream meaning; The follow-up removes 126,524 extra dictionary lines, 33,489 generated-notice/associated-copy lines and 386 audit-helper lines. EFF's 7,776-line suggestion asset stays; notices are generated/shipped artifacts. Published scope against
The published Checkpoint ACP/remote passes use two native processes on one Mac over loopback: 105-task paging, exact image/10 MiB replay, cold identities, owner-name events/search, isolation/revocation. Final-head app build/codesign/launch and fresh GUI/RPC smoke pass: selected new-chat completion, identity/Local routing and exact prior-row replay. The published UTF-8 fix passes locally and in the hosted Windows dependency-graph/verifier step; actual Windows build/tests and other CI remain in progress. Draft/unmerged; Dock callback, cross-platform release, packaging/hardening, low-end KDF and trusted baselines remain gates. |
6a7716a to
a62f5b4
Compare
a62f5b4 to
d03101c
Compare
|
The encryption Settings follow-up is implemented in d03101c, with the PR kept as one signed commit and still draft.
Validation passed: the final full Agent gate (593 core, 705 desktop and 183 headless tests, plus other workspace/doc suites), all compatible macOS root Nix checks, and 22 disposable native password-lifecycle checks on runtime-equivalent source. Native visual checks cover the empty forms, Save feedback and checkbox; no password was entered through GUI automation. Declared test ignores remain ignored. The runtime-equivalent Local build from The final test-only amendment repairs portable fixture interpreters and exposes child errors; the updated Linux CI rerun is pending. The body also documents narrow fixes for the old hosted packaging/Windows failures and the small-pipe validation-tool issues found locally. Final-head hosted CI remains a separate qualification; this report does not claim those remote builds or a release passed. |
d03101c to
c664249
Compare
|
Removed the shared page-top store feedback pattern in c664249. The PR remains draft and contains one verified signed commit.
The final mandatory gate passes 593 core, 720 desktop and 187 headless tests, four Clippy configurations, strict workspace build/tests and other suites. Declared ignores remain ignored. Native plain-mode setup and reset/setup on a fresh disposable Local profile both return to the normal login form without a top notice or Dismiss row. Reset changed generation; the fixture was closed and released its lock. Its first stale-connection status query was recovered through read-only reconnection, without repeating reset. The exact final revision was rebuilt, packaged, codesign/launch checked and reopened as the Local app. Read-only IPC checks confirm the main store generation and identity presence were preserved; no reset or credential changes were performed there. The existing Windows run progressed beyond its old Perl/OpenSSL failure and exposed three platform guards, now corrected. Final-head hosted CI remains a separate qualification and is still running; no merge or release is requested. |
c664249 to
d32d113
Compare
|
Fixed the post-encryption “Agent runtime is not running” failure. Password maintenance now blocks sends while the local store is busy, then reconciles the preserved local chat after verified Open for the same store/account and starts the runtime if needed. The path handles successful changes, rejected passwords and cancellation without automatically resending drafts. A runtime startup error remains separate from the completed password operation. Added seven real-IPC GPUI regression tests plus an unsent-draft barrier regression, including explicit successful sends after recovery, a surviving runtime, locked-store invalidation and local recovery while a remote chat is selected. Password/database work and inference in the IPC fixtures are synthetic. The full mandatory Agent gate passed: 593 core, 728 desktop and 187 headless tests, four Clippy configurations, strict workspace builds/tests and the remaining workspace suites; declared ignores remain ignored. The exact signed-commit Local build was packaged, verified and reopened on the same encrypted store generation at its normal unlock screen. The draft remains one signed commit: |
|
Follow-up qualification on source
These runs used disposable isolated profiles, left the user's running profile untouched, and keep one-off helpers/reports outside Git. Remote topology was direct loopback between independent native hosts on one Mac; no physical-device, LAN/NAT, relay or rendered computer-picker claim. More disk-full and backup-restore testing was intentionally excluded from this pass. Windows Agent remains under investigation. Diagnostic checkpoint |
d129db3 to
3fb7aa2
Compare
|
The signed qualification checkpoint is now This checkpoint fixes two independently reproduced integrity-check defects: operational errors were being classified as corruption, and SQLite omits CHECK expression trees when parsing a truly read-only database. The checker remains read-only, supplements the engine with the fixed application-owned CHECK predicates for each supported schema, and cannot issue a clean receipt for an incomplete check. Regression coverage includes plain/keyed invalid JSON, integer constraints, foreign-key orphans, cancellation/budgets, and additive redacted startup diagnostics. The Windows problem is still under investigation. The previous runner narrowed it to checker-child initialization while the same-process read-only WAL test passes. The new exact-checkpoint Windows job is comparing minimal native OS/private-temp environments and recording only startup stages and numeric SQLite codes. That temporary diagnostic is not a production fix and will be removed after the cause is established. The completed native ACP, remote plain/encrypted/mixed, seven process-crash/reopen, and limited UI/menu-Quit results remain scoped to the earlier |
|
Windows qualification update on signed checkpoint
The new Windows run is pending. The preceding checkpoint passed macOS/Linux Agent CI and unsigned desktop packaging checks. The draft stays open; final rebase/squash follows qualification. No merge or release. |
|
The first independent-review fix checkpoint is now pushed as signed commit d69d41f. It addresses malformed tool-image persistence, credential ownership and account-cache isolation, cancelled-runtime retry, reset preflight and corruption-journal races, pending-history deletion/GC protection, paging and controller ownership, account-scoped remote events, notification privacy, bounded idle maintenance, unbuffered checker key input, and compiled-provider attribution. Pi event semantics remain unchanged. Validation on that checkpoint: the full isolated pre-commit gate passed (639 core, 749 desktop, 198 headless tests and all four Clippy configurations). The pinned packaging fixtures and real license-notice generation also passed. Supply-chain CI passed; cross-platform Agent CI is still running. This is not new native UI or Windows manual qualification. The next local batch removes automatic permanent recovery archives and unsafe in-place repair, adds non-destructive refusal for incompatible stores, and fixes password retry/progress/keyboard paths. Explicit destructive reset remains available for actual damaged stores; password creation/change and experimental recovery stay gated in release builds. These next changes are not yet a validated checkpoint. ACP active replay and further host lifecycle regressions remain in progress, so this PR stays draft and final squash is held. |
d69d41f to
3ab0dd8
Compare
3ab0dd8 to
0a42093
Compare
|
The agreed review follow-up is complete on
Confirmed reset now deletes only the current store; there are no automatic permanent damaged-original archives or in-place content repair. The approved release hold remains: plain SQLite ships by default; password creation/change and experimental salvage stay host-enforced debug-only. Ambiguous account-deletion reconciliation remains deferred as agreed. No merge or release performed. |
Add durable SQLite history and privileged local state in a fresh namespace, with optional SQLCipher password protection and bounded desktop, ACP and remote history access. Keep previous application data untouched. Preserve Pi event contracts, recover failed saves without replaying prompts, enforce account and generation ownership, and require explicit destructive reset instead of retaining permanent damaged-store copies. Keep password creation and change plus experimental salvage behind the release validation gate.
0a42093 to
52cf660
Compare
Problem and resulting behavior
Agent history and privileged local state need durable ownership and bounded reads.
This adds a host-owned SQLite store in a fresh
store-v1namespace for history,credentials, settings, attachments, project metadata and send receipts. Previous
application data is untouched: no import, migration, adoption or cleanup.
Project/workspace instruction Markdown remains files.
Plain SQLite is the release path. Optional SQLCipher password creation/change
and experimental salvage remain host-enforced debug-only pending their release
qualification. Existing encrypted stores can still unlock; confirmed reset and
password removal remain available.
Review guide
Paths below are relative to
apps/maple-agent/.docs/local-store.md,docs/local-store-encryption.md,docs/local-host.md.crates/maple-agent/src/store/; durable source transactions, account andgeneration fencing, read-only integrity checks and crash-safe replacement.
app/src/host*,app/src/desktop*,app/src/ui/store_*; contextualvalidation/feedback, retry without automatic prompt replay, coordinated Quit
and frontend-only window close.
crates/maple-agent/src/acp/; temporary encrypted canonical-row capture,immutable-source reconstruction, revision reconciliation and bounded independent
session queues. Active appends do not invalidate an already captured replay.
dependencies/sqlcipher/README.mdand thepinned rusqlite fork.
One patch above the released base; no vendored dependency tree or Maple C changes.
crates/UPSTREAM.md. Existing emitted events retain their meaning. Genericadaptations cover bounded resume, persistence retry/flush and output directories;
Maple adapter receipts bind source identities separately from commitment.
EFF generation stays; typed assessment uses zxcvbn. Distribution notices are
generated into build artifacts rather than checked-in bulk.
Review follow-up
The failure-path review is addressed in source and regression tests: lossless
malformed-image persistence, exact credential ownership, cancelled-runtime retry,
account/generation cache invalidation, durable damage quarantine, safe refusal of
incompatible stores, paging/navigation, remote event scoping, notification privacy,
bounded maintenance, unbuffered checker key input and compiled-provider attribution.
Post-dispatch receipt failures retain the original uncertain send identity rather
than inviting replay. Account-owned computer names restore through the local controller.
Confirmed Start fresh/Erase deletes the current damaged store. Maple does not
retain permanent damaged-original archives or offer in-place content repair.
Only qualified temporary swap state remains during an unfinished operation or crash
recovery; experimental salvage installs its verified replacement before removing
its source. Previous-version and unrelated copies are never swept.
Ambiguous server-account-deletion reconciliation remains explicitly outside this
pass: the pending intent/data are retained, and ordinary sign-in can remain blocked.
Validation and current state
One signed commit, rebased onto master
a391ddfd:52cf660626deb258df6ea7db5a481346b516ce0e.The fully qualified checkpoint was
0a42093b. The Agent app/core/Pi sources,Cargo manifests/lockfile and component Nix inputs are unchanged by this rebase.
The single conflict combined the updater's five new Nix setup steps and this
PR's two, making the workflow inventory 76.
MAPLE_HOOK_FULL=1gate passed: all four strict featureClippies, warning-denied workspace build/tests, 684 core, 781 desktop and
217 headless tests, plus other workspace libraries and integration tests.
checkpoint source/binary. ACP covered cold replay, persisted identities and
context recall; remote covered same-machine loopback pairing, bounded
pages/ranges, subscriptions and revocation. All qualification hosts stopped
and released ownership.
rendered runtime recovery, transcript preservation, confirmed store/key deletion
without archives, fresh setup/login and a successful new chat. Rendered
Save/cancellation routing has separate real-IPC GPUI regression coverage.
A separate Local Pro instance remains open for user testing.
passed Linux, macOS and Windows. Source verification, store-performance CI and
unsigned packaging/downloaded Linux verification also passed. Signed macOS
jobs were skipped; these results do not establish release publication.
test and 31 packaging tests. Hosted CI on the rebased head was not awaited
for merge. Older native/password/crash evidence retains its recorded scope.
Native Windows/Linux UI, ordinary Dock termination, low-end KDF costs and trusted
performance baselines remain release qualification. Unit tests and same-machine
loopback networking do not establish those properties. The staged encryption
release hold remains in place.
Need help on this PR? Tag
@codesmith-botwith what you need.