E0-3/E0-4 groundwork: provider options, pinned docs, Track A/B in the protocol

- providers: per-model request extras (e.g. reasoning_effort), key_env,
  token_param (max_completion_tokens on api.openai.com); recorded
- docs pinned to the toolchain being run: Rust offline docs from the
  sysroot, Zig langref and std source of the same installation; several
  mounts under a read-only /docs; hashes recorded (cached for big trees)
- protocol: neutral model labels and calibration before classes (§2);
  smoke gates, fixed Aji commit, fixed per-model reasoning mode, slope of
  degradation (§39a); Track A controlled vs Track B native agents (§39b)
- plan: E-C calibration, E-G gates, E-N native-agent run
This commit is contained in:
dev committed 2026-10-04 17:28:15 +03:00
1 parent b49003bdb9
commit d7bb9273f3
14 files changed
+250 -60

No files matched your search

+22
View File
@@ -36,6 +36,28 @@ def sha256_path(path):
return "sha256:" + h.hexdigest()
def sha256_path_cached(path):
"""`sha256_path` for large documentation trees, cached on disk by the
tree's path, file count, total size and newest modification time."""
count, size, newest = 0, 0, 0.0
for root, dirs, files in os.walk(path) if os.path.isdir(path) else [(os.path.dirname(path), [], [os.path.basename(path)])]:
dirs[:] = [d for d in dirs if d not in (".git", "__pycache__")]
for name in files:
st = os.stat(os.path.join(root, name))
count, size, newest = count + 1, size + st.st_size, max(newest, st.st_mtime)
key = f"{os.path.realpath(path)}|{count}|{size}|{newest}"
cache_file = os.path.join(os.path.expanduser("~"), ".cache", "ajieval", "hashes.json")
try:
cache = read_json(cache_file)
except (OSError, ValueError):
cache = {}
if key not in cache:
cache[key] = sha256_path(path)
os.makedirs(os.path.dirname(cache_file), exist_ok=True)
write_json(cache_file, cache)
return cache[key]
def git_commit(path=REPO):
"""`<commit>` or `<commit>+dirty` for the repository containing `path`."""
try: