Categories:
Attempt 7
Back to durable goal · Attempt history
Why Attempt 6 was rejected
The user correctly identified that each package’s manifest.json,
content-addressed versions/ directory, and active/latest pointers were a
custom package manager rather than an MCP or Cordis standard. That mechanism
made reusable source look temporary, duplicated Cordis loader responsibilities,
and drove much of the worker-generation complexity. Green tests cannot justify
shipping the wrong extension model.
Decision review
Verdict: revise and proceed. The published DeepSeek Cordis packages provide the missing standard mechanisms directly:
@deepseek-ai/cordis-plugin-loaderowns runtime entries and lifecycle;@deepseek-ai/cordis-plugin-includepersists entries incordis.yamland transactionally refreshes them with rollback; and@deepseek-ai/cordis-plugin-hmrwatches normal modules, imports changed code before replacement, and restores the prior runtime when reload fails.
The strongest objection is that HMR is event-driven and failed source reloads are logged rather than returned to the file writer. MCP-driven updates must therefore retain prior bytes, wait for a correlated reload result, and restore the prior source on failure or timeout. Manual external edits retain Cordis HMR’s normal behavior and diagnostics.
Frozen plan
- Pin the exact released Loader, Include, HMR, Timer, and required peer dependencies through the project-owned npm lock.
- Replace package manifests and hash-named versions with normal ESM modules:
reusable modules under
projects/mcp_cordis/plugins/, disposable modules underout/mcp_cordis/plugins/. - Make
projects/mcp_cordis/cordis.yamlandout/mcp_cordis/cordis.yamlthe authoritative standard entry lists. - Mount the official Cordis Loader, two Include trees, Timer, and HMR in the stdio server. Keep the stable MCP gateway, workspace helpers, bounded process execution, and tool-registration effects as host services.
- Implement MCP define, update, start, stop, remove, and promotion as atomic source/config changes followed by Cordis lifecycle acknowledgement and rollback. Use Git for reusable history; do not create a second version database.
- Replace version-store tests with standard-config, restart, HMR rollback, manual-edit reload, and project/scratch promotion tests.
- Run the complete affected test/build/Buildifier packet, obtain a fresh independent review of the standard design, then rebase and deliver PR 32.
Boundaries
- Do not add an MCP Registry
server.jsonunless the server is actually being prepared for registry publication; it describes the whole server, not its internal Cordis entries. - Do not retain committed hash-named source snapshots or custom package manifests.
- Keep reusable source and config in the project and all disposable modules,
atomic-write scratch, state, and logs under
out/mcp_cordis. - Keep one normal module per package and one stable entry id per scope.
- Preserve PR 24’s scoped
projects/agentsimport and the accepted process execution corrections that remain relevant to the in-process host.
Acceptance status
Implementation and working-tree validation are complete; exact post-rebase
delivery gates remain open. The final architecture adds four narrow host
guards around the official Cordis services: synchronous activation admission
to prevent a never-settling apply(), source-token HMR correlation, a private
stdio protocol stream, and Fiber/invocation-owned Linux process supervision.
The real stdio regression covers define, inspect, run, invoke, update, failed
update rollback, stop, remove, logging isolation, and restart recovery.
Bazel invocation 39711671-375a-413f-8a72-e6f9ff892bd3 passes all 11 affected
tests on the rebased implementation after the import-boundary review
corrections, including Buildifier and all three imported skill configurations.
Invocation 153467fd-e62d-4eab-b260-6754d17fe8e2 builds all 26 affected
targets. Those receipts bind implementation commit 0a93e487; the following
amendments change only this durable goal record, with proportional diff and
format validation required before publication. Fresh independent review
accepted durable-record commit c05bd45a with no actionable findings.
PR 32 was republished at the verified rebased head, its obsolete description
was replaced, and all three prior review threads were resolved.