forgeproof-cli 0.2.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.
- forgeproof_cli-0.2.0/LICENSE +201 -0
- forgeproof_cli-0.2.0/NOTICE +23 -0
- forgeproof_cli-0.2.0/PKG-INFO +285 -0
- forgeproof_cli-0.2.0/README.md +259 -0
- forgeproof_cli-0.2.0/pyproject.toml +63 -0
- forgeproof_cli-0.2.0/setup.cfg +4 -0
- forgeproof_cli-0.2.0/src/forge_gate/__init__.py +44 -0
- forgeproof_cli-0.2.0/src/forge_gate/_deprecated_cli.py +16 -0
- forgeproof_cli-0.2.0/src/forgeproof/__init__.py +3 -0
- forgeproof_cli-0.2.0/src/forgeproof/catalog.py +110 -0
- forgeproof_cli-0.2.0/src/forgeproof/cli.py +560 -0
- forgeproof_cli-0.2.0/src/forgeproof/config.py +339 -0
- forgeproof_cli-0.2.0/src/forgeproof/data/gate_catalog.json +66 -0
- forgeproof_cli-0.2.0/src/forgeproof/data/host_sets.json +7 -0
- forgeproof_cli-0.2.0/src/forgeproof/debug_caller.py +271 -0
- forgeproof_cli-0.2.0/src/forgeproof/debug_core.py +368 -0
- forgeproof_cli-0.2.0/src/forgeproof/fixture_engine.py +81 -0
- forgeproof_cli-0.2.0/src/forgeproof/fixtures/__init__.py +19 -0
- forgeproof_cli-0.2.0/src/forgeproof/fixtures/decision_tree_id3.py +90 -0
- forgeproof_cli-0.2.0/src/forgeproof/fixtures/gradient_descent_momentum.py +73 -0
- forgeproof_cli-0.2.0/src/forgeproof/fixtures/kmeans_clustering.py +98 -0
- forgeproof_cli-0.2.0/src/forgeproof/fixtures/knn_classifier.py +79 -0
- forgeproof_cli-0.2.0/src/forgeproof/fixtures/linear_regression_gd.py +77 -0
- forgeproof_cli-0.2.0/src/forgeproof/fixtures/logistic_regression.py +85 -0
- forgeproof_cli-0.2.0/src/forgeproof/fixtures/naive_bayes_text.py +114 -0
- forgeproof_cli-0.2.0/src/forgeproof/fixtures/perceptron.py +84 -0
- forgeproof_cli-0.2.0/src/forgeproof/fixtures/polynomial_regression.py +67 -0
- forgeproof_cli-0.2.0/src/forgeproof/fixtures/ridge_regression_normal_eq.py +75 -0
- forgeproof_cli-0.2.0/src/forgeproof/ledger.py +633 -0
- forgeproof_cli-0.2.0/src/forgeproof/lens_tools/__init__.py +11 -0
- forgeproof_cli-0.2.0/src/forgeproof/lens_tools/guard_lens.py +1250 -0
- forgeproof_cli-0.2.0/src/forgeproof/lens_tools/invariant_contracts/linear_regression_gd.json +74 -0
- forgeproof_cli-0.2.0/src/forgeproof/lens_tools/invariant_contracts/polynomial_regression.json +86 -0
- forgeproof_cli-0.2.0/src/forgeproof/lens_tools/invariant_contracts/ridge_regression_normal_eq.json +86 -0
- forgeproof_cli-0.2.0/src/forgeproof/lens_tools/invariant_gate.py +199 -0
- forgeproof_cli-0.2.0/src/forgeproof/lens_tools/metamorphic/__init__.py +9 -0
- forgeproof_cli-0.2.0/src/forgeproof/lens_tools/metamorphic/relations.py +962 -0
- forgeproof_cli-0.2.0/src/forgeproof/lens_tools/metamorphic/runner.py +112 -0
- forgeproof_cli-0.2.0/src/forgeproof/lens_tools/twin_consensus.py +395 -0
- forgeproof_cli-0.2.0/src/forgeproof/lenses.py +923 -0
- forgeproof_cli-0.2.0/src/forgeproof/paths.py +56 -0
- forgeproof_cli-0.2.0/src/forgeproof/reference/ORIGIN.md +29 -0
- forgeproof_cli-0.2.0/src/forgeproof/reference/decision_tree_id3.py +197 -0
- forgeproof_cli-0.2.0/src/forgeproof/reference/gradient_descent_momentum.py +141 -0
- forgeproof_cli-0.2.0/src/forgeproof/reference/kmeans_clustering.py +139 -0
- forgeproof_cli-0.2.0/src/forgeproof/reference/knn_classifier.py +118 -0
- forgeproof_cli-0.2.0/src/forgeproof/reference/linear_regression_gd.py +106 -0
- forgeproof_cli-0.2.0/src/forgeproof/reference/logistic_regression.py +141 -0
- forgeproof_cli-0.2.0/src/forgeproof/reference/naive_bayes_text.py +152 -0
- forgeproof_cli-0.2.0/src/forgeproof/reference/perceptron.py +123 -0
- forgeproof_cli-0.2.0/src/forgeproof/reference/polynomial_regression.py +125 -0
- forgeproof_cli-0.2.0/src/forgeproof/reference/ridge_regression_normal_eq.py +165 -0
- forgeproof_cli-0.2.0/src/forgeproof/runner.py +147 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/__init__.py +7 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/behaviour.py +365 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/box.py +581 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/cards.py +180 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/contract.py +37 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/corpus.py +104 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/embed.py +217 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/engines/__init__.py +1 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/engines/chaos.py +454 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/engines/chaos_port.py +1331 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/engines/chaos_runner.py +178 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/engines/executor_port.py +239 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/envfit.py +54 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/experience.py +161 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/fetchproxy.py +368 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/ghcache.py +395 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/ghpool.py +253 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/ghsearch.py +248 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/ids.py +82 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/intent_lens.py +170 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/learn.py +583 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/meaning_lens.py +231 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/outcomes.py +42 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/plant.py +327 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/ratify.py +214 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/report.py +448 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/rule2.py +177 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/shape.py +107 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/shape_lens.py +71 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/signature.py +52 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/slots.py +39 -0
- forgeproof_cli-0.2.0/src/forgeproof/scout/upstream_facts.py +536 -0
- forgeproof_cli-0.2.0/src/forgeproof/unsupported.py +83 -0
- forgeproof_cli-0.2.0/src/forgeproof/verifier.py +208 -0
- forgeproof_cli-0.2.0/src/forgeproof/view_coverage.py +166 -0
- forgeproof_cli-0.2.0/src/forgeproof_cli.egg-info/PKG-INFO +285 -0
- forgeproof_cli-0.2.0/src/forgeproof_cli.egg-info/SOURCES.txt +141 -0
- forgeproof_cli-0.2.0/src/forgeproof_cli.egg-info/dependency_links.txt +1 -0
- forgeproof_cli-0.2.0/src/forgeproof_cli.egg-info/entry_points.txt +3 -0
- forgeproof_cli-0.2.0/src/forgeproof_cli.egg-info/requires.txt +8 -0
- forgeproof_cli-0.2.0/src/forgeproof_cli.egg-info/top_level.txt +2 -0
- forgeproof_cli-0.2.0/tests/test_box.py +439 -0
- forgeproof_cli-0.2.0/tests/test_cli.py +87 -0
- forgeproof_cli-0.2.0/tests/test_debug_caller.py +239 -0
- forgeproof_cli-0.2.0/tests/test_debug_reify.py +125 -0
- forgeproof_cli-0.2.0/tests/test_debug_shrink.py +135 -0
- forgeproof_cli-0.2.0/tests/test_deps_lock.py +61 -0
- forgeproof_cli-0.2.0/tests/test_determinism_unsupported.py +61 -0
- forgeproof_cli-0.2.0/tests/test_fetchproxy.py +296 -0
- forgeproof_cli-0.2.0/tests/test_fg_common.py +260 -0
- forgeproof_cli-0.2.0/tests/test_fg_gate.py +752 -0
- forgeproof_cli-0.2.0/tests/test_fg_mutrun.py +964 -0
- forgeproof_cli-0.2.0/tests/test_ghcache.py +515 -0
- forgeproof_cli-0.2.0/tests/test_github_facts.py +757 -0
- forgeproof_cli-0.2.0/tests/test_github_lane_s1.py +250 -0
- forgeproof_cli-0.2.0/tests/test_guard_unsupported.py +75 -0
- forgeproof_cli-0.2.0/tests/test_ledger.py +743 -0
- forgeproof_cli-0.2.0/tests/test_ledger_cli.py +396 -0
- forgeproof_cli-0.2.0/tests/test_ledger_routes.py +168 -0
- forgeproof_cli-0.2.0/tests/test_ledger_scout.py +243 -0
- forgeproof_cli-0.2.0/tests/test_ledger_verify.py +272 -0
- forgeproof_cli-0.2.0/tests/test_lens_wire_up.py +708 -0
- forgeproof_cli-0.2.0/tests/test_lenses.py +218 -0
- forgeproof_cli-0.2.0/tests/test_live_library.py +54 -0
- forgeproof_cli-0.2.0/tests/test_meta_inv_unsupported.py +96 -0
- forgeproof_cli-0.2.0/tests/test_paths.py +92 -0
- forgeproof_cli-0.2.0/tests/test_purity_gate.py +78 -0
- forgeproof_cli-0.2.0/tests/test_ratify.py +248 -0
- forgeproof_cli-0.2.0/tests/test_relation_soundness.py +131 -0
- forgeproof_cli-0.2.0/tests/test_rename_shim.py +53 -0
- forgeproof_cli-0.2.0/tests/test_report_ucodes.py +95 -0
- forgeproof_cli-0.2.0/tests/test_routes.py +253 -0
- forgeproof_cli-0.2.0/tests/test_scout_behaviour.py +190 -0
- forgeproof_cli-0.2.0/tests/test_scout_cards.py +156 -0
- forgeproof_cli-0.2.0/tests/test_scout_chaos.py +721 -0
- forgeproof_cli-0.2.0/tests/test_scout_chaos_parity.py +353 -0
- forgeproof_cli-0.2.0/tests/test_scout_embed.py +363 -0
- forgeproof_cli-0.2.0/tests/test_scout_experience.py +337 -0
- forgeproof_cli-0.2.0/tests/test_scout_ghsearch.py +351 -0
- forgeproof_cli-0.2.0/tests/test_scout_intent.py +201 -0
- forgeproof_cli-0.2.0/tests/test_scout_learn.py +691 -0
- forgeproof_cli-0.2.0/tests/test_scout_learn_brain.py +290 -0
- forgeproof_cli-0.2.0/tests/test_scout_learn_github.py +336 -0
- forgeproof_cli-0.2.0/tests/test_scout_meaning.py +415 -0
- forgeproof_cli-0.2.0/tests/test_scout_slice1.py +282 -0
- forgeproof_cli-0.2.0/tests/test_shell_gates.py +66 -0
- forgeproof_cli-0.2.0/tests/test_twin_consensus.py +79 -0
- forgeproof_cli-0.2.0/tests/test_twin_unsupported.py +82 -0
- forgeproof_cli-0.2.0/tests/test_unsupported.py +102 -0
- forgeproof_cli-0.2.0/tests/test_view_coverage.py +171 -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 Derivative
|
|
95
|
+
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 2026 Illia Hladkyi
|
|
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,23 @@
|
|
|
1
|
+
ForgeProof
|
|
2
|
+
Copyright 2026 Illia Hladkyi (Reality Optimizer)
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
5
|
+
this file except in compliance with the License. A copy of the License is in the
|
|
6
|
+
LICENSE file, or at http://www.apache.org/licenses/LICENSE-2.0.
|
|
7
|
+
|
|
8
|
+
--------------------------------------------------------------------------------
|
|
9
|
+
Code that came from other projects. Every one is by the same author and ships here
|
|
10
|
+
under this repository's Apache-2.0 licence.
|
|
11
|
+
|
|
12
|
+
src/forgeproof/reference/
|
|
13
|
+
Byte copies of 10 patterns from the AURA Pattern Library (Apache-2.0).
|
|
14
|
+
Source commit and per-file sha256: src/forgeproof/reference/ORIGIN.md.
|
|
15
|
+
|
|
16
|
+
src/forgeproof/scout/shape.py
|
|
17
|
+
Ported from aura-code-corpus (src/code_corpus/shape.py, checkout c5129d2), an
|
|
18
|
+
unpublished project. The file's header gives the source md5.
|
|
19
|
+
|
|
20
|
+
src/forgeproof/scout/engines/executor_port.py
|
|
21
|
+
Ported from the AURA pattern-scoring validator (executor.py, lines 14-243), an
|
|
22
|
+
unpublished project. The file's header gives the source sha256 and records the
|
|
23
|
+
two comment edits made after the port.
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: forgeproof-cli
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Deterministic regression gate for code-generating agents, with reference implementations from the AURA pattern library.
|
|
5
|
+
Author-email: Illia Hladkyi <ihladkyi@realityoptimizer.app>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Keywords: ai-agent,verification,regression-testing,code-quality,deterministic-oracle
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Topic :: Software Development :: Testing
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
License-File: NOTICE
|
|
20
|
+
Requires-Dist: tomli>=2.0; python_version < "3.11"
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: pytest; extra == "dev"
|
|
23
|
+
Requires-Dist: pytest-timeout; extra == "dev"
|
|
24
|
+
Requires-Dist: setuptools>=61; extra == "dev"
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# ForgeProof
|
|
28
|
+
|
|
29
|
+
> **Renamed.** Forge Gate is now **ForgeProof** (2026-11-25). The name `forgegate` was already
|
|
30
|
+
> taken on PyPI and npm by another tool for AI agents, so we changed ours before the first release.
|
|
31
|
+
> For one release the old `forge-gate` command and `forge_gate` import still work and print a notice
|
|
32
|
+
> (see [`CHANGELOG.md`](CHANGELOG.md)). Links to the old repository address redirect here.
|
|
33
|
+
>
|
|
34
|
+
> **What the name means.** Read it like *waterproof* or *foolproof*: forged code does not get
|
|
35
|
+
> through. "Forge" keeps the project's history. "Proof" comes from the gunsmiths' proof house,
|
|
36
|
+
> where every barrel is test-fired with an extra-strong charge before it may be sold. ForgeProof
|
|
37
|
+
> does the same with code: it runs it, plants known faults as controls, and stamps a receipt.
|
|
38
|
+
> Other projects also use the name ForgeProof; this one checks AI-written code **by running it**.
|
|
39
|
+
|
|
40
|
+
ForgeProof checks code written by AI by **running it** next to a known-correct version on the
|
|
41
|
+
same inputs, and reports whether it behaves correctly. The known-correct versions come from the
|
|
42
|
+
signed AURA pattern library and ship inside the package. No language model takes part in any
|
|
43
|
+
verdict.
|
|
44
|
+
|
|
45
|
+
**New here? Start with [`docs/getting-started.md`](docs/getting-started.md):** from a clean clone
|
|
46
|
+
to a real PASS and a real FAIL in a few minutes.
|
|
47
|
+
|
|
48
|
+
## Why it exists
|
|
49
|
+
|
|
50
|
+
An AI agent can write code, write the tests for it, and report that the tests are green. All three
|
|
51
|
+
come from the same author, so a green run proves less than it seems. A test that cannot fail
|
|
52
|
+
passes, and a suite that never looks at the broken line passes too.
|
|
53
|
+
|
|
54
|
+
ForgeProof asks two questions that do not depend on trusting the author:
|
|
55
|
+
|
|
56
|
+
1. **Does this code behave like a correct implementation?** It runs your file and a reference
|
|
57
|
+
implementation on the same seed-locked input, and judges the result through several
|
|
58
|
+
independent lenses (below).
|
|
59
|
+
2. **Would the tests notice if the code were wrong?** The shared tools in `tools/` plant small
|
|
60
|
+
deliberate bugs ("mutants"), re-run the tests, and report which bugs the suite missed.
|
|
61
|
+
|
|
62
|
+
## Status
|
|
63
|
+
|
|
64
|
+
Alpha (0.2.0). Not on PyPI yet: install from a checkout. On PyPI the package will be called
|
|
65
|
+
`forgeproof-cli` (`forgeproof` is too close to an existing project there); the command and the
|
|
66
|
+
import stay `forgeproof`. The verify gate covers 10 Python
|
|
67
|
+
patterns. Several commands (`scout`, `learn`, `ledger`, `chaos-calibrate`) are advisory or
|
|
68
|
+
plumbing today. **`KNOWN-DEBT.md` lists every known gap**: what it
|
|
69
|
+
is, where, what "fixed" will look like, and who owns it.
|
|
70
|
+
|
|
71
|
+
## Install
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
git clone https://github.com/myfjin/forgeproof.git && cd forgeproof
|
|
75
|
+
python3 -m venv .venv && .venv/bin/pip install . pytest pytest-timeout "setuptools>=61"
|
|
76
|
+
PYTHONPATH=src .venv/bin/python -m pytest -q # default tier: fixtures only, no network, no library
|
|
77
|
+
npm ci # only for the JS oracle (TypeScript type gate)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
An install runs every lens on its own: the lens tools ship inside the package (`KNOWN-DEBT.md`,
|
|
81
|
+
KD-2, fixed 2026-11-25), so no `FORGE_GATE_HOME` is needed for a verdict. The clone is needed for
|
|
82
|
+
the tests, the shared tools in `tools/` and the JS oracle.
|
|
83
|
+
|
|
84
|
+
Python 3.10 or newer. Without `npm ci` the JS oracle's type gate reports `unavailable`. The JS
|
|
85
|
+
oracle is a checkout gate (`pytest -m js`), not a `verify` lens, so a pip install does not have it.
|
|
86
|
+
|
|
87
|
+
## Configuration
|
|
88
|
+
|
|
89
|
+
ForgeProof reads no other project unless you tell it where. Each setting is an
|
|
90
|
+
environment variable, or a key in `config.toml` `[paths]` (per host, not tracked; copy
|
|
91
|
+
`config.example.toml`). The environment wins.
|
|
92
|
+
|
|
93
|
+
| key | needed for | default |
|
|
94
|
+
|---|---|---|
|
|
95
|
+
| `FORGE_GATE_LIBRARY_DIR` | the twin-consensus lens, `pytest -m live`, library tools | none: unset, those fail naming the key |
|
|
96
|
+
| `FORGE_GATE_HOME` | where `config.toml` is read, and `github-facts`' test runner (a checkout tool); no lens needs it | the checkout |
|
|
97
|
+
| `FORGE_GATE_PYTHON` | child runs (oracles, fixtures, lenses) | the interpreter running ForgeProof |
|
|
98
|
+
| `FORGE_GATE_NODE`, `_BUN`, `_QJS` | the JS oracle's three engines | `PATH` |
|
|
99
|
+
| `FORGE_GATE_SCRATCH` | short-lived lens scripts | `<checkout>/tmp` |
|
|
100
|
+
|
|
101
|
+
`deps.lock` pins what each outside route was checked against.
|
|
102
|
+
|
|
103
|
+
## Usage
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# List gate-ready patterns
|
|
107
|
+
forgeproof list
|
|
108
|
+
|
|
109
|
+
# Verify a user implementation against a seed-locked oracle
|
|
110
|
+
forgeproof verify myfile.py --pattern linear_regression_gd
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
A verdict is `PASS`, `FAIL`, `UNSTABLE` or `UNSUPPORTED`, with one line per lens. `UNSUPPORTED`
|
|
114
|
+
means a lens could not measure here and says why; it is never a pass in disguise. `UNSTABLE`
|
|
115
|
+
means a lens errored or the references disagreed, so no verdict could be trusted.
|
|
116
|
+
|
|
117
|
+
## The lenses
|
|
118
|
+
|
|
119
|
+
| lens | the question it asks |
|
|
120
|
+
|---|---|
|
|
121
|
+
| property-primary | do the results have the properties a correct implementation must have? |
|
|
122
|
+
| metamorphic | if the input changes in a known way, does the output change the way it must? |
|
|
123
|
+
| invariant | do the rules that must always hold, hold? |
|
|
124
|
+
| twin-consensus | do implementations of the same pattern in other languages agree? |
|
|
125
|
+
| determinism | do repeated runs with a fixed seed give the same answer? |
|
|
126
|
+
| guard | given NaN (not-a-number) as input, does the code pass it on honestly, or quietly return a plausible number? Infinity is tried too, but only recorded. Needs no reference at all (`docs/GUARD_LENS.md`) |
|
|
127
|
+
|
|
128
|
+
## Examples
|
|
129
|
+
|
|
130
|
+
The `examples/` directory contains self-contained reference implementations for
|
|
131
|
+
gate-ready patterns. Run them standalone, or pass them to the gate to see a live
|
|
132
|
+
`PASS`/`FAIL` verdict:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
python examples/linear_regression_gd_good.py
|
|
136
|
+
forgeproof verify examples/linear_regression_gd_good.py --pattern linear_regression_gd
|
|
137
|
+
forgeproof verify examples/linear_regression_gd_bad.py --pattern linear_regression_gd
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Every one of the 10 catalog patterns has a pair: `<pattern>_good.py` and `<pattern>_bad.py`.
|
|
141
|
+
The `_good` files implement the algorithm correctly and print `PASS` via the gate. The `_bad`
|
|
142
|
+
files each contain one deliberate bug and print `FAIL`.
|
|
143
|
+
|
|
144
|
+
Known oddity: `kmeans_clustering_good.py` shows `determinism FAIL` inside a `PASS`. k-means can
|
|
145
|
+
settle on different valid answers from run to run, so that lens is advisory for this one pattern;
|
|
146
|
+
the line does not say so yet (`KNOWN-DEBT.md`, KD-6).
|
|
147
|
+
|
|
148
|
+
## What `verify` does
|
|
149
|
+
|
|
150
|
+
1. Resolves the pattern name in the shipped catalog (`forgeproof/data/gate_catalog.json`).
|
|
151
|
+
2. Loads the shipped reference implementation (`forgeproof/reference/`, byte copies of
|
|
152
|
+
AURA library patterns; commit and sha256 in `reference/ORIGIN.md`).
|
|
153
|
+
3. Runs the user's file in a separate process: fixed seed, 60 s timeout; network cut off where
|
|
154
|
+
the system supports it (Linux `unshare`), not on macOS.
|
|
155
|
+
4. Runs the AURA oracle on the same fixture.
|
|
156
|
+
5. Compares exit codes and numeric outputs within tolerance, and runs the lenses.
|
|
157
|
+
6. Returns PASS / FAIL / UNSTABLE / UNSUPPORTED.
|
|
158
|
+
|
|
159
|
+
No LLM judgment is used in the verdict path. The gate is execution-backed.
|
|
160
|
+
|
|
161
|
+
## Catalog
|
|
162
|
+
|
|
163
|
+
Python-only v1 ships with 10 curated seed-locked oracles:
|
|
164
|
+
|
|
165
|
+
- `kmeans_clustering`
|
|
166
|
+
- `linear_regression_gd`
|
|
167
|
+
- `knn_classifier`
|
|
168
|
+
- `logistic_regression`
|
|
169
|
+
- `naive_bayes_text`
|
|
170
|
+
- `polynomial_regression`
|
|
171
|
+
- `decision_tree_id3`
|
|
172
|
+
- `perceptron`
|
|
173
|
+
- `ridge_regression_normal_eq`
|
|
174
|
+
- `gradient_descent_momentum`
|
|
175
|
+
|
|
176
|
+
## Shared tools: does your test suite test anything?
|
|
177
|
+
|
|
178
|
+
Two tools in `tools/` work on any Python project kept in git and tested with pytest, not only
|
|
179
|
+
ForgeProof (`docs/shared-tools.md`):
|
|
180
|
+
|
|
181
|
+
- **`tools/fg_gate.py`** runs the tests and calls a run green only when it can prove what ran:
|
|
182
|
+
counts from the run's own fresh result file, the tree unchanged by the tests, and any tests you
|
|
183
|
+
name actually run. Stopping it with Ctrl-C stops the tests too.
|
|
184
|
+
- **`tools/fg_mutrun.py`** plants the small bugs you describe, one at a time, runs the tests,
|
|
185
|
+
restores the code, and reports which bugs the tests caught and which survived.
|
|
186
|
+
|
|
187
|
+
ForgeProof's own recent changes were gated this way: each step was reviewed by a separate AI
|
|
188
|
+
agent session, not the one that built it, before it was merged.
|
|
189
|
+
|
|
190
|
+
## Where the code to check comes from
|
|
191
|
+
|
|
192
|
+
ForgeProof doesn't care who wrote a file. It runs it and measures what comes out. In practice,
|
|
193
|
+
code reaches it from four kinds of source, and each one is trusted differently.
|
|
194
|
+
|
|
195
|
+
- **Your own file, or what your AI assistant just wrote.** This is the main case: a script from
|
|
196
|
+
Claude Code, Copilot, Cursor or any other agent, or one you wrote yourself. If it implements one
|
|
197
|
+
of the 10 catalog patterns, `forgeproof verify yourfile.py --pattern <name>` runs it against the
|
|
198
|
+
shipped reference and gives a verdict. Code that matches no catalog pattern gets no verdict; the
|
|
199
|
+
shared tools above can still tell you whether its own tests would notice a bug.
|
|
200
|
+
- **The examples in `examples/`.** A known-good and a known-bad file for every pattern. Use them
|
|
201
|
+
to see what a real `PASS` and a real `FAIL` look like before trusting a verdict on your own code.
|
|
202
|
+
- **The signed reference implementations** in `src/forgeproof/reference/`. These are byte copies
|
|
203
|
+
from the AURA pattern library, a signed collection of self-testing code patterns. They are the
|
|
204
|
+
oracles: ForgeProof compares your code with them and does not judge them.
|
|
205
|
+
- **Pools that `scout` and `learn` read** (advisory today, see Status). A pool is a body of
|
|
206
|
+
existing code that scout searches to answer "what is this code related to?". There are two so
|
|
207
|
+
far. One is a **GitHub pool**: public repositories on a list signed with two keys, each pinned
|
|
208
|
+
to one commit and read from a private cache (KD-13). Today only python/cpython at v3.14.10 is
|
|
209
|
+
on it. The other is the **crew corpus**, described next. Scout reads pool code as
|
|
210
|
+
text and never runs it while searching.
|
|
211
|
+
|
|
212
|
+
### Crew code collector: how we gather the code our own agents write
|
|
213
|
+
|
|
214
|
+
AURA is built by a small crew of AI agents working with one person. Over months they have written
|
|
215
|
+
thousands of scripts: backups, monitors, test harnesses, data tools. Most were written once,
|
|
216
|
+
worked, and were forgotten, and the next agent wrote the same thing again. The **code collector**
|
|
217
|
+
gathers that code so that it can be found, measured, and in the end proven or thrown away.
|
|
218
|
+
|
|
219
|
+
How it works:
|
|
220
|
+
|
|
221
|
+
1. **It harvests after the fact.** Agents don't change how they work. The collector reads the
|
|
222
|
+
session records they already leave behind, and takes out every piece of code they produced:
|
|
223
|
+
files written or edited, scripts passed inline to a shell, and longer shell commands.
|
|
224
|
+
2. **Exclude, scrub, then store, always in that order.** Work done for outside clients is dropped
|
|
225
|
+
first. Secrets, keys, host names, addresses, user names and e-mail addresses are then removed in
|
|
226
|
+
memory, and a second pass checks the scrubbing. Only then is anything written to disk. The store
|
|
227
|
+
refuses any write a secret detector still matches. A separate scanner, sharing no code with the
|
|
228
|
+
scrubber, sweeps the result.
|
|
229
|
+
3. **Every run proves it can fail.** Each run starts by planting fake secrets, fake client files
|
|
230
|
+
and a corrupt record. If they don't land exactly as expected, the run is marked invalid.
|
|
231
|
+
4. **Each item keeps its evidence.** Who wrote it, when, and in which session. Did it **run**, and
|
|
232
|
+
with what exit code? Was it ever **proven red**, meaning run with a deliberately planted bug and
|
|
233
|
+
seen to fail? Is it still **scheduled**, still on disk, or gone? Every answer keeps the evidence
|
|
234
|
+
string it came from. "Not seen running" is recorded as *unknown*, never as *no*, and words alone
|
|
235
|
+
never upgrade an item to proven.
|
|
236
|
+
5. **Near-copies are grouped.** Items with the same shape fall into one cluster. A cluster that
|
|
237
|
+
turns up in two or more projects is a sign the code is worth keeping. A cluster whose members
|
|
238
|
+
drifted apart is kept as a before/after pair. When an agent is about to write a new script, a
|
|
239
|
+
hook can show it the closest existing shapes first: *this already exists, here*.
|
|
240
|
+
6. **Collected is not verified.** The corpus is raw input with the lowest trust. Scout reads it
|
|
241
|
+
only from an export whose manifest and checksums all match; anything else counts as blind, never
|
|
242
|
+
as clean. `forgeproof learn` can test a corpus item, but today only the chaos engine can give it
|
|
243
|
+
a `PASS` (KD-11, KD-12). Code reaches the signed pattern library only through that battery and a
|
|
244
|
+
reviewed harvest, never straight from the corpus.
|
|
245
|
+
|
|
246
|
+
The corpus itself is **private**. It is built from private working conversations, so it is not
|
|
247
|
+
published, and neither is the collector. What this repository ships is the reading side: scout's
|
|
248
|
+
intake checks, and the ledgers that record whether reused code later held up (`KNOWN-DEBT.md`,
|
|
249
|
+
KD-7, KD-11, KD-14).
|
|
250
|
+
|
|
251
|
+
## Where ForgeProof is going
|
|
252
|
+
|
|
253
|
+
ForgeProof is alpha. This is the order we plan to work in, and each step lands only with its
|
|
254
|
+
tests and its known-debt entry.
|
|
255
|
+
|
|
256
|
+
1. **Learn from what scout measures.** Scout already records facts: how well a GitHub project's
|
|
257
|
+
own tests catch planted bugs (`forgeproof github-facts`), and whether code from the crew corpus
|
|
258
|
+
was ever seen running. `learn` reads only the crew corpus today. Next it also reads the GitHub
|
|
259
|
+
facts, first by hand on a copy, and only then on a schedule (`KNOWN-DEBT.md`, KD-17 (a)).
|
|
260
|
+
2. **More reviewed GitHub projects.** About one project every one to two weeks, chosen for a long
|
|
261
|
+
history and real tests rather than for stars. Each one is pinned to one commit, licence-checked
|
|
262
|
+
file by file, and signed before scout reads it.
|
|
263
|
+
3. **All six languages.** The pattern library holds Python, R, Rust, Go, C++ and JavaScript. The
|
|
264
|
+
scores scout reads exist for Python, R and Rust today; Go, C++ and JavaScript need their own
|
|
265
|
+
extractors first.
|
|
266
|
+
4. **A first release on PyPI**, as `forgeproof-cli`. Its condition is met: since KD-2 was fixed
|
|
267
|
+
(2026-11-25), an installed copy runs every lens without a source checkout.
|
|
268
|
+
5. **A free web service.** Paste code and have it checked in an isolated sandbox, with no account.
|
|
269
|
+
You choose whether we may keep your code to improve the checks, and we never show one person's
|
|
270
|
+
code to anyone else. Prefer to keep everything private? Run this repository on your own
|
|
271
|
+
machine. This is a direction, not yet a design: it starts after the steps above, with a legal
|
|
272
|
+
review first.
|
|
273
|
+
|
|
274
|
+
ForgeProof is directed by one person and largely written with AI agents. Every commit says so.
|
|
275
|
+
|
|
276
|
+
## How this repository is made
|
|
277
|
+
|
|
278
|
+
Most of this tree is published from a private working repository by a script that
|
|
279
|
+
scrubs it and refuses to publish when any of its checks fails. `CONTRIBUTING.md` says
|
|
280
|
+
which files are edited here directly, and how a pull request to published code is
|
|
281
|
+
carried back.
|
|
282
|
+
|
|
283
|
+
## Licence
|
|
284
|
+
|
|
285
|
+
Apache-2.0. Copyright 2026 Illia Hladkyi. See `LICENSE` and `NOTICE`.
|