feat: enforce bound membership and native probe boundary
This commit is contained in:
1 parent
855af0bd12
commit
fbc7ddd037
6 files changed
+232
-76
No files matched your search
@@ -6,7 +6,8 @@ CAD, packaging, or modifying project files.
|
||||
## Public API
|
||||
|
||||
`TaskCenterService.task_context(task_id: str) -> ProjectTaskContext` returns a
|
||||
cached immutable context for UI refreshes. `TaskCenterService.refresh_bound_project(task_id:
|
||||
fresh immutable context for UI refreshes; only the per-task service facade is
|
||||
cached. `TaskCenterService.refresh_bound_project(task_id:
|
||||
str) -> ProjectTaskContext` rereads the task and its bound project from SQLite,
|
||||
without scanning a directory or attaching COM. A bound task must have one
|
||||
`primary_project_id` and exactly one project. Historical tasks without that
|
||||
@@ -35,13 +36,20 @@ versioned `request.json`/`evidence.json` files when an evidence root is given.
|
||||
It does not attach COM or launch CAD.
|
||||
|
||||
`PrivateDesktop` owns the Windows desktop handle and processes started with
|
||||
`STARTUPINFO.lpDesktop`; launch fails when no private desktop was created, so
|
||||
there is no input-desktop fallback. Cleanup terminates only processes created by
|
||||
the worker and closes the owned desktop handle.
|
||||
`STARTUPINFO.lpDesktop="winsta0\\<private>"`; launch uses pywin32
|
||||
`CreateProcess`, a Job Object with kill-on-close, and fails when no private
|
||||
desktop was created, so there is no input-desktop fallback. Cleanup terminates
|
||||
only processes created by the worker and closes the owned desktop handle.
|
||||
|
||||
`IsolatedDesktopWorker.read_only_probe(request, cad_probe, evidence_root=...)`
|
||||
is the usable native boundary: an injected native reader returns
|
||||
`CadIdentity(pid, project_path)`, which is checked against the request before
|
||||
`read_only_verified` evidence is published. The worker refuses unrelated CAD
|
||||
identity and write enablement. It remains opt-in and does not mutate CAD.
|
||||
|
||||
## Verification
|
||||
|
||||
- `tests/v1_1/test_project_context.py` and `test_isolated_desktop.py`: **6 passed**.
|
||||
- `tests/v1_1/test_project_context.py` and `test_isolated_desktop.py`: **11 passed**.
|
||||
- Existing target/quick-run checks (`test_service_target_integration.py`,
|
||||
`test_target_execution.py`): **8 passed**.
|
||||
- Python bytecode compilation passed for all changed backend modules.
|
||||
|
||||
Reference in new issue
Block a user