Repository navigation
feat: add memcode TUI harness with verified native restore - #6515
Conversation
🏆 Review leaderboardOct 3–10, 2026 · UTC
Ranked by distinct external PRs reviewed, then review rounds, then PR comments. Self-activity and bot activity are excluded. Show 6 more reviewers
|
|
Full evidence report for memcode TUI: native restore blocks registrationmemcode is not registered or tested inside AO. The official Linux x86-64 This is a real ReproduceUse an independently installed official memcode v0.38.1, Python 3, Git, and python3 test/harness/memcode_conformance.py \
--binary /absolute/path/to/memcode \
--report "$HOME/.ao/audits/memcode-restore-attempt-001" \
--screenshots
When sharing a host, use a lock without passing its descriptor to detached flock --close "$HOME/.ao/audits/compute.lock" \
python3 test/harness/memcode_conformance.py \
--binary /absolute/path/to/memcode \
--report "$HOME/.ao/audits/memcode-restore-attempt-002"The credential-free fixture tests do not need an installed memcode: PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover \
-s test/harness -p 'test_memcode_conformance.py'Pinned source and failure boundary
The archive matches the release's published checksums. Source inspection of official v0.38.0, v0.37.0, v0.36.0, v0.31.0, v0.29.0, and Evidence and limitsThese separate attempts ran on the authorized VPS. Original reports and captures
The slash-command control saved Cancellation was narrower: the active turn stopped, but the resumed agent later Integration decisionA fresh TUI followed by Other future integration gates remain:
|
|
memcode is integrated as TUI-only through supported initialized native /resume with exact identity/history witnesses, exclusive input and owned rollback. All lifecycle gates passed: 24 PASS / 1 auth BLOCKED / 1 catalog FAIL / 2 catalog NOT_RUN; overall diagnostic FAIL. Ask-mode ordinary Send refusal and changed selection, executing-shell Escape (593ms reap, native ready921ms, AO idle5081ms), and active-shell AO Kill (89ms reap) passed with32-second delayed-write/control-isolation checks. No Chat/handoff or model override support. Detailed revision-pinned recovery report · evidence HEAD Complete current evidence-head GitHub CI: 24/24 SUCCESS at |
|
Complete current evidence-head GitHub CI: 24/24 SUCCESS at Revision-pinned report and real AO Electron screenshots. Both harness audits remain diagnostic FAIL for reported auth/catalog gaps, with all functional lifecycle gates passing. Final cleanup also stopped two exact retained AO auth-workspace lazy PTY hosts and their two descendants; no credential data read. No full VPS suite/race pass, merge or release. |
|
Harness-specific reports, JSON receipts, screenshots and provenance now live on this integration PR branch, rather than the skill PR #6509. Evidence index with embedded screenshots and JSON links. Historical successes, failures and scope limitations remain as recorded. Moving these files does not rerun native/AO testing or upgrade any verdict. This is evidence relocation only. Existing tested source/native hashes and failures are preserved; the documentation commit is not a fresh runtime pass. Applicable checks run in PR CI. |
|
Canonical main conflicts reconciled at Validation is PR CI only; current-head checks are pending until GitHub reports them. This merge does not constitute a new native/AO run or promote historical fresh/restore/provider-role proof. Harness evidence stays on this integration PR; PR6509 remains reusable guidance and linked summaries. |
|
Canonical main conflicts reconciled at Validation is PR CI only; current-head checks are pending until GitHub reports them. This merge does not constitute a new native/AO run or promote historical fresh/restore/provider-role proof. Harness evidence stays on this integration PR; PR6509 remains reusable guidance and linked summaries. |
|
Canonical main conflicts reconciled at Validation is PR CI only; current-head checks are pending until GitHub reports them. This merge does not constitute a new native/AO run or promote historical fresh/restore/provider-role proof. Harness evidence stays on this integration PR; PR6509 remains reusable guidance and linked summaries. |
|
Memcode actual registered AO audit evidence is owned by this integration PR at |
|
Canonical main and the green shared ACP replay CI budget reconciled at The shared test-only fix PR6617 had21 green applicable checks; this integration head still needs its own exact-head CI. The full20543-frame replay burst and exact-once assertions remain unchanged. No routine local suites ran. This merge does not constitute a new native/AO run or promote historical fresh/restore/provider-role proof. Harness evidence stays on this integration PR; PR6509 remains reusable guidance and linked summaries. |
Prasad-D-Ware
left a comment
There was a problem hiding this comment.
Thanks for this. memcode support with verified native restore is a big addition. I'm requesting changes for the first five inline comments below, which are blocking: they can destroy a user's live session or make memcode sessions impossible to launch or restore.
startup_health.go:57: a live session is destroyed on daemon restart if the start hook never bound the native identity.memcode.go:94: the advertisedmodelconfig field is always rejected, which breaks every launch/restore when it's set.hooks.go:223: prompts over 8 KiB with whitespace after the last paragraph break before 8192 bytes fail to launch.manager.go:3302: interactive-native restore has no fresh fallback when there's no native history or identity.restore.go:60: a whole-file hash ofmessages.jsontreats harmless rewrites (e.g.saved_at) as tampering and rolls back a good restore.
The remaining comments (panic: detection scope, auth exit-code handling, signal coverage, the hardcoded harness check in the shared observer, and the duplicated frontend chip) are non-blocking but worth addressing.
Prasad-D-Ware
left a comment
There was a problem hiding this comment.
Follow-up pass on the same head (612f0d1bf). There are no new commits since my earlier review, so all ten earlier threads are still open and unchanged, including the five blockers. My CHANGES_REQUESTED still stands.
Status changes
- CI hasn't run on this head. GitHub reports the PR as
CONFLICTINGwithmain, and no checks are attached to612f0d1bf. That includes the newharness-fixtures,harness-proof-build, andmemcode-released-roleworkflows. Please rebase or mergemainso CI runs.mainnow has0197_detach_split_orchestrator_conversations.sql, and theshippedMigrationsledger will conflict next to your202entry. - Local results on the PR head. These pass:
go testforadapters/agent/{memcode,registry,activitydispatch},observe/activity,service/{agentauth,systeminstall},cli(-run 'Hook|Memcode'),session_managerandstorage/sqlite(-run 'Memcode|NativeRestore|Interactive|Migration'), plustest/harness/test_memcode_*.py(10 tests).go vetis clean on the memcode and session_manager packages. None of these tests cover the two new findings below.
New findings (inline):
cli/hooks.go:600: [Blocking] after a native restore, AO stops tracking the session's native identity.memcode/hooks.go:184: memcode's session history in the workspace isn't gitignored (non-blocking; please confirm what memcode does upstream).
a4ea22c to
67d8ba4
Compare
|
Published, incomplete qualification — AO UI evidence BLOCKED; not merge-ready. Head Publication report · All ordered screenshot checkpoints Every applicable latest UI checkpoint remains NOT_RUN because this stage had no genuine isolated Electron dependencies and insufficient disk preserving512MiB. API/native receipts are auxiliary, never screenshot substitutes. No image was fabricated. Exact publication-head CI is being checked separately below; old green heads do not qualify edited/merged source. No routine VPS tests, lint, typecheck, gofmt or CI emulator ran. Linux/provider evidence does not establish other OS/provider coverage. Original failures/profiles/logs remain intact privately. No skill6509 writes, production changes, merge, release or deployment. Exact-head CI (2026-10-15T07:12:32.952599+00:00): complete at |
Prasad-D-Ware
left a comment
There was a problem hiding this comment.
Requesting changes for four blockers, each with an inline comment:
- The selected memcode model is dropped on launches that have no task prompt.
- Model confirmation uses a substring match and can pass on the wrong model.
- Sessions that share a workspace overwrite each other's
context-chunk-Nhooks in the shared.memcode/hooks.json. - The 2s hook timeout is too short for the session-start identity POST, which risks unverified identity and a failed restore.
The other inline comments are non-blocking.
Also non-blocking (not part of the diff, so no inline comment): session_manager/manager.go:3293 restore copies rec.Metadata.Model into agentConfig.Model without the memcode catalog filter that effectiveAgentConfig applies at spawn. If a record saved a model memcode doesn't support (e.g. claude-opus-4-1 from another harness), validateModel rejects it in GetLaunchCommand/PrepareNativeRestore and every restore of that session fails. It could fall back to the TUI's own selection instead.
|
Addressed and resolved all nine open review threads in e22e1bc (implementation 20dbf27), with a fix explanation on each thread. Also fixed the additional review-body finding: restore now ignores unsupported saved memcode models instead of rejecting the session, with regression coverage for both unsupported and valid models. Merged current main and resolved conflicts. All 24 CI checks pass on e22e1bc, including full backend race suites, frontend validation, platform CLI checks, lint and generated-contract drift checks. The updated PR description records local validation limits and the fixed hook-slot startup cost. The previous native/provider/UI qualification remains incomplete, so the PR remains a draft. |
Prasad-D-Ware
left a comment
There was a problem hiding this comment.
Re-reviewed against 20dbf2785 (head e22e1bcae). All four blockers from my earlier review are fixed:
- Promptless model selection: spawn, fresh restore, and native restore now always go through
deliverAfterStartPrompt. An empty prompt is never submitted as a user turn. - Model confirmation: it now compares the full model token from the newest
model →line in the styled current viewport, and fails closed when no rendered output is available. - Shared
hooks.json: the 64 stable slots no longer depend on any session's chunk count. Each slot reads its own session's atomicinstructions.json, and unused slots emit nothing. - Hook timeout: raised to 30s.
The non-blocking items are also addressed: the launch-env endpoint check, removing the synchronous catalog probe, MEMCODE_AUTO_UPDATE=off, the generic catalogSchemaVersions, moving to hooksjson.Manager with flat events and uninstall, dropping the no-op post_tool_use hook, and dropping unsupported saved models on restore. All 24 CI checks pass.
I've left three small non-blocking notes inline.
This approval covers the code changes only. The PR is still a draft, and per the author's own note the native, provider, and UI qualification is still incomplete.
fd83c6f to
81b023b
Compare
|
Post-merge qualification gap: authenticated Memcode 0.46.0 and actual Electron checks remain unrun. Merged source 9b81590 has the same tree as reviewed head ad0c14c. All 24 exact-head checks passed (CI checks). The older native-only 0.38.1 receipt does not qualify this source/version. Remaining live scenarios:
Prerequisites: An owner-authenticated Memcode 0.46.0 profile or authorized test host is still needed. No credentials or profile data should be posted. On this Windows host, existing Python 3.12.8 works when explicitly selected, but the pinned native dependency rebuild fails with “Could not find any Visual Studio installation to use.” Compatible Visual C++ build tools and Windows SDK, or another supported buildable host, are required. Completed non-auth checks: isolated npm ci and source runtime builds; Electron 44.7.0 executes in Node mode (ABI149). No AO window or provider task was run. Targeted source/CI inspection identified no demonstrated urgent schema/startup or shared-runtime defect. Authenticated native/Electron behavior remains unqualified. No code changes, reopen/revert, or PR state actions were taken. |








Code changes: +1439 -72
Tests: +1647 -3
Others: +271 -3
Current-head CI recovery (2026-10-18)
Current head:
ad0c14c60a3ee4b687704536974bf952ead8df23, based on main6f299014062c392b82b820b23dc08affcaaff04f. Fixed the sole CI lint failure at the preceding head by moving the existingCatalogFingerprintdoc comment back immediately above the exported function. No behavior changed and no lint checks were excluded.Full pinned
golangci-lint v2.13.2ruleset passed locally with 0 issues on an LF source export targeting Linux (GOOS=linux,CGO_ENABLED=0). Build/vet and focused spawn/restore regressions passed before this comment-only change; complete adapter suites passed for the endpoint helper change. All 24/24 CI checks passed on exact headad0c14c60a3ee4b687704536974bf952ead8df23, including full backend race suites, aggregate Go gate, frontend validation, platform CLI/container checks, lint, cloud tests and API/sqlc drift. Completed exact-head Go workflow. AO exact-head review run3e919f53-cc84-4e45-9298-0fb1f89a8ea9approved with no further findings; its provider POST returned HTTP 401, so it is an internal AO approval. GitHub separately reports APPROVED, MERGEABLE and CLEAN; the PR is still draft because native/UI qualification is incomplete. Final local native auth preflight still reports not authenticated. Earlier head-specific results below are historical.PR remains draft and is not merge-ready: current native auth reports not authenticated, and current-head registered-AO native lifecycle plus actual Electron evidence are still missing. The exact prerequisites and proof gaps are recorded below. Do not equate CI or internal AO approval with native/UI qualification. No merge is being performed. One binary asset has no line count.
Spawn endpoint review follow-up (2026-10-18)
Current head:
89bccecfdcd14207339025196bcda878693ddf62, based on main6f299014062c392b82b820b23dc08affcaaff04f. Fresh Memcode spawns now clear inherited project/role model defaults when any recognized custom endpoint source is present. Endpoint detection runs after the workspace and effective launch environment are available and before hooks or launch validation. Explicit per-spawn model overrides remain errors for custom endpoints; rejection happens before runtime creation. Both adapter launch config and persisted model metadata use the cleared choice.The spawn regression exercises real Memcode hook installation and model validation for project environment, daemon environment, global
.env, workspace endpoints, no-endpoint controls, and malformed configuration. It covers base project defaults, role defaults, and explicit overrides. Build/vet and focused spawn, startup/native restore, saved model/effort regressions passed. Complete adapter suites passed for the preceding endpoint helper change. AO re-review approved exact head89bccecfdwith no further required changes; the provider review POST returned HTTP 401, so that AO approval was not published to GitHub. GitHub separately reports its existing review decision as APPROVED. Exact-head CI is running. Previous-head CI sections are historical and do not qualify this head.The full Windows backend run at rebased head
81b023be8completed with platform/environment failures (shell, modes, ACLs, symlink privilege) and a session-manager timeout. It is not a local full-suite pass. Linux race validation remains unavailable locally with CGO disabled; frontend dependencies are absent. Supported full suites are being verified in remote CI. Native/UI qualification remains incomplete; PR stays draft and no merge is being performed. Neither endpoint finding has a provider thread because the review POSTs returned HTTP 401. Binary assets have no line count.Current-host qualification preflight (2026-10-18): installed Memcode
0.46.0reports not authenticated; this checkout has no frontend dependencies. The historical native-only0.38.1receipt and NOT_RUN Electron checkpoint list do not qualify this head. Missing current-head proof: registered-AO fresh/restored private instructions with project/user-hook preservation and exact conversation history/identity, executing-turn cancel/active Kill isolation with no late effects, and actual Electron harness/model/task/follow-up/archive/restore/Kanban/reconnect checkpoints. Completion requires an authenticated authorized native profile on a qualification host. No secrets should be shared in chat. Keep draft; not merge-ready, even if CI passes.Restore endpoint review follow-up (2026-10-18)
Follow-up head:
e534089a5af93dd233439419cfa3d10d85ae82f4, rebased onto main6f299014062c392b82b820b23dc08affcaaff04f. Restore now shares Memcode's native endpoint detection with model validation: project launch environment, daemon environment, global.env, and workspace.memcode/config.json. A saved AO model is cleared for a custom endpoint so the TUI can use its own choice. Malformed configuration errors still surface before launch.The manager regression invokes the real adapter model validator at the launch boundary. It covers all four endpoint sources, valid
opuswithout endpoints, unsupported saved models, an empty endpoint list, and malformed configuration. Build and vet, complete memcode/hooksjson/activitydispatch suites, and focused startup/native restore/saved model/effort regressions passed locally. New-head CI is pending. The earlier rebased head reached 17 successful CI checks before this follow-up; its results do not qualify the new head.The full Windows backend attempt at rebased head 81b023b completed with platform/environment failures and a session-manager timeout; Linux race execution is unavailable locally with CGO disabled, and frontend dependencies are absent. Those checks are being verified in CI. Native/UI qualification remains incomplete; the PR remains draft and is not being merged. The AO review POST returned HTTP 401, so there is no provider inline thread to resolve for this finding. Binary assets have no line count.
Rebase onto current main (2026-10-18)
Rebased onto
6f299014062c392b82b820b23dc08affcaaff04f; rebased head is81b023be8fe7e77b4d5cc46afc57fdde09397ac5. Resolved overlaps while preserving main's harness support, asynchronous catalog checks, restore effort/identity handling, model visibility, and migration ledger. GitHub reports the rebased head mergeable. All previous review fixes remain in place.Validation on this head: backend build and vet passed; complete memcode, hooksjson and activitydispatch suites passed; memcode/catalog and Aider grouping regressions, focused startup/native restore/saved model/effort checks, and migration regressions passed. Full Windows backend suite completed with environment-dependent failures and a session-manager timeout (Unix shell, file modes, credential-home/ACL assumptions); the caller-deadline regression also fails locally. Linux race coverage is unavailable locally (
CGO_ENABLED=0); frontend dependencies are absent. New-head CI is pending and will validate the supported runner suites. Earlier successful CI sections below refer to their recorded historical heads, not this rebased head.The PR remains draft pending native/UI qualification; rebasing does not complete those gates. Verified net GitHub change counts remain unchanged; the binary asset has no line count.
Additional review follow-up, 2026-10-17:
fd83c6faa340de0a95db02d1a3f6974ac9acbff4. Addressed and resolved the two additional comments found during the final thread audit. Resolve the startup command before readiness polling, returning immediately when both command and task prompt are empty. During restore, clear the saved AO model when the effective project launch environment has a custom endpoint; native hosted catalog choices still persist and explicit custom-endpoint spawn overrides remain rejected. Added a real-adapter no-readiness regression and extended saved-model restore coverage. All review threads are resolved.Focused session-manager regressions, full memcode/hooksjson suites, backend build and vet pass locally. The full affected session-manager suite completed with the known Windows home-path, ACL and installed-CLI failures; the new and related focused regressions pass. All 24/24 CI checks passed on this exact head, including the full backend race suites and aggregate gate, frontend validation, platform CLI checks, lint and generated-contract drift checks. Completed checks. Runner scheduling delayed the final jobs; no failed checks, reruns or additional recovery commits were required. Earlier head-specific CI results below remain historical. Native/provider/UI qualification remains incomplete and the PR stays draft.
Hook-performance follow-up, 2026-10-17:
503848623b1155f40b1531e47db69071ec6ec250. Addressed and resolved the new hook-process cost comment. Pin a private per-launch chunk count so unused slots return before opening or decoding the instruction snapshot. Active slots reject stale counts; older launches retain their decode fallback. Shared hooks still use 64 stable slots, and each slot still starts a process.Added regressions and
BenchmarkInstructionHookSlotswith legacy/launch-count controls. On this shared Windows i7-12700H host, the 64-slot in-process loop measured 2.29 ms to 0.148 ms (one chunk), and 15.37 ms to 1.20 ms (four chunks). Synthetic CLI-only process loops were around 2.1 seconds; initial PowerShell-plus-CLI loops were 29-40 seconds under concurrent validation load. After local test/lint load ended, a repeat measured 2.253 s before / 2.198 s after for 64 CLI starts and 12.574 s before / 12.971 s after with PowerShell (one sample per build). Process/shell startup dominates; these samples establish no end-to-end speedup and do not complete the missing native/UI qualification.Backend build/vet, full memcode/hooksjson suites and focused CLI regressions pass locally. Full backend Windows validation encounters the previously documented environment failures; Linux-target local lint encounters checkout-wide CRLF/goimports differences. All 24/24 CI checks passed on this exact head, including full backend race suites and aggregate gate, frontend validation, platform CLI checks, lint and generated-contract drift checks. Completed checks. Earlier head-specific validation below remains historical. The PR remains draft.
Review follow-up, 2026-10-17:
e22e1bcae7fa5aea9f09b02ffcd55d5209924d28. Addressed and resolved all nine open inline review threads and fixed the additional saved-model restore comment. Merge current main (acf34d529) and reconcile the harness imports, restore configuration and migration ledger; GitHub reports the head mergeable.Model selection runs on promptless launches and restores, uses an exact model token and current styled viewport confirmation, rejects project-env custom endpoint overrides, and drops unsupported inherited saved models. Memcode context uses a private atomic snapshot and 64 fixed workspace hook slots, respecting the upstream 8 KiB per-hook limit and avoiding cross-session chunk-count overwrites; unused slots still incur a hook process start. Reuse hooksjson.Manager for native flat arrays, 30-second timeouts, prefix-safe reconciliation and uninstall. Remove the unused post-tool-use hook and synchronous catalog cache check; disable self-update during binary identity probes and use generic catalog schema versions.
Validation: backend build and vet pass locally. Full memcode, hooksjson and activitydispatch suites pass, as do focused modelcatalog, agent-service, CLI, session-manager and migration regressions. Broader Windows suites encounter permissions, home-path and installed-CLI failures; local race tests are unavailable because CGO is disabled and no C compiler is installed. Local Linux-target lint reports checkout-wide CRLF/goimports differences. Docker, Linux/macOS runners and frontend dependencies are unavailable locally. All 24/24 CI checks passed on this exact head, including backend race suites and aggregate gate, frontend validation and renderer smoke, Linux/macOS/Windows CLI E2E, Windows workspace checks, lint, API/sqlc drift, cloud build/test, release feeds and secret scanning. Completed checks.
This review follow-up does not complete the previously missing native/provider/UI qualification. The PR remains a draft. The earlier publication/evidence history below is preserved.
Binary assets: 1 (excluded from line counts).
Current publication, 2026-10-15:
a7e5fcdba0bc5f5ba2f63f0ecae5ccfc74e521c3. Incomplete qualification; AO UI evidence BLOCKED; not merge-ready. Main conflicts reconciled. Exact-head CI is recorded below; no local routine suites.Published the composer panic-readiness fix, unrun regression cases, corrected model/chunk documentation and main reconciliation. A fresh native-only0.38.1 control observed initial/restored private/project/user-hook effects; this does not resolve the original registered-AO restored-token failure. Current AO/UI verification remains incomplete.
Current report and scoped evidence. Historical runtime/source attribution is retained there.
Exact-head CI (2026-10-15T07:12:32.952599+00:00): complete at
a7e5fcdba0bc5f5ba2f63f0ecae5ccfc74e521c3— 24 SUCCESS (24 reported; 24 expected including the merged Go aggregate gate). Current checks. MergeabilityMERGEABLE, merge stateBLOCKED; draft handoff. CI does not qualify missing native/UI/provider/OS gates. Initial cloud job failed with temporary cleanup-script text file busy; implementation/test bytes match canonical main. Original failure preserved. One affected-job rerun passed on the unchanged head. Canonical main subsequently advanced to48c4ef5e with only two non-overlapping preview-process files; GitHub reports this head mergeable. These completed checks belong to the stated publication head, not a newly rebuilt merge with that later base.Preserved earlier description (historical status, validation and evidence snapshots)
Binary assets: 1 (memcode logo).
Summary
Validation
Known limitation
Native restore still needs an end-to-end check that a restored session consumes a subsequent new task. Keep this PR in draft until that behavior is verified.