# Next Session Entry — α-7 Closure Pending + Track 2c + Bidi Gate Mid-Wave

> **Status**: mid-cycle. α-7 implementation done + N=3 baseline captured
> + 5-tier mode remeasurement in flight (background, ~5-7h remaining at
> session pause). Three draft PRs queued (#680 α-7, #681 Track 2c,
> #682 bidi gate). Two collaboration DMs sent (Ali Track 2c ack, Robin
> Direction 3 consolidated share).
> **Cycle position**: between α-7 implementation and α-7 closure.
> Collaboration line resumed (Ali active post-6/6, Robin's "you see
> first" Direction 3 ask fulfilled). Track 2c integration mid-wave.
> **Resume entry point**: read this file → check 5-tier completion →
> proceed per §4 action sequence.

---

## 0. Where the project is

- **Version**: v0.4.1 (latest minted DOI `10.5281/zenodo.20426719`).
  α-7 cycle adds the first JAMES code change against α-5+α-6
  measurement debt.
- **Active theme**: α-7 closure (5-tier mode reshape verdict) +
  Track 2c follow-up (Phase 4 JAMES sweep + cross-stack report) +
  α-8 design refinement (evidence-of-absence preservation rule). Three
  parallel tracks; α-7 closure is the load-bearing decision.
- **Cumulative wrong-fix-averted**: **9** (carried from α-6 close;
  α-7 baseline did NOT add to the count — the -0.107 abst_f1 regression
  at gemma4 production tier is a research finding, not a wrong fix).
- **Cumulative JAMES code change**: now non-zero — α-7 PR #680 ships
  the first code change against measurement debt (graph top-K + DFS
  threshold tighten + bucket-(d) phrases). Track 2c PR #681 is docs +
  fixtures. Bidi gate PR #682 is security defence (independent).

---

## 1. Headline state (today's session 2026-06-02)

### Done

- α-7 implementation: PR #680 draft
  - `core/graph_topk.py` new module (~3.8 KB)
  - `DFS_SCORE_THRESHOLD` 0.05 → 0.08
  - 5 bucket-(d) phrases added to `_ABSTENTION_PHRASES`
  - 14 unit tests pass
- α-7 N=3 baseline captured: `baseline_91b9a2c.json` + rescored version
- **α-7 baseline shows regression at gemma4 production tier**:
  graded -0.020 (within noise) / **abst_f1 -0.107 outside noise edge**
  / null_query -0.120 graded + -0.107 abst_f1 (both outside noise)
- **Mechanism identified (provisional)**: top-K=10 removed gemma4's
  "evidence-of-absence" signal — the 41-161 entity surface was
  giving the grounding-trained model the "I looked at lots of stuff,
  none of it is the answer" signal that triggers refusal. Narrower
  context lets gemma4 commit to inference.
- 4-step rule audit confirmed regression is structural, NOT oracle
  phrase coverage artifact (re-score with 5 added phrases shifted
  median abst_f1 by only +0.002).

### In flight (background `b8cp78rv8`)

- α-7 5-tier mode remeasurement: 5 tiers (1b/4b/12b/27b/e4b) × 2
  cells (C_minus + C_rag-full) = 10 cells
- Progress at session pause: 8/10 done, M_L just finishing
  C_rag-full, M_XL (27b) is the remaining big block (~5-8h)

### Collaboration line (resumed today)

- **Ali (Track 2c)**:
  - Received `ar_ecommerce.yaml` (18 cases) + Provia run report +
    raw JSON. Preserved at `eval/adversarial/ar_ecommerce-*`.
  - Ack DM v3 sent 2026-06-02 — concrete α-7-mechanism parallel + α-8
    architectural lesson + bidi gate commitment + 100-case forward-look
  - **Track 2c X2 cross-stack mechanism convergence with α-7 finding**:
    grounding fails open at both Provia gpt-4o-mini AND JAMES gemma4:e4b
    when assertions land without real anchor / when context is narrowed
- **Robin (Direction 3 consolidated share)**:
  - DM sent 2026-06-02 (deferred since 2026-05-29) — PR #600 +
    7-model H1 confirmed / H2-H3 rejected + 5-point S4 ladder
    forward-look + Phase 3b plan

### PRs queued (3 draft)

| PR | Branch | What | Gate |
|---|---|---|---|
| #680 | feat/v0.4-alpha7-graph-topk | α-7 implementation + closure analysis | 5-tier completion + final verdict (adopt / tier-gated / reject) |
| #681 | docs/v0.4-track-2c-ali-integration | Track 2c Phase 1-3 + bidi audit + design memo | review |
| #682 | feat/v0.4-bidi-input-gate | bidi gate runtime impl (29 tests) | review |

All three are independent — different branches, no overlapping
files except for the documented α-8 design memo touchpoint
(Track 2c branch extends α-7 branch's §2.4; this is documented in
PR #681 body).

### Bidi gate (PR #682, today's surprise extra)

DM commit fulfilled in <24h. Ships `core/input_normalization.py` +
`routes/query.py` wire + 29 unit tests + ARCHITECTURE.md §5.7.11.
Strips 11 bidi + 4 invisible chars + NFC. log_stage audit row when
chars dropped. Independent of α-7 / α-8 cycle.

---

## 2. Verdict (CONFIRMED post-5-tier 2026-06-02 PM)

### 2.1 α-7 verdict — REJECT

5-tier remeasurement completed 2026-06-02 (1000 queries, 0 timeouts,
0 errors, 10/10 cells written). Result: **REJECT at all tiers**.

| Tier | α-6 contribution | α-7 contribution | change | mode change |
|---|---:|---:|---:|---|
| 1b | 0.000 | 0.000 | 0 | stable inert |
| 4b | -0.074 | -0.067 | +0.007 | unchanged disrupt |
| **e4b** | **+0.033** | **-0.283** | **-0.316** | **CRASH** amplify → disrupt |
| **12b** | **+0.375** | **-0.076** | **-0.451** | **CRASH** create → disrupt |
| 27b | -0.181 | -0.359 | -0.178 | worse disrupt |

**Mechanism CONFIRMED**: top-K=10 removes evidence-of-absence signal
at every tier where pure-LLM had nonzero abstention capability.
Universal regression. K=50/K=25 tuning would not fix — wrong-knob
mechanism, not wrong-value.

**S4 universal-law candidate** survives the context reshape — path Δ
±0.013 spread across 5 tiers (α-6 was ±0.022). ⭐⭐⭐ candidate
strengthens.

**Next action**: close PR #680 as REJECT. Bucket-(d) phrase additions
(7 total) eligible for separate docs-only PR. α-7 closure analysis
preserved on main via PR #683.

**10th wrong-fix-averted**: α-7 hypothesis tested at full 5-tier
scale before production adoption. Production stays safe.

**Memory pass complete (2026-06-02)** — 4 new entries:
- `feedback_alpha7_top_k_destroys_positive_contributions`
- `feedback_s4_citation_survives_context_reshape`
- `feedback_12b_pure_capability_misclassified_as_plateau`
- `project_alpha_7_closure_state`

### 2.2 Track 2c verdicts (independent of α-7 outcome)

| Track 2c phase | Decision |
|---|---|
| Phase 1-3 (PR #681) | merge after review — pure docs + fixtures + runner |
| Phase 4 (JAMES 18-case sweep at M_M) | post-5tier, Ollama serialization required |
| Phase 5 (cross-stack report) | post-Phase 4 |
| Phase 6 (α-8 acceptance integration) | gated on α-8 implementation cycle |
| Phase 7 (Ali cross-stack DM) | post-Phase 5 |

### 2.3 Bidi gate (PR #682)

Independent ship. Merge whenever (CI permitting). No measurement
dependency. Quality delta exempt label justified per audit doc §7.1.

---

## 3. P3 sequencing — updated post-α-7 baseline finding

Original P3 (from 2026-06-01 strategy handover): α-6 closure → α-7 →
α-8 → Phase 3b on α-8 baseline.

**Updated post-α-7 closure (2026-06-02 PM)**:

```
✅ α-7 5-tier remeasurement closed as REJECT
   ↓
✅ α-8 design refined — evidence-of-absence preservation rule R1-R5
   (now empirically justified by α-7's universal regression)
   ↓
α-8 implementation (~2-3 weeks) — NEXT LAUNCH
   ↓
α-8 closure + baseline + 5-tier remeasurement
   ↓
Phase 3b proper on α-8 baseline (per Option C decision, 45h compute)
```

Track 2c work runs in parallel where possible — Phase 4 fits in
post-5tier idle, α-8 acceptance integration fits at α-8 closure
time, cross-stack report and Ali follow-up DM run in collab line.

---

## 4. First actions next session (in order)

### Action 0 — Ollama healthcheck (mandatory carry-over)

```powershell
Restart-Service Ollama
ollama list  # gemma3:1b/4b/12b/27b + gemma4:e4b + qwen2.5:7b + llama3.1:8b + deepseek-v2:16b + gemma2:2b + qwen2.5-coder:7b
```

### Action 1 — Check α-7 5-tier completion

```powershell
Get-Content reports/research-runs/_alpha7-5tier-remeasurement.log -Tail 20
# Or via the Python helper used in this session:
python -c "
with open('reports/research-runs/_alpha7-5tier-remeasurement.log', 'rb') as f:
    data = f.read().decode('utf-16-le', errors='ignore')
lines = data.split('\n')
queries = [l for l in lines if '/100]' in l]
finishes = [l for l in lines if 'bench finished' in l]
print(f'queries: {len(queries)}/1000  cells done: {len(finishes)}/10')
"
```

Expected at session resume: 10/10 cells done (if not, wait).

### Action 2 — Extract 5-tier aggregates + mode reshape verdict

```powershell
# 10 cell JSONs at workspaces/hotpot_eval/reports/research-runs/qvt-ablation-cells/
# Pattern: qvt-ablation-cell-{C_minus|C_rag-full}-{M_XS|M_S|M_M|M_L|M_XL}.json
# Compare to α-6 5-mode picture per recovery curve doc §3
```

Update:
- `reports/research-runs/alpha-7-closure-analysis-20260602.md` §5
  (mode comparison α-6 vs α-7 across 5 tiers)
- Decide α-7 verdict per §2.1 above

### Action 3 — α-7 PR #680 decision

Either:
- **Adopt / tier-gated**: update PR description with QDC Card, mark
  ready for review, merge
- **Reject**: close PR #680, document α-7 finding for α-8 design
  refinement, all subsequent cycles proceed without α-7's top-K

In all cases: write closure handover doc + memory pass per task #15.

### Action 4 — Track 2c Phase 4 (Ollama serialization)

After 5-tier finishes (or after α-7 PR decision):

```powershell
$env:JAMES_WORKSPACE = "./workspaces/hotpot_eval"
$env:PYTHONIOENCODING = "utf-8"
$env:JAMES_BENCH_TIMEOUT = "600"
python scripts/adversarial_sweep.py \
    --fixture eval/adversarial/ar_ecommerce-v1.1-james.yaml \
    --tier M_M \
    --output reports/track-2c-james-sweep-M_M-<date>.json
```

ETA: ~10-30 min Ollama compute.

### Action 5 — Track 2c Phase 5 cross-stack report

After Phase 4:
- Read JAMES results vs Ali Provia results (`eval/adversarial/ar_ecommerce-provia-results.json`)
- Per-case diff: which family / case / verdict differed
- Write `reports/research-runs/track-2c-cross-stack-ar-adversarial-<date>.md`

### Action 6 — Memory pass (task #15)

Defer until α-7 closure is done. Then:
- `feedback_alpha6_think_mode_off_rules_out_thinking_capacity_hypothesis`
- `feedback_alpha7_graph_top_k_impact` (post-bench data)
- `project_alpha_7_closure_state`
- Annotations to `feedback_graph_layer_top_k_debt`, `feedback_james_mode_taxonomy_context_dependent`,
  `feedback_alpha6_findings_mostly_known_to_literature`
- `direction_3_cross_family_review.md` → "share fulfilled 2026-06-02"
- `v0.4.x-backlog-reconciliation §Lane C` → C1 (M2 Ali) + C5 (M3 D3) closed
- Track 2c new memory: `project_track_2c_arabic_adversarial_collab` (per phase 5 results)

### Action 7 — PR merge order

| Step | PR | Decision criteria |
|---|---|---|
| 7a | #682 bidi gate | independent; merge when CI green, no gates |
| 7b | #681 Track 2c Phase 1-3 + bidi audit | requires α-8 design memo §2.4 base — see note below |
| 7c | #680 α-7 (or close as reject) | post-closure analysis |

PR #681 dependency note: extends α-8 §2.4 from PR #680. Two scenarios:
- PR #680 lands first: PR #681 rebases cleanly
- PR #681 lands first: carries §2.4 from α-7 branch along

### Action 8 — α-8 implementation prep (if α-7 PR #680 closes as reject)

Begin α-8 implementation per `docs/design/v0.4-alpha-8-ontology-typed-filter.md`:
- New module `core/graph_typed_filter.py` (~5-8 KB target)
- Query intent → expected-type classifier (keyword heuristic)
- New sector cell `C_rag-ontology` in `qvt_ablation_matrix._SECTOR_CELL_ENVS`
- Acceptance tests: multihop_rag null query audit + Ali poison_01/04
  (per design memo §2.4)

---

## 5. Critical gotchas (carry-over + new)

1. **4-step rule + arithmetic step** — same as before
2. **Per-layer intent verdict** — CLAUDE.md rule 2 layer-intent extension
3. **Rate-limit env bypass** in matrix runner (#672)
4. **DON'T frame methodology as Replayable RAG validation** — position guard
5. **fix label exemption** for measurement-side PRs
6. **Matrix runner tier→model is hardcoded** (#677) — use --tiers, env var inert
7. **Mode taxonomy is cycle-specific empirical** — α-7 / α-8 reshape expected
8. **Honest framing rule** — tier-tag every finding
9. **graph_engine 20.4 KB over gate** — new α-7/α-8 logic in new modules
10. **NEW (Track 2c)**: runtime input gate vs test fixture preservation MUST NOT
    be conflated. bidi gate at routes/query.py strips bidi at runtime;
    `eval/adversarial/ar_ecommerce-*.yaml` preserve U+202E byte-exact;
    `scripts/adversarial_sweep.py` does NOT normalize input. See
    `reports/research-runs/bidi-normalization-audit-20260602.md` §7.2.
11. **NEW (DOI hold)**: M9 .zenodo.json skeleton draft OK; actual DOI
    publish gated on T3 + mid-June joint piece framing per
    `memory/feedback_intent_vehicle_gap_collective_archival.md` +
    α-7 entry §9 DOI hold

---

## 6. Memory entries to read on entry

Existing (read at α-6 / α-7 entry):
- `feedback_oracle_phrase_artifacts` — 4-step rule
- `mechanism_layer_intent_axis_alignment` — per-layer intent matrix
- `feedback_jameses_positioning_replayable_rag` (정정 2026-05-31)
- `feedback_intent_vehicle_gap_collective_archival` — Vehicle separation
- `feedback_finding_size_honest_framing` — tier-tag findings
- `feedback_matrix_runner_tier_model_override` — measurement infra trap
- `feedback_alpha6_findings_mostly_known_to_literature` — α-6 학계 매핑
- `feedback_james_mode_taxonomy_context_dependent` — mode context dependency
- `feedback_graph_layer_top_k_debt` — measurement debt
- `project_alpha_7_alpha_8_ontology_track_sequencing` — P3 sequencing
- `feedback_ali_resume_notice_june6` — Ali DM template + 6/6 pause
- `feedback_robin_routing_precision_endorsement` — Robin Direction 4 endorse
- `feedback_robin_doi_attribution_pattern_endorsement` — Robin DOI pattern
- `direction_3_cross_family_review` — Direction 3 share (DM sent 2026-06-02)

**No new memory entries added this session** — all memory updates
deferred to α-7 closure pass (task #15).

---

## 7. Quick orientation queries

```powershell
# Today's PR queue
gh pr list --state open --author "@me"

# α-7 5-tier log tail
Get-Content reports/research-runs/_alpha7-5tier-remeasurement.log -Tail 30

# Branches alive
git branch -a | grep -E "alpha7|track-2c|bidi"

# This session's recovery doc + Track 2c design + bidi audit
cat reports/research-runs/alpha-7-closure-analysis-20260602.md
cat docs/design/v0.4-track-2c-arabic-adversarial-integration.md
cat reports/research-runs/bidi-normalization-audit-20260602.md
```

---

## 8. Done condition for next session

- [ ] Action 0 (Ollama healthcheck) confirmed
- [ ] Action 1 — α-7 5-tier completion verified (all 10 cells)
- [ ] Action 2 — 5-tier aggregates extracted, mode comparison done
- [ ] Action 3 — α-7 PR #680 decision (merge / tier-gated / reject)
- [ ] Action 4 — Track 2c Phase 4 JAMES sweep at M_M complete
- [ ] Action 5 — Track 2c cross-stack report written
- [ ] Action 6 — memory pass complete (task #15)
- [ ] PR #682 (bidi gate) merged
- [ ] PR #681 (Track 2c Phase 1-3) merged or rebased
- [ ] PR #680 (α-7) merged as tier-gated / closed as reject
- [ ] α-8 implementation entry handover written (if α-7 closes as reject)

If all 11 checks: cycle closes cleanly. Next launch = α-8
implementation (per design memo) or Phase 3b proper (if α-8
deferred).

---

## 9. After-cycle follow-up tracks (still gated)

| Track | Trigger |
|---|---|
| α-8 ontology typed-filter implementation | α-7 closure decision |
| Track 2c Phase 4-5 | post α-7 5-tier (Ollama serialization) |
| Phase 3b proper cross-family measurement | α-8 closure (per Option C 2026-06-02) |
| Bidi gate defence-in-depth (chat / multimodal / wiki edit endpoints) | iterative; ship `/query/` first then expand |
| MultiHop-RAG paper baseline reproduction | independent ~5h, anytime |
| α-7 5-tier mode re-measurement on α-8 baseline | α-8 closure (mandatory subtask) |
| M5 Track 4 scope-lock note (Ali co-draft) | Ali ongoing engagement |
| M6 Vadym Phase 2/3 attribution | Ali ack + Robin DM |
| M9 joint Zenodo DOI | T3 ship + mid-June joint piece framing |
| Direction 6 joint paper consolidation | Stages 1-3 + scope-lock |
| DOI bump | T3 ship + mid-June joint piece framing |

---

## 10. References (single source of truth)

- α-7 design memo: `docs/design/v0.4-alpha-7-graph-topk.md`
- α-8 design memo: `docs/design/v0.4-alpha-8-ontology-typed-filter.md`
- α-7 bucket-(d) sub-finding: `reports/research-runs/alpha-7-bucket-d-oracle-phrase-gap.md`
- α-7 closure analysis (filled with baseline + per-type cross-tab + mechanism §3.2): `reports/research-runs/alpha-7-closure-analysis-20260602.md`
- Track 2c integration design memo: `docs/design/v0.4-track-2c-arabic-adversarial-integration.md`
- Track 2c phase 3b pre-work design: `docs/design/v0.4-phase-3b-pre-work-cross-family-refusal-inventory.md`
- Bidi audit doc: `reports/research-runs/bidi-normalization-audit-20260602.md`
- Ali Track 2c originals: `eval/adversarial/ar_ecommerce-{v1.1-pending.yaml, REPORT-provia.md, provia-results.json, README-ali.md}`
- Ali v1.1-james remap: `eval/adversarial/ar_ecommerce-v1.1-james.yaml`
- Adversarial sweep runner: `scripts/adversarial_sweep.py`
- Phase 3a recovery curve (sealed): `reports/research-runs/alpha-6-phase-3a-recovery-curve-20260601.md`
- α-6 cycle PR index: `reports/research-runs/alpha-6-cycle-pr-index.md`
- ROADMAP α-6 / α-7 / α-8 / sequencing: `ROADMAP.md`
- Previous session entry (α-7 launch): `docs/handovers/v0.4-next-session-entry-2026-06-02-alpha7.md` (sealed)
- Previous-previous (Phase 3a launch): `docs/handovers/v0.4-next-session-entry-2026-06-01-PM.md` (sealed)

---

## 11. End-of-session sign-off

This session (2026-06-02):
- **3 PRs drafted** (#680 α-7, #681 Track 2c, #682 bidi gate)
- α-7 N=3 baseline captured + per-type analyzed + mechanism §3.2 identified
- α-7 5-tier mode remeasurement launched (in flight)
- Ali Track 2c 18 cases received + preserved + remapped + sweep runner built
- bidi audit + runtime gate impl + 29 unit tests
- Ali ack DM v3 + Robin Direction 3 consolidated share DM sent
- α-8 design memo sharpened with evidence-of-absence preservation rule R1-R5
- α-8 acceptance test extended with Ali poison_01 / poison_04
- 12b "dip" → "plateau" framing correction applied
- 7 user cautions reviewed + 3 explicit clarifications added to docs

α-7 closure is the natural next milestone. Estimated 5-7h of compute
remaining + ~2-3h analysis + closure work. Track 2c Phase 4-5 fits
in the same window post-5tier.

Good handoff. Next session starts cold by reading this file +
running Action 0.
