Skip to content

Commit e38294a

Browse files
gHashTaggHashTag
andauthored
fix(witness): resolve the wide-rung pack defaults inside the repository (#1582)
* fix(witness): resolve the wide-rung pack defaults inside the repository The six wide-rung witness decode references defaulted to an absolute path under /home/user/workspace when run with no argument, so the file a witnesses[] entry names failed on every machine but the one it was written on: FileNotFoundError: '/home/user/workspace/gf128_work/gf128_pack.json' That matters more than an ordinary broken default. These are the artifacts honesty rule #10 points a sceptical reader at, and running the named file is the first thing anyone checking the corpus does. The witnesses themselves are sound. Passing the in-repo pack explicitly already gave the claimed result -- gf128 15/15 exact, abs_error=0 -- so nothing about the decoding changes here, only where the default input is looked up. The cross_check_representative.py scripts were never affected, since they import these modules rather than invoking __main__. The default now resolves relative to the script's own location. All six run standalone afterwards and print their own verdict at abs_error=0, gf48 through gf1024. Found by extending the pass-49 "just run everything" sweep to tools/ and scripts/, after triaging 300 files by side effect so only the 79 with no write, exec, network or git call were executed unattended. Closes #1581 * docs(now): record #1582 in the coordination anchor now-sync-gate requires every PR to master to update docs/NOW.md. This PR predates my knowing that; the entry describes what it lands and states its honesty limits, in the file's existing shape. --------- Co-authored-by: gHashTag <admin@t27.ai>
1 parent dc57ea8 commit e38294a

7 files changed

Lines changed: 38 additions & 6 deletions

File tree

conformance/witness/gf1024/gf1024_decode_ref.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"""
3535
import json
3636
import re
37+
import os
3738
import sys
3839
from fractions import Fraction
3940

@@ -158,7 +159,8 @@ def check_pack(pack_path):
158159

159160
if __name__ == "__main__":
160161
p = sys.argv[1] if len(sys.argv) > 1 else \
161-
"/home/user/workspace/gf1024_work/gf1024_pack.json"
162+
os.path.join(os.path.dirname(os.path.abspath(__file__)),
163+
"..", "..", "vectors", "gf1024_conformance_v0.json")
162164
ok, tot, fails = check_pack(p)
163165
print(f"gf1024 golden (Fraction exact oracle) vs pack: {ok}/{tot} exact "
164166
f"[e={E} m={M} bias={BIAS}]")

conformance/witness/gf128/gf128_decode_ref.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"""
3535
import json
3636
import re
37+
import os
3738
import sys
3839
from fractions import Fraction
3940

@@ -158,7 +159,8 @@ def check_pack(pack_path):
158159

159160
if __name__ == "__main__":
160161
p = sys.argv[1] if len(sys.argv) > 1 else \
161-
"/home/user/workspace/gf128_work/gf128_pack.json"
162+
os.path.join(os.path.dirname(os.path.abspath(__file__)),
163+
"..", "..", "vectors", "gf128_conformance_v0.json")
162164
ok, tot, fails = check_pack(p)
163165
print(f"gf128 golden (Fraction exact oracle) vs pack: {ok}/{tot} exact "
164166
f"[e={E} m={M} bias={BIAS}]")

conformance/witness/gf256/gf256_decode_ref.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"""
3737
import json
3838
import re
39+
import os
3940
import sys
4041
from fractions import Fraction
4142

@@ -152,7 +153,8 @@ def check_pack(pack_path):
152153

153154
if __name__ == "__main__":
154155
p = sys.argv[1] if len(sys.argv) > 1 else \
155-
"/home/user/workspace/gf256_witness/gf256_wide_pack.json"
156+
os.path.join(os.path.dirname(os.path.abspath(__file__)),
157+
"..", "..", "vectors", "gf256_conformance_v0.json")
156158
ok, tot, fails = check_pack(p)
157159
print(f"gf256 golden (Fraction exact oracle) vs pack: {ok}/{tot} exact "
158160
f"[e={E} m={M} bias={BIAS}]")

conformance/witness/gf48_fp64/gf48_decode_ref.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
#!/usr/bin/env python3
23
# -*- coding: utf-8 -*-
34
"""
@@ -161,7 +162,8 @@ def python_check_pack(pack_path):
161162
if __name__ == "__main__":
162163
import sys
163164
p = sys.argv[1] if len(sys.argv) > 1 else \
164-
"/home/user/workspace/t27/conformance/vectors/gf48_conformance_v0.json"
165+
os.path.join(os.path.dirname(os.path.abspath(__file__)),
166+
"..", "..", "vectors", "gf48_conformance_v0.json")
165167
ok, tot, fails = python_check_pack(p)
166168
print(f"gf48 golden (Fraction, FP64-target) vs pack: {ok}/{tot} exact")
167169
for lbl, msg in fails:

conformance/witness/gf512/gf512_decode_ref.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"""
3535
import json
3636
import re
37+
import os
3738
import sys
3839
from fractions import Fraction
3940

@@ -158,7 +159,8 @@ def check_pack(pack_path):
158159

159160
if __name__ == "__main__":
160161
p = sys.argv[1] if len(sys.argv) > 1 else \
161-
"/home/user/workspace/gf512_work/gf512_pack.json"
162+
os.path.join(os.path.dirname(os.path.abspath(__file__)),
163+
"..", "..", "vectors", "gf512_conformance_v0.json")
162164
ok, tot, fails = check_pack(p)
163165
print(f"gf512 golden (Fraction exact oracle) vs pack: {ok}/{tot} exact "
164166
f"[e={E} m={M} bias={BIAS}]")

conformance/witness/gf96/gf96_decode_ref.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"""
3535
import json
3636
import re
37+
import os
3738
import sys
3839
from fractions import Fraction
3940

@@ -158,7 +159,8 @@ def check_pack(pack_path):
158159

159160
if __name__ == "__main__":
160161
p = sys.argv[1] if len(sys.argv) > 1 else \
161-
"/home/user/workspace/gf96_work/gf96_pack.json"
162+
os.path.join(os.path.dirname(os.path.abspath(__file__)),
163+
"..", "..", "vectors", "gf96_conformance_v0.json")
162164
ok, tot, fails = check_pack(p)
163165
print(f"gf96 golden (Fraction exact oracle) vs pack: {ok}/{tot} exact "
164166
f"[e={E} m={M} bias={BIAS}]")

docs/NOW.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
# NOW — witness: wide-rung decode refs resolve their pack inside the repository (2026-08-01)
2+
3+
Last updated: 2026-08-01
4+
5+
## witness: wide-rung decode refs resolve their pack inside the repository (Closes #1581)
6+
7+
- Branch: `fix/witness-default-paths`
8+
- Issue: #1581
9+
- PR: #1582
10+
11+
### Что легло
12+
- All six wide-rung witness decode references defaulted to a path under `/home/user/workspace` when run with no argument, so the file a `witnesses[]` entry names failed on every machine but the one it was written on. The default now resolves relative to the script's own location.
13+
14+
### Границы честности (BINDING)
15+
- The witnesses themselves were sound: given the in-repo pack explicitly, gf128 already reported 15/15 exact at abs_error=0. Only the default lookup was wrong; no decoding changes.
16+
- All six run standalone afterwards, gf48 through gf1024, each at abs_error=0.
17+
- The `cross_check_representative.py` scripts were never affected — they import these modules and never reach `__main__`.
18+
19+
---
20+
121
# NOW — ci: gate INDEX_all_formats.json against the packs it summarises (2026-08-01)
222

323
Last updated: 2026-08-01

0 commit comments

Comments
 (0)