Skip to content

[codex] Add in-flight background experiment harvester - #2405

Open
morganmcg1 wants to merge 6 commits into
mainfrom
codex/in-flight-harness
Open

[codex] Add in-flight background experiment harvester#2405
morganmcg1 wants to merge 6 commits into
mainfrom
codex/in-flight-harness

Conversation

@morganmcg1

@morganmcg1 morganmcg1 commented Apr 17, 2026

Copy link
Copy Markdown
Member

Summary

Adds a small harness-level in-flight handoff for backgrounded student runs, so a later session can finish the PR handoff if the launching session dies.

Changes

  • add plugins/senpai/scripts/in_flight.py with new-tag, record, harvest, and clear
  • run harvest from the student heartbeat before polling for new work
  • track continuity with --wandb_tag; keep --wandb_group as optional human-facing grouping only
  • keep harvested PR comments metric-agnostic: the harness links runs and marks completion, but does not guess task-specific metrics or configs
  • promote reusable helpers into plugins/senpai/scripts/senpai-gh.sh:
    • comment_pr_with_file
    • current_pr_number
    • require_clean_tracked_worktree
    • require_pushed_head
  • make mark_ready_for_review tolerate already-ready PRs
  • update student/advisor docs and submission flow for the tracked background-run path

Validation

  • bash -n plugins/senpai/scripts/senpai-gh.sh
  • python3 -m py_compile plugins/senpai/scripts/in_flight.py cfd_tandemfoil/train.py
  • bash -lc 'source plugins/senpai/scripts/senpai-gh.sh && current_pr_number'
  • python3 plugins/senpai/scripts/in_flight.py new-tag

Notes

Programmatic PR comments and state transitions are explicitly labeled HARNESS: so later model sessions do not mistake them for model-authored work.

@morganmcg1
morganmcg1 marked this pull request as ready for review April 17, 2026 16:32
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.

2 participants