feat: embed native Harness assistant and verify live task model
This commit is contained in:
1 parent
9c508333bb
commit
96227eed2e
29 files changed
+11110
-582
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import json
|
||||
from dx_productivity.dsh.native_runtime import launch_environment, write_context
|
||||
from dx_productivity.dsh.snapshot import TaskSnapshot
|
||||
|
||||
|
||||
def test_context_publication_has_revision_and_no_unrelated_progress_fields(tmp_path):
|
||||
value = write_context(tmp_path, TaskSnapshot('t', 'paused', {'completed': 2, 'api_key': 'secret'}))
|
||||
assert value['revision']
|
||||
assert 'secret' not in json.dumps(value)
|
||||
assert json.loads((tmp_path / 'task-context.json').read_text(encoding='utf8')) == value
|
||||
|
||||
|
||||
def test_launch_does_not_inherit_unrelated_credentials_or_user_harness_home(tmp_path, monkeypatch):
|
||||
monkeypatch.setenv('OPENAI_API_KEY', 'unrelated-secret')
|
||||
monkeypatch.setenv('DSH_HOME', 'unrelated-home')
|
||||
env = launch_environment(tmp_path)
|
||||
assert 'OPENAI_API_KEY' not in env
|
||||
assert 'DSH_HOME' not in env
|
||||
assert env['DX_DSH_HOME'].startswith(str(tmp_path))
|
||||
Reference in new issue
Block a user