open-code-review-toolkit 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.
- open_code_review_toolkit-0.1.0/.gitignore +17 -0
- open_code_review_toolkit-0.1.0/CHANGELOG.md +28 -0
- open_code_review_toolkit-0.1.0/CONTRIBUTING.md +14 -0
- open_code_review_toolkit-0.1.0/LICENSE +202 -0
- open_code_review_toolkit-0.1.0/PKG-INFO +283 -0
- open_code_review_toolkit-0.1.0/README.md +55 -0
- open_code_review_toolkit-0.1.0/SECURITY.md +13 -0
- open_code_review_toolkit-0.1.0/changelog.d/README.md +3 -0
- open_code_review_toolkit-0.1.0/docs/codex/AGENT_EXECUTION_PITFALLS.md +28 -0
- open_code_review_toolkit-0.1.0/docs/codex/TASKS_BACKLOG.md +45 -0
- open_code_review_toolkit-0.1.0/docs/configuration.md +44 -0
- open_code_review_toolkit-0.1.0/docs/development.md +19 -0
- open_code_review_toolkit-0.1.0/docs/engineering/project_principles.md +26 -0
- open_code_review_toolkit-0.1.0/docs/gitlab.md +27 -0
- open_code_review_toolkit-0.1.0/docs/release.md +34 -0
- open_code_review_toolkit-0.1.0/docs/security.md +23 -0
- open_code_review_toolkit-0.1.0/examples/gitlab/ocr-review.gitlab-ci.yml +82 -0
- open_code_review_toolkit-0.1.0/examples/gitlab/rules.json +33 -0
- open_code_review_toolkit-0.1.0/pyproject.toml +149 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/__init__.py +1 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/_version.py +24 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/cli.py +56 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/common/__init__.py +1 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/common/language.py +60 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/common/markdown.py +214 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/common/redaction.py +324 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/config_writer.py +106 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/configure.py +194 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/context/__init__.py +1 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/context/__main__.py +8 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/context/ansible.py +561 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/context/categorize.py +162 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/context/instructions.py +269 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/context/manifests.py +459 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/context/planner.py +227 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/context/render.py +955 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/context/repo.py +672 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/context/settings.py +97 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/mcp_config.py +257 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/posting/__init__.py +1 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/posting/__main__.py +8 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/posting/comments.py +87 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/posting/formatting.py +755 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/posting/gitlab.py +853 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/posting/markers.py +284 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/posting/payloads.py +141 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/posting/result.py +116 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/posting/settings.py +181 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/posting/snapshot.py +468 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/posting/workflow.py +873 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/preflight.py +395 -0
- open_code_review_toolkit-0.1.0/src/ocr_toolkit/py.typed +1 -0
- open_code_review_toolkit-0.1.0/tests/__init__.py +1 -0
- open_code_review_toolkit-0.1.0/tests/support.py +85 -0
- open_code_review_toolkit-0.1.0/tests/test_cli.py +39 -0
- open_code_review_toolkit-0.1.0/tests/test_common_helpers.py +391 -0
- open_code_review_toolkit-0.1.0/tests/test_context_helpers.py +1935 -0
- open_code_review_toolkit-0.1.0/tests/test_posting_helpers.py +1649 -0
- open_code_review_toolkit-0.1.0/tests/test_release_authorization.py +89 -0
- open_code_review_toolkit-0.1.0/tests/test_release_notes.py +38 -0
- open_code_review_toolkit-0.1.0/tests/test_runtime_helpers.py +880 -0
- open_code_review_toolkit-0.1.0/tests/test_testpypi_preview.py +206 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
## 0.1.0 - 2026-07-20
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- Publish one deterministic, checksum-verified TestPyPI development build after every merge into `main`, with bounded registry downloads and idempotent reruns. ([#4](https://github.com/xeonvs/open-code-review-toolkit/pull/4))
|
|
6
|
+
- Target Open Code Review 1.7.13 in preflight validation and the pinned GitLab CI example. ([#4](https://github.com/xeonvs/open-code-review-toolkit/pull/4))
|
|
7
|
+
- Support and continuously test Python 3.14 while retaining Python 3.10-3.13 compatibility. ([#4](https://github.com/xeonvs/open-code-review-toolkit/pull/4))
|
|
8
|
+
- Publish reproducible 0.1.0 distributions to TestPyPI and PyPI with exact hash verification, provenance attestations, and immutable GitHub Release assets.
|
|
9
|
+
- Introduce the standalone `ocr-ci` toolkit with safe context generation, GitLab posting, runtime configuration, MCP configuration, and preflight checks.
|
|
10
|
+
|
|
11
|
+
### Bug fixes
|
|
12
|
+
|
|
13
|
+
- Bind production release smoke tests to the exact reviewed wheel and sdist hashes, with bounded HTTPS downloads from TestPyPI and PyPI. ([#4](https://github.com/xeonvs/open-code-review-toolkit/pull/4))
|
|
14
|
+
- Use `OCR_REVIEW_LANGUAGE` as the single safe language setting for OCR configuration and generated review context, with English as the default and Russian as an explicit option. ([#4](https://github.com/xeonvs/open-code-review-toolkit/pull/4))
|
|
15
|
+
- Preserve bounded context and version discovery with a 7,950-character ceiling, improve provider billing classification, and prevent cross-file remapping of findings that already name a path. ([#3](https://github.com/xeonvs/open-code-review-toolkit/pull/3))
|
|
16
|
+
|
|
17
|
+
### Security
|
|
18
|
+
|
|
19
|
+
- Require secure credential endpoints, block unsafe GitLab redirects, redact secret-shaped environment values, and reduce GitHub Actions credential persistence and permissions. ([#3](https://github.com/xeonvs/open-code-review-toolkit/pull/3))
|
|
20
|
+
|
|
21
|
+
### Documentation
|
|
22
|
+
|
|
23
|
+
- Document the checksum-verified TestPyPI prerelease path used before the public stable release. ([#2](https://github.com/xeonvs/open-code-review-toolkit/pull/2))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# Changelog
|
|
27
|
+
|
|
28
|
+
Changes for each release are assembled from `changelog.d/` by Towncrier.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thank you for improving Open Code Review Toolkit. Keep changes focused, add regression tests for behavior changes, and use synthetic examples only.
|
|
4
|
+
|
|
5
|
+
1. Create a branch from `main`.
|
|
6
|
+
2. Install the locked development environment with `uv sync --frozen`.
|
|
7
|
+
3. Update `PLANS.md` for substantial work.
|
|
8
|
+
4. Add a Towncrier fragment for user-visible changes.
|
|
9
|
+
5. Run the checks in [docs/development.md](docs/development.md).
|
|
10
|
+
6. Open a pull request; protected `main` accepts changes only through green pull requests.
|
|
11
|
+
|
|
12
|
+
Every non-release merge publishes a `0.2.0.devN` development build to TestPyPI. Stable releases use a repository-owned `release/vX.Y.Z` branch and an exact `Release vX.Y.Z` pull-request title; merging that reviewed PR authorizes the automated TestPyPI, PyPI, and GitHub Release chain.
|
|
13
|
+
|
|
14
|
+
Do not include real credentials, provider payloads, internal hosts, or private repository details. Security reports should follow [SECURITY.md](SECURITY.md), not public issues.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: open-code-review-toolkit
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Unofficial GitLab CI integration layer for Open Code Review
|
|
5
|
+
Project-URL: Homepage, https://github.com/xeonvs/open-code-review-toolkit
|
|
6
|
+
Project-URL: Repository, https://github.com/xeonvs/open-code-review-toolkit
|
|
7
|
+
Project-URL: Issues, https://github.com/xeonvs/open-code-review-toolkit/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/xeonvs/open-code-review-toolkit/blob/main/CHANGELOG.md
|
|
9
|
+
Author: Open Code Review Toolkit contributors
|
|
10
|
+
License:
|
|
11
|
+
Apache License
|
|
12
|
+
Version 2.0, January 2004
|
|
13
|
+
http://www.apache.org/licenses/
|
|
14
|
+
|
|
15
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
16
|
+
|
|
17
|
+
1. Definitions.
|
|
18
|
+
|
|
19
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
20
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
21
|
+
|
|
22
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
23
|
+
the copyright owner that is granting the License.
|
|
24
|
+
|
|
25
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
26
|
+
other entities that control, are controlled by, or are under common
|
|
27
|
+
control with that entity. For the purposes of this definition,
|
|
28
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
29
|
+
direction or management of such entity, whether by contract or
|
|
30
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
31
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
32
|
+
|
|
33
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
34
|
+
exercising permissions granted by this License.
|
|
35
|
+
|
|
36
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
37
|
+
including but not limited to software source code, documentation
|
|
38
|
+
source, and configuration files.
|
|
39
|
+
|
|
40
|
+
"Object" form shall mean any form resulting from mechanical
|
|
41
|
+
transformation or translation of a Source form, including but
|
|
42
|
+
not limited to compiled object code, generated documentation,
|
|
43
|
+
and conversions to other media types.
|
|
44
|
+
|
|
45
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
46
|
+
Object form, made available under the License, as indicated by a
|
|
47
|
+
copyright notice that is included in or attached to the work
|
|
48
|
+
(an example is provided in the Appendix below).
|
|
49
|
+
|
|
50
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
51
|
+
form, that is based on (or derived from) the Work and for which the
|
|
52
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
53
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
54
|
+
of this License, Derivative Works shall not include works that remain
|
|
55
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
56
|
+
the Work and Derivative Works thereof.
|
|
57
|
+
|
|
58
|
+
"Contribution" shall mean any work of authorship, including
|
|
59
|
+
the original version of the Work and any modifications or additions
|
|
60
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
61
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
62
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
63
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
64
|
+
means any form of electronic, verbal, or written communication sent
|
|
65
|
+
to the Licensor or its representatives, including but not limited to
|
|
66
|
+
communication on electronic mailing lists, source code control systems,
|
|
67
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
68
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
69
|
+
excluding communication that is conspicuously marked or otherwise
|
|
70
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
71
|
+
|
|
72
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
73
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
74
|
+
subsequently incorporated within the Work.
|
|
75
|
+
|
|
76
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
77
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
78
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
79
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
80
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
81
|
+
Work and such Derivative Works in Source or Object form.
|
|
82
|
+
|
|
83
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
84
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
85
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
86
|
+
(except as stated in this section) patent license to make, have made,
|
|
87
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
88
|
+
where such license applies only to those patent claims licensable
|
|
89
|
+
by such Contributor that are necessarily infringed by their
|
|
90
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
91
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
92
|
+
institute patent litigation against any entity (including a
|
|
93
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
94
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
95
|
+
or contributory patent infringement, then any patent licenses
|
|
96
|
+
granted to You under this License for that Work shall terminate
|
|
97
|
+
as of the date such litigation is filed.
|
|
98
|
+
|
|
99
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
100
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
101
|
+
modifications, and in Source or Object form, provided that You
|
|
102
|
+
meet the following conditions:
|
|
103
|
+
|
|
104
|
+
(a) You must give any other recipients of the Work or
|
|
105
|
+
Derivative Works a copy of this License; and
|
|
106
|
+
|
|
107
|
+
(b) You must cause any modified files to carry prominent notices
|
|
108
|
+
stating that You changed the files; and
|
|
109
|
+
|
|
110
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
111
|
+
that You distribute, all copyright, patent, trademark, and
|
|
112
|
+
attribution notices from the Source form of the Work,
|
|
113
|
+
excluding those notices that do not pertain to any part of
|
|
114
|
+
the Derivative Works; and
|
|
115
|
+
|
|
116
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
117
|
+
distribution, then any Derivative Works that You distribute must
|
|
118
|
+
include a readable copy of the attribution notices contained
|
|
119
|
+
within such NOTICE file, excluding those notices that do not
|
|
120
|
+
pertain to any part of the Derivative Works, in at least one
|
|
121
|
+
of the following places: within a NOTICE text file distributed
|
|
122
|
+
as part of the Derivative Works; within the Source form or
|
|
123
|
+
documentation, if provided along with the Derivative Works; or,
|
|
124
|
+
within a display generated by the Derivative Works, if and
|
|
125
|
+
wherever such third-party notices normally appear. The contents
|
|
126
|
+
of the NOTICE file are for informational purposes only and
|
|
127
|
+
do not modify the License. You may add Your own attribution
|
|
128
|
+
notices within Derivative Works that You distribute, alongside
|
|
129
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
130
|
+
that such additional attribution notices cannot be construed
|
|
131
|
+
as modifying the License.
|
|
132
|
+
|
|
133
|
+
You may add Your own copyright statement to Your modifications and
|
|
134
|
+
may provide additional or different license terms and conditions
|
|
135
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
136
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
137
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
138
|
+
the conditions stated in this License.
|
|
139
|
+
|
|
140
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
141
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
142
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
143
|
+
this License, without any additional terms or conditions.
|
|
144
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
145
|
+
the terms of any separate license agreement you may have executed
|
|
146
|
+
with Licensor regarding such Contributions.
|
|
147
|
+
|
|
148
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
149
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
150
|
+
except as required for reasonable and customary use in describing the
|
|
151
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
152
|
+
|
|
153
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
154
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
155
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
156
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
157
|
+
implied, including, without limitation, any warranties or conditions
|
|
158
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
159
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
160
|
+
appropriateness of using or redistributing the Work and assume any
|
|
161
|
+
risks associated with Your exercise of permissions under this License.
|
|
162
|
+
|
|
163
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
164
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
165
|
+
unless required by applicable law (such as deliberate and grossly
|
|
166
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
167
|
+
liable to You for damages, including any direct, indirect, special,
|
|
168
|
+
incidental, or consequential damages of any character arising as a
|
|
169
|
+
result of this License or out of the use or inability to use the
|
|
170
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
171
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
172
|
+
other commercial damages or losses), even if such Contributor
|
|
173
|
+
has been advised of the possibility of such damages.
|
|
174
|
+
|
|
175
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
176
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
177
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
178
|
+
or other liability obligations and/or rights consistent with this
|
|
179
|
+
License. However, in accepting such obligations, You may act only
|
|
180
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
181
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
182
|
+
defend, and hold each Contributor harmless for any liability
|
|
183
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
184
|
+
of your accepting any such warranty or additional liability.
|
|
185
|
+
|
|
186
|
+
END OF TERMS AND CONDITIONS
|
|
187
|
+
|
|
188
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
189
|
+
|
|
190
|
+
To apply the Apache License to your work, attach the following
|
|
191
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
192
|
+
replaced with your own identifying information. (Don't include
|
|
193
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
194
|
+
comment syntax for the file format. We also recommend that a
|
|
195
|
+
file or class name and description of purpose be included on the
|
|
196
|
+
same "printed page" as the copyright notice for easier
|
|
197
|
+
identification within third-party archives.
|
|
198
|
+
|
|
199
|
+
Copyright [yyyy] [name of copyright owner]
|
|
200
|
+
|
|
201
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
202
|
+
you may not use this file except in compliance with the License.
|
|
203
|
+
You may obtain a copy of the License at
|
|
204
|
+
|
|
205
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
206
|
+
|
|
207
|
+
Unless required by applicable law or agreed to in writing, software
|
|
208
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
209
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
210
|
+
See the License for the specific language governing permissions and
|
|
211
|
+
limitations under the License.
|
|
212
|
+
License-File: LICENSE
|
|
213
|
+
Keywords: ci,code-review,gitlab,open-code-review
|
|
214
|
+
Classifier: Development Status :: 4 - Beta
|
|
215
|
+
Classifier: Environment :: Console
|
|
216
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
217
|
+
Classifier: Operating System :: MacOS
|
|
218
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
219
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
220
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
221
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
222
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
223
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
224
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
225
|
+
Classifier: Typing :: Typed
|
|
226
|
+
Requires-Python: <3.15,>=3.10
|
|
227
|
+
Description-Content-Type: text/markdown
|
|
228
|
+
|
|
229
|
+
# Open Code Review Toolkit
|
|
230
|
+
|
|
231
|
+
Open Code Review Toolkit is an unofficial GitLab CI integration layer for [Alibaba Open Code Review](https://github.com/alibaba/open-code-review). It provides bounded repository context generation, environment-driven OCR configuration, preflight validation, and safe GitLab merge-request posting. It does **not** bundle or download the `ocr` binary.
|
|
232
|
+
|
|
233
|
+
> [!NOTE]
|
|
234
|
+
> The project is under active development. It currently targets Python 3.10-3.14 on Linux and macOS; the public API, CLI, environment contract, and generated schemas may evolve before 1.0.
|
|
235
|
+
|
|
236
|
+
## Install
|
|
237
|
+
|
|
238
|
+
Install the Python package from PyPI and install a supported OCR binary separately:
|
|
239
|
+
|
|
240
|
+
```console
|
|
241
|
+
python -m pip install open-code-review-toolkit
|
|
242
|
+
ocr --version
|
|
243
|
+
ocr-ci --help
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
The current compatibility target is OCR `1.7.13`. CI should pin the release and verify its published checksum before execution.
|
|
247
|
+
Review output defaults to English. Set `OCR_REVIEW_LANGUAGE=Russian` to use Russian consistently in both OCR configuration and generated review context.
|
|
248
|
+
|
|
249
|
+
Stable distributions are published to [PyPI](https://pypi.org/project/open-code-review-toolkit/) and mirrored as checksum-listed, provenance-attested assets in the corresponding [GitHub Release](https://github.com/xeonvs/open-code-review-toolkit/releases). Development snapshots are published only to TestPyPI.
|
|
250
|
+
|
|
251
|
+
## GitLab CI quick start
|
|
252
|
+
|
|
253
|
+
1. Configure protected/masked `GITLAB_API_TOKEN` and LLM variables in GitLab.
|
|
254
|
+
2. Pin and checksum the OCR binary.
|
|
255
|
+
3. Install this package.
|
|
256
|
+
4. Run the five helper stages around `ocr review`:
|
|
257
|
+
|
|
258
|
+
```console
|
|
259
|
+
ocr-ci preflight
|
|
260
|
+
ocr-ci configure
|
|
261
|
+
ocr-ci mcp-config
|
|
262
|
+
ocr-ci context --output .review-context/dependencies.md
|
|
263
|
+
# run: ocr review ... --format json
|
|
264
|
+
ocr-ci post --result /tmp/ocr-result.json --stderr /tmp/ocr-stderr.log
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
See the fully synthetic [`examples/gitlab/ocr-review.gitlab-ci.yml`](examples/gitlab/ocr-review.gitlab-ci.yml) and the [GitLab guide](docs/gitlab.md).
|
|
268
|
+
|
|
269
|
+
## Configuration and safety
|
|
270
|
+
|
|
271
|
+
Configuration is environment-only in v0.1. The [configuration reference](docs/configuration.md) documents supported `OCR_*`, `CI_*`, `GITLAB_*`, and MCP inputs. Posting requires `GITLAB_API_TOKEN`; job tokens and legacy aliases are deliberately unsupported.
|
|
272
|
+
|
|
273
|
+
Repository content, OCR output, and provider responses are untrusted inputs. The toolkit applies bounded reads and writes, secret redaction, Unicode normalization, Markdown/quick-action neutralization, fingerprinted comments, ownership boundaries for human replies, and rollback controls. Review the [security and trust model](docs/security.md) before enabling write access.
|
|
274
|
+
|
|
275
|
+
## Development and release
|
|
276
|
+
|
|
277
|
+
- [Contributing](CONTRIBUTING.md)
|
|
278
|
+
- [Development guide](docs/development.md)
|
|
279
|
+
- [Security policy](SECURITY.md)
|
|
280
|
+
- [Release process](docs/release.md)
|
|
281
|
+
- [Changelog](CHANGELOG.md)
|
|
282
|
+
|
|
283
|
+
Licensed under Apache-2.0.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Open Code Review Toolkit
|
|
2
|
+
|
|
3
|
+
Open Code Review Toolkit is an unofficial GitLab CI integration layer for [Alibaba Open Code Review](https://github.com/alibaba/open-code-review). It provides bounded repository context generation, environment-driven OCR configuration, preflight validation, and safe GitLab merge-request posting. It does **not** bundle or download the `ocr` binary.
|
|
4
|
+
|
|
5
|
+
> [!NOTE]
|
|
6
|
+
> The project is under active development. It currently targets Python 3.10-3.14 on Linux and macOS; the public API, CLI, environment contract, and generated schemas may evolve before 1.0.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
Install the Python package from PyPI and install a supported OCR binary separately:
|
|
11
|
+
|
|
12
|
+
```console
|
|
13
|
+
python -m pip install open-code-review-toolkit
|
|
14
|
+
ocr --version
|
|
15
|
+
ocr-ci --help
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The current compatibility target is OCR `1.7.13`. CI should pin the release and verify its published checksum before execution.
|
|
19
|
+
Review output defaults to English. Set `OCR_REVIEW_LANGUAGE=Russian` to use Russian consistently in both OCR configuration and generated review context.
|
|
20
|
+
|
|
21
|
+
Stable distributions are published to [PyPI](https://pypi.org/project/open-code-review-toolkit/) and mirrored as checksum-listed, provenance-attested assets in the corresponding [GitHub Release](https://github.com/xeonvs/open-code-review-toolkit/releases). Development snapshots are published only to TestPyPI.
|
|
22
|
+
|
|
23
|
+
## GitLab CI quick start
|
|
24
|
+
|
|
25
|
+
1. Configure protected/masked `GITLAB_API_TOKEN` and LLM variables in GitLab.
|
|
26
|
+
2. Pin and checksum the OCR binary.
|
|
27
|
+
3. Install this package.
|
|
28
|
+
4. Run the five helper stages around `ocr review`:
|
|
29
|
+
|
|
30
|
+
```console
|
|
31
|
+
ocr-ci preflight
|
|
32
|
+
ocr-ci configure
|
|
33
|
+
ocr-ci mcp-config
|
|
34
|
+
ocr-ci context --output .review-context/dependencies.md
|
|
35
|
+
# run: ocr review ... --format json
|
|
36
|
+
ocr-ci post --result /tmp/ocr-result.json --stderr /tmp/ocr-stderr.log
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
See the fully synthetic [`examples/gitlab/ocr-review.gitlab-ci.yml`](examples/gitlab/ocr-review.gitlab-ci.yml) and the [GitLab guide](docs/gitlab.md).
|
|
40
|
+
|
|
41
|
+
## Configuration and safety
|
|
42
|
+
|
|
43
|
+
Configuration is environment-only in v0.1. The [configuration reference](docs/configuration.md) documents supported `OCR_*`, `CI_*`, `GITLAB_*`, and MCP inputs. Posting requires `GITLAB_API_TOKEN`; job tokens and legacy aliases are deliberately unsupported.
|
|
44
|
+
|
|
45
|
+
Repository content, OCR output, and provider responses are untrusted inputs. The toolkit applies bounded reads and writes, secret redaction, Unicode normalization, Markdown/quick-action neutralization, fingerprinted comments, ownership boundaries for human replies, and rollback controls. Review the [security and trust model](docs/security.md) before enabling write access.
|
|
46
|
+
|
|
47
|
+
## Development and release
|
|
48
|
+
|
|
49
|
+
- [Contributing](CONTRIBUTING.md)
|
|
50
|
+
- [Development guide](docs/development.md)
|
|
51
|
+
- [Security policy](SECURITY.md)
|
|
52
|
+
- [Release process](docs/release.md)
|
|
53
|
+
- [Changelog](CHANGELOG.md)
|
|
54
|
+
|
|
55
|
+
Licensed under Apache-2.0.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported versions
|
|
4
|
+
|
|
5
|
+
Before 1.0, only the newest published release receives security fixes.
|
|
6
|
+
|
|
7
|
+
## Reporting a vulnerability
|
|
8
|
+
|
|
9
|
+
Use [GitHub private vulnerability reporting](https://github.com/xeonvs/open-code-review-toolkit/security/advisories/new) for this repository. Do not open a public issue or attach live credentials, proprietary source, or production provider responses. Include a minimal synthetic reproducer, impact, affected version, and suggested mitigation when available.
|
|
10
|
+
|
|
11
|
+
Maintainers will acknowledge a report within five business days, privately validate severity and affected versions, and coordinate disclosure only after a fix or documented mitigation is available. Critical fixes are released as soon as practical; reporters receive status updates at least every ten business days while investigation remains open.
|
|
12
|
+
|
|
13
|
+
The runtime trust model and deployment guidance are documented in [docs/security.md](docs/security.md).
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Agent Execution Pitfalls
|
|
2
|
+
|
|
3
|
+
This note records recurring execution mistake patterns discovered during real work. Record generalized lessons, not one-off complaints.
|
|
4
|
+
|
|
5
|
+
## Planning And Context Discipline
|
|
6
|
+
|
|
7
|
+
- Do not leave durable scope, source boundaries, or resume state only in chat; keep the active plan current.
|
|
8
|
+
- Do not treat a local working specification as publishable documentation; translate its public requirements and keep private audit criteria outside tracked files.
|
|
9
|
+
- Do not silently reduce extraction scope because the source is large; split it into coherent, validated subsystem slices.
|
|
10
|
+
- Do not commit completed work while the active plan still says `planned` or `in_progress`.
|
|
11
|
+
|
|
12
|
+
## Source And Privacy Boundaries
|
|
13
|
+
|
|
14
|
+
- Inventory tracked source explicitly and avoid broad copy commands that could include ignored or untracked files.
|
|
15
|
+
- Do not turn one-time private marker criteria into a tracked denylist or test fixture.
|
|
16
|
+
- Do not use real provider payloads, hosts, repositories, or credentials in public fixtures.
|
|
17
|
+
|
|
18
|
+
## Tooling And Validation Hygiene
|
|
19
|
+
|
|
20
|
+
- Prefer the narrowest reproducer before broad reruns.
|
|
21
|
+
- Verify both UTF-8 byte limits and Python character limits when changing note formatting.
|
|
22
|
+
- Treat tests, lint, typing, artifact checks, install smoke, privacy scans, and source-integrity checks as distinct gates.
|
|
23
|
+
- Pin third-party Actions by full commit SHA and keep readable version comments beside the pin.
|
|
24
|
+
|
|
25
|
+
## Learning Loop
|
|
26
|
+
|
|
27
|
+
- Promote a repeated stable lesson into `docs/engineering/project_principles.md`.
|
|
28
|
+
- Record actionable future work in `docs/codex/TASKS_BACKLOG.md` only when it has an activation trigger and next safe action.
|