Skip to content

emrg: six standalone scripts have no caller in CI, the release chain or the runtime #2413

Closed

Description

@argszero

What was observed

Six scripts and their six test files sit in the tree with no automatic consumer:

script lines test lines
scripts/check-suite-durations.py 333 tests/test_check_suite_durations.py 380
scripts/llm-cost-report.py 292 tests/test_llm_cost_report.py 157
scripts/check-stacked-prs.py 362 tests/test_check_stacked_prs.py 378
scripts/recover-worktree.py 230 tests/test_recover_worktree.py 1,580
scripts/run-mutation-arm.py 880 tests/test_run_mutation_arm.py 1,133
scripts/check-install-drift.py 903 tests/test_check_install_drift.py 992

Measured on master d1246a4e:

  • grep -rn '<the six names>' .github/ — zero hits. No workflow runs any of them, so none of them can fail a build or block a merge.
  • grep -rln '<the six names>' scripts/ emrg/ — only the six scripts themselves. Nothing in the daemon, the TUI, the GUI or the scheduler imports or executes one.
  • Every other reference lives in a test that registers the script (tests/test_guard_report.py, tests/test_a_tree_reading_guard_names_its_tree.py, tests/test_documented_scripts_exist.py, tests/test_printed_commands_carry_the_python_runner.py, and siblings) or in a DEVELOPMENT.md usage section.

What was expected instead

A check earns its place in this tree only when something runs it without a person remembering to: a workflow, the release chain, or a task prompt that names it every cycle. None of the six is in any of those three places.

Each also fixes a single incident that is already recorded in memory, and each incident's lesson is knowledge, not machinery — a knowledge item that cannot drift, next to a script that can and does:

  • check-suite-durations.py reads pytest step timings from the GitHub API against a 180 s budget. It has never been wired into a workflow, so the reading it produces is only ever obtained by someone recalling that it exists.
  • llm-cost-report.py aggregates llm.jsonl against a hard-coded price table (gpt-5 at :65, gpt-4o at :67, a cache fraction at :73) that must go stale. Cost questions are answered by reading the log directly.
  • check-stacked-prs.py compares two gh pr view --json headRefOid,commits readings by prefix — one query, frozen into a program.
  • recover-worktree.py offers a manual second path out of a dirty-tree deadlock that the scheduler now clears itself at the start of every cycle.
  • run-mutation-arm.py frames the semantics of one exit code; arms are in practice written by hand in a session's temporary directory, as its own docstring states.
  • check-install-drift.py compares an installed tree file-by-file against a ref with git log --all -S — forensics for an incident that happened once and whose evidence is already stored.

What the fix must satisfy

  1. All six scripts and all six test files are gone, deleted whole — not skipped, not marked xfail, not merged into another test file. git diff --stat shows no new script, function or constant.
  2. The full pytest suite passes.
  3. grep -rn 'run-mutation-arm\|check-install-drift\|check-stacked-prs\|check-suite-durations\|llm-cost-report\|recover-worktree' scripts/ emrg/ tests/ README.md README.cn.md DEVELOPMENT.md .github/ returns nothing. A usage section in DEVELOPMENT.md is deleted with its script rather than rewritten into advice.
  4. The registry tests that enumerate these scripts narrow their lists and stay green, so the removal is proved by a tighter assertion rather than a looser one.

Activity

  1. argszero commented on Oct 20, 2026

    @argszero
    OwnerAuthor

    Handled by #2414

  2. argszero commented on Oct 20, 2026

    @argszero
    OwnerAuthor

    handled by #2414

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions