Skip to content

Docker smoke checks code-linked memories over MCP - #827

Merged
zlareb1 merged 4 commits into
mainfrom
test/mcp-code-link-lifecycle
Nov 18, 2026
Merged

zlareb1 merged 4 commits into
mainfrom
test/mcp-code-link-lifecycle

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

Not required.

Why

The Docker smoke verifies compiler indexes and restart persistence. Code-linked memory integration tests exercise handlers in process, so they do not check a packaged server returning a lesson's changed state over MCP after its source is reindexed. Extend the existing smoke with that round trip.

Scope and risk

The existing Python fixture saves a lesson over MCP, waits for the link worker to mark it fresh, commits an expression change, and waits for the ingest and link workers to report the new commit and changed link. The lifecycle also waits for the scheduled Python compiler worker to publish that commit. Restart verification reads the changed link again, then deletes that smoke memory and checks its absence.

The installed environment template enables scheduled ingest. Before the first boot, the smoke explicitly sets LOOM_CODE_INGEST_ENABLED=false in its disposable environment so its initial seed and compiler checks finish before scheduled ingest starts. It then sets the same switch to true and recreates its existing server service. Scheduled compiler flags retain their existing installed values; this change does not disable them during the initial seed. Worker intervals, memory settling, product defaults, compiler checks and the 45-minute CI job timeout are unchanged. Each lifecycle invocation has one shared 1,020-second bound at the default worker intervals. Waiting for the normal Python compiler cadence can add about nine to ten minutes to CI; both architecture jobs must establish that the complete smoke fits its existing timeout. The status endpoint can return a cached repository head after the link has changed. The smoke polls until that endpoint also reports the exact edited commit, within the same lifecycle deadline. The other language fixtures retain their existing checks. A failed smoke still tears down its own Compose stack and volumes.

The installed smoke configuration uses single-user mode, a local embedder and the fake LLM. These assertions check transport, indexing, link states and persistence; they do not measure model quality or authenticated-client behavior.

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: none. The ingest switch is set only in the disposable smoke environment.
  • Rollback: reverting removes the added smoke checks; no deployed data or schema changes are involved.

Tests

  • Ruff 0.16.9 lint and format checks pass for both changed scripts.
  • The prose checker and git diff --check pass.
  • A focused extracted environment-updater check verifies the explicit false-to-true phase configuration and source ordering. Fifteen earlier tiny extracted-helper checks cover MCP response errors, saved-value and namespace checks, fresh and changed states, exact commit checks and source compilation. They do not start a server or run a native smoke.
  • Nine focused checks run the extracted status poller with inert MCP responses. The previous poller passes five and fails four; the corrected poller passes all nine. The checks cover transient cached heads, a permanently stale head reaching the existing deadline, and rejection of incorrect link commits, symbol paths and included lesson states.
  • The previous native amd64 run returned the fresh link, then failed when the status endpoint returned an older cached head immediately after the scheduled Python compiler applied the edit. This corrects the smoke observation; it does not increase timeouts or change the status cache.
  • No local server, database, Docker, browser or provider test ran. Full current-head PR CI passes, including both existing Docker Quickstart architecture jobs. The packaged checks pass the fresh link, committed source edit, exact changed commit, restart readback and exact-key deletion assertions.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (an agent wrote most of the diff): Codex; checked against the existing smoke, worker configuration, MCP contract and code-link integration test.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • make format-check, make lint, make typecheck and make test-unit pass in GitHub CI, including the integration and native image checks. Only the focused checks above ran locally.
  • Generated files are regenerated in this PR, not by hand: the SDK op tables, docs/reference/configuration.md and the docs/reference/ tables (python scripts/codegen/docs_reference.py), the reach manifest, schemas/schema.sql (make schema-dump) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py). Not applicable: no generated source changed.
  • A new migration is additive and numbered after the latest on main; no merged migration is edited. Not applicable.
  • A behaviour change to any file a plugin ships (hooks/, lib/, bin/, skills/, .mcp.json, the Codex plugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version. Not applicable.
  • The frontend builds (npm --prefix frontend run build) and its tests pass, if frontend/ changed. Not applicable.
  • Docs under docs/ describe the system as it now is, and this description names any operator steps and wire changes. No documentation source changed.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers; the history goes in this description (tests/unit/test_public_copy.py).
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

@zlareb1
zlareb1 merged commit 19c2b3e into main Nov 18, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant