adp-hypervisor 0.1.0.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. adp_hypervisor-0.1.0.dev0/.git +1 -0
  2. adp_hypervisor-0.1.0.dev0/.github/ISSUE_TEMPLATE/bug-report.yml +48 -0
  3. adp_hypervisor-0.1.0.dev0/.github/ISSUE_TEMPLATE/epic.yml +31 -0
  4. adp_hypervisor-0.1.0.dev0/.github/ISSUE_TEMPLATE/feature-request.yml +40 -0
  5. adp_hypervisor-0.1.0.dev0/.github/ISSUE_TEMPLATE/improvement.yml +23 -0
  6. adp_hypervisor-0.1.0.dev0/.github/ISSUE_TEMPLATE/subtask.yml +21 -0
  7. adp_hypervisor-0.1.0.dev0/.github/PULL_REQUEST_TEMPLATE.md +35 -0
  8. adp_hypervisor-0.1.0.dev0/.github/workflows/ci.yml +108 -0
  9. adp_hypervisor-0.1.0.dev0/.gitignore +57 -0
  10. adp_hypervisor-0.1.0.dev0/AGENTS.md +30 -0
  11. adp_hypervisor-0.1.0.dev0/CLAUDE.md +1 -0
  12. adp_hypervisor-0.1.0.dev0/CONTRIBUTING.md +33 -0
  13. adp_hypervisor-0.1.0.dev0/GEMINI.md +1 -0
  14. adp_hypervisor-0.1.0.dev0/LICENSE +217 -0
  15. adp_hypervisor-0.1.0.dev0/NOTICE +2 -0
  16. adp_hypervisor-0.1.0.dev0/PKG-INFO +236 -0
  17. adp_hypervisor-0.1.0.dev0/README.md +204 -0
  18. adp_hypervisor-0.1.0.dev0/conf/logging_conf.yaml.template +52 -0
  19. adp_hypervisor-0.1.0.dev0/conf/physical.yaml.template +70 -0
  20. adp_hypervisor-0.1.0.dev0/conf/policy.yaml.template +42 -0
  21. adp_hypervisor-0.1.0.dev0/conf/semantic.yaml.template +80 -0
  22. adp_hypervisor-0.1.0.dev0/conf/users.yaml.template +38 -0
  23. adp_hypervisor-0.1.0.dev0/examples/README.md +330 -0
  24. adp_hypervisor-0.1.0.dev0/examples/conf/physical.yaml +59 -0
  25. adp_hypervisor-0.1.0.dev0/examples/conf/policy.yaml +57 -0
  26. adp_hypervisor-0.1.0.dev0/examples/conf/semantic.yaml +157 -0
  27. adp_hypervisor-0.1.0.dev0/examples/conf/users.yaml +26 -0
  28. adp_hypervisor-0.1.0.dev0/examples/docker-compose.yml +69 -0
  29. adp_hypervisor-0.1.0.dev0/examples/localfs/invoices/delivered/invoice-002.txt +16 -0
  30. adp_hypervisor-0.1.0.dev0/examples/localfs/invoices/delivered/invoice-004.txt +16 -0
  31. adp_hypervisor-0.1.0.dev0/examples/localfs/invoices/pending/invoice-005.txt +16 -0
  32. adp_hypervisor-0.1.0.dev0/examples/localfs/invoices/shipped/invoice-001.txt +16 -0
  33. adp_hypervisor-0.1.0.dev0/examples/localfs/invoices/shipped/invoice-003.txt +16 -0
  34. adp_hypervisor-0.1.0.dev0/examples/localfs/invoices/shipped/invoice-006.txt +16 -0
  35. adp_hypervisor-0.1.0.dev0/examples/mongodb/init/01-init.js +69 -0
  36. adp_hypervisor-0.1.0.dev0/examples/pgvector/init/01-init.sql +46 -0
  37. adp_hypervisor-0.1.0.dev0/examples/postgres/init/01-init.sql +71 -0
  38. adp_hypervisor-0.1.0.dev0/pyproject.toml +82 -0
  39. adp_hypervisor-0.1.0.dev0/schema/adp-physical-manifest-2026-01-20.json +265 -0
  40. adp_hypervisor-0.1.0.dev0/schema/adp-policy-manifest-2026-01-20.json +222 -0
  41. adp_hypervisor-0.1.0.dev0/schema/adp-protocol-2026-01-20.json +1482 -0
  42. adp_hypervisor-0.1.0.dev0/schema/adp-semantic-manifest-2026-01-20.json +205 -0
  43. adp_hypervisor-0.1.0.dev0/scripts/check-license.py +120 -0
  44. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/__init__.py +28 -0
  45. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/__main__.py +289 -0
  46. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/handlers/__init__.py +35 -0
  47. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/handlers/base.py +45 -0
  48. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/handlers/describe.py +286 -0
  49. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/handlers/discover.py +228 -0
  50. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/handlers/execute.py +211 -0
  51. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/handlers/initialize.py +123 -0
  52. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/handlers/ping.py +53 -0
  53. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/handlers/validate.py +387 -0
  54. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/manifest/__init__.py +84 -0
  55. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/manifest/index.py +446 -0
  56. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/manifest/physical.py +177 -0
  57. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/manifest/policy.py +210 -0
  58. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/manifest/provider.py +56 -0
  59. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/manifest/semantic.py +92 -0
  60. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/manifest/yaml_provider.py +108 -0
  61. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/policy/__init__.py +33 -0
  62. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/policy/authenticator.py +48 -0
  63. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/policy/basic_authenticator.py +114 -0
  64. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/policy/enforcer.py +232 -0
  65. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/policy/role_resolver.py +61 -0
  66. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/policy/yaml_role_resolver.py +64 -0
  67. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/protocol/__init__.py +221 -0
  68. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/protocol/dispatcher.py +487 -0
  69. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/protocol/errors.py +206 -0
  70. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/protocol/jsonrpc.py +105 -0
  71. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/protocol/types.py +840 -0
  72. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/server.py +278 -0
  73. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/transport/__init__.py +23 -0
  74. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/transport/base.py +54 -0
  75. adp_hypervisor-0.1.0.dev0/src/adp_hypervisor/transport/stdio.py +152 -0
  76. adp_hypervisor-0.1.0.dev0/src/backends/__init__.py +43 -0
  77. adp_hypervisor-0.1.0.dev0/src/backends/base.py +91 -0
  78. adp_hypervisor-0.1.0.dev0/src/backends/blob_storage/__init__.py +74 -0
  79. adp_hypervisor-0.1.0.dev0/src/backends/blob_storage/backend.py +35 -0
  80. adp_hypervisor-0.1.0.dev0/src/backends/blob_storage/local.py +777 -0
  81. adp_hypervisor-0.1.0.dev0/src/backends/credentials.py +82 -0
  82. adp_hypervisor-0.1.0.dev0/src/backends/nosql/__init__.py +25 -0
  83. adp_hypervisor-0.1.0.dev0/src/backends/nosql/backend.py +35 -0
  84. adp_hypervisor-0.1.0.dev0/src/backends/nosql/mongodb.py +519 -0
  85. adp_hypervisor-0.1.0.dev0/src/backends/rdbms/__init__.py +25 -0
  86. adp_hypervisor-0.1.0.dev0/src/backends/rdbms/backend.py +268 -0
  87. adp_hypervisor-0.1.0.dev0/src/backends/rdbms/postgres.py +133 -0
  88. adp_hypervisor-0.1.0.dev0/src/backends/registry.py +111 -0
  89. adp_hypervisor-0.1.0.dev0/src/backends/vector/__init__.py +25 -0
  90. adp_hypervisor-0.1.0.dev0/src/backends/vector/backend.py +112 -0
  91. adp_hypervisor-0.1.0.dev0/src/backends/vector/pgvector.py +284 -0
  92. adp_hypervisor-0.1.0.dev0/tests/__init__.py +15 -0
  93. adp_hypervisor-0.1.0.dev0/tests/integration/__init__.py +15 -0
  94. adp_hypervisor-0.1.0.dev0/tests/integration/test_backend_mongodb.py +433 -0
  95. adp_hypervisor-0.1.0.dev0/tests/integration/test_backend_pgvector.py +305 -0
  96. adp_hypervisor-0.1.0.dev0/tests/integration/test_backend_postgres.py +380 -0
  97. adp_hypervisor-0.1.0.dev0/tests/integration/test_blob_storage_local_e2e.py +464 -0
  98. adp_hypervisor-0.1.0.dev0/tests/integration/test_server_e2e.py +568 -0
  99. adp_hypervisor-0.1.0.dev0/tests/unit/__init__.py +15 -0
  100. adp_hypervisor-0.1.0.dev0/tests/unit/backends/__init__.py +13 -0
  101. adp_hypervisor-0.1.0.dev0/tests/unit/backends/nosql/__init__.py +15 -0
  102. adp_hypervisor-0.1.0.dev0/tests/unit/backends/nosql/test_mongodb.py +527 -0
  103. adp_hypervisor-0.1.0.dev0/tests/unit/backends/nosql/test_mongodb_config.py +114 -0
  104. adp_hypervisor-0.1.0.dev0/tests/unit/backends/test_base.py +124 -0
  105. adp_hypervisor-0.1.0.dev0/tests/unit/backends/test_blob_storage.py +1317 -0
  106. adp_hypervisor-0.1.0.dev0/tests/unit/backends/test_credentials.py +96 -0
  107. adp_hypervisor-0.1.0.dev0/tests/unit/backends/test_rdbms.py +429 -0
  108. adp_hypervisor-0.1.0.dev0/tests/unit/backends/test_registry.py +176 -0
  109. adp_hypervisor-0.1.0.dev0/tests/unit/backends/test_vector.py +620 -0
  110. adp_hypervisor-0.1.0.dev0/tests/unit/handlers/__init__.py +13 -0
  111. adp_hypervisor-0.1.0.dev0/tests/unit/handlers/test_describe.py +597 -0
  112. adp_hypervisor-0.1.0.dev0/tests/unit/handlers/test_discover.py +621 -0
  113. adp_hypervisor-0.1.0.dev0/tests/unit/handlers/test_execute.py +505 -0
  114. adp_hypervisor-0.1.0.dev0/tests/unit/handlers/test_initialize.py +164 -0
  115. adp_hypervisor-0.1.0.dev0/tests/unit/handlers/test_ping.py +55 -0
  116. adp_hypervisor-0.1.0.dev0/tests/unit/handlers/test_validate.py +1016 -0
  117. adp_hypervisor-0.1.0.dev0/tests/unit/manifest/__init__.py +15 -0
  118. adp_hypervisor-0.1.0.dev0/tests/unit/manifest/fixtures/physical.yaml +78 -0
  119. adp_hypervisor-0.1.0.dev0/tests/unit/manifest/fixtures/policy-bootstrap.yaml +46 -0
  120. adp_hypervisor-0.1.0.dev0/tests/unit/manifest/fixtures/policy.yaml +52 -0
  121. adp_hypervisor-0.1.0.dev0/tests/unit/manifest/fixtures/semantic.yaml +154 -0
  122. adp_hypervisor-0.1.0.dev0/tests/unit/manifest/test_index.py +527 -0
  123. adp_hypervisor-0.1.0.dev0/tests/unit/manifest/test_manifest_schema_consistency.py +269 -0
  124. adp_hypervisor-0.1.0.dev0/tests/unit/manifest/test_physical.py +314 -0
  125. adp_hypervisor-0.1.0.dev0/tests/unit/manifest/test_policy.py +297 -0
  126. adp_hypervisor-0.1.0.dev0/tests/unit/manifest/test_semantic.py +183 -0
  127. adp_hypervisor-0.1.0.dev0/tests/unit/manifest/test_yaml_provider.py +295 -0
  128. adp_hypervisor-0.1.0.dev0/tests/unit/policy/__init__.py +13 -0
  129. adp_hypervisor-0.1.0.dev0/tests/unit/policy/test_authenticator.py +161 -0
  130. adp_hypervisor-0.1.0.dev0/tests/unit/policy/test_enforcer.py +261 -0
  131. adp_hypervisor-0.1.0.dev0/tests/unit/policy/test_role_resolver.py +114 -0
  132. adp_hypervisor-0.1.0.dev0/tests/unit/protocol/__init__.py +15 -0
  133. adp_hypervisor-0.1.0.dev0/tests/unit/protocol/test_dispatcher.py +482 -0
  134. adp_hypervisor-0.1.0.dev0/tests/unit/protocol/test_protocol_schema_consistency.py +279 -0
  135. adp_hypervisor-0.1.0.dev0/tests/unit/protocol/test_protocol_types.py +952 -0
  136. adp_hypervisor-0.1.0.dev0/tests/unit/transport/__init__.py +15 -0
  137. adp_hypervisor-0.1.0.dev0/tests/unit/transport/test_stdio.py +287 -0
  138. adp_hypervisor-0.1.0.dev0/uv.lock +978 -0
@@ -0,0 +1 @@
1
+ gitdir: /Users/mchades/copilot/adp/adp-hypervisor/.git/worktrees/adp-hypervisor-mongo
@@ -0,0 +1,48 @@
1
+ name: Bug Report
2
+ title: "[Bug report] "
3
+ description: A bug report issue
4
+ labels: [ "bug" ]
5
+ body:
6
+
7
+ - type: dropdown
8
+ id: version
9
+ attributes:
10
+ label: Version
11
+ description: What version of ADP Hypervisor are you running?
12
+ options:
13
+ - main branch
14
+ default: 0
15
+ validations:
16
+ required: true
17
+
18
+ - type: textarea
19
+ attributes:
20
+ label: Describe what's wrong
21
+ description: >
22
+ A clear and concise description of what works not as it is supposed to.
23
+ validations:
24
+ required: true
25
+
26
+ - type: textarea
27
+ attributes:
28
+ label: Error message and/or stacktrace
29
+ description: >
30
+ If applicable, add screenshots to help explain your problem.
31
+ validations:
32
+ required: true
33
+
34
+ - type: textarea
35
+ attributes:
36
+ label: How to reproduce
37
+ placeholder: >
38
+ + Which ADP Hypervisor version to use
39
+ validations:
40
+ required: true
41
+
42
+ - type: textarea
43
+ attributes:
44
+ label: Additional context
45
+ placeholder: >
46
+ Any other context about the problem here.
47
+ validations:
48
+ required: false
@@ -0,0 +1,31 @@
1
+ name: Epic
2
+ title: "[EPIC] "
3
+ description: An epic issue with multiple sub-tasks
4
+ labels: [ "epic" ]
5
+ body:
6
+
7
+ - type: textarea
8
+ attributes:
9
+ label: Describe the proposal
10
+ description: >
11
+ Please put the related docs here if required.
12
+ placeholder: >
13
+ Please describe the content of the proposal clearly and concisely.
14
+ validations:
15
+ required: true
16
+
17
+ - type: textarea
18
+ attributes:
19
+ label: Task list
20
+ description: >
21
+ For more details, please refer to [github docs](https://docs.github.com/en/issues/tracking-your-work-with-issues/about-task-lists).
22
+ placeholder: >
23
+ Please create sub-tasks with the pre-create issues here and @ the assignees if you know any of them. A simple example is as follows:
24
+ - [ ] #1
25
+ - [ ] #11 @user1
26
+ - [ ] #12
27
+ - [ ] #13
28
+ - [ ] #2 @user2
29
+ - [ ] #3
30
+ validations:
31
+ required: true
@@ -0,0 +1,40 @@
1
+ name: Feature Request
2
+ title: "[FEATURE] "
3
+ description: Suggest an idea for ADP Hypervisor
4
+ labels: [ "feature" ]
5
+ body:
6
+
7
+ - type: textarea
8
+ attributes:
9
+ label: Describe the feature
10
+ description: What is it?
11
+ placeholder: >
12
+ Please describe the feature you want here.
13
+ validations:
14
+ required: true
15
+
16
+ - type: textarea
17
+ attributes:
18
+ label: Motivation
19
+ description: Why should it be implemented?
20
+ placeholder: >
21
+ Please describe your motivation for requesting this feature.
22
+ validations:
23
+ required: false
24
+
25
+ - type: textarea
26
+ attributes:
27
+ label: Describe the solution
28
+ description: How could it be implemented?
29
+ placeholder: >
30
+ Please describe the solution to implement the new feature if you have any.
31
+ validations:
32
+ required: false
33
+
34
+ - type: textarea
35
+ attributes:
36
+ label: Additional context
37
+ placeholder: >
38
+ Anything else we need to know.
39
+ validations:
40
+ required: false
@@ -0,0 +1,23 @@
1
+ # See https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository
2
+
3
+ name: Improvement
4
+ title: "[Improvement] "
5
+ description: Suggest an improvement on performance, code quality, user experience, etc
6
+ labels: [ "improvement" ]
7
+ body:
8
+
9
+ - type: textarea
10
+ attributes:
11
+ label: What would you like to be improved?
12
+ placeholder: >
13
+ Please describe the problem you see and how it is needed to be improved.
14
+ validations:
15
+ required: true
16
+
17
+ - type: textarea
18
+ attributes:
19
+ label: How should we improve?
20
+ placeholder: >
21
+ Please provide the solution if you have thoughts.
22
+ validations:
23
+ required: false
@@ -0,0 +1,21 @@
1
+ name: Subtask
2
+ title: "[Subtask] "
3
+ description: A subtask issue
4
+ labels: [ "subtask" ]
5
+ body:
6
+
7
+ - type: textarea
8
+ attributes:
9
+ label: Describe the subtask
10
+ placeholder: >
11
+ Please describe the content of the subtask clearly and concisely.
12
+ validations:
13
+ required: true
14
+
15
+ - type: textarea
16
+ attributes:
17
+ label: Parent issue
18
+ placeholder: >
19
+ Please put the parent issue link here.
20
+ validations:
21
+ required: true
@@ -0,0 +1,35 @@
1
+ <!--
2
+ 1. Title: [#<issue>] <type>(<scope>): <subject>
3
+ Examples:
4
+ - "[#123] feat(operator): support xxx"
5
+ - "[#233] fix: check null before access result in xxx"
6
+ - "[MINOR] refactor: fix typo in variable name"
7
+ - "[MINOR] docs: fix typo in README"
8
+ - "[#255] test: fix flaky test NameOfTheTest"
9
+ Reference: https://www.conventionalcommits.org/en/v1.0.0/
10
+ 2. If the PR is unfinished, please mark this PR as draft.
11
+ -->
12
+
13
+ ### What changes were proposed in this pull request?
14
+
15
+ (Please outline the changes and how this PR fixes the issue.)
16
+
17
+ ### Why are the changes needed?
18
+
19
+ (Please clarify why the changes are needed. For instance,
20
+ 1. If you propose a new API, clarify the use case for a new API.
21
+ 2. If you fix a bug, describe the bug.)
22
+
23
+ Fix: #(issue)
24
+
25
+ ### Does this PR introduce _any_ user-facing change?
26
+
27
+ (Please list the user-facing changes introduced by your change, including
28
+ 1. Change in user-facing APIs.
29
+ 2. Addition or removal of property keys.)
30
+
31
+ ### How was this patch tested?
32
+
33
+ (Please test your changes, and provide instructions on how to test it:
34
+ 1. If you add a feature or fix a bug, add a test to cover your changes.
35
+ 2. If you fix a flaky test, repeat it for many times to prove it works.)
@@ -0,0 +1,108 @@
1
+ # Copyright 2026 Datastrato, Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ name: CI
16
+
17
+ on:
18
+ push:
19
+ branches: [main]
20
+ pull_request:
21
+ branches: [main]
22
+
23
+ jobs:
24
+ check-license:
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+
29
+ - name: Set up Python
30
+ uses: actions/setup-python@v5
31
+ with:
32
+ python-version: "3.11"
33
+
34
+ - name: Check license headers
35
+ run: python scripts/check-license.py
36
+
37
+ lint:
38
+ runs-on: ubuntu-latest
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+
42
+ - name: Install uv
43
+ uses: astral-sh/setup-uv@v4
44
+ with:
45
+ version: "latest"
46
+
47
+ - name: Set up Python
48
+ uses: actions/setup-python@v5
49
+ with:
50
+ python-version: "3.11"
51
+
52
+ - name: Install dependencies
53
+ run: uv sync --all-extras
54
+
55
+ - name: Run Ruff
56
+ run: uv run ruff check .
57
+
58
+ - name: Run Black
59
+ run: uv run black --check .
60
+
61
+ - name: Run mypy
62
+ run: uv run mypy src/
63
+
64
+ unit-test:
65
+ runs-on: ubuntu-latest
66
+ strategy:
67
+ matrix:
68
+ python-version: ["3.11", "3.12", "3.13"]
69
+
70
+ steps:
71
+ - uses: actions/checkout@v4
72
+
73
+ - name: Install uv
74
+ uses: astral-sh/setup-uv@v4
75
+ with:
76
+ version: "latest"
77
+
78
+ - name: Set up Python ${{ matrix.python-version }}
79
+ uses: actions/setup-python@v5
80
+ with:
81
+ python-version: ${{ matrix.python-version }}
82
+
83
+ - name: Install dependencies
84
+ run: uv sync --all-extras
85
+
86
+ - name: Run unit tests
87
+ run: uv run python -m unittest discover -s tests/unit -t tests -v
88
+
89
+ integration-test:
90
+ runs-on: ubuntu-latest
91
+ steps:
92
+ - uses: actions/checkout@v4
93
+
94
+ - name: Install uv
95
+ uses: astral-sh/setup-uv@v4
96
+ with:
97
+ version: "latest"
98
+
99
+ - name: Set up Python
100
+ uses: actions/setup-python@v5
101
+ with:
102
+ python-version: "3.11"
103
+
104
+ - name: Install dependencies
105
+ run: uv sync --all-extras
106
+
107
+ - name: Run integration tests
108
+ run: uv run python -m unittest discover -s tests/integration -v
@@ -0,0 +1,57 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+
27
+ # Virtual environments
28
+ .venv/
29
+ venv/
30
+ ENV/
31
+
32
+ # IDE
33
+ .idea/
34
+ .vscode/
35
+ *.swp
36
+ *.swo
37
+
38
+ # Testing
39
+ .pytest_cache/
40
+ .coverage
41
+ htmlcov/
42
+ .tox/
43
+
44
+ # Type checking
45
+ .mypy_cache/
46
+
47
+ # Linting
48
+ .ruff_cache/
49
+
50
+ # Local development
51
+ *.local
52
+ .env
53
+ .env.*
54
+
55
+ # macOS
56
+ .DS_Store
57
+ .worktrees/
@@ -0,0 +1,30 @@
1
+ # Agent Guidelines
2
+
3
+ Code conventions for AI-assisted development on `adp-hypervisor`.
4
+
5
+ - All code, comments, and Git commit messages **must** be in English.
6
+
7
+ ## Python Style
8
+
9
+ - **Formatting**: Black & Ruff, 100-char line length. Run `uv run black .` and `uv run ruff check .` before committing.
10
+ - **Type checking**: `uv run mypy` with `strict = true`. All parameters and return types must be annotated. Use `str | None` and `list[str]` (not `Optional` / `List`).
11
+ - **Imports**: absolute only, no star imports. Use aliases to resolve name collisions (e.g., `from pydantic import Field as PydanticField`).
12
+ - **Docstrings**: Google-style. Required for modules, classes, and public methods. Use `Args:`, `Returns:`, `Raises:` sections.
13
+ - **Naming**: PascalCase classes, snake_case functions/files, UPPER_SNAKE_CASE constants, `_prefix` for private members.
14
+ - **Class layout**: public methods before private methods. Use `@property` for read-only accessors. Prefer `@dataclass` for plain data; Pydantic `BaseModel` for serializable models.
15
+ - **Logging**: module-level `logger = logging.getLogger(__name__)`, `%s`-style formatting, `exc_info=True` for caught exceptions.
16
+ - **Error handling**: inherit from a specific base, use `!r` in messages, chain with `raise ... from e`.
17
+ - **`__init__.py`**: define `__all__` with category comments; re-export from submodules.
18
+
19
+ ## Testing
20
+
21
+ - Use **`unittest.TestCase`** (sync) and **`unittest.IsolatedAsyncioTestCase`** (async). Do not use bare pytest classes or `pytest.fixture`.
22
+ - Use `self.assert*` methods. Do not use the bare `assert` keyword.
23
+ - Naming: `test_<module>.py` → `Test<Feature>(unittest.TestCase)` → `test_<case>`.
24
+ - Use `# ===...===` separators between test classes. Place helpers (stubs, factories) at file top with `_` prefix.
25
+ - Run tests: `uv run python -m unittest discover -s tests -v`
26
+
27
+ ## Git Conventions
28
+
29
+ - Issue templates: `.github/ISSUE_TEMPLATE/` (bug-report, feature-request, improvement, epic, subtask).
30
+ - PR template: `.github/PULL_REQUEST_TEMPLATE.md`.
@@ -0,0 +1 @@
1
+ AGENTS.md
@@ -0,0 +1,33 @@
1
+ # Contributing to ADP Hypervisor
2
+
3
+ Thank you for your interest in contributing to ADP Hypervisor!
4
+
5
+ ## How to Contribute
6
+
7
+ 1. Fork the repository and create your branch from `main`.
8
+ 2. Make your changes and ensure any new code is covered by tests.
9
+ 3. Submit a pull request with a clear description of the change.
10
+
11
+ ## License
12
+
13
+ By contributing, you agree that your contributions will be licensed under the [Apache License 2.0](LICENSE).
14
+
15
+ ## License Header
16
+
17
+ Every source file must include the following header (using the appropriate comment syntax for the file type):
18
+
19
+ ```python
20
+ # Copyright 2026 Datastrato, Inc.
21
+ #
22
+ # Licensed under the Apache License, Version 2.0 (the "License");
23
+ # you may not use this file except in compliance with the License.
24
+ # You may obtain a copy of the License at
25
+ #
26
+ # http://www.apache.org/licenses/LICENSE-2.0
27
+ #
28
+ # Unless required by applicable law or agreed to in writing, software
29
+ # distributed under the License is distributed on an "AS IS" BASIS,
30
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31
+ # See the License for the specific language governing permissions and
32
+ # limitations under the License.
33
+ ```
@@ -0,0 +1 @@
1
+ AGENTS.md
@@ -0,0 +1,217 @@
1
+ Copyright 2026 Datastrato, Inc.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
14
+
15
+ ---
16
+
17
+ Apache License
18
+ Version 2.0, January 2004
19
+ http://www.apache.org/licenses/
20
+
21
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
22
+
23
+ 1. Definitions.
24
+
25
+ "License" shall mean the terms and conditions for use, reproduction,
26
+ and distribution as defined by Sections 1 through 9 of this document.
27
+
28
+ "Licensor" shall mean the copyright owner or entity authorized by
29
+ the copyright owner that is granting the License.
30
+
31
+ "Legal Entity" shall mean the union of the acting entity and all
32
+ other entities that control, are controlled by, or are under common
33
+ control with that entity. For the purposes of this definition,
34
+ "control" means (i) the power, direct or indirect, to cause the
35
+ direction or management of such entity, whether by contract or
36
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
37
+ outstanding shares, or (iii) beneficial ownership of such entity.
38
+
39
+ "You" (or "Your") shall mean an individual or Legal Entity
40
+ exercising permissions granted by this License.
41
+
42
+ "Source" form shall mean the preferred form for making modifications,
43
+ including but not limited to software source code, documentation
44
+ source, and configuration files.
45
+
46
+ "Object" form shall mean any form resulting from mechanical
47
+ transformation or translation of a Source form, including but
48
+ not limited to compiled object code, generated documentation,
49
+ and conversions to other media types.
50
+
51
+ "Work" shall mean the work of authorship, whether in Source or
52
+ Object form, made available under the License, as indicated by a
53
+ copyright notice that is included in or attached to the work
54
+ (an example is provided in the Appendix below).
55
+
56
+ "Derivative Works" shall mean any work, whether in Source or Object
57
+ form, that is based on (or derived from) the Work and for which the
58
+ editorial revisions, annotations, elaborations, or other modifications
59
+ represent, as a whole, an original work of authorship. For the purposes
60
+ of this License, Derivative Works shall not include works that remain
61
+ separable from, or merely link (or bind by name) to the interfaces of,
62
+ the Work and Derivative Works thereof.
63
+
64
+ "Contribution" shall mean any work of authorship, including
65
+ the original version of the Work and any modifications or additions
66
+ to that Work or Derivative Works thereof, that is intentionally
67
+ submitted to the Licensor for inclusion in the Work by the copyright
68
+ owner or by an individual or Legal Entity authorized to submit on behalf
69
+ of the copyright owner. For the purposes of this definition, "submitted"
70
+ means any form of electronic, verbal, or written communication sent
71
+ to the Licensor or its representatives, including but not limited to
72
+ communication on electronic mailing lists, source code control systems,
73
+ and issue tracking systems that are managed by, or on behalf of, the
74
+ Licensor for the purpose of discussing and improving the Work, but
75
+ excluding communication that is conspicuously marked or otherwise
76
+ designated in writing by the copyright owner as "Not a Contribution."
77
+
78
+ "Contributor" shall mean Licensor and any individual or Legal Entity
79
+ on behalf of whom a Contribution has been received by Licensor and
80
+ subsequently incorporated within the Work.
81
+
82
+ 2. Grant of Copyright License. Subject to the terms and conditions of
83
+ this License, each Contributor hereby grants to You a perpetual,
84
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
85
+ copyright license to reproduce, prepare Derivative Works of,
86
+ publicly display, publicly perform, sublicense, and distribute the
87
+ Work and such Derivative Works in Source or Object form.
88
+
89
+ 3. Grant of Patent License. Subject to the terms and conditions of
90
+ this License, each Contributor hereby grants to You a perpetual,
91
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
92
+ (except as stated in this section) patent license to make, have made,
93
+ use, offer to sell, sell, import, and otherwise transfer the Work,
94
+ where such license applies only to those patent claims licensable
95
+ by such Contributor that are necessarily infringed by their
96
+ Contribution(s) alone or by combination of their Contribution(s)
97
+ with the Work to which such Contribution(s) was submitted. If You
98
+ institute patent litigation against any entity (including a
99
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
100
+ or a Contribution incorporated within it constitutes direct
101
+ or contributory patent infringement, then any patent licenses
102
+ granted to You under this License for that Work shall terminate
103
+ as of the date such litigation is filed.
104
+
105
+ 4. Redistribution. You may reproduce and distribute copies of the
106
+ Work or Derivative Works thereof in any medium, with or without
107
+ modifications, and in Source or Object form, provided that You
108
+ meet the following conditions:
109
+
110
+ (a) You must give any other recipients of the Work or
111
+ Derivative Works a copy of this License; and
112
+
113
+ (b) You must cause any modified files to carry prominent notices
114
+ stating that You changed the files; and
115
+
116
+ (c) You must retain, in the Source form of any Derivative Works
117
+ that You distribute, all copyright, patent, trademark, and
118
+ attribution notices from the Source form of the Work,
119
+ excluding those notices that do not pertain to any part of
120
+ the Derivative Works; and
121
+
122
+ (d) If the Work includes a "NOTICE" text file as part of its
123
+ distribution, then any Derivative Works that You distribute must
124
+ include a readable copy of the attribution notices contained
125
+ within such NOTICE file, excluding those notices that do not
126
+ pertain to any part of the Derivative Works, in at least one
127
+ of the following places: within a NOTICE text file distributed
128
+ as part of the Derivative Works; within the Source form or
129
+ documentation, if provided along with the Derivative Works; or,
130
+ within a display generated by the Derivative Works, if and
131
+ wherever such third-party notices normally appear. The contents
132
+ of the NOTICE file are for informational purposes only and
133
+ do not modify the License. You may add Your own attribution
134
+ notices within Derivative Works that You distribute, alongside
135
+ or as an addendum to the NOTICE text from the Work, provided
136
+ that such additional attribution notices cannot be construed
137
+ as modifying the License.
138
+
139
+ You may add Your own copyright statement to Your modifications and
140
+ may provide additional or different license terms and conditions
141
+ for use, reproduction, or distribution of Your modifications, or
142
+ for such Derivative Works as a whole, provided Your use,
143
+ reproduction, and distribution of the Work otherwise complies with
144
+ the conditions stated in this License.
145
+
146
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
147
+ any Contribution intentionally submitted for inclusion in the Work
148
+ by You to the Licensor shall be under the terms and conditions of
149
+ this License, without any additional terms or conditions.
150
+ Notwithstanding the above, nothing herein shall supersede or modify
151
+ the terms of any separate license agreement you may have executed
152
+ with Licensor regarding such Contributions.
153
+
154
+ 6. Trademarks. This License does not grant permission to use the trade
155
+ names, trademarks, service marks, or product names of the Licensor,
156
+ except as required for reasonable and customary use in describing the
157
+ origin of the Work and reproducing the content of the NOTICE file.
158
+
159
+ 7. Disclaimer of Warranty. Unless required by applicable law or
160
+ agreed to in writing, Licensor provides the Work (and each
161
+ Contributor provides its Contributions) on an "AS IS" BASIS,
162
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
163
+ implied, including, without limitation, any warranties or conditions
164
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
165
+ PARTICULAR PURPOSE. You are solely responsible for determining the
166
+ appropriateness of using or redistributing the Work and assume any
167
+ risks associated with Your exercise of permissions under this License.
168
+
169
+ 8. Limitation of Liability. In no event and under no legal theory,
170
+ whether in tort (including negligence), contract, or otherwise,
171
+ unless required by applicable law (such as deliberate and grossly
172
+ negligent acts) or agreed to in writing, shall any Contributor be
173
+ liable to You for damages, including any direct, indirect, special,
174
+ incidental, or consequential damages of any character arising as a
175
+ result of this License or out of the use or inability to use the
176
+ Work (including but not limited to damages for loss of goodwill,
177
+ work stoppage, computer failure or malfunction, or any and all
178
+ other commercial damages or losses), even if such Contributor
179
+ has been advised of the possibility of such damages.
180
+
181
+ 9. Accepting Warranty or Additional Liability. While redistributing
182
+ the Work or Derivative Works thereof, You may choose to offer,
183
+ and charge a fee for, acceptance of support, warranty, indemnity,
184
+ or other liability obligations and/or rights consistent with this
185
+ License. However, in accepting such obligations, You may act only
186
+ on Your own behalf and on Your sole responsibility, not on behalf
187
+ of any other Contributor, and only if You agree to indemnify,
188
+ defend, and hold each Contributor harmless for any liability
189
+ incurred by, or claims asserted against, such Contributor by reason
190
+ of your accepting any such warranty or additional liability.
191
+
192
+ END OF TERMS AND CONDITIONS
193
+
194
+ APPENDIX: How to apply the Apache License to your work.
195
+
196
+ To apply the Apache License to your work, attach the following
197
+ boilerplate notice, with the fields enclosed by brackets "[]"
198
+ replaced with your own identifying information. (Don't include
199
+ the brackets!) The text should be enclosed in the appropriate
200
+ comment syntax for the file format. We also recommend that a
201
+ file or class name and description of purpose be included on the
202
+ same "printed page" as the copyright notice for easier
203
+ identification within third-party archives.
204
+
205
+ Copyright 2026 Datastrato, Inc.
206
+
207
+ Licensed under the Apache License, Version 2.0 (the "License");
208
+ you may not use this file except in compliance with the License.
209
+ You may obtain a copy of the License at
210
+
211
+ http://www.apache.org/licenses/LICENSE-2.0
212
+
213
+ Unless required by applicable law or agreed to in writing, software
214
+ distributed under the License is distributed on an "AS IS" BASIS,
215
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
216
+ See the License for the specific language governing permissions and
217
+ limitations under the License.
@@ -0,0 +1,2 @@
1
+ ADP Hypervisor
2
+ Copyright 2026 Datastrato, Inc.