Skip to content

refactor: deepen the campaign code — one Sadeed harness, SPECS as data, observable gate - #70

Merged
ronaldtse merged 1 commit into
mainfrom
refactor/deepen-campaign-code
Aug 29, 2026
Merged

refactor: deepen the campaign code — one Sadeed harness, SPECS as data, observable gate#70
ronaldtse merged 1 commit into
mainfrom
refactor/deepen-campaign-code

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

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.yaml behind 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_model now writes parity_stages.jsonl to 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-shot int8_pc/int8_head probes are gone (findings live in EXPERIMENTS.md E1).

Full suite green (non-gpu), ruff clean.

Not in this PR (deliberately)

  • Full modal_distill split (labeling/eval/chain modules) — waits until no arm is in flight (E4 running).
  • The marker-protocol runstate module (C4) — lands with the next orchestrator change.
  • rababa r-scripts vendoring the harness — rababa-side PR.

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.
@ronaldtse
ronaldtse merged commit 05124e1 into main Aug 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant