refactor: deepen the campaign code — one Sadeed harness, SPECS as data, observable gate - #70
Merged
Merged
Conversation
C1 — one Sadeed harness: the windowed zero-skip protocol (split at word boundaries, 2x-window generation cap, haraqat projection) existed as five verbatim copies across two repos. Now one deep module, src/harness/sadeed.py, with direct unit tests (the published protocol was previously testable only through 6-hour GPU runs). evaluate_der uses it; rababa r-scripts should vendor it instead of carrying inline copies. C2 (bounded) — SPECS as data: the 16-entry distill spec registry moves to distill_specs.yaml behind a layout-tolerant loader; spec diffs become declarative instead of buried in a 1,700-line module. C3 — the release gate gains a durable stage log (parity_stages.jsonl on the volume): seven consecutive ara-diac2 gate attempts died without a traceback; the gate's interface is now observable. The two spent quantization probes (int8_pc/int8_head — findings recorded in EXPERIMENTS.md E1) are removed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The architecture-review deepening cuts (report delivered alongside):
C1 — one Sadeed harness (STRONG). The windowed zero-skip protocol — the protocol every published Arabic number depends on — existed as five verbatim copies (rababa r5/r6/r7/r8 + evaluate_der). Now one deep module
src/harness/sadeed.py(windowed_paragraphs,split_windows,project_haraqat,strip_diacritics), unit-tested directly (7 tests: byte budgets, word preservation, insertion/drop projection paths). Deletion test: four copies deleted, complexity concentrated.C2 bounded — SPECS as data. The 16-entry spec registry moves to
distill_specs.yamlbehind a layout-tolerant loader (Modal copies the entry file to /root/ while the repo sits at /root/interscript-ml — the loader covers both). Roundtrip verified exact: pkm dicts, optimizer flags, label files intact.C3 — observable gate + spent probes removed.
parity_modelnow writesparity_stages.jsonlto the volume (start / reference-decode / per-precision parity / margin) — seven consecutive ara-diac2 gate attempts died without a traceback; the gate's interface is now its durable log. The one-shotint8_pc/int8_headprobes are gone (findings live in EXPERIMENTS.md E1).Full suite green (non-gpu), ruff clean.
Not in this PR (deliberately)
runstatemodule (C4) — lands with the next orchestrator change.