forgeproof-cli 0.2.0__py3-none-any.whl → 0.2.1__py3-none-any.whl
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.
- forge_gate/__init__.py +2 -2
- forge_gate/_deprecated_cli.py +2 -2
- forgeproof/__init__.py +1 -1
- forgeproof/catalog.py +1 -1
- forgeproof/cli.py +5 -3
- forgeproof/config.py +140 -46
- forgeproof/ledger.py +2 -2
- forgeproof/lens_tools/__init__.py +1 -1
- forgeproof/lenses.py +1 -1
- forgeproof/reference/ORIGIN.md +1 -1
- forgeproof/scout/box.py +4 -4
- forgeproof/scout/embed.py +2 -2
- forgeproof/scout/engines/chaos.py +1 -1
- forgeproof/scout/ghcache.py +1 -1
- forgeproof/scout/ghpool.py +2 -2
- forgeproof/scout/ghsearch.py +1 -1
- forgeproof/scout/learn.py +2 -2
- forgeproof/scout/upstream_facts.py +2 -2
- {forgeproof_cli-0.2.0.dist-info → forgeproof_cli-0.2.1.dist-info}/METADATA +25 -12
- {forgeproof_cli-0.2.0.dist-info → forgeproof_cli-0.2.1.dist-info}/RECORD +25 -25
- {forgeproof_cli-0.2.0.dist-info → forgeproof_cli-0.2.1.dist-info}/WHEEL +0 -0
- {forgeproof_cli-0.2.0.dist-info → forgeproof_cli-0.2.1.dist-info}/entry_points.txt +0 -0
- {forgeproof_cli-0.2.0.dist-info → forgeproof_cli-0.2.1.dist-info}/licenses/LICENSE +0 -0
- {forgeproof_cli-0.2.0.dist-info → forgeproof_cli-0.2.1.dist-info}/licenses/NOTICE +0 -0
- {forgeproof_cli-0.2.0.dist-info → forgeproof_cli-0.2.1.dist-info}/top_level.txt +0 -0
forge_gate/__init__.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
``import forge_gate`` and ``import forge_gate.<module>`` keep working for one release: each
|
|
4
4
|
``forge_gate.<module>`` IS ``forgeproof.<module>`` (the same module object). Import ``forgeproof``
|
|
5
|
-
instead; this alias
|
|
5
|
+
instead; this alias is removed in 0.3.0.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
import importlib
|
|
@@ -16,7 +16,7 @@ _OWN = (_OLD + "._deprecated_cli",) # real modules of this shim package, never
|
|
|
16
16
|
|
|
17
17
|
warnings.warn(
|
|
18
18
|
"the 'forge_gate' package was renamed to 'forgeproof' (2026-11-25); import 'forgeproof' instead. "
|
|
19
|
-
"This alias
|
|
19
|
+
"This alias is removed in 0.3.0.",
|
|
20
20
|
DeprecationWarning,
|
|
21
21
|
stacklevel=2,
|
|
22
22
|
)
|
forge_gate/_deprecated_cli.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"""The ``forge-gate`` command: renamed ``forgeproof`` on 2026-11-25. Kept
|
|
1
|
+
"""The ``forge-gate`` command: renamed ``forgeproof`` on 2026-11-25. Kept until 0.3.0, which removes it."""
|
|
2
2
|
|
|
3
3
|
import sys
|
|
4
4
|
|
|
5
5
|
NOTICE = ("forge-gate: this command was renamed to 'forgeproof' (2026-11-25). "
|
|
6
|
-
"Running 'forgeproof' now; please update your scripts.")
|
|
6
|
+
"Running 'forgeproof' now; please update your scripts: 'forge-gate' is removed in 0.3.0.")
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
def main(argv=None) -> int:
|
forgeproof/__init__.py
CHANGED
forgeproof/catalog.py
CHANGED
|
@@ -5,7 +5,7 @@ Maps a pattern name to its reference implementation and the matching gate fixtur
|
|
|
5
5
|
reference implementations ship too, in `forgeproof/reference/` (byte copies of library
|
|
6
6
|
patterns; see `reference/ORIGIN.md`), so `forgeproof verify` reads no other project.
|
|
7
7
|
The live library is read only when a caller passes `library_root` or uses
|
|
8
|
-
`load_aura_catalog`, and then through `config.library_dir()` (
|
|
8
|
+
`load_aura_catalog`, and then through `config.library_dir()` (FORGEPROOF_LIBRARY_DIR).
|
|
9
9
|
"""
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
forgeproof/cli.py
CHANGED
|
@@ -201,6 +201,8 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
201
201
|
prog="forgeproof",
|
|
202
202
|
description="Deterministic regression gate for code-generating agents.",
|
|
203
203
|
)
|
|
204
|
+
from forgeproof import __version__
|
|
205
|
+
ap.add_argument("--version", action="version", version=f"forgeproof {__version__}")
|
|
204
206
|
sub = ap.add_subparsers(dest="command", required=True)
|
|
205
207
|
|
|
206
208
|
list_parser = sub.add_parser("list", help="list gate-ready patterns")
|
|
@@ -276,7 +278,7 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
276
278
|
facts_parser = sub.add_parser(
|
|
277
279
|
"github-facts",
|
|
278
280
|
help="measure whether a ratified repo's own tests notice planted bugs, per function, in the box "
|
|
279
|
-
"(writes only $
|
|
281
|
+
"(writes only $FORGEPROOF_SCOUT_DIR/github_facts.jsonl; a fact row, never a PASS)")
|
|
280
282
|
facts_parser.add_argument("spec", metavar="ORG/REPO@SHA", help="a ratified repo at its signed pin")
|
|
281
283
|
facts_parser.add_argument("--functions", nargs="+", metavar="NAME",
|
|
282
284
|
help="only these functions: NAME, PATH::NAME or MODULE:NAME (default: every "
|
|
@@ -340,7 +342,7 @@ def cmd_box_selftest(args) -> int:
|
|
|
340
342
|
print(f" probe said (boxed): {boxed['probe']}")
|
|
341
343
|
user = box.box_user()
|
|
342
344
|
depth = (f"box user {user}" if user else
|
|
343
|
-
f"namespaces only;
|
|
345
|
+
f"namespaces only; FORGEPROOF_BOX_USER unset, so an escape lands as {getpass.getuser()}")
|
|
344
346
|
print(f" control: unboxed reached our own listener {unboxed['control_target']}")
|
|
345
347
|
print(f"PASS: every boxed attempt blocked, every unboxed attempt leaked ({depth})" if ok else
|
|
346
348
|
"FAIL: " + ("a boxed attempt got through" if not boxed["ok"] else "the unboxed control did not leak: targets not real"))
|
|
@@ -349,7 +351,7 @@ def cmd_box_selftest(args) -> int:
|
|
|
349
351
|
|
|
350
352
|
def cmd_github_facts(args) -> int:
|
|
351
353
|
"""Exit 0 when at least one function was MEASURED, 3 when every row is BLIND, 2 when there
|
|
352
|
-
is no place for the rows ($
|
|
354
|
+
is no place for the rows ($FORGEPROOF_SCOUT_DIR)."""
|
|
353
355
|
from . import config
|
|
354
356
|
from .scout import upstream_facts
|
|
355
357
|
|
forgeproof/config.py
CHANGED
|
@@ -6,8 +6,8 @@ gets :class:`NotConfigured`, whose message names the key and where to set it.
|
|
|
6
6
|
|
|
7
7
|
Where ``config.toml`` is looked for, first hit wins:
|
|
8
8
|
|
|
9
|
-
1. ``$
|
|
10
|
-
2. ``$
|
|
9
|
+
1. ``$FORGEPROOF_CONFIG`` (a file path);
|
|
10
|
+
2. ``$FORGEPROOF_HOME/config.toml``;
|
|
11
11
|
3. ``<checkout>/config.toml`` when this file sits in a source checkout
|
|
12
12
|
(``pyproject.toml`` and ``src/forgeproof`` next to each other).
|
|
13
13
|
|
|
@@ -19,18 +19,28 @@ Keys (classed as the standard's §2 asks):
|
|
|
19
19
|
========================= ============== =========================================
|
|
20
20
|
key class default
|
|
21
21
|
========================= ============== =========================================
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
FORGEPROOF_HOME in-project the source checkout, else none
|
|
23
|
+
FORGEPROOF_LIBRARY_DIR other project NONE: unset fails, naming the key
|
|
24
|
+
FORGEPROOF_NODE/BUN/QJS host binary ``shutil.which`` (PATH), else BLIND
|
|
25
|
+
FORGEPROOF_SCRATCH in-project ``<home>/tmp`` (created on demand), else the system temp dir
|
|
26
|
+
FORGEPROOF_PYTHON host binary ``sys.executable`` (the interpreter running ForgeProof)
|
|
27
|
+
FORGEPROOF_CORPUS_EXPORT_DIR other project NONE: unset fails, naming the key
|
|
28
|
+
FORGEPROOF_BRAIN_DATA other project NONE: the Brain's data folder (``learn`` appends to scout_registry*.jsonl there)
|
|
29
|
+
FORGEPROOF_SCOUT_DIR runtime state NONE: scout's state folder (report cards, learn lock)
|
|
30
|
+
FORGEPROOF_REGISTRY_BUILD_LOCK other project NONE: the lock file the registry build holds
|
|
31
|
+
FORGEPROOF_LEDGER_DIR runtime state NONE: the exposure + outcome ledgers (step 8a); unset = ledgers OFF
|
|
32
|
+
FORGEPROOF_SCOUT_LIST_DIR in-project ``<checkout>/scout`` (signed list + allowed_signers), else unset fails, naming the key
|
|
33
33
|
========================= ============== =========================================
|
|
34
|
+
|
|
35
|
+
The old names (rename slice B, 0.2.1). Until 0.2.0 every key was ``FORGE_GATE_<X>``. Each key is
|
|
36
|
+
now read as ``FORGEPROOF_<X>`` first and the old ``FORGE_GATE_<X>`` second, in the environment
|
|
37
|
+
and in ``config.toml`` alike, through one helper (:func:`setting` for the environment,
|
|
38
|
+
:func:`configured` for both), so a host that still uses the old names keeps working unchanged.
|
|
39
|
+
When only the old name is set, it still works, and one line on stderr (once per process tree)
|
|
40
|
+
says it stops working in 0.3.0. When both names are set and differ, the new one wins and ONE notice goes to stderr, the first
|
|
41
|
+
time that key is read; the process environment is then made to agree (the old name takes the
|
|
42
|
+
new value), so a child process does not print the notice again.
|
|
43
|
+
Not settings and NOT renamed: the ``FORGE_GATE_RESULT`` fixture protocol line.
|
|
34
44
|
"""
|
|
35
45
|
|
|
36
46
|
from __future__ import annotations
|
|
@@ -51,26 +61,39 @@ except ModuleNotFoundError: # Python < 3.11: tomli is the same parser
|
|
|
51
61
|
|
|
52
62
|
CODE: Path = Path(__file__).resolve().parents[2] # src/forgeproof/config.py -> checkout root
|
|
53
63
|
|
|
54
|
-
LIBRARY_KEY = "
|
|
55
|
-
CORPUS_KEY = "
|
|
64
|
+
LIBRARY_KEY = "FORGEPROOF_LIBRARY_DIR"
|
|
65
|
+
CORPUS_KEY = "FORGEPROOF_CORPUS_EXPORT_DIR"
|
|
56
66
|
# `forgeproof learn` (design §4.5, build step 6b-1). None of the three has a default: each is a
|
|
57
67
|
# route into another project's live state (or scout's own), and a guessed path there writes
|
|
58
68
|
# the wrong registry or locks a file nobody else locks.
|
|
59
|
-
BRAIN_DATA_KEY = "
|
|
60
|
-
SCOUT_DIR_KEY = "
|
|
61
|
-
BUILD_LOCK_KEY = "
|
|
69
|
+
BRAIN_DATA_KEY = "FORGEPROOF_BRAIN_DATA"
|
|
70
|
+
SCOUT_DIR_KEY = "FORGEPROOF_SCOUT_DIR"
|
|
71
|
+
BUILD_LOCK_KEY = "FORGEPROOF_REGISTRY_BUILD_LOCK"
|
|
62
72
|
LEARN_KEYS = (BRAIN_DATA_KEY, SCOUT_DIR_KEY, BUILD_LOCK_KEY)
|
|
63
73
|
# The ledgers (design §4a.5, build step 8a, DECISIONS-8a G1). No default: unset means the
|
|
64
74
|
# ledgers are switched OFF and nothing is recorded; setting it is the switch-on.
|
|
65
|
-
LEDGER_KEY = "
|
|
75
|
+
LEDGER_KEY = "FORGEPROOF_LEDGER_DIR"
|
|
66
76
|
# Build step 8b (DECISIONS-8b H1, H4): the local embedder for the meaning and intent lenses, and its
|
|
67
77
|
# vector cache. Both unset = those lenses are BLIND(not-configured).
|
|
68
|
-
EMBED_URL_KEY = "
|
|
69
|
-
EMBED_CACHE_KEY = "
|
|
78
|
+
EMBED_URL_KEY = "FORGEPROOF_EMBED_URL"
|
|
79
|
+
EMBED_CACHE_KEY = "FORGEPROOF_EMBED_CACHE_DIR"
|
|
70
80
|
# KD-13 (f), GitHub-lane loop S1: the folder holding the signed list ``trusted_repos.jsonl`` and
|
|
71
81
|
# ``allowed_signers``. Default: ``scout/`` of the source checkout this file sits in. An installed
|
|
72
82
|
# ForgeProof has no checkout, so it must be told; it never guesses (same shape as KD-2).
|
|
73
|
-
SCOUT_LIST_DIR_KEY = "
|
|
83
|
+
SCOUT_LIST_DIR_KEY = "FORGEPROOF_SCOUT_LIST_DIR"
|
|
84
|
+
PREFIX = "FORGEPROOF_"
|
|
85
|
+
OLD_PREFIX = "FORGE_GATE_" # read when the new name is unset (rename slice B, 0.2.1)
|
|
86
|
+
_NOTICED: set = set() # (source, key) pairs already announced on stderr
|
|
87
|
+
# The settings ForgeProof reads. Only these get the old-name notice: other programs use names that
|
|
88
|
+
# merely start with FORGE_GATE_ (the deploy host's measurement harness passes FORGE_GATE_PATH).
|
|
89
|
+
SETTINGS = frozenset({"HOME", "CONFIG", "LIBRARY_DIR", "CORPUS_EXPORT_DIR", "BRAIN_DATA", "SCOUT_DIR",
|
|
90
|
+
"REGISTRY_BUILD_LOCK", "LEDGER_DIR", "EMBED_URL", "EMBED_CACHE_DIR",
|
|
91
|
+
"SCOUT_LIST_DIR", "SCRATCH", "PYTHON", "NODE", "BUN", "QJS", "BOX_USER",
|
|
92
|
+
"BOX_ROOT", "RATIFY_PIN"})
|
|
93
|
+
# Set in os.environ after the old-name notice, so the notice is printed once per process tree
|
|
94
|
+
# (children inherit it). Not a setting: no FORGEPROOF_ prefix.
|
|
95
|
+
OLD_NAME_MARK = "_FORGEPROOF_OLD_NAME_NOTICE_SHOWN"
|
|
96
|
+
REMOVAL = "0.3.0"
|
|
74
97
|
LOOPBACK = ("127.0.0.1", "::1") # literal addresses only: a name goes through /etc/hosts (s1 review F3)
|
|
75
98
|
|
|
76
99
|
|
|
@@ -82,20 +105,63 @@ def _is_checkout(p: Path) -> bool:
|
|
|
82
105
|
return (p / "pyproject.toml").is_file() and (p / "src" / "forgeproof").is_dir()
|
|
83
106
|
|
|
84
107
|
|
|
108
|
+
def names(key: str) -> tuple:
|
|
109
|
+
"""``(new, old)`` names of one setting, given under either name."""
|
|
110
|
+
for pre in (PREFIX, OLD_PREFIX):
|
|
111
|
+
if key.startswith(pre) and len(key) > len(pre):
|
|
112
|
+
rest = key[len(pre):]
|
|
113
|
+
return PREFIX + rest, OLD_PREFIX + rest
|
|
114
|
+
raise ValueError(f"not a ForgeProof setting: {key!r} (expected {PREFIX}<NAME>)")
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def _pick(key: str, values, source: str) -> Optional[str]:
|
|
118
|
+
"""The value of ``key`` in ``values``: the new name, else the old one, else None."""
|
|
119
|
+
new, old = names(key)
|
|
120
|
+
a = str(values.get(new, "") or "")
|
|
121
|
+
b = str(values.get(old, "") or "")
|
|
122
|
+
if a and b and a != b:
|
|
123
|
+
if (source, new) not in _NOTICED:
|
|
124
|
+
_NOTICED.add((source, new))
|
|
125
|
+
print(f"forgeproof: {new} and the old name {old} are both set {source} and differ; "
|
|
126
|
+
f"using {new}", file=sys.stderr)
|
|
127
|
+
if values is os.environ:
|
|
128
|
+
os.environ[old] = a # the new name wins in child processes too: one notice, not one per child
|
|
129
|
+
if b and not a and new[len(PREFIX):] in SETTINGS:
|
|
130
|
+
_old_name_notice(old, new)
|
|
131
|
+
return a or b or None
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def _old_name_notice(old: str, new: str) -> None:
|
|
135
|
+
"""One stderr line per process tree when an old name is what a setting came from (0.2.1+)."""
|
|
136
|
+
if os.environ.get(OLD_NAME_MARK):
|
|
137
|
+
return
|
|
138
|
+
os.environ[OLD_NAME_MARK] = "1"
|
|
139
|
+
print(f"forgeproof: {old} is an old name; use {new}. The old FORGE_GATE_* names stop working "
|
|
140
|
+
f"in {REMOVAL}.", file=sys.stderr)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def setting(key: str) -> Optional[str]:
|
|
144
|
+
"""A setting from the environment: ``FORGEPROOF_<X>``, else the old ``FORGE_GATE_<X>``, else None.
|
|
145
|
+
|
|
146
|
+
``key`` may be given under either name. Every environment read of a setting goes through here.
|
|
147
|
+
"""
|
|
148
|
+
return _pick(key, os.environ, "in the environment")
|
|
149
|
+
|
|
150
|
+
|
|
85
151
|
def home() -> Optional[Path]:
|
|
86
|
-
"""The project folder: $
|
|
152
|
+
"""The project folder: $FORGEPROOF_HOME, else the checkout this file sits in, else None.
|
|
87
153
|
|
|
88
154
|
A non-editable install puts this file in site-packages, where parents[2] is
|
|
89
155
|
lib/pythonX.Y; that is NOT a project home, so it is refused rather than guessed.
|
|
90
156
|
"""
|
|
91
|
-
raw =
|
|
157
|
+
raw = setting("FORGEPROOF_HOME")
|
|
92
158
|
if raw:
|
|
93
159
|
return Path(raw).expanduser()
|
|
94
160
|
return CODE if _is_checkout(CODE) else None
|
|
95
161
|
|
|
96
162
|
|
|
97
163
|
def config_file() -> Optional[Path]:
|
|
98
|
-
raw =
|
|
164
|
+
raw = setting("FORGEPROOF_CONFIG")
|
|
99
165
|
if raw:
|
|
100
166
|
return Path(raw).expanduser()
|
|
101
167
|
h = home()
|
|
@@ -118,14 +184,36 @@ def _load() -> dict:
|
|
|
118
184
|
def configured(name: str) -> Optional[str]:
|
|
119
185
|
"""The raw value of ``name`` from the environment or config.toml, else None.
|
|
120
186
|
|
|
121
|
-
|
|
122
|
-
|
|
187
|
+
Order: environment (new name, then old), then config.toml (new name, then old). ``name`` may
|
|
188
|
+
be given under either name. Read on every call (not cached at import), so a test or a caller
|
|
189
|
+
that sets the environment after import is seen.
|
|
123
190
|
"""
|
|
124
|
-
|
|
191
|
+
new, old = names(name)
|
|
192
|
+
raw = setting(name)
|
|
125
193
|
if raw:
|
|
194
|
+
if not os.environ.get(new): # the value came from the OLD name
|
|
195
|
+
filed = str(_load().get(new, "") or "")
|
|
196
|
+
if filed and filed != raw and ("env-over-file", new) not in _NOTICED:
|
|
197
|
+
_NOTICED.add(("env-over-file", new))
|
|
198
|
+
print(f"forgeproof: {new} in {config_file()} is ignored: the old name {old} is set in "
|
|
199
|
+
f"the environment, and the environment comes first", file=sys.stderr)
|
|
126
200
|
return raw
|
|
127
|
-
|
|
128
|
-
|
|
201
|
+
return _pick(name, _load(), f"in {config_file()}")
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
def supplied_by(key: str) -> str:
|
|
205
|
+
"""The name that supplied ``key``'s value (environment first, then config.toml), for messages:
|
|
206
|
+
an operator who set the old name must be able to find it. The new name when nothing is set."""
|
|
207
|
+
new, old = names(key)
|
|
208
|
+
if os.environ.get(new):
|
|
209
|
+
return new
|
|
210
|
+
if os.environ.get(old):
|
|
211
|
+
return old
|
|
212
|
+
try:
|
|
213
|
+
filed = _load()
|
|
214
|
+
except NotConfigured:
|
|
215
|
+
return new
|
|
216
|
+
return old if not filed.get(new) and filed.get(old) else new
|
|
129
217
|
|
|
130
218
|
|
|
131
219
|
def _as_path(raw: str) -> Path:
|
|
@@ -155,7 +243,7 @@ def library_dir() -> Path:
|
|
|
155
243
|
)
|
|
156
244
|
p = _as_path(raw)
|
|
157
245
|
if not p.is_dir():
|
|
158
|
-
raise NotConfigured(f"{LIBRARY_KEY}={p} is not a directory ({where()})")
|
|
246
|
+
raise NotConfigured(f"{supplied_by(LIBRARY_KEY)}={p} is not a directory ({where()})")
|
|
159
247
|
return p
|
|
160
248
|
|
|
161
249
|
|
|
@@ -171,7 +259,7 @@ def corpus_export_dir() -> Path:
|
|
|
171
259
|
)
|
|
172
260
|
p = _as_path(raw)
|
|
173
261
|
if not p.is_dir():
|
|
174
|
-
raise NotConfigured(f"{CORPUS_KEY}={p} is not a directory ({where()})")
|
|
262
|
+
raise NotConfigured(f"{supplied_by(CORPUS_KEY)}={p} is not a directory ({where()})")
|
|
175
263
|
return p
|
|
176
264
|
|
|
177
265
|
|
|
@@ -188,9 +276,9 @@ def brain_data() -> Path:
|
|
|
188
276
|
f"to the Brain's data folder ({where()}). Only `forgeproof learn` needs it.")
|
|
189
277
|
p = _as_path(raw)
|
|
190
278
|
if not p.is_dir():
|
|
191
|
-
raise NotConfigured(f"{BRAIN_DATA_KEY}={p} is not an existing directory ({where()})")
|
|
279
|
+
raise NotConfigured(f"{supplied_by(BRAIN_DATA_KEY)}={p} is not an existing directory ({where()})")
|
|
192
280
|
if not (p / "logic_registry.jsonl").is_file():
|
|
193
|
-
raise NotConfigured(f"{BRAIN_DATA_KEY}={p} holds no logic_registry.jsonl: not the Brain's "
|
|
281
|
+
raise NotConfigured(f"{supplied_by(BRAIN_DATA_KEY)}={p} holds no logic_registry.jsonl: not the Brain's "
|
|
194
282
|
f"data folder ({where()})")
|
|
195
283
|
return p
|
|
196
284
|
|
|
@@ -206,7 +294,7 @@ def scout_dir() -> Path:
|
|
|
206
294
|
f"to scout's state folder ({where()}). Only `forgeproof learn` needs it.")
|
|
207
295
|
p = _as_path(raw)
|
|
208
296
|
if not p.is_dir():
|
|
209
|
-
raise NotConfigured(f"{SCOUT_DIR_KEY}={p} is not an existing directory ({where()})")
|
|
297
|
+
raise NotConfigured(f"{supplied_by(SCOUT_DIR_KEY)}={p} is not an existing directory ({where()})")
|
|
210
298
|
return p
|
|
211
299
|
|
|
212
300
|
|
|
@@ -221,14 +309,14 @@ def ledger_dir() -> Path:
|
|
|
221
309
|
f"config.toml [paths] to the ledger folder ({where()}).")
|
|
222
310
|
p = _as_path(raw)
|
|
223
311
|
if not p.is_dir():
|
|
224
|
-
raise NotConfigured(f"{LEDGER_KEY}={p} is not an existing directory ({where()})")
|
|
312
|
+
raise NotConfigured(f"{supplied_by(LEDGER_KEY)}={p} is not an existing directory ({where()})")
|
|
225
313
|
return p
|
|
226
314
|
|
|
227
315
|
|
|
228
316
|
def scout_list_dir() -> Path:
|
|
229
317
|
"""The folder holding ``trusted_repos.jsonl`` and ``allowed_signers`` (KD-13 f).
|
|
230
318
|
|
|
231
|
-
``$
|
|
319
|
+
``$FORGEPROOF_SCOUT_LIST_DIR`` / config.toml first; else ``<checkout>/scout`` when this file
|
|
232
320
|
sits in a source checkout; else NotConfigured naming the key. It must be an existing folder:
|
|
233
321
|
a typo would otherwise read as "no repo is ratified", which looks like a quiet BLIND."""
|
|
234
322
|
raw = configured(SCOUT_LIST_DIR_KEY)
|
|
@@ -242,7 +330,7 @@ def scout_list_dir() -> Path:
|
|
|
242
330
|
f"Set it in the environment or in config.toml [paths] to the folder holding "
|
|
243
331
|
f"trusted_repos.jsonl and allowed_signers ({where()}).")
|
|
244
332
|
if not p.is_dir():
|
|
245
|
-
raise NotConfigured(f"{SCOUT_LIST_DIR_KEY}={p} is not an existing directory ({where()})")
|
|
333
|
+
raise NotConfigured(f"{supplied_by(SCOUT_LIST_DIR_KEY)}={p} is not an existing directory ({where()})")
|
|
246
334
|
return p
|
|
247
335
|
|
|
248
336
|
|
|
@@ -263,10 +351,10 @@ def loopback_url(raw: str) -> str:
|
|
|
263
351
|
u = urlsplit(raw)
|
|
264
352
|
port = u.port
|
|
265
353
|
except ValueError as e:
|
|
266
|
-
raise NotConfigured(f"{EMBED_URL_KEY}={raw!r} is not a URL: {e}") from None
|
|
354
|
+
raise NotConfigured(f"{supplied_by(EMBED_URL_KEY)}={raw!r} is not a URL: {e}") from None
|
|
267
355
|
if (u.scheme != "http" or u.hostname not in LOOPBACK or port is None or u.username or u.password
|
|
268
356
|
or u.path not in ("", "/") or u.query or u.fragment):
|
|
269
|
-
raise NotConfigured(f"{EMBED_URL_KEY}={raw!r} must be http://<loopback>:<port> "
|
|
357
|
+
raise NotConfigured(f"{supplied_by(EMBED_URL_KEY)}={raw!r} must be http://<loopback>:<port> "
|
|
270
358
|
f"(one of {', '.join(LOOPBACK)}), nothing more")
|
|
271
359
|
return raw.rstrip("/")
|
|
272
360
|
|
|
@@ -278,7 +366,7 @@ def embed_cache_dir() -> Path:
|
|
|
278
366
|
raise NotConfigured(f"{EMBED_CACHE_KEY} is not set: no vector cache ({where()})")
|
|
279
367
|
p = _as_path(raw)
|
|
280
368
|
if not p.is_dir():
|
|
281
|
-
raise NotConfigured(f"{EMBED_CACHE_KEY}={p} is not an existing directory ({where()})")
|
|
369
|
+
raise NotConfigured(f"{supplied_by(EMBED_CACHE_KEY)}={p} is not an existing directory ({where()})")
|
|
282
370
|
return p
|
|
283
371
|
|
|
284
372
|
|
|
@@ -295,7 +383,7 @@ def registry_build_lock() -> Path:
|
|
|
295
383
|
p = _as_path(raw)
|
|
296
384
|
if not p.is_file():
|
|
297
385
|
raise NotConfigured(
|
|
298
|
-
f"{BUILD_LOCK_KEY}={p} does not exist. learn never creates it: it must be the file "
|
|
386
|
+
f"{supplied_by(BUILD_LOCK_KEY)}={p} does not exist. learn never creates it: it must be the file "
|
|
299
387
|
f"the registry build locks ({where()})")
|
|
300
388
|
return p
|
|
301
389
|
|
|
@@ -309,7 +397,7 @@ def scratch_dir() -> Path:
|
|
|
309
397
|
"""
|
|
310
398
|
import tempfile
|
|
311
399
|
|
|
312
|
-
raw = configured("
|
|
400
|
+
raw = configured("FORGEPROOF_SCRATCH")
|
|
313
401
|
if raw:
|
|
314
402
|
d = _as_path(raw)
|
|
315
403
|
else:
|
|
@@ -327,13 +415,19 @@ def python() -> str:
|
|
|
327
415
|
the reference files' zero-width characters, and 7 of 10 patterns read as UNSTABLE
|
|
328
416
|
(measured 2026-11-11, build step 1).
|
|
329
417
|
"""
|
|
330
|
-
raw = configured("
|
|
418
|
+
raw = configured("FORGEPROOF_PYTHON")
|
|
331
419
|
return str(_as_path(raw)) if raw else sys.executable
|
|
332
420
|
|
|
333
421
|
|
|
334
422
|
def engine(name: str) -> Optional[str]:
|
|
335
|
-
"""A JavaScript engine binary:
|
|
336
|
-
raw = configured("
|
|
423
|
+
"""A JavaScript engine binary: FORGEPROOF_<NAME> > PATH > None (the caller goes BLIND)."""
|
|
424
|
+
raw = configured("FORGEPROOF_" + name.upper())
|
|
337
425
|
if raw:
|
|
338
426
|
return str(_as_path(raw))
|
|
339
427
|
return shutil.which(name)
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
# F6 (review, slice B): make the two names agree in this process's environment at import, before a
|
|
431
|
+
# caller copies os.environ for a child; otherwise each child would print the notice again.
|
|
432
|
+
for _k in [k for k in list(os.environ) if k.startswith(OLD_PREFIX) and k[len(OLD_PREFIX):] in SETTINGS]:
|
|
433
|
+
setting(_k)
|
forgeproof/ledger.py
CHANGED
|
@@ -17,7 +17,7 @@ and again when read, so a hand-appended row with the wrong writer never scores.
|
|
|
17
17
|
|
|
18
18
|
Files and locking (G6, the 3b/6b lessons):
|
|
19
19
|
|
|
20
|
-
* ``
|
|
20
|
+
* ``FORGEPROOF_LEDGER_DIR`` has no default. Unset = the ledgers are switched OFF and nothing is
|
|
21
21
|
written anywhere. The folder, both ledger files and ``ledger.lock`` must already exist: the
|
|
22
22
|
switch-on creates them with their owner and ACL, never a writer (a typo'd folder must not get a
|
|
23
23
|
fresh ledger nobody reads, and the first writer must not decide the owner).
|
|
@@ -141,7 +141,7 @@ def result_ids_in(text: str) -> list[str]:
|
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
def enabled() -> bool:
|
|
144
|
-
"""True when ``
|
|
144
|
+
"""True when ``FORGEPROOF_LEDGER_DIR`` is set (it may still be wrong: writers check)."""
|
|
145
145
|
return config.configured(config.LEDGER_KEY) is not None
|
|
146
146
|
|
|
147
147
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""The lens tools: metamorphic, invariant, twin-consensus and guard.
|
|
2
2
|
|
|
3
3
|
They ship inside the package (KNOWN-DEBT KD-2, done 2026-11-25), so an installed ForgeProof
|
|
4
|
-
runs every lens without a source checkout and without
|
|
4
|
+
runs every lens without a source checkout and without FORGEPROOF_HOME. ``forgeproof.lenses``
|
|
5
5
|
imports metamorphic, invariant_gate and twin_consensus from here, and runs guard_lens.py as a
|
|
6
6
|
script by its file path (``GUARD_LENS``) in a child process.
|
|
7
7
|
"""
|
forgeproof/lenses.py
CHANGED
|
@@ -36,7 +36,7 @@ from forgeproof.lens_tools import GUARD_LENS
|
|
|
36
36
|
_PKG_PARENT = Path(__file__).resolve().parents[1]
|
|
37
37
|
# The lens tools (metamorphic, invariant, twin, guard) ship inside the package, in
|
|
38
38
|
# forgeproof/lens_tools/ (KNOWN-DEBT KD-2, done 2026-11-25): an install alone runs every lens,
|
|
39
|
-
# with no source checkout and no
|
|
39
|
+
# with no source checkout and no FORGEPROOF_HOME. They always come from the package this file
|
|
40
40
|
# is in, never from another checkout, so the lenses and their tools cannot be two versions.
|
|
41
41
|
|
|
42
42
|
BASE_LENS = "property-primary"
|
forgeproof/reference/ORIGIN.md
CHANGED
|
@@ -13,7 +13,7 @@ shipped tool no longer reads the library at run time (build step 1, Q1, 2026-11-
|
|
|
13
13
|
- **Changed here:** nothing. Do not edit them in this repo. Fix the pattern in the
|
|
14
14
|
library, then re-copy, and update the commit and every sha256 below in the same change.
|
|
15
15
|
- **Drift check:** `tests/test_live_library.py` (tier `live`, needs
|
|
16
|
-
`
|
|
16
|
+
`FORGEPROOF_LIBRARY_DIR`) compares each copy against the library checkout.
|
|
17
17
|
|
|
18
18
|
| file here | path in the library | sha256 |
|
|
19
19
|
|---|---|---|
|
forgeproof/scout/box.py
CHANGED
|
@@ -4,7 +4,7 @@ RUN mode (built): bubblewrap with every namespace unshared, so network off (a fr
|
|
|
4
4
|
has only its own loopback), no home folder and no secrets file visible (only /usr, /lib*,
|
|
5
5
|
/bin, /sbin and a few /etc files are mounted, read-only), the source mounted read-only at
|
|
6
6
|
/src, a throwaway copy at /work, an empty environment, uid 65534 inside the namespace, its
|
|
7
|
-
own process tree, killed with its parent. If
|
|
7
|
+
own process tree, killed with its parent. If FORGEPROOF_BOX_USER is set, bubblewrap itself
|
|
8
8
|
runs as that unprivileged user (sudo -n -u), so an escape lands as that user, not ours.
|
|
9
9
|
|
|
10
10
|
FETCH mode (built in step 7, slice 1): the same box, still in a fresh network namespace, plus
|
|
@@ -51,10 +51,10 @@ from .. import config
|
|
|
51
51
|
from . import fetchproxy
|
|
52
52
|
from .outcomes import Outcome, blind, clean, found
|
|
53
53
|
|
|
54
|
-
BOX_USER_KEY = "
|
|
54
|
+
BOX_USER_KEY = "FORGEPROOF_BOX_USER"
|
|
55
55
|
# Where the box's copies live when a box user is set: a folder that user can reach (it cannot
|
|
56
56
|
# reach our home, by design). Deploy host: /var/lib/forge-gate-box, owner au, group fgbox, 2770.
|
|
57
|
-
BOX_ROOT_KEY = "
|
|
57
|
+
BOX_ROOT_KEY = "FORGEPROOF_BOX_ROOT"
|
|
58
58
|
_ETC = ("ld.so.cache", "ld.so.conf", "ld.so.conf.d", "alternatives", "localtime", "nsswitch.conf")
|
|
59
59
|
_SYS = ("/usr", "/bin", "/sbin", "/lib", "/lib64", "/lib32")
|
|
60
60
|
MEMORY_MB = 1024 # address-space cap for the box and everything in it (same mechanism as runner.run_file)
|
|
@@ -135,7 +135,7 @@ def box_root() -> Path:
|
|
|
135
135
|
if r:
|
|
136
136
|
return Path(r)
|
|
137
137
|
if box_user():
|
|
138
|
-
raise RuntimeError(f"{BOX_USER_KEY} is set but {BOX_ROOT_KEY} is not: the box user cannot "
|
|
138
|
+
raise RuntimeError(f"{config.supplied_by(BOX_USER_KEY)} is set but {BOX_ROOT_KEY} is not: the box user cannot "
|
|
139
139
|
"reach our scratch folder")
|
|
140
140
|
return config.scratch_dir() / "box"
|
|
141
141
|
|
forgeproof/scout/embed.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""The embedder behind the language-meaning and intent lenses (design §4a.3 lenses 4-5, build step 8b s1).
|
|
2
2
|
|
|
3
3
|
One engine: a LOCAL Ollama serving ``nomic-embed-text`` at the pinned digest (DECISIONS-8b H1 a),
|
|
4
|
-
reached at ``
|
|
4
|
+
reached at ``FORGEPROOF_EMBED_URL`` (env > config.toml, no default; unset = the lenses are BLIND).
|
|
5
5
|
Corpus bodies are private: before any text is sent, ``check()`` refuses
|
|
6
6
|
|
|
7
7
|
- a URL that is not plain http on a loopback address (config.embed_url),
|
|
@@ -13,7 +13,7 @@ and every request goes through an opener with NO proxy handler, so an ``http_pro
|
|
|
13
13
|
environment cannot route a body off the host.
|
|
14
14
|
|
|
15
15
|
Vectors are cached (H4 b) in one append-only file per model digest under
|
|
16
|
-
``
|
|
16
|
+
``FORGEPROOF_EMBED_CACHE_DIR``. A scout run only READS the cache; ``fill()`` (a separate, explicit
|
|
17
17
|
command) is the only writer. A row is keyed by ``sha256(digest NUL text)`` and checked when read.
|
|
18
18
|
"""
|
|
19
19
|
from __future__ import annotations
|
|
@@ -23,7 +23,7 @@ must never be easier to get. The semantics, read and measured, are in
|
|
|
23
23
|
timeout is not clean, and gives BLIND (see engines/chaos_runner.py).
|
|
24
24
|
- HOST HISTORY (parent review, 2026-11-13). The gate is a race on some hosts, so 3 clean runs
|
|
25
25
|
only bound the odds; they cannot make one file's verdict identical to the validator's own run.
|
|
26
|
-
Every gate run is recorded per host in ``$
|
|
26
|
+
Every gate run is recorded per host in ``$FORGEPROOF_SCOUT_DIR/chaos_gate_history.json``. Once
|
|
27
27
|
any NC has survived on a host, chaos is BLIND for every probe there, and stays BLIND until an
|
|
28
28
|
operator archives the file. A host whose gate is unreliable is an input class where parity
|
|
29
29
|
cannot be shown. A history that cannot be read is BLIND too (fail closed).
|
forgeproof/scout/ghcache.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""The private pinned GitHub cache and its pin check (design v1.4.5 §12.5 D7-2c; build step 7
|
|
2
2
|
slice 3; DECISIONS-7-github G3).
|
|
3
3
|
|
|
4
|
-
Layout under ``$
|
|
4
|
+
Layout under ``$FORGEPROOF_SCOUT_DIR/github-cache/``:
|
|
5
5
|
- ``.objects/<org>/<repo>.git``: a bare object store WE create. The fetch box hands back only
|
|
6
6
|
its ``objects/`` files and ``shallow``; nothing it wrote is run or read as git config, hooks
|
|
7
7
|
or refs.
|
forgeproof/scout/ghpool.py
CHANGED
|
@@ -28,7 +28,7 @@ from . import fetchproxy, ghcache, ratify
|
|
|
28
28
|
|
|
29
29
|
POOL = "github"
|
|
30
30
|
# KD-13 (f): the signed list and its signer file are found through config.scout_list_dir()
|
|
31
|
-
# (
|
|
31
|
+
# (FORGEPROOF_SCOUT_LIST_DIR, default <checkout>/scout), never through this file's position, so an
|
|
32
32
|
# installed ForgeProof can be pointed at them. Both are tracked and public-safe (G8).
|
|
33
33
|
LIST_NAME = "trusted_repos.jsonl"
|
|
34
34
|
SIGNERS_NAME = "allowed_signers"
|
|
@@ -182,7 +182,7 @@ class Admitted:
|
|
|
182
182
|
"lang": self.lang}
|
|
183
183
|
|
|
184
184
|
|
|
185
|
-
TRUST_PIN_KEY = "
|
|
185
|
+
TRUST_PIN_KEY = "FORGEPROOF_RATIFY_PIN" # untracked config: "operator=<16-hex key id>" (review open question)
|
|
186
186
|
|
|
187
187
|
|
|
188
188
|
def trust_pin(raw: str | None) -> tuple[str, str] | None:
|
forgeproof/scout/ghsearch.py
CHANGED
|
@@ -8,7 +8,7 @@ Per query, in this order (the admission rules of ``ghpool.admit``, paid once ins
|
|
|
8
8
|
1. the cache root and the signed list must exist; else BLIND(no-cache) / BLIND(unsigned);
|
|
9
9
|
2. the signed list is verified ONCE (``ratify.verify_list``: every signature of every line is
|
|
10
10
|
checked once per query); no verified line → BLIND(unsigned);
|
|
11
|
-
3. the host's trust pin (``
|
|
11
|
+
3. the host's trust pin (``FORGEPROOF_RATIFY_PIN``) must name the key that signed each line as
|
|
12
12
|
the required principal; ANY line that fails 2 or 3 makes the whole pool BLIND(unsigned) (review
|
|
13
13
|
F2: a dropped line must not read as a clean search);
|
|
14
14
|
4. per verified line: ``ghcache.check_cache`` ONCE for that cache and one ``ls-tree``. Any
|
forgeproof/scout/learn.py
CHANGED
|
@@ -30,14 +30,14 @@ The pipeline, in order:
|
|
|
30
30
|
rest BLIND(not wired)).
|
|
31
31
|
5. SURVIVAL GATE. A function with no engine verdict gets no row and no card.
|
|
32
32
|
6. APPEND + CARDS. Rows go to scout's OWN ladder files in the Brain's data folder,
|
|
33
|
-
``$
|
|
33
|
+
``$FORGEPROOF_BRAIN_DATA/scout_registry{,_r,_rust,_sysadmin}.jsonl`` (6E's decision A,
|
|
34
34
|
2026-11-13, for review finding F3). Only learn writes them; the Brain reads them after its
|
|
35
35
|
real ladders, so no extractor, reconcile or regate run can delete a learned row. learn never
|
|
36
36
|
writes a real ladder file: it reads all eight files for the duplicate check. All of it runs
|
|
37
37
|
under ``scout_learn.lock`` (learn-vs-learn singleton, LOCK_NB, fails fast) AND the registry
|
|
38
38
|
build's own lock (L1: the hourly build reads these files and rewrites the real ladders in
|
|
39
39
|
place). The build lock is waited for, then learn fails loudly. Rows whose id is already in any
|
|
40
|
-
of the eight files are skipped and reported, never duplicated. Cards go to ``$
|
|
40
|
+
of the eight files are skipped and reported, never duplicated. Cards go to ``$FORGEPROOF_SCOUT_DIR/learn_report.json`` through
|
|
41
41
|
``cards.stage_report`` (write_report's checks and temp file), so every check runs before
|
|
42
42
|
the registry changes; then the rows are appended and the report swapped in. A failure
|
|
43
43
|
after the append cuts the registry back to its old size: nothing is kept.
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
``forgeproof github-facts ORG/REPO@SHA [--functions ...]``. For every admitted top-level function
|
|
5
5
|
(admission is ``ghpool.admit``, read only), it plants up to 12 single-node bugs (``plant``, R5),
|
|
6
6
|
runs the repo's OWN unittest suite in the run-mode isolation box once per bug, and appends one
|
|
7
|
-
FACT ROW per function to ``$
|
|
7
|
+
FACT ROW per function to ``$FORGEPROOF_SCOUT_DIR/github_facts.jsonl``. A fact row is never a PASS
|
|
8
8
|
and never a card: this module imports neither ``learn`` nor ``cards`` and writes nothing else
|
|
9
9
|
(its own throwaway staging folder under the box root is removed after each module).
|
|
10
10
|
|
|
11
11
|
Rules, as built:
|
|
12
|
-
- R0: no ``
|
|
12
|
+
- R0: no ``FORGEPROOF_BOX_USER`` -> one run row BLIND(box-user-unset); nothing is admitted or run.
|
|
13
13
|
- R1: the suite runs unmutated before a function's mutants and after them (the "after" control
|
|
14
14
|
of one function is the "before" control of the next in the same module). Both must exit 0 with
|
|
15
15
|
>= 1 test and the same set of passing test ids, else BLIND(control-red | control-unstable |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: forgeproof-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Deterministic regression gate for code-generating agents, with reference implementations from the AURA pattern library.
|
|
5
5
|
Author-email: Illia Hladkyi <ihladkyi@realityoptimizer.app>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -61,15 +61,24 @@ ForgeProof asks two questions that do not depend on trusting the author:
|
|
|
61
61
|
|
|
62
62
|
## Status
|
|
63
63
|
|
|
64
|
-
Alpha (0.2.0)
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
Alpha (0.2.0), on PyPI as [`forgeproof-cli`](https://pypi.org/project/forgeproof-cli/)
|
|
65
|
+
(`forgeproof` is too close to an existing project there); the command and the import are
|
|
66
|
+
`forgeproof`. The verify gate covers 10 Python
|
|
67
67
|
patterns. Several commands (`scout`, `learn`, `ledger`, `chaos-calibrate`) are advisory or
|
|
68
68
|
plumbing today. **`KNOWN-DEBT.md` lists every known gap**: what it
|
|
69
69
|
is, where, what "fixed" will look like, and who owns it.
|
|
70
70
|
|
|
71
71
|
## Install
|
|
72
72
|
|
|
73
|
+
```bash
|
|
74
|
+
pip install forgeproof-cli # the tool: every lens, no checkout needed
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
It needs Python 3.10 or newer. macOS's built-in `/usr/bin/python3` is 3.9, and there pip says
|
|
78
|
+
"No matching distribution found for forgeproof-cli": use a newer Python (for example from Homebrew).
|
|
79
|
+
|
|
80
|
+
To run the tests or work on ForgeProof, install from a checkout:
|
|
81
|
+
|
|
73
82
|
```bash
|
|
74
83
|
git clone https://github.com/myfjin/forgeproof.git && cd forgeproof
|
|
75
84
|
python3 -m venv .venv && .venv/bin/pip install . pytest pytest-timeout "setuptools>=61"
|
|
@@ -78,7 +87,7 @@ npm ci # only for the JS oracle (TypeSc
|
|
|
78
87
|
```
|
|
79
88
|
|
|
80
89
|
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 `
|
|
90
|
+
KD-2, fixed 2026-11-25), so no `FORGEPROOF_HOME` is needed for a verdict. The clone is needed for
|
|
82
91
|
the tests, the shared tools in `tools/` and the JS oracle.
|
|
83
92
|
|
|
84
93
|
Python 3.10 or newer. Without `npm ci` the JS oracle's type gate reports `unavailable`. The JS
|
|
@@ -90,13 +99,17 @@ ForgeProof reads no other project unless you tell it where. Each setting is an
|
|
|
90
99
|
environment variable, or a key in `config.toml` `[paths]` (per host, not tracked; copy
|
|
91
100
|
`config.example.toml`). The environment wins.
|
|
92
101
|
|
|
102
|
+
Until 0.2.0 every setting was `FORGE_GATE_<NAME>`. Those old names still work (0.2.1 reads
|
|
103
|
+
`FORGEPROOF_<NAME>` first, then the old name, and prints one line on stderr when the old name is
|
|
104
|
+
used) and stop working in 0.3.0.
|
|
105
|
+
|
|
93
106
|
| key | needed for | default |
|
|
94
107
|
|---|---|---|
|
|
95
|
-
| `
|
|
96
|
-
| `
|
|
97
|
-
| `
|
|
98
|
-
| `
|
|
99
|
-
| `
|
|
108
|
+
| `FORGEPROOF_LIBRARY_DIR` | the twin-consensus lens, `pytest -m live`, library tools | none: unset, those fail naming the key |
|
|
109
|
+
| `FORGEPROOF_HOME` | where `config.toml` is read, and `github-facts`' test runner (a checkout tool); no lens needs it | the checkout |
|
|
110
|
+
| `FORGEPROOF_PYTHON` | child runs (oracles, fixtures, lenses) | the interpreter running ForgeProof |
|
|
111
|
+
| `FORGEPROOF_NODE`, `_BUN`, `_QJS` | the JS oracle's three engines | `PATH` |
|
|
112
|
+
| `FORGEPROOF_SCRATCH` | short-lived lens scripts | `<checkout>/tmp` |
|
|
100
113
|
|
|
101
114
|
`deps.lock` pins what each outside route was checked against.
|
|
102
115
|
|
|
@@ -263,8 +276,8 @@ tests and its known-debt entry.
|
|
|
263
276
|
3. **All six languages.** The pattern library holds Python, R, Rust, Go, C++ and JavaScript. The
|
|
264
277
|
scores scout reads exist for Python, R and Rust today; Go, C++ and JavaScript need their own
|
|
265
278
|
extractors first.
|
|
266
|
-
4. **A first release on PyPI
|
|
267
|
-
|
|
279
|
+
4. **A first release on PyPI**: done. `forgeproof-cli` 0.2.0 (2026-11-26), once KD-2 was fixed so
|
|
280
|
+
that an installed copy runs every lens without a source checkout.
|
|
268
281
|
5. **A free web service.** Paste code and have it checked in an isolated sandbox, with no account.
|
|
269
282
|
You choose whether we may keep your code to improve the checks, and we never show one person's
|
|
270
283
|
code to anyone else. Prefer to keep everything private? Run this repository on your own
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
forge_gate/__init__.py,sha256=
|
|
2
|
-
forge_gate/_deprecated_cli.py,sha256
|
|
3
|
-
forgeproof/__init__.py,sha256=
|
|
4
|
-
forgeproof/catalog.py,sha256=
|
|
5
|
-
forgeproof/cli.py,sha256=
|
|
6
|
-
forgeproof/config.py,sha256=
|
|
1
|
+
forge_gate/__init__.py,sha256=X1HSx6fI7hR99wbp508u0wNEIg2q5zRFmt-0fQ9OHGc,1439
|
|
2
|
+
forge_gate/_deprecated_cli.py,sha256=MKhwab55ZqitWabQM-FKu2YYNJZiOxwBYCweiFdbg6M,505
|
|
3
|
+
forgeproof/__init__.py,sha256=QoEmUzCG6SAoyq68iknabh5qjlMenH-CBxHoYEG1clE,102
|
|
4
|
+
forgeproof/catalog.py,sha256=dhfi7uF5BffbsnGMDDpHY8KcudXCy_2_PRpwWGWRkuY,3844
|
|
5
|
+
forgeproof/cli.py,sha256=mueaWkm6HjL_T9Wy8tP4zgtWLeW27dhac0Y9bUgvryE,26575
|
|
6
|
+
forgeproof/config.py,sha256=s5Q1pGyKWmgzc3xwyhDfnA-HYoGWjouyQ4Hl-RR4WyA,19849
|
|
7
7
|
forgeproof/debug_caller.py,sha256=jxBIb9_NtclXzDnsNPdcxtKyRSZ4RHSG1wL3eP-RGqY,11856
|
|
8
8
|
forgeproof/debug_core.py,sha256=mMXncQQnAy57Vl0mEZ4kDV3IOYtSYWPCo6Y4ofa2bCI,17290
|
|
9
9
|
forgeproof/fixture_engine.py,sha256=DoXLt4CnGVw5hOvjizibjYrMx7gu23vKyj1xEIJewIw,2928
|
|
10
|
-
forgeproof/ledger.py,sha256=
|
|
11
|
-
forgeproof/lenses.py,sha256
|
|
10
|
+
forgeproof/ledger.py,sha256=W7X3A_X4BikUmW2sHec5xJX6B_M8AwY3hQnjyc8UGIU,28978
|
|
11
|
+
forgeproof/lenses.py,sha256=-tFZq9lKzgt-I9zZ9zQ5ncr4xhHeJtRhEmn5vAQE8UQ,39484
|
|
12
12
|
forgeproof/paths.py,sha256=w-9pX5HbkfYxrSWjN3ZXgvJg7a1Pp-zlBgd8ZdzxsqQ,2070
|
|
13
13
|
forgeproof/runner.py,sha256=dm5Ql86YTq8EDzb7lWbVJJMlfbrYnEt8iLeovLqGhxU,4250
|
|
14
14
|
forgeproof/unsupported.py,sha256=tvY66bgdJIOFYhMhMXHKiHZ3NlsvFVVebUbmQxTwLtI,3041
|
|
@@ -27,7 +27,7 @@ forgeproof/fixtures/naive_bayes_text.py,sha256=2GWSQMZJFwS1ILKrcd0BMcqHN2hudhpEX
|
|
|
27
27
|
forgeproof/fixtures/perceptron.py,sha256=56ZTlkXqslU8iJ5rLMU-Fjc7ReaeyC-fFvGMCeOG3qE,2630
|
|
28
28
|
forgeproof/fixtures/polynomial_regression.py,sha256=CCQc5MruIk3VXaRDrS5iQvRiVy4ZeALWYklOXEHSyBw,2146
|
|
29
29
|
forgeproof/fixtures/ridge_regression_normal_eq.py,sha256=si5dqcCSgRv3xG3VRq6eJvhSi6ZtnYCxLIcjowKoWIY,2523
|
|
30
|
-
forgeproof/lens_tools/__init__.py,sha256=
|
|
30
|
+
forgeproof/lens_tools/__init__.py,sha256=lEt8bWsuB8dmndlip2EKl1MP50kGNYbKVTfkMiuatcU,515
|
|
31
31
|
forgeproof/lens_tools/guard_lens.py,sha256=8lgHH4CF9WnF58VDBPgBho_TUlF17yFCJBV6xe-Glxk,52726
|
|
32
32
|
forgeproof/lens_tools/invariant_gate.py,sha256=wDrU0MEhIXd3U20nddFVJvHa28bQ7lbz9xHQ2cQ24Mk,7954
|
|
33
33
|
forgeproof/lens_tools/twin_consensus.py,sha256=xE6yfHXCyIXmX7r-Fujhau4nwJX3XoIRf80LxqEOlBI,14877
|
|
@@ -37,7 +37,7 @@ forgeproof/lens_tools/invariant_contracts/ridge_regression_normal_eq.json,sha256
|
|
|
37
37
|
forgeproof/lens_tools/metamorphic/__init__.py,sha256=C8yXmZHYa_L7Bg5epLNv2pPN35RfMwe1_fmi8L9LmeE,354
|
|
38
38
|
forgeproof/lens_tools/metamorphic/relations.py,sha256=sF8pHgvVPu4JhjmKJhWKDmUTo5ARcn_3dOMRDo_DgcI,38339
|
|
39
39
|
forgeproof/lens_tools/metamorphic/runner.py,sha256=S8wNEd5LZ4nH7rT15hwbuR3a7u6ko7uP9jmYr-Y7CT4,3756
|
|
40
|
-
forgeproof/reference/ORIGIN.md,sha256=
|
|
40
|
+
forgeproof/reference/ORIGIN.md,sha256=OsoL4s_zQme92ycu0jZ_SsyKs_8m4Ta-eCekR_8IyFc,2806
|
|
41
41
|
forgeproof/reference/decision_tree_id3.py,sha256=Ti0W8Nl2b9qzx8BEMGKNqX6ZQGgBfb74ZjJ35cD22YY,9724
|
|
42
42
|
forgeproof/reference/gradient_descent_momentum.py,sha256=nVUoandzOGWHW1Or8ddWW8lqL0AYPzjOWV9882kXsVs,8830
|
|
43
43
|
forgeproof/reference/kmeans_clustering.py,sha256=VdblPJHmRu7cYVfYbtQ0PTDbYve0TsycBtjGX4GTv4o,8623
|
|
@@ -50,20 +50,20 @@ forgeproof/reference/polynomial_regression.py,sha256=JMo7ani7u43SnziHoyNzwereyS4
|
|
|
50
50
|
forgeproof/reference/ridge_regression_normal_eq.py,sha256=2T2O3opBL_PU-VjLruwaYTZsKcQf6gtQSX-2Yk2dG_0,8812
|
|
51
51
|
forgeproof/scout/__init__.py,sha256=rOZTXCcEq8cC0T6yjianMSvmzGEwiTUmFfPgzXjjcqA,465
|
|
52
52
|
forgeproof/scout/behaviour.py,sha256=Rf1Q2BVtllcNJm6lAB98-zSAQL0mImnCiR753rNscts,17163
|
|
53
|
-
forgeproof/scout/box.py,sha256=
|
|
53
|
+
forgeproof/scout/box.py,sha256=IasB_8Ptf8K_-5XyqY4fO3Pm2weOXkoIT3CSxfyDmWo,30448
|
|
54
54
|
forgeproof/scout/cards.py,sha256=81BIAuGHYoBXfeVdjkuMvxt9y-FmmEuHOgZbt9r-ljk,7722
|
|
55
55
|
forgeproof/scout/contract.py,sha256=iN5n7syMebDEdCzlRraEBUz4aGiZXshvJjkB172cRrs,1491
|
|
56
56
|
forgeproof/scout/corpus.py,sha256=sfuWy_dGCmueqmPQao5iYDZ1PDbt0yelwcH_7j2UisM,4358
|
|
57
|
-
forgeproof/scout/embed.py,sha256=
|
|
57
|
+
forgeproof/scout/embed.py,sha256=mdW5HeaATls7OZh88r3dBhtuBuy_XH3QIpk5aItFOXU,9782
|
|
58
58
|
forgeproof/scout/envfit.py,sha256=jHQD5e_FEH6lXZqaeRHz6tTx_NBxVw8SMrRBUrVOAsE,2548
|
|
59
59
|
forgeproof/scout/experience.py,sha256=R1AisVTcvsewXDJMDd-wvyZDBC3xS7Ytl8I3nEhgtho,7824
|
|
60
60
|
forgeproof/scout/fetchproxy.py,sha256=LE8-4kXk_D2dqiq8SWvL34Wagd8BjSSBtJHoTkvIC14,16258
|
|
61
|
-
forgeproof/scout/ghcache.py,sha256=
|
|
62
|
-
forgeproof/scout/ghpool.py,sha256=
|
|
63
|
-
forgeproof/scout/ghsearch.py,sha256=
|
|
61
|
+
forgeproof/scout/ghcache.py,sha256=MiOfL9gwQKWRF1LYoFskjRjn9ZF_zbY5oLU_t-uqxhc,19784
|
|
62
|
+
forgeproof/scout/ghpool.py,sha256=vwg6h7zyvFmgkFKldKOmv3IMXm2JtBPRGbH2BihRF_Y,11377
|
|
63
|
+
forgeproof/scout/ghsearch.py,sha256=HKrqDLw_qVZ1fRC8jnORzNqBwci8zsImDuhKe8pZHvQ,12611
|
|
64
64
|
forgeproof/scout/ids.py,sha256=duX16OSev7_MB3egZ03butdkuuBdCmlJ-rywpSfslwQ,3647
|
|
65
65
|
forgeproof/scout/intent_lens.py,sha256=jPdNQexdMQH5wfjspffYmmXSDW0IedQAAeGlBHkA4-M,9211
|
|
66
|
-
forgeproof/scout/learn.py,sha256=
|
|
66
|
+
forgeproof/scout/learn.py,sha256=E1Oz4_S-w7WvoMFg6v9qCmLr3j8eRhptJadPUls8PcU,28302
|
|
67
67
|
forgeproof/scout/meaning_lens.py,sha256=TDBQ2paqxuKgW7e3FQyz5sggFamgq9Je7O5AJ8huGjw,11606
|
|
68
68
|
forgeproof/scout/outcomes.py,sha256=VXQ8skOwupaOn-K11odEb4YHT8B885cTJxIsLLm1FVE,1355
|
|
69
69
|
forgeproof/scout/plant.py,sha256=LglRBn8rPazIIEPNfPjlm4k4AEV65wu24E47v0rgN6U,13687
|
|
@@ -74,16 +74,16 @@ forgeproof/scout/shape.py,sha256=1Km3cl6RH0zAWbWvFSHXuXGFwQgCqzvloZxLNb0FoQk,413
|
|
|
74
74
|
forgeproof/scout/shape_lens.py,sha256=FfRU1H32MM3KF9SP6yq6qkRRYkuNqPcvOW8dRx9TBAU,2951
|
|
75
75
|
forgeproof/scout/signature.py,sha256=-G-P4b9ykE1r46DaBgI7l5ebcu1LF0Pef_efsUpQ3tc,2118
|
|
76
76
|
forgeproof/scout/slots.py,sha256=SexSLryZsTrCpeVj7eOptU1_TM6THaY6Bj67aDz9ui4,1492
|
|
77
|
-
forgeproof/scout/upstream_facts.py,sha256=
|
|
77
|
+
forgeproof/scout/upstream_facts.py,sha256=g43s0vJa6YlK8sLpnPdmKpBbffTn9UgN5a60iLknevw,24897
|
|
78
78
|
forgeproof/scout/engines/__init__.py,sha256=kgUI4iNwYUikHnMxQzCAIZAX3QFz0D3eQWZmvfPhXws,101
|
|
79
|
-
forgeproof/scout/engines/chaos.py,sha256=
|
|
79
|
+
forgeproof/scout/engines/chaos.py,sha256=AstxAeIFBIrQOfyReD7ONhGoHnzWLgoMQl8hEkAMxzs,24123
|
|
80
80
|
forgeproof/scout/engines/chaos_port.py,sha256=VicN_z7JRS76UW7e7B9QLyfTbkQPAaFyJnKMKui3toY,62592
|
|
81
81
|
forgeproof/scout/engines/chaos_runner.py,sha256=i1T7yzPDQ31xKWkqTN3ahI6v0h3NhOf6lHd8ommyli8,7116
|
|
82
82
|
forgeproof/scout/engines/executor_port.py,sha256=IPXs48Fic3AVg6upZEDxA1qjMiGMcpFEyj80211CjsA,13413
|
|
83
|
-
forgeproof_cli-0.2.
|
|
84
|
-
forgeproof_cli-0.2.
|
|
85
|
-
forgeproof_cli-0.2.
|
|
86
|
-
forgeproof_cli-0.2.
|
|
87
|
-
forgeproof_cli-0.2.
|
|
88
|
-
forgeproof_cli-0.2.
|
|
89
|
-
forgeproof_cli-0.2.
|
|
83
|
+
forgeproof_cli-0.2.1.dist-info/licenses/LICENSE,sha256=Mt2B1eyaiYRwpeKNE7Xb7HpX3qLFOFs8uv6eYZULeMc,11343
|
|
84
|
+
forgeproof_cli-0.2.1.dist-info/licenses/NOTICE,sha256=YP5ScJyFop7_pAEE3J_oFlqvo4-JGTwMI-VWgtgn-tQ,1106
|
|
85
|
+
forgeproof_cli-0.2.1.dist-info/METADATA,sha256=k0z275ug2lswLr4Jl58hR9r60kZuA3dZOfdPx42mPyc,16338
|
|
86
|
+
forgeproof_cli-0.2.1.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
87
|
+
forgeproof_cli-0.2.1.dist-info/entry_points.txt,sha256=H7KSGfo11Ag72Zf7RxbsWn8KB_s9LUxYF0UZV1uGFtQ,96
|
|
88
|
+
forgeproof_cli-0.2.1.dist-info/top_level.txt,sha256=3Hi4e3wifY69rrLQH-vOspjVst0Oc2mgeMFZk5kb5Fc,22
|
|
89
|
+
forgeproof_cli-0.2.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|