Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
0fd7cfa
docs(experiments): persist reranker P3 probe artifacts + prereg
Sep 29, 2026
d3d5307
feat(search): P3 module-head pool anchor, live-FALSIFIED (see reranke…
Sep 29, 2026
f2df816
fix(reranker): normalize llama.cpp raw logits via sigmoid (scale cont…
Sep 29, 2026
753e70c
fix(chunker): emit module docstring as chunk 0, live-RED (see reranke…
Sep 29, 2026
f1c32d0
fix(index): exclude measurement artifacts from index (Layer 5)
Sep 29, 2026
d092a17
feat(process): distinguishable MCP and llama process names
Sep 29, 2026
6138b9b
feat(hygiene): add disk_guard with TTL caps and disk-space CI check
Sep 29, 2026
a17a926
fix(tests): remove unused pytest import in test_disk_guard
Sep 29, 2026
31cf58a
feat(hygiene): disk_guard also sweeps stale pytest worker dirs
Sep 29, 2026
cc07a7a
fix(hygiene): tolerate missing disk anchors in disk_guard
Sep 29, 2026
03e4db4
Merge pull request #60 from ManSio/chore/disk-guard
ManSio Sep 29, 2026
af4f6e7
merge(main): sync feat/process-titles with main after disk-guard merge
Sep 29, 2026
1c1c892
Merge pull request #59 from ManSio/feat/process-titles
ManSio Sep 29, 2026
05809e7
feat(process): mcp exe hardlink fallback for windowless pythonw
Sep 29, 2026
f76b15a
Merge pull request #61 from ManSio/feat/mcp-hardlink-name
ManSio Sep 29, 2026
93bb342
fix(search): cold FTS build out of 2s budget plus ext-dir off-by-one
Sep 28, 2026
c4c9296
feat(index): exclude experiment outputs from index, keep git tracking
Sep 28, 2026
5d3fa48
feat(reranker): salvage PR52 scale floor plus holdout calibration
Sep 29, 2026
322765d
tool(index): one-time purge of experiment outputs from shared DB
Sep 29, 2026
e5aafe3
exp(f5relang): clean-stack RU vs EN rerun plus queries-file flag
Sep 29, 2026
47b4ea9
chore(exp): drop f5relang work scratch from versioning
Sep 29, 2026
2ce3ddc
docs(4a): relang verdict plus purge and PR52 outcome
Sep 29, 2026
ea581fe
exp(f5): objective baseline re-measured on clean index
Sep 29, 2026
404238a
Merge pull request #63 from ManSio/feat/pr52-salvage
ManSio Sep 29, 2026
b4310d5
merge(main): sync latest into fix/fts-cold-plus-index-guard
Sep 29, 2026
3841b55
Merge pull request #62 from ManSio/fix/fts-cold-plus-index-guard
ManSio Sep 29, 2026
36801ac
chore(docs): archive auto-synced diary copies out of the issue board
Oct 3, 2026
58b95b7
fix(deps): bump urllib3 and PyJWT to clear 16 known CVEs
Oct 3, 2026
ee5edd2
fix(tests): remove the cross-test race that made CI classify a health…
Oct 3, 2026
7ce72f9
fix(deps): bump urllib3 and PyJWT to clear 16 known CVEs (#65)
ManSio Oct 3, 2026
8588864
feat(verification): committed gates, protocol triage, and six command…
ManSio Oct 3, 2026
0130850
docs: bind published counts to the command that re-derives them (#66)
ManSio Oct 3, 2026
265ce2f
feat(guards): add third-party data and cross-session pre-commit gates
Oct 3, 2026
c4fda0a
fix(gate-zero): run pytest under python.exe, not pythonw
Oct 3, 2026
7d6366a
docs(registries): diary, wisdom and known-issues entries for the new …
Oct 3, 2026
22642cf
fix(eval): align base_repeats default with CLI and ignore .pr_work
Oct 3, 2026
46bb2ab
test(eval): parse CLI stdout/stderr and assert both language arms
Oct 3, 2026
31323da
chore(eval): record prompt_robustness v2 live run and findings
Oct 3, 2026
6f8afe9
feat(eval): structured matcher rules and fail-closed control verdicts
Oct 3, 2026
b9afd4c
docs(eval): record v3 matcher calibration and control-verdict rework
Oct 3, 2026
0718e5f
docs(eval): record v3 live run - verdict column not comparable, new F…
Oct 3, 2026
08aa4e2
docs(eval): live-distribution calibration is degenerate - 16:1 noise …
Oct 3, 2026
53e9651
docs(eval): propose diary, wisdom and known-issues entries for the re…
Oct 3, 2026
55e57b1
merge origin/main: resolve registry conflicts by union, rotate KNOWN_…
Oct 3, 2026
d43b9e5
fix(negative-controls): resolve GitBash outside PATH
Oct 3, 2026
335324a
Merge pull request #67 from ManSio/chore/bump-urllib3-pyjwt-cve
ManSio Oct 3, 2026
a662208
docs(known-issues): record the PATH-dependent bash resolver defect
Oct 3, 2026
1d21a2c
Merge pull request #69 from ManSio/chore/record-gate-fixes
ManSio Oct 3, 2026
74e23aa
fix(gates): select gate kwargs and report unusable input
Oct 3, 2026
a19ed80
docs(claims): mark A10 measurement SUPERSEDED (closes T-17)
Oct 3, 2026
0c6d0ff
fix(hooks): make a slow gate return a verdict instead of a traceback
Oct 3, 2026
8f82ed0
fix(ruff-gate): resolve a ruff that can actually run
Oct 3, 2026
ac0bdc9
fix(judge): one verdict parser, last-match in both copies
Oct 3, 2026
51d941d
docs(ledger): propose KNOWN_ISSUES entries for the owning session
Oct 3, 2026
b3de219
docs(diary): record the three gate blockers and my bad diagnostics
Oct 3, 2026
31e5d1e
fix(tests): repair what CI caught in the gate work
Oct 3, 2026
fcdc070
chore(tests): drop the duplicated ruff-gate contract test
Oct 3, 2026
3ffbdb2
fix(hooks): keep the spawn stub local to the hook module
Oct 3, 2026
cfacdba
Merge pull request #70 from ManSio/fix/gate-kwargs-and-claims-t17
ManSio Oct 3, 2026
5983cda
Merge pull request #68 from ManSio/exp/prompt-robustness-v3
ManSio Oct 4, 2026
a233291
docs(issues): inventory of own gaps, split into fix vs add
Oct 4, 2026
5612375
Merge pull request #71 from ManSio/chore/gap-inventory-2026-10-04
ManSio Oct 4, 2026
ae85069
fix(search): graceful fast-mode fallback when embedder is down
Oct 8, 2026
95e1231
fix(tests): machine-readable expected-fail markers in E25-E27 frozen …
Oct 8, 2026
901859a
Merge origin/main into fix/fast-mode-embedder-fallback
Oct 8, 2026
99cef55
docs(diary): record PR #72 pipeline outcome
Oct 8, 2026
d338e25
feat(index): E26 file-level chunk augmentation behind flag (default OFF)
Oct 8, 2026
b8e544a
feat(search): on-demand cosine rerank path behind flag (default OFF)
Oct 8, 2026
8b3b39b
feat(search): MSCODEBASE_DENSE_OFF kill-switch + EXP-28 dense-off A/B
Oct 10, 2026
3813561
exp(e29): symbol/NL subset split closes EXP-28 H5, corrects 18% speed…
Oct 10, 2026
05b06ba
Merge pull request #75 from ManSio/exp/dense-off-ab
ManSio Oct 10, 2026
2afd2c6
Merge pull request #72 from ManSio/fix/fast-mode-embedder-fallback
ManSio Oct 10, 2026
11c71c0
Merge pull request #74 from ManSio/feat/ondemand-rerank
ManSio Oct 10, 2026
67325b2
Merge remote-tracking branch 'origin/main' into feat/e26-chunk-format
Oct 10, 2026
1612b53
ci: run CI for stacked PRs whose base is a feature branch (#76)
ManSio Oct 10, 2026
b62b80a
Merge pull request #73 from ManSio/feat/e26-chunk-format
ManSio Oct 10, 2026
4d1195b
Merge origin/main into fix/chunker-module-doc: revive the 11-day-old …
Oct 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 46 additions & 10 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,20 @@ MSCodeBase pre-commit hook — автоматическая проверка п
8. check_known_issues — §4.8 R4: размер ≤ 300 строк + архивация старых записей
"""

import os
import subprocess
import sys
from pathlib import Path

# Per-gate budget. 900s is the historical value (documented flakiness at 300s);
# overridable only to make the timeout path testable without a 15-minute wait.
GATE_TIMEOUT = int(os.environ.get("MSCB_PRECOMMIT_GATE_TIMEOUT", "900"))

# Indirection so a test can stub THIS module's spawn without patching the
# global `subprocess` module — a global patch leaks into every other test in
# the same worker (CI: 14 unrelated failures).
Popen = subprocess.Popen


# §9 п.9 (ENCODING SAFETY): при выводе emoji-строк из stdout скриптов
# (например, «📊 Итог: 20 ✅ / 1 ❌») в cp1251-консоль падает
Expand All @@ -42,7 +52,7 @@ def find_project_root() -> Path | None:
return None


def run_script(script_path: str, label: str) -> bool:
def run_script(script_path: str, label: str, extra_args: list[str] | None = None) -> bool:
"""Запускает скрипт и возвращает True если успешно."""
project_root = find_project_root()
if project_root is None:
Expand All @@ -54,10 +64,13 @@ def run_script(script_path: str, label: str) -> bool:
print(f" ⏭️ {label}: скрипт не найден ({script})")
return True

# Печатаем ДО запуска: гейт с большим бюджетом (verify_diary тянет полный
# pytest) иначе выглядит как зависание — и его обходят через --no-verify.
print(f" ⏳ {label}: выполняется (бюджет {GATE_TIMEOUT}s)…", flush=True)
# §5.16: Popen + communicate (не capture_output) — защита от pipe-deadlock
# в фоновых потоках; encoding="utf-8" — декодирование stdout в utf-8.
proc = subprocess.Popen(
[sys.executable, str(script)],
proc = Popen(
[sys.executable, str(script), *(extra_args or [])],
cwd=str(project_root),
stdout=subprocess.PIPE,
stderr=subprocess.DEVNULL,
Expand All @@ -69,35 +82,58 @@ def run_script(script_path: str, label: str) -> bool:
# нагрузкой) — кап 120s давал флаки TimeoutExpired на коммитах (2026-08-08);
# 300→900 (2026-08-24): сюита выросла (live-sync + predict-наборы), 300s
# начал флакать при параллельной нагрузке.
stdout, _ = proc.communicate(timeout=900)
try:
stdout, _ = proc.communicate(timeout=GATE_TIMEOUT)
except subprocess.TimeoutExpired:
# Раньше это было необработанное исключение: хук умирал с трейсбеком и
# БЕЗ вердикта — его путали с «гейт сломан» и обходили через --no-verify.
# Таймаут — это вердикт: называем гейт, который не ответил.
proc.kill()
proc.communicate()
print(f" ❌ {label}: TIMEOUT >{GATE_TIMEOUT}s — гейт не ответил, вердикта нет",
flush=True)
return False
if proc.returncode != 0:
print(f" ❌ {label}: exit {proc.returncode}")
print(f" ❌ {label}: exit {proc.returncode}", flush=True)
if stdout:
for line in stdout.splitlines()[-10:]:
print(f" {line}")
return False
print(f" ✅ {label}: OK")
print(f" ✅ {label}: OK", flush=True)
return True


def main():
print("🔍 MSCodeBase pre-commit checks:")
print("🔍 MSCodeBase pre-commit checks:", flush=True)
all_ok = True

all_ok &= run_script("scripts/verify_diary.py", "verify_diary")
# gate-zero тянет полный `pytest tests/`. Измерено 2026-10-03 на этой машине:
# 36% за 600s, то есть ~1670s — бюджет гейта (900s) не выдерживает НИ ОДНОГО
# коммита. Раньше это выглядело как «хук висит», и коммиты уходили в
# --no-verify. Поэтому fast-режим: полный прогон остаётся за CI, а локальный
# коммит говорит ВСЛУХ, что именно пропущено.
fast = os.environ.get("MSCB_PRECOMMIT_FAST") == "1"
diary_args = ["--skip-gate-zero"] if fast else None
if fast:
print(" ⚠️ FAST: полный `pytest tests/` (gate-zero) ПРОПУЩЕН — "
"покрытие этого коммита обязана взять CI.", flush=True)

all_ok &= run_script("scripts/verify_diary.py", "verify_diary", diary_args)
all_ok &= run_script("scripts/stale_detector.py", "stale_detector")
all_ok &= run_script("scripts/check_tool_names.py", "check_tool_names")
all_ok &= run_script("scripts/negative_controls_runner.py", "negative_controls")
all_ok &= run_script("scripts/check_layer_boundaries.py", "check_layer_boundaries")
all_ok &= run_script("scripts/architecture_linter.py", "architecture_linter")
all_ok &= run_script("scripts/lock_guard.py", "lock_guard (advisory)")
all_ok &= run_script("scripts/check_known_issues.py", "check_known_issues")
all_ok &= run_script("scripts/check_third_party_data.py", "third_party_data")
all_ok &= run_script("scripts/check_parallel_sessions.py", "parallel_sessions")
all_ok &= run_script("scripts/ruff_gate.py", "ruff_gate")

if not all_ok:
print("\n❌ Pre-commit checks FAILED. Исправьте ошибки перед коммитом.")
print("\n❌ Pre-commit checks FAILED. Исправьте ошибки перед коммитом.", flush=True)
sys.exit(1)
print("\n✅ All pre-commit checks passed.")
print("\n✅ All pre-commit checks passed.", flush=True)
sys.exit(0)


Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ on:
push:
branches: [main]
pull_request:
branches: [main]
# main — обычные PR. Ветки миграции — «stacked» PR (основа не main):
# без них CI не запускался, и фазы 2/3 уехали без единого зелёного прогона
# (2026-10-10, инцидент PR #74/#75). push по-прежнему только main,
# чтобы не задваивать прогоны для одной и той же ревизии.
branches: [main, 'feat/**', 'exp/**', 'fix/**', 'chore/**']

permissions:
contents: read
Expand Down Expand Up @@ -63,6 +67,12 @@ jobs:
- name: Check version consistency
run: python scripts/bump_version.py --check

- name: Disk-space guard (C:-critical 2026-09-29)
# Fails if the runner disk has <1GB free — full disks cause
# silent truncations in lancedb/onnx caches. Local equivalent:
# python scripts/disk_guard.py --check
run: python scripts/disk_guard.py --check --min-free-gb 1

- name: Audit dependencies (pip-audit)
# Pinned: pip-audit 2.10.1 проверен 2026-08-08 (PYSEC-2026-3552).
# Бамп — только после локального прогона `pip-audit -r requirements-lock.txt --no-deps --disable-pip`.
Expand Down
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ scripts/update_zed_models.py
# Dev notes — не для publish
DEV_EXP.md
# Экспериментальные артефакты — не пушить
.pr_work/
experiments/__pycache__/
experiments/*_results.json
experiments/*_results.csv
Expand Down Expand Up @@ -182,6 +183,13 @@ experiments/compiler_concept*.json
experiments/pagerank_out.txt
experiments/exp_*.py
experiments/research_internet_*.md
# Сырые выгрузки чужих публикаций (дословный текст + личные данные авторов).
# Хранить только ВНЕ репозитория: %LOCALAPPDATA%/mscodebase/audit-cache/.
# В репозитории допустимы лишь свой вывод, sha256, URL и короткие цитаты.
experiments/**/frozen/*_raw_fetch.*
experiments/**/frozen/*.raw.*
experiments/**/frozen/*_page_dump.*
experiments/**/frozen/*_SCRAPED.*
experiments/bootstrap/trace_result.json
experiments/bootstrap/__pycache__/
# Bootstrap Step 3: дефолтный trace_result.json в cwd (bootstrap_trace_plugin.py)
Expand Down Expand Up @@ -231,3 +239,7 @@ _measure_*.py
# E17 experiment: regenerable prompt shards (rebuild via e17_export_*.py)
experiments/bootstrap/e17_shards/*.txt
experiments/bootstrap/e17_judge/*.txt

# Written by tests/test_planted_break_gate.py on every run (atomic, read by nobody).
# Tracked, it dirties git status and invites committing a timestamp.
experiments/planted_break/results.json
44 changes: 0 additions & 44 deletions .local/e2e_chain_test.py

This file was deleted.

63 changes: 0 additions & 63 deletions .local/fix_zed_settings.py

This file was deleted.

94 changes: 0 additions & 94 deletions .local/hard_triggers_patch.py

This file was deleted.

Loading
Loading