Skip to content

docs(handover): Phase C restart note β€” bash tee + python buffering trap#691

Merged
Hashevolution merged 1 commit into
mainfrom
docs/v0.4-phase-c-restart-note
Jun 2, 2026
Merged

docs(handover): Phase C restart note β€” bash tee + python buffering trap#691
Hashevolution merged 1 commit into
mainfrom
docs/v0.4-phase-c-restart-note

Conversation

@Hashevolution
Copy link
Copy Markdown
Owner

Summary

Update next-session entry doc with Phase C restart instructions.

What happened

Phase C N=3 baseline at M_M was launched in background during session 2026-06-02 evening. After 30+ minutes, the log file (reports/research-runs/alpha8-phase-c-sanity.log) and the bg task output were both 0 bytes, despite Python processes consuming significant memory (~2.4 GB resident for the JAMES server). Process killed at session close.

Root cause (likely)

The launch command was:
```bash
python scripts/qvt_ablation_matrix.py ... | tee log
```

Python's default stdout buffering holds output until flush/close. When piped to tee, the pipe buffer accumulated all matrix runner output but never flushed because Python wasn't told to flush per-line. The matrix runner uses print() extensively and likely produced output, but it stayed buffered.

Fix for next session

Use `python -u` (unbuffered):
```powershell
python -u scripts/qvt_ablation_matrix.py --sector-cells C_rag-graph,C_rag-ontology
--tiers M_M --n-runs 3 2>&1 | Tee-Object reports/research-runs/alpha8-phase-c-sanity.log
```

Also corrected the cells output directory in the entry doc β€” it lives at `workspaces/hotpot_eval/reports/research-runs/qvt-ablation-cells/` not `reports/research-runs/qvt-ablation-cells/`.

Changes

  • `docs/handovers/v0.4-next-session-entry-2026-06-02-evening.md`:
    • Β§1 first-commands: -u flag + correct cells dir
    • Β§2 Phase C row: ⏳ β†’ ❌ NOT STARTED
    • Added "Phase C buffering lesson" note

`Quality delta: exempt (label: docs)`

πŸ€– Generated with Claude Code

Update next-session entry doc 2026-06-02 evening with the buffering
lesson: bash `python ... | tee log` pipeline + Python default stdout
buffering held 30+ min of matrix runner output in pipe buffers,
producing a 0-byte log and zero per-cell JSON output. Process killed
at session close.

Resolution for next session:
- Use `python -u` (unbuffered) when piping to tee for long-running
  runs. PowerShell `Tee-Object` works similarly.
- Phase C row in §2 table downgraded from ⏳ to ❌ NOT STARTED.
- Β§1 first-commands updated with the -u flag + correct cells dir
  (workspaces/hotpot_eval/... not reports/research-runs/...).

Lesson worth promoting to memory in next session if pattern recurs
(currently 1 occurrence β€” not yet pattern grade).

Quality delta: exempt (label: docs)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Hashevolution Hashevolution merged commit c2b0dc2 into main Jun 2, 2026
4 checks passed
@Hashevolution Hashevolution deleted the docs/v0.4-phase-c-restart-note branch June 2, 2026 10:10
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant