Skip to content

Config data class + lazy, config-driven memory list (Phases 1–5) #201

@hanwencheng

Description

@hanwencheng

Goal

Make the web /memory list config-driven, lazy, and durable: resolve categories from the user's memory-types config (the classifier taxonomy, #178) rather than decrypting every blob or enumerating S3; reflect the durable S3 store (survive daemon restarts); and decrypt an entry's detail only on click. This requires standing up the DataClass::Config substrate (the taxonomy's encrypted, master-only home — #178 §7 P1) and fixing per-namespace storage to hold multiple classified memory lines (today the plant is lossy: two entries in one namespace collide on memory:<ns>.enc).

Full design / plan: docs/plan/web-flow/config-data-class-memory-list.md (landed in #200).

Status

  • Phase 0 — cap layer landed in feat: #164 sponsored ERC-4337 register + v2-demo harness restructure #200 (commit 581eb2c): DataClass::Config in broker/handlers/cap.rs + worker-creds/verify.rs (serializes "config"); broker cap_config_store/cap_config_fetch handlers + routes /v1/cap/config-{store,fetch}; check_data_class rejects cross-class (unit-tested). Dormant — no worker/bucket yet, no behavior change.

Remaining phases

  • Phase 1 — infra (operator on AWS): config bucket + own IAM role (per §17.2), split-statement bucket policy (s3:prefix=bots/${PrincipalTag}/config/*), OIDC PrincipalTag mapping; add CONFIG_BUCKET/CONFIG_ROLE_ARN to scripts/operator-workstation.env. New idempotent scripts/provision-config-role.sh + scripts/apply-config-bucket-policy.sh (mirror vault/memory).
  • Phase 2 — config worker: new agentkeys-worker-config (mirror agentkeys-worker-memory), store/fetch encrypted bots/<operator>/config/<svc>.enc, master-only; wired into setup-broker-host.sh (unit + nginx vhost); operator redeploys.
  • Phase 3 — isolation tests (test-discipline rule): extend harness/v2-stage3-demo.sh with the 4-layer cross-isolation tests for Config + the cap data-class-mismatch (config cap → memory/cred worker → cap_data_class_mismatch, and reverse).
  • Phase 4 — daemon: read/write the memory-types taxonomy via config-fetch/store; GET /v1/master/memory → categories from the taxonomy (no decrypt); new lazy detail endpoint GET /v1/master/memory/entry?ns=&key=memory-get(memory:<ns>) → decrypt → that entry; plant → per-ns JSON arrays (fix the lossy overwrite); agent-read parity + re-verify the wire demo (Chengdu still injects).
  • Phase 5 — frontend: apps/parent-control list shows categories (from daemon/Config); clicking a category/entry fetches detail on demand.

Dependency chain: Phase 4 (the visible behavior) gates on 0→1→2 — the Config data class must exist, be provisioned (AWS), and be deployed before the daemon can read the taxonomy from it. Phases 1–2 need the operator on AWS + a broker redeploy.

Source-of-truth updates (land with the code)

  • arch.md: add config to the data-class inventory (§15/§17), canonical-names, the four-layer isolation table; note the config bucket/role.
  • docs/spec/deployed-contracts.md / bucket+role registry: add the config bucket + role ARN.
  • CLAUDE.md per-data-class table: add the Config row + its stage-3 isolation tests.

Deferred beyond this issue

Refs: #178 (classifier-service), #191 (W3 master-self memory), #196 (auto-register), #200 (Phase 0).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions