Skip to content

fix: the harness says what it is doing while it does it - #130

Merged
thedancingdeveloper merged 1 commit into
mainfrom
fix/say-what-it-is-doing
Aug 3, 2026
Merged

fix: the harness says what it is doing while it does it#130
thedancingdeveloper merged 1 commit into
mainfrom
fix/say-what-it-is-doing

Conversation

@thedancingdeveloper

Copy link
Copy Markdown
Contributor

Closes #129.

Found by running the harness end to end for the first time, locally, against a
real endpoint — no container, no session host, no GitHub.

logging.basicConfig was never called anywhere in the package, so every
log.info and log.warning went to a root logger with no handler and was
discarded. That includes the lines written specifically to explain unusual
behaviour: started %d worker(s), drained project %s, lease: could not beat for %s, release: … result was discarded.

run compounded it by printing a header and then nothing until the item
finished. The run that prompted this sat silent for four minutes. The event
stream — the only place anything was recorded — said:

T1 calling reviewer
   reviewer error HTTP 504
   reviewer retry_wait waiting 209.9s     <- the "hang"

A 210-second backoff after a gateway error is correct. It is also
indistinguishable from a wedged process, and the natural response to a command
that has printed nothing for four minutes is to kill it — which throws away an
item mid-flight.

Changes

  • --log-level (or $HARNESS_LOG_LEVEL), configured once in main().
    Defaults to info: this process spends money unattended, and silence is not
    a safe default for that.
  • run mirrors every stage transition to the log as it happens. The events
    file is still the record; the terminal now gets a line a human can follow.
  • --repo is optional for run when --no-push is set. With nothing to push
    there is nothing to open a pull request against, and requiring it meant
    inventing a repo name to work locally. Refuses clearly when a push is
    actually wanted and no repo was given.

Gates: 548 tests, ruff, mypy . all green.

Nothing called `logging.basicConfig`, so every `log.info` and `log.warning`
in the package went to a root logger with no handler and was discarded --
including the lines written specifically to explain a lost claim, a drained
project, or a result that had to be thrown away.

`run` made it worse by printing a header and then nothing until an item
finished. A real run against a live endpoint sat silent for four minutes; the
event stream, which nobody was tailing, said `reviewer error HTTP 504` and
then `retry_wait waiting 209.9s`. That backoff is correct behaviour and it is
indistinguishable from a wedged process, so the natural response is to kill a
run that was working.

Configure logging once in `main()`, behind `--log-level` (default info,
because this process spends money unattended and silence is not a safe
default for that), and mirror every stage transition to it. The events file
stays the record; the terminal now gets a line a human can follow.

Also make `--repo` optional for `run` when `--no-push` is set: with nothing to
push there is nothing to open a pull request against, and requiring a repo
meant inventing one to work locally.
@thedancingdeveloper
thedancingdeveloper merged commit 0927bf8 into main Aug 3, 2026
2 checks passed
@thedancingdeveloper
thedancingdeveloper deleted the fix/say-what-it-is-doing branch August 3, 2026 22:15
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.

Bug: nothing configures logging, and run prints nothing per stage, so a 210s backoff is indistinguishable from a hang

1 participant