Skip to content

refactor(memory): simplify member memory to one SQLite store - #11780

Merged
bolichen97 merged 1 commit into
mainfrom
codex/memory-v2-simplify
Sep 19, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
codex/memory-v2-simplify

Conversation

@bolichen97

@bolichen97 bolichen97 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Memory V2 spreads a member's learned state across SQLite, writable lesson/history files and a separate search index. It also ties normal routing and context delivery to member-specific isolation and proof machinery. This makes ordinary edits, retries and background work harder to route and preserve correctly.

Why it matters

Members need separate learning and working context. They do not need a promise that arbitrary code run by the same operator cannot read another member's files. The implementation should make the selected member and write result explicit while preserving retention, durability and the application's independent security controls.

What changed (motivation → approach → change)

| User contract | Implementation |

|---|---|

| One member keeps one set of learned memories | One SQLite database selected by stable IDs |

| Templates and projects do not move memory | Captured execution identity |

| Context works without learned memory | Independent persona, rules and project context |

| Retention and ordinary security still apply | Restricted-mode propagation and existing host controls |

Each newly created Crew Member owns one SQLite memory store. Its stable member and store IDs determine the database; templates, projects and display names do not. Facts, learned rules, episodes, daily history, record revisions, search and vector validity live in that database. Retry receipts keep counts and a digest instead of a transcript copy; unused full history revision copies are removed. Normal opens report missing, damaged or mismatched databases instead of creating replacements. Manual rules, persona and project context remain available when learned memory is unavailable.

Every execution captures its member, store, template and retention mode before planning or dispatch. Delegation inherits that record or explicitly selects an existing target member; continuations and durable jobs retain their own association. Sessions with native context require a new session to change member. Incognito and Temporary restrictions propagate through background work, and transient bodies stay out of Crew checkpoints and learning. Terminal and release paths clear transient live state only after state writers and delivery reports settle; a retained conversation keeps its original run record until release or the existing TTL, and delayed delivery cannot recreate a restricted tombstone. Recall does not update memory or retain queries. Transactions, retry receipts, revision checks, vector publication checks and SQLite-consistent backup/restore preserve data correctness.

Member-only OS views, process proofs, HMAC capabilities, duplicate member-only bindings and private/public task-body copies are removed. The retired member_process_records.py module and its Windows-only tests are deleted with the member-proof path. Prompt and path guards guide normal tools; they do not guarantee secrecy against arbitrary same-host code. Ordinary sandbox rules keep named stores and Gateway-owned run records readable while denying agent writes where supported; Gateway mutations remain available. Run records retain application ownership on cold continuation. Malformed member or store identity values now refuse new allocation with the existing typed error before any replacement identity is chosen. Host sandboxing, credentials, transport authentication, owner/application permissions, audit integrity and enterprise governance remain. The existing UI and documentation describe member-scoped memory and explicit errors. Creation initializes V2; the old in-place opt-in and migration paths are removed. This is a replacement of an unreleased design, with no old-V2 compatibility requirement. Global and named V1 behavior and routine backups remain supported.

Embedding diagnostics in vector_memory.py _try_embed log the text length only; the memory text itself no longer reaches the log on the success, None or failure branch (CodeQL py/clear-text-logging-sensitive-data).

Backwards compatibility

Breaking: old development-stage V2 databases, proof/grant fields, isolation capability requirements and existing-member provision_memory opt-in are replaced. No migration, retirement-marker repair or dual V2 authority is provided. Local owner-token bootstrap requires positive host-process provenance independently of whether member memory exists. Writer sweep on origin/main @ cff7de5: explicit CLI/dashboard member creation, interactive/API session selection, pooled MCP, subagents and continuation, cron, workflows, TaskRunner and hook registration/delivery use canonical execution records. Their readers and synthetic fixtures are updated. Global/named V1 consumers retain their existing storage path and can resume retained runs using their original app and retention association; historical credential-bearing paths remain excluded from exports. Database files are never silently replaced and real user data was not read or deleted.

Tests

Review map for the changed responsibilities:

| Responsibility | Owning implementation |

|---|---|

| Single SQLite authority and publication | kiro_crew/memory.py, memory_schema.py, memory_record_metadata.py, vector_memory.py, memory_v2.py, history_consolidation.py, learn.py, eval/bench/member_v2.py |

| Captured identity and explicit creation | execution_context.py, memory_stores.py, kiro_crew/members.py, member_memory_auth.py, config/loader.py, validation.py, cli.py, cli_commands.py |

| Manual context and session selection | context.py, member_essential_context.py, session_agent_selection.py, session_allocation.py, session.py, history.py |

| Gateway and tool routing; payload-free audit | mcp_core.py, mcp_shared.py, mcp_caller.py, mcp_cron.py, mcp_gateway/gatewayd.py, mcp_tools/spawn.py, mcp_tools/logs.py, mcp_tools/sessions.py, dashboard/session_control.py |

| Durable and transient work | subagent.py, subagent_manager/run.py, subagent_persistence.py, kiro_crew/cron.py, workflow_memory.py, workflows/runner.py, taskq/adapters/runner.py, kiro_crew/taskrunner.py, task_models.py, task_reporter.py, llm_helpers.py, messaging/session_resume.py, slack/gateway.py |

| Native provider lifecycle and capability cleanup | acp/client.py, acp/runtime.py, acp/session_mcp.py, acp_backends.py, agent_sdk/backends.py, providers/acp.py |

| Independent security and ordinary audit destination; retired member-proof cleanup | sandbox.py, security/paths.py, session_pid_sig.py, sel.py, member_memory_auth.py, platform_compat.py, session_cleanup.py |

| Routine consistent backups and restore | member_memory_backup.py, memory_backup.py, snapshot.py |

| Member UI, translations and regressions | website/src/pages, website/src/i18n, website/src/test, website/src/utils, website/playwright |

| Contract, packaging and test maintenance | docs, src/kiro_crew/docs, website/docs, test, .github/workflows, .github/black-baseline.txt, config-baseline.json, testing/workflow_memory_scenario.py |

  • Targeted synthetic regressions cover routing interleaving, same-name member/template selection, late startup and queued work, parent closure, continuation/restart/rerun, missing identity, restricted payloads, context delivery failures, revision conflicts, lost acknowledgements, stale embeddings and midnight-safe history replacement.

  • Storage verification includes WAL round-trips through snapshot and export, restore with active handles, concurrent manual-profile writes, atomic history/FTS rollback and read-only recall.

  • Independent authentication, owner/application permissions, governance, host sandbox and SEL integrity suites retain their assertions. Only tests and CI canaries for the deliberately removed member-confidentiality guarantee are retired.

  • Measured diff against cff7de54165be22c423194c3b274643877a5c7d8: 359 files, +15,085/-20,506 (net -5,421); the count includes the narrow terminal lifecycle, cron compatibility, and test-isolation follow-up. Current-head local revalidation passed 425 ACP runtime tests (1 existing xfail), 423 member routing/storage/cron/session tests, and 93 identity/MCP/session-token tests (3 skips, 6 existing xfails); the full MCP shared suite passed 93 with 5 skips after audit-payload redaction. The history-bound follow-up passed 12 history-edit tests and the full vector-memory suite passed 213 tests with 15 skips. V13 final gates all returned 0, including Black, mypy, flake8, documentation and security-boundary checks. Earlier scoped storage, backup, UI and synthetic Gateway evidence remains recorded above. The branch is based on the current origin/main (cff7de54165be22c423194c3b274643877a5c7d8) as 6df4db653bf215fadf045939f84956ebab57aefb; the post-correctness-fix remote matrix is running. Its final check counts and any baseline failures will be recorded here after completion; no failure is treated as an approval or suppressed.

  • test_vector_memory.py::TestEmbedLogsCarryNoMemoryText locks in that the three embed diagnostics carry no memory text. test_theme_install.py::test_dest_case_variant_ancestor_rejected_on_case_insensitive_fs accepts either fail-closed refusal on a case-insensitive filesystem (the staging containment check refuses before the ancestor guard does); its source-preservation assertions are unchanged. This is the pre-existing macOS-only failure from the base, carried here so the macOS lane can run green on this head.

Manual verification

The work ran in a separate feature worktree with synthetic data and bounded concurrency. No serving Gateway was changed or restarted. Actual dashboard pages and components were rendered with synthetic HTTP fixtures in isolated frontend processes, checking English/Chinese, light/dark, narrow width, console errors and overflow. Real provider integration was not exercised. Isolated Gateway integration uses a deterministic synthetic provider; its result is reported separately from native-engine verification.

Limits: provider engines may maintain their own native files; Crew disables its recording and cleans owned transient native sessions, but a provider crash is not covered by a universal no-persistence API. Native Windows cannot validate Linux namespaces or macOS Seatbelt; platform checks and unrelated failures are reported separately from PR regressions. UI checks found existing shared-component contrast issues, including the edited empty-state subtitle; all editor and drawer scans passed. Local vendor checking found generated bytecode only; host policy refused its cleanup. The unchanged vendor payload passed remote clean-checkout CI on the first submitted head. Local review model availability is disclosed in the review record.

The pre-rebase remote platform limits (from the prior head) were isolated from this diff; the post-rebase matrix is running: macOS shard 1 has one failure in test_cloud_login_paths.py::TestPrivateLoginDir::test_guard_reads_mode_back_through_bsd_stat_with_bash, and macOS shard 3 has one failure in test_theme_install.py::TestCopyInstalledTheme::test_dest_case_variant_ancestor_rejected_on_case_insensitive_fs; neither test file nor its owning implementation is changed here. macOS shard 2 passed. Windows shard 5 has one failure in test_embeddings_resource_budget.py::test_bulk_cooldown_is_shared_but_does_not_delay_interactive_calls, and shard 8 has one failure in test_autonudge_provider_trust.py::test_failed_restart_activation_preserves_a_concurrent_committed_patch; those tests and their owning modules are unchanged here. CodeQL continues to report two pre-existing clear-text logging alerts in unchanged ACP/vector logging statements on main; the large diff can surface them as new. They are disclosed rather than suppressed. Linux/macOS enforcement still requires native CI evidence.

Screenshots / video

English light - new member guidance without an empty field

Chinese dark at 390px - legacy member summary and its only edit action

English light - populated member memory and member selector

Member roster, editors, drawers and empty memory

English light - actual member roster and creation-only banner

Chinese dark at 390px - actual member roster

English light - existing V2 member ownership and management

Chinese dark at 390px - existing V2 member

English light - existing V1 member retains its memory

Chinese dark at 390px - existing V1 member

Chinese dark at 390px - standalone new-member guidance

English light - actual legacy member summary drawer

English light - member memory empty state and selector

Chinese dark at 390px - member memory empty state and selector

English light at 1440px - Global memory and member-scoped explanation

Chinese dark at 390px - Global memory and member-scoped explanation

Related Issues

The task owner explicitly directed the replacement contract and authorized supported review overrides (attributed authorization). No accepted RFC covering this replacement was found on main. Security Scope refused the diff above its unchanged 1 MB cap before producing a verdict. Owner-authorized Design, First Principles and Scope exceptions accept those disclosed limitations and the single-PR contract; they are not an automated security verdict and do not waive code defects, technical CI or independent security controls.

no linked issue: this PR implements the explicitly approved Memory V2 replacement task.

Preserves the routing, retention and durability requirements established by #9553, #10086, #10337, #10266, #10435, #10586, #11102, #11376, #11018, #11593, #11630 and #11659 under the simplified contract.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title

  • Remote platform checks are pending on the current head

  • Self-review completed; code follows project style guidelines

  • Owning specifications and user documentation updated

  • No secrets, credentials, or internal references in the diff

@bolichen97
bolichen97 requested review from a team and Zedmor September 18, 2026 11:05
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 18, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Intent: Replace development-stage Memory V2 with one stable member-to-store binding and one SQLite learning authority. Capture routing once per execution, build manual context without a database dependency, and preserve transaction, backup and retention correctness.

Not a goal: Adversarial confidentiality between agents running arbitrary code under the same host/operator, old-V2 migration or compatibility, global V1 redesign, a new service, removal of ordinary host/credential/transport/application/enterprise protections, or automatic merge.

@bolichen97

Copy link
Copy Markdown
Contributor Author

Validation for 60e76e3db557a99af05acb666805e418032e06ae (base adef620ab0fadbf8e95b36c6f94d0ed7264c2dda). All data-bearing tests used synthetic records and isolated directories. No serving Gateway, real memory database, protected identity record or credentials were used.

Area Local evidence
Independent security 468 passed, 19 skipped, 7 existing xfailed across authentication, owner/application permissions, governance, sandbox and audit suites
MCP and audit retention 333 passed, 31 skipped, 1 xfailed; the final payload-free audit matrix separately passed all 42 cases
Member routing, context and session lifecycle 595 passed in the owning regression bundle; 121 passed after integrating the queued-prompt durability change from main
SQLite authority, history limits and memory API 170 passed; the oversized-history regression failed before the fix and now checks refusal before Python body materialization, byte limits and no overwrite
Backups and manual context 115 passed, 14 platform skips, including live-WAL snapshot/export and active-handle restore; 97 passed, 18 platform skips for manual context/resources
ACP diagnostics and lifecycle 1,131 passed, 198 skipped, 1 xfailed in the expanded suite; three partial-construction fixtures were corrected and the 24-case retention/authentication bundle passed. One unchanged Windows clock-sensitive test is reported below
Workflow/task admission Workflow service and retention: 99 passed, including 15 new storeless-admission cases. Pool and runner adapter: 108 passed. TaskRunner: 27 passed. Subagent fairness, nested work, waiting and approvals: 146 passed; 12 pressure cases passed after a typing-only cleanup
Upstream integration 425 passed, 1 xfailed across ACP runtime and the new TaskStore invariant suite. Pod, meetings and dashboard integration: 868 passed, 146 skipped, 4 xfailed; three stale token success fixtures lacked synthetic host provenance. The corrected core/authentication bundle passed 181 tests; the 11-case token matrix includes refusal of a valid secret without positive peer identity. Production authentication was not changed by this fixture repair.
Chat and model fallback integration 998 passed in the integration bundle; all 15 stale chat-fixture failures were corrected, then all 26 targeted cases passed. Assertions retain workspace/reset/race behavior and prove Temporary fork history replays from RAM without a durable transcript. Upstream model fallback retains the captured member, retention mode and delivery receipts
Frontend All planned related targets executed in bounded batches. Initial copy/generated-key failures were fixed and covered by 227 passing and 309 passing focused cases. Build, TypeScript, ESLint, jscpd, bundle/cycle checks, all 19 i18n checks and render-vs-base checks passed
Static gates Full mypy (1,625 sources), isort/flake8, Black baseline gate, SDK boundary, sync I/O, memory seam, lockdown-before-publish, subprocess, test-path, skill, focus, feature-map, changelog and documentation checks passed; changed review fixes received focused reruns

Counts describe separate commands and overlap; they are not added into a claimed total. Evidence spans clean rebases whose PR patch was verified unchanged with git range-diff; affected upstream ACP, TaskStore, core/authentication and chat/model-fallback paths received focused integration checks. The final core and chat sources passed scoped mypy. The complete backend matrix is delegated to remote CI as requested.

The expanded ACP partial-construction sweep found ten stale synthetic fixtures, corrected without changing their assertions; the corrected bundle passed 212 cases with one platform skip. The remaining six setup failures are the unchanged POSIX-only cases below.

Measured diff against the fetched base: 259 files changed, 9766 insertions(+), 16300 deletions(-). These are raw Git counts across code, tests, translations and documentation, not a claimed complexity percentage.

Local environment limits:

  • Electron: 1,895 passed, 5 skipped, 2 failures caused by Windows symlink EPERM; assertions and security checks were retained.
  • TestStaleTurnProbeAccounting::test_priming_verdict_defers_then_real_evidence_reaps: the unchanged test and production method fail on both the base and this branch with a same-tick 15.625 ms Windows monotonic clock. The same synthetic test with advancing time succeeds on both, with exactly two probes. No production timing rule or assertion was weakened.
  • Six unchanged test_pid_lifecycle.py cases require POSIX-only os.getpgrp/os.getuid and fail in their Windows fixture setup. The test file matches the fetched base; no skip or assertion change was added.
  • Vendor verification reported generated __pycache__ only. Automatic host policy rejected scoped cleanup with “blocked by policy”; no alternate deletion method was attempted. Vendor payload files were unchanged. Clean-checkout CI must verify the manifest.
  • Five actual-component screenshots cover English/Chinese, light/dark, narrow layouts, empty/populated member memory and member creation/legacy states. New captures had zero page/console errors and no horizontal overflow. Axe reported unchanged shared-component contrast and SidePanel tab-role issues; the evidence comment lists exact selectors rather than claiming a clean accessibility audit.
  • Real provider/Gateway integration was not run. Provider engines can write native files while live; Crew disables its own restricted recording and cleans known owned native transcripts on teardown, but undocumented engine storage or a process crash has no universal no-persistence API.

Local review used the extracted CI charters. GPT review requested gpt-5.6-sol; served model was not independently reported. The required Opus model and its listed fallback were unavailable in this environment; a supplemental review used the current non-Opus model and does not claim Opus parity. A focused verifier confirmed all four original blockers closed and reported no remaining or new Critical/High findings; the final verification stamp covers 60e76e3db557a99af05acb666805e418032e06ae. Remote Opus and all required CI/review gates remain authoritative.

@bolichen97

Copy link
Copy Markdown
Contributor Author

UI evidence for 60e76e3db557a99af05acb666805e418032e06ae. Images are attached in the PR body.

{
  "scope": "Actual MemoryStoreCard + MemberMemoryPanel empty state; actual KiroCrewAgentsPage with owned, legacy and new-member MemoryStoreField composite; actual MembersPage legacy summary. Synthetic API data only, isolated Vite5199; no gateway.",
  "results": [
    {
      "view": "memory",
      "lang": "en",
      "theme": "light",
      "width": 1100,
      "errors": [],
      "consoleErrors": [],
      "overflow": false,
      "a11y": [
        {
          "id": "color-contrast",
          "impact": "serious",
          "nodes": [
            {
              "target": [
                ".text-muted\\/60"
              ],
              "summary": "Fix any of the following:\n  Element has insufficient color contrast of 2.73 (foreground color: #9e9ba3, background color: #ffffff, font size: 9.8pt (13px), font weight: normal). Expected contrast ratio of 4.5:1"
            }
          ]
        }
      ],
      "unknown": [],
      "image": "member-memory-final-memory-en-light-1100.png"
    },
    {
      "view": "memory",
      "lang": "zh-CN",
      "theme": "dark",
      "width": 390,
      "errors": [],
      "consoleErrors": [],
      "overflow": false,
      "a11y": [
        {
          "id": "color-contrast",
          "impact": "serious",
          "nodes": [
            {
              "target": [
                "#radix-\\:r1\\:-trigger-memories"
              ],
              "summary": "Fix any of the following:\n  Element has insufficient color contrast of 3.56 (foreground color: #8e48ff, background color: #211d25, font size: 9.0pt (12px), font weight: normal). Expected contrast ratio of 4.5:1"
            },
            {
              "target": [
                ".text-muted\\/60"
              ],
              "summary": "Fix any of the following:\n  Element has insufficient color contrast of 2.74 (foreground color: #65616c, background color: #211d25, font size: 9.8pt (13px), font weight: normal). Expected contrast ratio of 4.5:1"
            }
          ]
        }
      ],
      "unknown": [],
      "image": "member-memory-final-memory-zh-CN-dark-390.png"
    },
    {
      "view": "crew",
      "lang": "zh-CN",
      "theme": "light",
      "width": 1280,
      "errors": [],
      "consoleErrors": [],
      "overflow": false,
      "a11y": [
        {
          "id": "color-contrast",
          "impact": "serious",
          "nodes": [
            {
              "target": [
                ".gap-1"
              ],
              "summary": "Fix any of the following:\n  Element has insufficient color contrast of 4.01 (foreground color: #008543, background color: #e0f0e8, font size: 9.8pt (13px), font weight: normal). Expected contrast ratio of 4.5:1"
            },
            {
              "target": [
                "div[aria-label=\"编辑代理 reviewer\"] > .grid-cols-2.gap-x-3.border-t > .gap-2.items-center.min-w-0:nth-child(2) > .min-w-0 > .pr-0\\.5.truncate.text-\\[12px\\] > .ml-1\\.5.text-warn.text-\\[11px\\]"
              ],
              "summary": "Fix any of the following:\n  Element has insufficient color contrast of 3.39 (foreground color: #a38a00, background color: #ffffff, font size: 8.3pt (11px), font weight: normal). Expected contrast ratio of 4.5:1"
            },
            {
              "target": [
                "div[aria-label=\"编辑代理 legacy\"] > .grid-cols-2.gap-x-3.border-t > .gap-2.items-center.min-w-0:nth-child(2) > .min-w-0 > .pr-0\\.5.truncate.text-\\[12px\\] > .ml-1\\.5.text-warn.text-\\[11px\\]"
              ],
              "summary": "Fix any of the following:\n  Element has insufficient color contrast of 3.39 (foreground color: #a38a00, background color: #ffffff, font size: 8.3pt (11px), font weight: normal). Expected contrast ratio of 4.5:1"
            }
          ]
        }
      ],
      "unknown": [],
      "image": "member-memory-final-crew-zh-CN-light-1280.png"
    },
    {
      "view": "members",
      "lang": "en",
      "theme": "light",
      "width": 1440,
      "errors": [],
      "consoleErrors": [],
      "overflow": false,
      "a11y": [
        {
          "id": "aria-required-parent",
          "impact": "critical",
          "nodes": [
            {
              "target": [
                ".max-w-\\[240px\\]"
              ],
              "summary": "Fix any of the following:\n  Required ARIA parent role not present: tablist"
            },
            {
              "target": [
                "div[aria-label=\"Artifacts\"]"
              ],
              "summary": "Fix any of the following:\n  Required ARIA parent role not present: tablist"
            },
            {
              "target": [
                "div[aria-label=\"Files\"]"
              ],
              "summary": "Fix any of the following:\n  Required ARIA parent role not present: tablist"
            }
          ]
        }
      ],
      "unknown": [
        "/api/config/stt",
        "/api/dashboard/config",
        "/api/agents/sync",
        "/api/chat/slots/member-legacy"
      ],
      "image": "member-memory-final-members-en-light-1440.png"
    }
  ],
  "head": "60e76e3db557a99af05acb666805e418032e06ae",
  "base": "adef620ab0fadbf8e95b36c6f94d0ed7264c2dda",
  "baseline_note": "Reported Axe findings are unchanged shared contrast styles and SidePanel tab-parent markup. No accessibility assertion was weakened. No page/console errors or horizontal overflow were observed."
}

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 18, 2026
@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — 🟡 CONCERNS

Design-level review of 6df4db653bf215fadf045939f84956ebab57aefb — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: CONCERNS

Member-confidentiality removal rests on one linked owner authorization and no automated security verdict — a human must confirm both before merge.

Watch

  • The deleted OS views, HMAC capabilities and process proofs retire a pinned security guarantee, and the description concedes "Security Scope refused the diff above its unchanged 1 MB cap before producing a verdict" — so the only sanction is the owner comment (5733478865) and "owner-authorized … exceptions" this review cannot verify. If that authorization is not what the description claims, a decided guarantee was removed with no security lane ever ruling on it.
    Clears when: a maintainer confirms the linked comment authorizes the replacement contract and a human security review covers the sandbox.py/member_memory_auth.py deletions.
  • "Remote platform checks are pending on the current head" while the diff deletes Windows-only tests and platform_compat code; the four disclosed shard failures are claimed unrelated but unproven on this head.
    Clears when: the post-rebase macOS/Windows matrix completes and the failing tests are shown green or independently attributed to main.

Suggestions

  • The new memory_stores READONLY disposition means agents can read every member's SQLite file; consider stating that read-visibility explicitly in the dashboard's member-memory UI copy, since users of the old design may still assume secrecy.

[DESIGN-REVIEWED] 6df4db6

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — 🟡 CONCERNS

UX-level review of abd518415b1e1f5e4144591e78f5e5bd749c459b — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

Legacy members lose their only memory affordance with no pointer to where V1 memory lives — the blind reader could not tell why the buttons differ.

Watch

  • Removing setup_in_crew_manager hides the drawer/editor button entirely for legacy members ({activeMemory !== 'legacy' && (<Btn…), so a V1 member shows memory-store facts with no way to view that memory; the reader: "Why 'reviewer' has a 'Manage memory' button but 'legacy' has none… I cannot tell." Persistent friction for every existing-member owner. Fix: keep a "View memory" link to the V1 store's settings view beside the legacy note.
  • New picker_explanation ("Select Global Memory V1 or member memory…") still doesn't say the picker only changes what the page shows; reader: "no idea which of those two it does — hesitant; if it changes what's used… that feels big." Fix: "Choose which memory to view and edit."

Suggestions

  • memoryV2.empty_body "Copy selected memories here" — name the source ("Copy memories from Global Memory V1 or another member"); the reader would not dare press the purple "Copy memories" button without knowing what it copies from.

[UX-REVIEWED] abd5184

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ human override accepted

Human judgment by @bolichen97 overrides the GPT 5.6 finding for abd518415b1e1f5e4144591e78f5e5bd749c459b; the recorded reason is authoritative for this commit.

This comment is updated in place on each push.

The model was not re-run because an authorized human decision supersedes it.

False positive or not applicable? A repository writer can comment:
/ai-review override gpt abd518415b1e1f5e4144591e78f5e5bd749c459b: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ human override accepted

@bolichen97 overrode this lane for abd518415b1e1f5e4144591e78f5e5bd749c459b via /ai-review override (this commit only).

@bolichen97

Copy link
Copy Markdown
Contributor Author

Product decision supplied by the task owner (reconfirmed during this review round):

Memory V2 is still in development. This PR replaces its design with one stable member -> one store -> one SQLite learning authority. Normal built-in operations must select the correct member database; arbitrary code run by the same host/operator is no longer promised adversarial isolation from other members' files. Explicit cross-member delegation uses the target member's existing store. Context construction remains independent of database availability.

This explicitly authorizes removal of memory-only OS hiding, process/namespace/HMAC proofs, duplicate protected grants and secrecy-only body copies. It does not authorize weakening ordinary host sandboxing, transport authentication, owner/application permissions, credentials, audit integrity or enterprise policy. Incognito/Temporary retention, transactional correctness, failure reporting and daily SQLite backup/restore remain requirements. Existing global V1 behavior remains supported. No old-V2 migration or dual implementation is required; provisioning happens only through explicit member creation.

This comment records the user's product direction, not a maintainer review, accepted base-branch RFC, or human override. The Design and First Principles maintainership gates remain authoritative. The security-scope reviewer also refused the >1 MB diff before producing a verdict; its cap has not been changed or bypassed. The requested delivery remains one coherent PR, so an approved review path for its size needs a maintainer decision.

I am addressing the concrete CI/UX/integrity findings and will post individual dispositions with evidence. No approval, override or merge will be performed by this agent.

@bolichen97

bolichen97 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor Author

needs-a-decision

  • Recorded authority for the contract change (span=33b83d2e5557)

The task owner explicitly directed and reconfirmed this product contract; the attributed record is #11780 (comment). Member confidentiality is intentionally withdrawn while independent host, authentication, credential, audit and enterprise boundaries remain. This is not a claim of maintainer approval. Maintainer: will you record acceptance of this contract through the repository's prescribed decision path?

@bolichen97

bolichen97 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor Author

needs-a-decision

  • Withdrawal of adversarial member confidentiality (span=5296ae159271)

This removal is required by the task owner's explicit product direction, recorded at #11780 (comment); rebuilding the proof chain would contradict the requested design. Normal routing and data correctness remain required. Maintainer: will you accept this product decision through the required base-RFC or human-review path? The agent will not issue an override.

@bolichen97

bolichen97 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor Author

needs-a-decision

  • Creation-only provisioning replaces the old opt-in (span=df04647fac1a)

The requested development-stage contract allows database initialization only on explicit member creation, with no old-V2 migration or compatibility path. Retaining existing-member provision_memory would keep that removed path. The task owner's direction is attributed at #11780 (comment). Maintainer: will you record acceptance of creation-only provisioning under the required product-decision process?

@bolichen97

bolichen97 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor Author

needs-a-decision

  • Repository acceptance of the replacement product shape (span=02e182b0bb22)

The requested one-store design and removal of the old opt-in are now explicitly attributed to the task owner at #11780 (comment). No covering accepted RFC on main or maintainer override is claimed. Maintainer: please choose the repository-approved decision path for this coherent replacement. This agent will not merge an RFC, self-approve, or invoke an override.

@bolichen97
bolichen97 force-pushed the codex/memory-v2-simplify branch from 60e76e3 to 70f5003 Compare September 18, 2026 13:04
@bolichen97

Copy link
Copy Markdown
Contributor Author

Validation for 70f500314120cec0d13feead61574aa14deaa4e9 on origin/main at f20a4b6eed65ff9bdb942498ffc754368cc6cd4b. One commit; 294 files, +11,226 / -16,615 lines including tests and documentation. The rebase to this base preserved the preceding patch (git range-diff equality). The larger focused groups below ran on candidate 89ade584fd8a59969a01448b6ff0cb57664afc51; subsequent changes were limited to safe MCP-settings reads, history-query audit payload omission and their tests/specs. Those repairs have additional causal tests below; no full matrix is claimed locally.

Verified behavior Result
Original backend CI failures 205 of 206 original unique failing nodes now covered by passing focused runs: storage74, subagents55, dashboard31, context/workflow45. The remaining node is the Linux projected-MCP end-to-end test below. No original failure was converted to a skip.
Storage authority, retained V1 behavior and lineage checks 98 passed; stronger journal/import controls29 passed; lineage negative controls13 passed.
Subagent identity and queue fixtures All55 exact failing nodes passed; expanded owning files423 passed,2 existing xfailed.
Dashboard lifecycle and retention 501 passed,4 existing skipped,8 existing xfailed; final race/retention group133 passed. Fresh-main queue/retention cross-check247 passed.
Member context, workflow admission and normal session tokens 420 passed,14 platform skips outside the original45 failures; create/load identity controls also passed after the signature and positive-backend-branch fixes.
Ordinary strict identity for log/history reads 8 negative cases failed before the repair; owning suites105 passed,7 skipped,6 xfailed; final topology/member-history/token/port cross-check30 passed,3 skipped,6 xfailed. Registry and strict-gate guard remain unchanged.
Existing sandbox integrity and selected-store checks 417 passed,220 platform skips; metadata65 passed,4 skipped. No member-specific hidden view was reinstated.
Safe MCP settings and history-query retention 10 new configuration refusal/parse cases failed before repair; ACP/Codex/identity group208 passed,7 existing skips. Final identity group50 passed,2 Windows symlink-privilege skips. History-query success/validation/execution cases all failed before repair; final shared-MCP/history group124 passed,5 existing skips.
UI behavior and fresh-main shortcuts 168 affected tests passed; upstream shortcut group204 passed; Electron menu29 and window-lifecycle13 passed.

Every final static gate recorded for this exact head exited0: Black (cache independently refreshed), isort, Flake8, mypy (1,625 source files), comment-history, subprocess encoding, SDK boundary, synchronous-I/O checks, harness parity, memory-store seam, loop-bound locks, ACP host-data, lockdown-before-publish and documentation lint. Frontend TypeScript, production build, full ESLint, duplication, phantom-class checks, analyze build, bundle budgets and chunk cycles passed. i18n render versus the prior main and unchanged frontend source introduced no surface regression; its existing findings were642 text,2 layout,10 latent. Test groups overlap; their counts are not summed into an invented total.

Transport limit: test/e2e/test_private_workflow_memory.py::test_private_workflows_execute_over_real_projected_mcp is still awaiting a passing Linux run. Windows reached25 completed worker turns but timed out at300s during the first rerun, before nested/spawn/restart stages. Cold member context, missing ordinary unpooled session identity, an incorrect policy-query port and title-fixture command matching were repaired with causal regressions. A standalone owned IPv4 loopback experiment measured localhost connections at2.047–2.063s versus <1ms for127.0.0.1; that can consume the test budget but does not prove the entire timeout cause. No timeout was increased. Real Kiro engine startup, per-tool filtering after ACP transport projection, and crash-time native-file retention remain unverified.

Environment limits: the unchanged vendor payload passed the first submitted head's clean-checkout Vendored Tree Integrity CI. A local generated-bytecode cleanup was denied by host policy; it was not retried. The isolated synthetic E2E temporary-directory cleanup was separately denied; the verified owned process tree had been stopped and its residue was preserved. No serving Gateway was changed or restarted, and no real memory database or credentials were read to validate the design.

Local code review: GPT discovery and authoritative falsification reported no findings on preceding candidate 89ade584fd8a59969a01448b6ff0cb57664afc51. An independent supplemental contract reviewer found the MCP-settings read bypass; the repair was made and the focused verifier cleared exact head 70f500314120cec0d13feead61574aa14deaa4e9, including the history-query payload fix. The required Opus model was unavailable locally; the supplemental reviewer is not an Opus pass. Actual served models were unverified. Remote required reviewer stamps remain pending.

The earlier validation record remains historical evidence, not a claim that cancelled jobs or old-head checks passed on this commit. Full matrix and required review results remain pending for the new remote head. Design/First-Principles require a maintainer decision; SecurityScope refused the >1MB diff before a verdict. No override or merge was performed.

@bolichen97

Copy link
Copy Markdown
Contributor Author

UI evidence for 70f500314120cec0d13feead61574aa14deaa4e9. The captures predate the final backend-only repairs; the corresponding frontend blobs are unchanged. The existing Chinese dark narrow capture is reused as identified in the PR body. New images are attached in the PR body; synthetic API data and actual components only.

{
  "scope": "Actual MemoryStoreCard + MemberMemoryPanel empty state; actual KiroCrewAgentsPage with owned, legacy and new-member MemoryStoreField composite; actual MembersPage legacy summary. Synthetic API data only, isolated Vite5199; no gateway.",
  "results": [
    {
      "view": "memory",
      "lang": "en",
      "theme": "light",
      "width": 1100,
      "errors": [],
      "consoleErrors": [],
      "overflow": false,
      "a11y": [
        {
          "id": "color-contrast",
          "impact": "serious",
          "nodes": [
            {
              "target": [
                ".text-muted\\/60"
              ],
              "summary": "Fix any of the following:\n  Element has insufficient color contrast of 2.73 (foreground color: #9e9ba3, background color: #ffffff, font size: 9.8pt (13px), font weight: normal). Expected contrast ratio of 4.5:1"
            }
          ]
        }
      ],
      "unknown": [],
      "image": "member-memory-round2-memory-en-light-1100.png"
    },
    {
      "view": "memory-populated",
      "lang": "en",
      "theme": "light",
      "width": 1100,
      "errors": [],
      "consoleErrors": [],
      "overflow": false,
      "a11y": [],
      "unknown": [],
      "image": "member-memory-round2-memory-populated-en-light-1100.png"
    },
    {
      "view": "crew",
      "lang": "en",
      "theme": "light",
      "width": 1280,
      "errors": [],
      "consoleErrors": [],
      "overflow": false,
      "a11y": [
        {
          "id": "color-contrast",
          "impact": "serious",
          "nodes": [
            {
              "target": [
                ".gap-1"
              ],
              "summary": "Fix any of the following:\n  Element has insufficient color contrast of 4.01 (foreground color: #008543, background color: #e0f0e8, font size: 9.8pt (13px), font weight: normal). Expected contrast ratio of 4.5:1"
            },
            {
              "target": [
                "div[aria-label=\"Edit agent reviewer\"] > .grid-cols-2.gap-x-3.border-t > .gap-2.items-center.min-w-0:nth-child(2) > .min-w-0 > .pr-0\\.5.truncate.text-\\[12px\\] > .ml-1\\.5.text-warn.text-\\[11px\\]"
              ],
              "summary": "Fix any of the following:\n  Element has insufficient color contrast of 3.39 (foreground color: #a38a00, background color: #ffffff, font size: 8.3pt (11px), font weight: normal). Expected contrast ratio of 4.5:1"
            },
            {
              "target": [
                "div[aria-label=\"Edit agent legacy\"] > .grid-cols-2.gap-x-3.border-t > .gap-2.items-center.min-w-0:nth-child(2) > .min-w-0 > .pr-0\\.5.truncate.text-\\[12px\\] > .ml-1\\.5.text-warn.text-\\[11px\\]"
              ],
              "summary": "Fix any of the following:\n  Element has insufficient color contrast of 3.39 (foreground color: #a38a00, background color: #ffffff, font size: 8.3pt (11px), font weight: normal). Expected contrast ratio of 4.5:1"
            }
          ]
        }
      ],
      "unknown": [],
      "image": "member-memory-round2-crew-en-light-1280.png"
    },
    {
      "view": "members",
      "lang": "en",
      "theme": "light",
      "width": 1440,
      "errors": [],
      "consoleErrors": [],
      "overflow": false,
      "a11y": [
        {
          "id": "aria-required-parent",
          "impact": "critical",
          "nodes": [
            {
              "target": [
                ".max-w-\\[240px\\]"
              ],
              "summary": "Fix any of the following:\n  Required ARIA parent role not present: tablist"
            },
            {
              "target": [
                "div[aria-label=\"Artifacts\"]"
              ],
              "summary": "Fix any of the following:\n  Required ARIA parent role not present: tablist"
            },
            {
              "target": [
                "div[aria-label=\"Files\"]"
              ],
              "summary": "Fix any of the following:\n  Required ARIA parent role not present: tablist"
            }
          ]
        }
      ],
      "unknown": [
        "/api/config/stt",
        "/api/dashboard/config",
        "/api/agents/sync",
        "/api/chat/slots/member-legacy"
      ],
      "image": "member-memory-round2-members-en-light-1440.png"
    }
  ],
  "head": "70f500314120cec0d13feead61574aa14deaa4e9",
  "base": "f20a4b6eed65ff9bdb942498ffc754368cc6cd4b",
  "baseline_note": "Unchanged shared contrast and SidePanel tab-parent findings remain. No page errors, console errors or horizontal overflow were observed. The populated memory surface has zero Axe findings. The unchanged Chinese dark 390px attachment is retained from the prior evidence record, not recaptured."
}

@bolichen97

bolichen97 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor Author

fixed

  • Keep raw named-store writes behind the ordinary sandbox (span=bb39e3c513a0)

Fixed in 70f5003. The existing ordinary Linux/macOS sandbox exposes memory_stores/ read-only, with an empty root prepared only when required by its mount. Cross-member reads remain allowed. Built-in mutations run in the Gateway. Global V1 paths and existing named-V1 root links retain their behavior. No member-only hidden view, ancestry proof or platform admission rule was added. Scoped sandbox/store tests passed; the spec states sandbox-off code and writable aliases remain outside this guard.

@bolichen97

bolichen97 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor Author

fixed

  • One destination for editing a legacy member (span=819e2b863866)

Fixed in 70f5003. The duplicate legacy-state crew-manager CTA is removed. MembersPage keeps its single existing edit destination. The PR body has a fresh actual-component capture of the legacy state, and the owning test checks this navigation.

@bolichen97

bolichen97 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor Author

fixed

  • Legacy memory text explains the state without promising a setup action (span=69de9e0fe5d5)

Fixed in 70f5003. The V1 state uses an informational explanation and its normal member edit link, instead of a memory-setup CTA leading to a screen with no such action. Explicit creation owns new V2 initialization under the approved development-stage contract; the existing-member opt-in is not reintroduced. Updated tests and fresh MembersPage/crew-manager captures cover the destination.

@bolichen97

bolichen97 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor Author

fixed

  • Use member memory in visible status copy (span=d68721d69975)

Fixed in 70f5003. The status reads “Member memory · V2” and the ownership helper reads “Member memory V2.” The pseudo-locale was regenerated and affected tests, i18n checks and fresh rendered evidence pass.

@bolichen97

bolichen97 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor Author

needs-a-decision

  • Real-provider verification remains an explicit limitation (span=3e762aa998c4)

The task author prohibited changing or restarting a serving Gateway and reading real credentials to validate the design. Tests used isolated synthetic homes/providers. The exact Linux projected-MCP workflow run still needs its new-head CI verdict; the Windows run timed out, and neither substitutes for a real kiro-cli member-create/chat/write/recall/resume run. Maintainers: will you supply that run in an owned test environment, or explicitly decide whether the documented native-provider verification gap is acceptable? No real-provider success or waiver is claimed.

@bolichen97

Copy link
Copy Markdown
Contributor Author

needs-a-decision

  • Authority and independent security review (span=c570443013e5)

Cross-member confidentiality is intentionally withdrawn by the task owner's explicit instruction, recorded at #11780 (comment). This is an attributed user decision, not a claim of maintainer approval. Ordinary authentication, credentials, owner/application permissions, host sandbox and enterprise boundaries remain independently required. Security Scope run35348132204 refused this exact head at its1MB input cap and produced no verdict. Maintainers: will you confirm the contract's authority and provide the prescribed human security review or other approved review path for this single logical PR? No agent override or cap change is proposed.

@bolichen97

Copy link
Copy Markdown
Contributor Author

needs-a-decision

  • Unreleased format as the release baseline (span=e1e06f357262)

The task explicitly replaces the unreleased V2 format without old-V2 migration, compatibility, retirement repair or a version rollback framework. It also explicitly retains routine consistent backup/restore and prohibits deletion of real data; those constraints are implemented. Maintainers: will you accept this format as the release baseline before a release includes it? The feature PR does not edit published CHANGELOG history or manufacture a release decision.

@bolichen97

Copy link
Copy Markdown
Contributor Author

needs-a-decision

  • Recorded product-shape decision (span=261763d7cb28)

Items1–4 and10 implement the task owner's explicit replacement contract, documented at #11780 (comment). Reintroducing the confidentiality proof chain or in-place legacy upgrade would contradict that instruction. No accepted base RFC was found, and the user decision is not represented as a maintainer ruling. Maintainer: will you record acceptance through the repository's required RFC or human-review decision path? The agent will not issue an override.

@bolichen97

Copy link
Copy Markdown
Contributor Author

needs-a-decision

  • Repository approval remains a human gate (span=fc47585d9d1d)

The removed CI canaries asserted the guarantee that the task owner explicitly withdrew. Ordinary host, authentication, credential, application, governance and audit protections remain covered; the removal does not authorize weakening those boundaries. Maintainer: will you approve the product-shape decision through the required base-RFC or maintainer ruling for this head? No passing First Principles verdict, self-approval or agent-issued override is claimed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants