honestenv 0.1.0__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 (32) hide show
  1. honestenv-0.1.0/LICENSE +201 -0
  2. honestenv-0.1.0/PKG-INFO +170 -0
  3. honestenv-0.1.0/README.md +150 -0
  4. honestenv-0.1.0/pyproject.toml +35 -0
  5. honestenv-0.1.0/setup.cfg +4 -0
  6. honestenv-0.1.0/src/honestenv/__init__.py +5 -0
  7. honestenv-0.1.0/src/honestenv/cli.py +152 -0
  8. honestenv-0.1.0/src/honestenv/gates/__init__.py +1 -0
  9. honestenv-0.1.0/src/honestenv/gates/baseline.py +138 -0
  10. honestenv-0.1.0/src/honestenv/gates/lint.py +11 -0
  11. honestenv-0.1.0/src/honestenv/gates/run.py +16 -0
  12. honestenv-0.1.0/src/honestenv/gates/schema.py +39 -0
  13. honestenv-0.1.0/src/honestenv/harbor_cli.py +57 -0
  14. honestenv-0.1.0/src/honestenv/package.py +38 -0
  15. honestenv-0.1.0/src/honestenv/scaffold.py +110 -0
  16. honestenv-0.1.0/src/honestenv/types.py +31 -0
  17. honestenv-0.1.0/src/honestenv.egg-info/PKG-INFO +170 -0
  18. honestenv-0.1.0/src/honestenv.egg-info/SOURCES.txt +30 -0
  19. honestenv-0.1.0/src/honestenv.egg-info/dependency_links.txt +1 -0
  20. honestenv-0.1.0/src/honestenv.egg-info/entry_points.txt +2 -0
  21. honestenv-0.1.0/src/honestenv.egg-info/requires.txt +1 -0
  22. honestenv-0.1.0/src/honestenv.egg-info/top_level.txt +1 -0
  23. honestenv-0.1.0/tests/test_baseline.py +72 -0
  24. honestenv-0.1.0/tests/test_canaries.py +44 -0
  25. honestenv-0.1.0/tests/test_ci_planner.py +70 -0
  26. honestenv-0.1.0/tests/test_cli.py +136 -0
  27. honestenv-0.1.0/tests/test_init.py +62 -0
  28. honestenv-0.1.0/tests/test_lint.py +39 -0
  29. honestenv-0.1.0/tests/test_package.py +66 -0
  30. honestenv-0.1.0/tests/test_run.py +54 -0
  31. honestenv-0.1.0/tests/test_scaffold.py +46 -0
  32. honestenv-0.1.0/tests/test_schema.py +66 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,170 @@
1
+ Metadata-Version: 2.4
2
+ Name: honestenv
3
+ Version: 0.1.0
4
+ Summary: A Harbor-compatible factory for verifiable agent tasks
5
+ License-Expression: Apache-2.0
6
+ Project-URL: Homepage, https://github.com/EZfan/honestenv
7
+ Project-URL: Repository, https://github.com/EZfan/honestenv
8
+ Project-URL: Issues, https://github.com/EZfan/honestenv/issues
9
+ Project-URL: Changelog, https://github.com/EZfan/honestenv/blob/main/CHANGELOG.md
10
+ Keywords: Harbor,evaluation tasks,quality gates
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Operating System :: OS Independent
15
+ Requires-Python: >=3.12
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: harbor==0.27.0
19
+ Dynamic: license-file
20
+
21
+ # honestenv
22
+
23
+ Verifiable agent tasks, checked before they ship.
24
+
25
+ honestenv is a Harbor-compatible factory for verifiable agent tasks. Its core is
26
+ quality gates and owned task packs, not an agent framework.
27
+
28
+ [![CI](https://github.com/EZfan/honestenv/actions/workflows/ci.yml/badge.svg)](https://github.com/EZfan/honestenv/actions/workflows/ci.yml) ![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue) ![Python >=3.12](https://img.shields.io/badge/python-%3E%3D3.12-blue) ![Harbor 0.27.0](https://img.shields.io/badge/Harbor-0.27.0-blue)
29
+
30
+ Checkable training and evaluation tasks are scarce. [Harbor](https://docs.harborframework.com/) provides the task format and runtime; honestenv owns the gates that check tasks and the packs that contain them.
31
+
32
+ ## Quickstart
33
+
34
+ With Python 3.12 or newer, once the package is published, install it with either:
35
+
36
+ ```sh
37
+ pip install honestenv
38
+ ```
39
+
40
+ ```sh
41
+ uv tool install honestenv
42
+ ```
43
+
44
+ To install from a checkout:
45
+
46
+ ```sh
47
+ git clone https://github.com/EZfan/honestenv.git
48
+ cd honestenv
49
+ pip install -e .
50
+ ```
51
+
52
+ Create a task skeleton and run its static gates:
53
+
54
+ ```sh
55
+ honestenv init my-org/my-task
56
+ honestenv check tasks/my-task --static-only
57
+ ```
58
+
59
+ Run the static gates on all local tasks:
60
+
61
+ ```sh
62
+ honestenv test-gates --static-only
63
+ ```
64
+
65
+ Full checks require Docker and Docker Compose. Check the first task and copy it into a new dataset directory:
66
+
67
+ ```sh
68
+ honestenv check tasks/reservation-window --out report.json
69
+ honestenv pack tasks/reservation-window --into dataset
70
+ honestenv verify-pack dataset
71
+ ```
72
+
73
+ The original deterministic tasks are [`tasks/reservation-window`](tasks/reservation-window), [`tasks/version-compare`](tasks/version-compare), [`tasks/invoice-cents`](tasks/invoice-cents), [`tasks/cut-field`](tasks/cut-field), [`tasks/bind-config`](tasks/bind-config), [`tasks/quoted-csv`](tasks/quoted-csv), [`tasks/text-normalize`](tasks/text-normalize), [`tasks/record-sort`](tasks/record-sort), [`tasks/job-order`](tasks/job-order), and [`tasks/date-shift`](tasks/date-shift). All use Harbor schema 1.4.
74
+
75
+ ## CLI
76
+
77
+ - `honestenv init <org/task> [--force]` writes a task skeleton to `tasks/<task>` in the current directory and records `org/task` as the task name. Each component must start with a letter or digit and contain only ASCII letters, digits, dots, hyphens, and underscores. Neither component may contain `..`. An existing empty directory can be used. A non-empty destination requires `--force`, which may overwrite its files.
78
+ - `honestenv check <task-dir> [--static-only] [--out report.json]` runs schema checks, factory policy checks, `harbor lint --extend-select ALL`, and official Docker-backed `harbor run` checks. The built-in solution agent (`-a oracle`) must return a valid reward of exactly 1.0, and the empty agent (`-a nop`) must return a valid reward of exactly 0.0. With `--static-only`, it skips the runtime checks. The command optionally writes a JSON report.
79
+ - `honestenv test-gates [--static-only]` runs the same checks for every task under `tasks/`. With `--static-only`, it runs schema, factory policy, and lint checks.
80
+ - `honestenv pack <task-dir> --into <dataset-dir>` runs the full check, including runtime gates, and copies the task into the dataset. It refuses to pack if checks fail or if the destination task directory already exists. It writes or updates `dataset-manifest.json` in the dataset.
81
+ - `honestenv verify-pack <dataset-dir>` checks the manifest, task hashes, schema versions, and unlisted task directories without running Harbor or Docker. The recorded tool version is provenance and need not match the running version.
82
+
83
+ The manifest is a JSON object with a `tasks` object keyed by task directory name.
84
+ Each entry contains `content_sha256`, `schema_version`, `checked_at` (UTC
85
+ ISO-8601 ending in `Z`), and `honestenv_version`. The content hash is SHA-256
86
+ over task files in sorted relative POSIX path order. For each file, the UTF-8
87
+ path and file bytes are each preceded by their length as an 8-byte big-endian
88
+ integer. The digest is lowercase hexadecimal.
89
+
90
+ ## CI
91
+
92
+ Repositories with tasks in `tasks/` can call the reusable workflow. Replace both
93
+ `<ref>` values with the same commit SHA or tag of this repository:
94
+
95
+ ```yaml
96
+ jobs:
97
+ honestenv:
98
+ permissions:
99
+ contents: read
100
+ pull-requests: write
101
+ uses: EZfan/honestenv/.github/workflows/honestenv-check.yml@<ref>
102
+ with:
103
+ honestenv-ref: <ref>
104
+ ```
105
+
106
+ The workflow checks out the caller's repository and the specified honestenv ref.
107
+ Its `test` job installs honestenv, runs the caller's Python unit tests in `tests/`,
108
+ and runs static gates on all shipped tasks. Its `runtime` job runs official
109
+ Docker-backed Harbor gates. On pull requests it compares changes since the merge base with the base SHA:
110
+ changes under a shipped `tasks/<name>/` select that task; changes under `src/`,
111
+ `pyproject.toml`, `.github/workflows/`, or `.github/actions/` select all tasks.
112
+ Other changes skip runtime gates. Pushes to main run all tasks. Only directories
113
+ under `tasks/` containing `task.toml` are shipped tasks; canary fixtures are not.
114
+
115
+ On pull requests, the runtime job posts or updates a Markdown checkup with each
116
+ task's schema, lint, factory, and runtime results. Unchanged tasks have runtime
117
+ marked skipped. It uses the default `GITHUB_TOKEN`; grant `contents: read` and
118
+ `pull-requests: write` to the calling job. Fork pull requests may receive a
119
+ read-only token, so their checkup comment may be unavailable.
120
+
121
+ A reusable workflow's checks are named `<caller-job> / test` and
122
+ `<caller-job> / runtime`. To keep exact check names `test` and `runtime`, compose
123
+ the actions as steps in your own jobs instead:
124
+
125
+ ```yaml
126
+ jobs:
127
+ test:
128
+ runs-on: ubuntu-latest
129
+ steps:
130
+ - uses: actions/checkout@v7
131
+ - uses: EZfan/honestenv/.github/actions/test@<ref>
132
+ runtime:
133
+ runs-on: ubuntu-latest
134
+ timeout-minutes: 30
135
+ permissions:
136
+ contents: read
137
+ pull-requests: write
138
+ steps:
139
+ - uses: actions/checkout@v7
140
+ with:
141
+ fetch-depth: 0
142
+ - uses: EZfan/honestenv/.github/actions/runtime@<ref>
143
+ ```
144
+
145
+ Use a commit SHA or tag for each `<ref>`. The runtime action requires full Git
146
+ history to compare the PR base. This repository uses these composite actions in
147
+ its own `test` and `runtime` jobs. A standalone action repository may come later.
148
+
149
+ ## Factory policy
150
+
151
+ Factory checks require digest-pinned images in Dockerfiles and `environment.docker_image`, an explicit separate verifier, a non-root agent user, and a restricted agent network policy. Set `environment.network_mode` to `"no-network"`, or use a non-empty restricted allowlist. The agent can override the environment policy. Dockerfiles must not use host networking, and test material must not fetch from public hosts. Reward scripts are checked for obvious unconditional rewards, failure exits, nondeterminism, and missing checks of packaged artifacts. These static checks are heuristics; runtime gates still check the oracle and empty agent.
152
+
153
+ The intentionally invalid packages in `tests/fixtures/bad_tasks/` verify that the
154
+ factory gates reject bad tasks. They are not part of the shipped `tasks/` pack.
155
+
156
+ The Headroom Policy requires an explicit, finite `verifier.timeout_sec` of at least 15 seconds. If `metadata.expected_oracle_runtime_sec` is a finite positive number, the timeout must also be at least three times that value.
157
+
158
+ ## Status
159
+
160
+ Version 0.1.0 includes static and Docker-backed runtime gates, task initialization, packing and pack verification, incremental CI checks, and ten shipped tasks.
161
+
162
+ Releases use the `publish.yml` Trusted Publisher workflow and the `pypi` environment.
163
+
164
+ ## License
165
+
166
+ [Apache-2.0](LICENSE).
167
+
168
+ ## Project links
169
+
170
+ [Contributing](CONTRIBUTING.md) | [Changelog](CHANGELOG.md) | [Security](SECURITY.md) | [Code of Conduct](CODE_OF_CONDUCT.md)
@@ -0,0 +1,150 @@
1
+ # honestenv
2
+
3
+ Verifiable agent tasks, checked before they ship.
4
+
5
+ honestenv is a Harbor-compatible factory for verifiable agent tasks. Its core is
6
+ quality gates and owned task packs, not an agent framework.
7
+
8
+ [![CI](https://github.com/EZfan/honestenv/actions/workflows/ci.yml/badge.svg)](https://github.com/EZfan/honestenv/actions/workflows/ci.yml) ![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue) ![Python >=3.12](https://img.shields.io/badge/python-%3E%3D3.12-blue) ![Harbor 0.27.0](https://img.shields.io/badge/Harbor-0.27.0-blue)
9
+
10
+ Checkable training and evaluation tasks are scarce. [Harbor](https://docs.harborframework.com/) provides the task format and runtime; honestenv owns the gates that check tasks and the packs that contain them.
11
+
12
+ ## Quickstart
13
+
14
+ With Python 3.12 or newer, once the package is published, install it with either:
15
+
16
+ ```sh
17
+ pip install honestenv
18
+ ```
19
+
20
+ ```sh
21
+ uv tool install honestenv
22
+ ```
23
+
24
+ To install from a checkout:
25
+
26
+ ```sh
27
+ git clone https://github.com/EZfan/honestenv.git
28
+ cd honestenv
29
+ pip install -e .
30
+ ```
31
+
32
+ Create a task skeleton and run its static gates:
33
+
34
+ ```sh
35
+ honestenv init my-org/my-task
36
+ honestenv check tasks/my-task --static-only
37
+ ```
38
+
39
+ Run the static gates on all local tasks:
40
+
41
+ ```sh
42
+ honestenv test-gates --static-only
43
+ ```
44
+
45
+ Full checks require Docker and Docker Compose. Check the first task and copy it into a new dataset directory:
46
+
47
+ ```sh
48
+ honestenv check tasks/reservation-window --out report.json
49
+ honestenv pack tasks/reservation-window --into dataset
50
+ honestenv verify-pack dataset
51
+ ```
52
+
53
+ The original deterministic tasks are [`tasks/reservation-window`](tasks/reservation-window), [`tasks/version-compare`](tasks/version-compare), [`tasks/invoice-cents`](tasks/invoice-cents), [`tasks/cut-field`](tasks/cut-field), [`tasks/bind-config`](tasks/bind-config), [`tasks/quoted-csv`](tasks/quoted-csv), [`tasks/text-normalize`](tasks/text-normalize), [`tasks/record-sort`](tasks/record-sort), [`tasks/job-order`](tasks/job-order), and [`tasks/date-shift`](tasks/date-shift). All use Harbor schema 1.4.
54
+
55
+ ## CLI
56
+
57
+ - `honestenv init <org/task> [--force]` writes a task skeleton to `tasks/<task>` in the current directory and records `org/task` as the task name. Each component must start with a letter or digit and contain only ASCII letters, digits, dots, hyphens, and underscores. Neither component may contain `..`. An existing empty directory can be used. A non-empty destination requires `--force`, which may overwrite its files.
58
+ - `honestenv check <task-dir> [--static-only] [--out report.json]` runs schema checks, factory policy checks, `harbor lint --extend-select ALL`, and official Docker-backed `harbor run` checks. The built-in solution agent (`-a oracle`) must return a valid reward of exactly 1.0, and the empty agent (`-a nop`) must return a valid reward of exactly 0.0. With `--static-only`, it skips the runtime checks. The command optionally writes a JSON report.
59
+ - `honestenv test-gates [--static-only]` runs the same checks for every task under `tasks/`. With `--static-only`, it runs schema, factory policy, and lint checks.
60
+ - `honestenv pack <task-dir> --into <dataset-dir>` runs the full check, including runtime gates, and copies the task into the dataset. It refuses to pack if checks fail or if the destination task directory already exists. It writes or updates `dataset-manifest.json` in the dataset.
61
+ - `honestenv verify-pack <dataset-dir>` checks the manifest, task hashes, schema versions, and unlisted task directories without running Harbor or Docker. The recorded tool version is provenance and need not match the running version.
62
+
63
+ The manifest is a JSON object with a `tasks` object keyed by task directory name.
64
+ Each entry contains `content_sha256`, `schema_version`, `checked_at` (UTC
65
+ ISO-8601 ending in `Z`), and `honestenv_version`. The content hash is SHA-256
66
+ over task files in sorted relative POSIX path order. For each file, the UTF-8
67
+ path and file bytes are each preceded by their length as an 8-byte big-endian
68
+ integer. The digest is lowercase hexadecimal.
69
+
70
+ ## CI
71
+
72
+ Repositories with tasks in `tasks/` can call the reusable workflow. Replace both
73
+ `<ref>` values with the same commit SHA or tag of this repository:
74
+
75
+ ```yaml
76
+ jobs:
77
+ honestenv:
78
+ permissions:
79
+ contents: read
80
+ pull-requests: write
81
+ uses: EZfan/honestenv/.github/workflows/honestenv-check.yml@<ref>
82
+ with:
83
+ honestenv-ref: <ref>
84
+ ```
85
+
86
+ The workflow checks out the caller's repository and the specified honestenv ref.
87
+ Its `test` job installs honestenv, runs the caller's Python unit tests in `tests/`,
88
+ and runs static gates on all shipped tasks. Its `runtime` job runs official
89
+ Docker-backed Harbor gates. On pull requests it compares changes since the merge base with the base SHA:
90
+ changes under a shipped `tasks/<name>/` select that task; changes under `src/`,
91
+ `pyproject.toml`, `.github/workflows/`, or `.github/actions/` select all tasks.
92
+ Other changes skip runtime gates. Pushes to main run all tasks. Only directories
93
+ under `tasks/` containing `task.toml` are shipped tasks; canary fixtures are not.
94
+
95
+ On pull requests, the runtime job posts or updates a Markdown checkup with each
96
+ task's schema, lint, factory, and runtime results. Unchanged tasks have runtime
97
+ marked skipped. It uses the default `GITHUB_TOKEN`; grant `contents: read` and
98
+ `pull-requests: write` to the calling job. Fork pull requests may receive a
99
+ read-only token, so their checkup comment may be unavailable.
100
+
101
+ A reusable workflow's checks are named `<caller-job> / test` and
102
+ `<caller-job> / runtime`. To keep exact check names `test` and `runtime`, compose
103
+ the actions as steps in your own jobs instead:
104
+
105
+ ```yaml
106
+ jobs:
107
+ test:
108
+ runs-on: ubuntu-latest
109
+ steps:
110
+ - uses: actions/checkout@v7
111
+ - uses: EZfan/honestenv/.github/actions/test@<ref>
112
+ runtime:
113
+ runs-on: ubuntu-latest
114
+ timeout-minutes: 30
115
+ permissions:
116
+ contents: read
117
+ pull-requests: write
118
+ steps:
119
+ - uses: actions/checkout@v7
120
+ with:
121
+ fetch-depth: 0
122
+ - uses: EZfan/honestenv/.github/actions/runtime@<ref>
123
+ ```
124
+
125
+ Use a commit SHA or tag for each `<ref>`. The runtime action requires full Git
126
+ history to compare the PR base. This repository uses these composite actions in
127
+ its own `test` and `runtime` jobs. A standalone action repository may come later.
128
+
129
+ ## Factory policy
130
+
131
+ Factory checks require digest-pinned images in Dockerfiles and `environment.docker_image`, an explicit separate verifier, a non-root agent user, and a restricted agent network policy. Set `environment.network_mode` to `"no-network"`, or use a non-empty restricted allowlist. The agent can override the environment policy. Dockerfiles must not use host networking, and test material must not fetch from public hosts. Reward scripts are checked for obvious unconditional rewards, failure exits, nondeterminism, and missing checks of packaged artifacts. These static checks are heuristics; runtime gates still check the oracle and empty agent.
132
+
133
+ The intentionally invalid packages in `tests/fixtures/bad_tasks/` verify that the
134
+ factory gates reject bad tasks. They are not part of the shipped `tasks/` pack.
135
+
136
+ The Headroom Policy requires an explicit, finite `verifier.timeout_sec` of at least 15 seconds. If `metadata.expected_oracle_runtime_sec` is a finite positive number, the timeout must also be at least three times that value.
137
+
138
+ ## Status
139
+
140
+ Version 0.1.0 includes static and Docker-backed runtime gates, task initialization, packing and pack verification, incremental CI checks, and ten shipped tasks.
141
+
142
+ Releases use the `publish.yml` Trusted Publisher workflow and the `pypi` environment.
143
+
144
+ ## License
145
+
146
+ [Apache-2.0](LICENSE).
147
+
148
+ ## Project links
149
+
150
+ [Contributing](CONTRIBUTING.md) | [Changelog](CHANGELOG.md) | [Security](SECURITY.md) | [Code of Conduct](CODE_OF_CONDUCT.md)
@@ -0,0 +1,35 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "honestenv"
7
+ dynamic = ["version"]
8
+ description = "A Harbor-compatible factory for verifiable agent tasks"
9
+ readme = "README.md"
10
+ requires-python = ">=3.12"
11
+ license = "Apache-2.0"
12
+ license-files = ["LICENSE"]
13
+ keywords = ["Harbor", "evaluation tasks", "quality gates"]
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3.12",
17
+ "Programming Language :: Python :: 3.13",
18
+ "Operating System :: OS Independent",
19
+ ]
20
+ dependencies = ["harbor==0.27.0"]
21
+
22
+ [project.urls]
23
+ Homepage = "https://github.com/EZfan/honestenv"
24
+ Repository = "https://github.com/EZfan/honestenv"
25
+ Issues = "https://github.com/EZfan/honestenv/issues"
26
+ Changelog = "https://github.com/EZfan/honestenv/blob/main/CHANGELOG.md"
27
+
28
+ [project.scripts]
29
+ honestenv = "honestenv.cli:main"
30
+
31
+ [tool.setuptools.packages.find]
32
+ where = ["src"]
33
+
34
+ [tool.setuptools.dynamic]
35
+ version = {attr = "honestenv.__version__"}
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,5 @@
1
+ __version__ = "0.1.0"
2
+
3
+ from .types import CheckReport, CommandResult, GateReport, TaskPackage
4
+
5
+ __all__ = ["TaskPackage", "GateReport", "CheckReport", "CommandResult"]