Skip to content

Fix knowledge export authorization and durable artifact selection - #53

Merged
jay-m-dev merged 1 commit into
developfrom
fix/55-export-authorization-and-artifacts
Nov 10, 2026
Merged

jay-m-dev merged 1 commit into
developfrom
fix/55-export-authorization-and-artifacts

Conversation

@jay-m-dev

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

Copy link
Copy Markdown
Collaborator

An owned knowledge registration previously allowed a shared external tree to enter an experiment package, and artifact selection both dropped durable Script output directories and retained actual workspace scratch. Require an explicit operator grant for an exact external bundle root, check foreign/ownerless registration and grant overlaps before any content capture, and recognize workspace scratch by its structural location.

Application-owned upload/document roots retain their existing per-owner boundary. Isolated legacy external bundles remain supported through ASAREE_KNOWLEDGE_EXPORT_GRANTS; the grant is an operator assertion that all content under that exact root is authorized for the user, not a filesystem-ownership inference. Broad roots, overlap or missing/ambiguous evidence produce generic unresolved dependencies without foreign paths, identifiers, commands or bytes. The schema and existing package format are unchanged.

Preserve arbitrary user outputs/working, cache, scratch, __pycache__, .scratch, and results.preparing directories. Exclude actual root/dataset=/agent= workspace .scratch and reserved hidden preparation names. Document grant semantics and API/results-worker configuration.

Validation:

  • Red regression loop: 6 failures reproducing archive exfiltration in four cases, omitted real wired Script outputs, and included production workspace scratch.
  • Final focused backend suite: 70 passed, 1 disposable-PostgreSQL migration check skipped locally.
  • Changed-path ruff, narrow mypy for the two affected source files, and git diff --check passed.
  • Tests serialize actual _server archives, iterate supplied foreign registration rows, prove denied capture never starts, cover exact grants/legacy positives and ownerless/missing evidence, and execute a real wired Script plus Workspace.open/_scratch_dir fixtures.
  • No browser automation, containers, production services or paid calls used. PostgreSQL integration remains for CI.

References EpistasisLab/ASAREE_Issues#55.

Integration verification: PR CI 42754206793 and post-merge CI 42755013514 passed; 2,061 backend tests, 3 skipped. Frontend/statistical suites skipped by scope. Existing warn-only mypy backlog remains 693 errors in 57 files.

@jay-m-dev
jay-m-dev marked this pull request as ready for review November 10, 2026 04:18
@jay-m-dev
jay-m-dev merged commit 6139a63 into develop Nov 10, 2026
3 checks passed
@jay-m-dev
jay-m-dev deleted the fix/55-export-authorization-and-artifacts branch November 10, 2026 04:18
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