From d20147300b68c2b838480944b2763a13ebe69b8d Mon Sep 17 00:00:00 2001 From: hongming Date: Sat, 23 May 2026 13:20:30 -0700 Subject: [PATCH 1/3] chore(workspace-server): #1735 remove unused Awareness namespace surface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop the entire `Awareness namespace` memory-routing plumbing. The feature was wired through migrations, models, the provisioner, and several handlers but was never enabled in any environment — the 2026-05-23 sweep against the Railway controlplane (project molecule-platform, prod env 59227671-…, staging env 639539ec-…) found zero `AWARENESS_*` env vars set, and the operator-host bootstrap files (`/etc/molecule-bootstrap/all-credentials.env`, `secrets.env`, `agent-secrets.env`) likewise had no awareness entries. The provisioner already only injected the env vars when both URL and namespace were non-empty (so workspace containers also never received them). Scope: - Drop `workspaces.awareness_namespace` column via new forward migration `20260523130000_drop_workspaces_awareness_namespace.up.sql` (mirrors the recent `drop_runtime_image_pins` shape; paired down migration restores migration 010 verbatim). - Drop `Workspace.AwarenessNamespace` from the model. - Drop `WorkspaceConfig.AwarenessURL` + `AwarenessNamespace` and the conditional env injection in `internal/provisioner/provisioner.go`. - Drop `workspaceAwarenessNamespace` + `loadAwarenessNamespace`, rename the one-line helper to `workspaceMemoryNamespace` (still produces the canonical `workspace:` string matching the v2 namespace resolver at `internal/memory/namespace/resolver.go:186`). - `seedInitialMemories` drops its `awarenessNamespace` parameter and computes the namespace inline — the parameter was always `workspace:` at every call site, so the value is a pure function of the workspace id. - Update three INSERT call sites (`workspace.go`, `org_import.go`) and the org-import root-memory seed in `org.go`. - Trim `awareness_namespace` from the create-handler response payload. - Remove ~22 awareness-specific test assertions and SQL-mock arg placeholders across `handlers_test.go`, `handlers_additional_test.go`, `workspace_test.go`, `workspace_provision_test.go`, `workspace_compute_test.go`, `workspace_budget_test.go`, `workspace_create_name_integration_test.go`, and `provisioner_test.go`. The `agent_memories.namespace` column (added by migration 017) is unaffected — seedInitialMemories continues to write `workspace:` into it, just computed inline now. Canvas-side cleanup (the `