Skip to content

Owe an action for occurrences under no declaration - #41

Merged
samuelduchesne merged 1 commit into
mainfrom
watch-owes-strangers
Oct 19, 2026
Merged

samuelduchesne merged 1 commit into
mainfrom
watch-owes-strangers

Conversation

@samuelduchesne

Copy link
Copy Markdown
Contributor

Summary

During the 26.2.0 adoption the watch reported next action: none owed by a person and exited 0 while the record was refused for 13 occurrences under no declaration (resolved in #39). This change makes such occurrences an owed action.

Cause

  1. record.refusals() refuses the record when evaluation.strangers is not empty.
  2. Evaluation.complete() is false in the same case, so the watch branch that reports "every step is resolved, but the record was refused" never runs.
  3. next_action() considered only steps, project states and publications, so it returned None.

Change

  1. next_action() takes the strangers. Once nothing earlier is owed, it returns: "account for N occurrence(s) under no declaration in : declare each in governance/energyplus.toml, or change it."
  2. Both callers pass them: evaluate() and the re-evaluation after dispatch in watch.dispatch().
  3. The issue body, the watch line and the exit code (3, waiting) follow without further change.

Tests

  1. A new test in tests/energyplus/test_watch.py covers a fully adopted organisation with one stranger: no record is written, the exit code is waiting, and the action appears in the watch output and in the issue body. The test fails on main and passes with this change.
  2. python -m pytest tests -q: 322 passed. The one exception is test_every_caller_in_the_workspace_pins_one_governance_tag, which scans sibling directories and failed only because the worktree sat beside an unrelated checkout.

The watch reported "next action: none owed by a person" and exited 0
while the record was refused for undeclared occurrences of the newest
release. Evaluation.complete() is false when strangers exist, so the
"every step is resolved, but the record was refused" branch never ran,
and next_action() considered only steps.

next_action() now returns an action naming the count and the projects
once nothing earlier is owed. The issue body, the watch line and the exit
code (3, waiting) follow from it.
@samuelduchesne
samuelduchesne requested review from a team as code owners October 19, 2026 19:04
@samuelduchesne
samuelduchesne merged commit 55fdcd5 into main Oct 19, 2026
1 check passed
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.

1 participant