Skip to content

Import portable experiment packages with owned dependencies and historical evidence - #54

Merged
jay-m-dev merged 8 commits into
developfrom
feat/70-import-experiment-packages
Nov 10, 2026
Merged

jay-m-dev merged 8 commits into
developfrom
feat/70-import-experiment-packages

Conversation

@jay-m-dev

@jay-m-dev jay-m-dev commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Implements EpistasisLab/ASAREE_Issues#70.

ASAREE could export published experiment packages but could not restore them. This adds owned upload, validation/preflight, explicit confirmation and staged activation in the API and UI. Each import creates a fresh editable experiment and owned dependencies. Source publications, sampling evidence, optional historical attempts and artifacts remain immutable evidence, separate from local execution. Local credentials and connections must be configured and acknowledged before normal publication and execution.

Imports preserve exact dataset/split files, design cells and planned replicates, factor alternatives, complete Skills, knowledge bundles/documents and typed measurement references. Typed identities are remapped durably; opaque experimental values retain their content. The workflow uses the existing ASAREE/Motoro PostgreSQL databases and managed filesystem storage, with cancellation, retry, expiry, compensation and interrupted-activation recovery. Packaged scripts/tools are never executed.

The package documentation contains the component coverage matrix, API, lifecycle, limits and compatibility policy. AGENTS.md and CONTRIBUTING.md require local CI checks before pushing.

Independent review fixes since reviewed head adf2e2a4dc6725e9497389e3fd79930b2560b3d9:

  • P1, knowledge source boundary: canonical UUIDs and MCP requirement filename/ID/knowledge-directory agreement are checked before confirmation and again during reconstruction. Metadata-derived dataset, Skill and knowledge source paths are checked for resolved containment, including individual knowledge files immediately before copying. Correctly hashed malicious packages are rejected; source sentinels outside the payload cannot be copied.
  • P2, nested Skill fidelity: only the exact root SKILL.md entrypoint is excluded from SkillFile restoration. Nested references/SKILL.md resources retain exact bytes and v2 encoding/order. PostgreSQL export/import/re-export cases cover UTF-8 and binary nested resources across independent owners, both dataset modes and optional results. A v1 nested binary resource retains bytes with explicit unknown source encoding/order.
  • P2, expiry relay isolation: never-validated payloads are discarded without parsing their untrusted inventories. Each cleanup uses a separate PostgreSQL transaction; compensation/enqueue failures are isolated by request. The mixed-request PostgreSQL regression includes a malformed expired upload, successful staged-resource compensation, an injected compensation failure after product deletes, and a valid pending import that still reaches preflight. The failed transaction rolls back and later cleanup succeeds. Existing crash/cancellation recovery tests remain intact.

Compatibility: exports remain schema 2; imports accept schemas 1 and 2, with no new migration. Both require canonical typed identities and consistent archive paths. Missing/unresolved legacy name-only dependencies remain diagnostics. V1 facts omitted by the original exporter remain unknown; they are not guessed.

Local validation, completed before pushing (native disposable PostgreSQL 16.2 + pgvector; bounded database waits and test-command timeouts):

  • Full backend regression suite: 2,116 passed, 3 skipped, 14 expensive statistical-validation cases deselected.
  • Focused archive suite: 44 passed; focused PostgreSQL import/lifecycle suites also passed before the full regression run.
  • Frontend: 652 tests passed, TypeScript passed, oxlint completed with 15 existing warnings.
  • Full Ruff, offline lockfile validation, focused import mypy and git diff --check passed. Full mypy reports the existing warn-only backlog of 697 errors in 59 files; the three changed import modules are type-clean.
  • Local Python is 3.14.4; required GitHub CI additionally verifies Python 3.12. Disposable local database processes stop after each run.

Final head: 803fb2b9ecf5eca2a99609b4dbe0cbeb554f97bb. Required GitHub checks: all passed on this exact head (run 42890649235): backend lint/tests, frontend types/lint/tests and change selection.

Remaining limits: historical evidence stays separate from current native execution projections; native Motoro step/resume history was not exported and cannot be restored. Configurable document/resource limits still apply (16 MiB by default). UI appearance has not been checked in a browser. No production databases, application credential files, paid provider calls, packaged script execution, merge or deployment were used.

Merged into develop with merge commit 31d36312ad2aeb7ccadb7decd841a8c0bc2b9417. Post-merge CI 42893074483 passed: 2,116 backend tests (3 skipped, 14 statistical cases deselected) and 652 frontend tests. Full CI mypy remains warn-only: 695 errors in 58 files under Python 3.12. The merge tree matches reviewed head 803fb2b. Ancestry is preserved. No production deployment or migration was performed.

Jay Moran added 8 commits November 9, 2026 20:18
Validate canonical MCP identities and requirement/directory agreement, and check resolved payload containment before reading or copying resources. Restore nested SKILL.md resources instead of treating them as root entrypoints. Discard never-validated payloads without parsing dependency inventories and isolate cleanup transactions and enqueue failures per request.

Add schema 1/2 archive regressions, PostgreSQL nested resource round trips, and mixed-request cleanup rollback/retry coverage. Verified full local backend and frontend CI suites before pushing.
@jay-m-dev
jay-m-dev marked this pull request as ready for review November 10, 2026 20:12
@jay-m-dev
jay-m-dev merged commit 31d3631 into develop Nov 10, 2026
3 checks passed
@jay-m-dev
jay-m-dev deleted the feat/70-import-experiment-packages branch November 10, 2026 20:13
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