Skip to content

test(payout-executor): add 4 missing execute coverage cases - #962

Open
mathiasbourgoin wants to merge 4 commits into
mainfrom
test/payout-executor-coverage
Open

test(payout-executor): add 4 missing execute coverage cases#962
mathiasbourgoin wants to merge 4 commits into
mainfrom
test/payout-executor-coverage

Conversation

@mathiasbourgoin

Copy link
Copy Markdown
Collaborator

Summary

  • Adds 4 previously uncovered behavioral tests for Payout_executor.execute:
    • TC-1: successful payout writes summary.json and marks cycle paid
    • TC-2: abort after 2 consecutive batch failures (batch 4 never sent)
    • TC-3: dry_run=true writes to dry_report_dir, does NOT mark cycle paid
    • TC-4: empty/whitespace payout_key_alias returns early Error without calling octez-client
  • Also includes roster harness upgrade to v2.5.2 (.claude/ tooling, KB pipeline commands)

Test plan

  • dune exec test/test_payout_executor.exe → 24/24 pass
  • dune build → clean on OCaml 5.3.0 local switch
  • dune fmt → no diff
  • ./scripts/check-copyright.sh → all headers correct

Nomadic Labs and others added 3 commits May 28, 2026 12:17
Cover the happy path and 3 critical behavioral properties of
Payout_executor.execute that had zero test coverage:

- TC-1: successful payout writes summary.json and marks cycle paid
- TC-2: abort after 2 consecutive batch failures (never sends batch 4)
- TC-3: dry_run=true writes to dry_report_dir and does NOT mark paid
- TC-4: empty/whitespace payout_key_alias returns early Error

All assertions use the existing with_temp_xdg / make_ctx /
blueprint_with_payouts infrastructure and the Cmd_runner hook.
No production code changed.

Co-Authored-By: Claude <noreply@anthropic.com>
- Update all agents (architect, implementer, planner, qa, recruiter,
  reviewer, tech-lead) to roster v2.5.2
- Add kb-agent for knowledge base management
- Add full roster pipeline commands (intake, plan, implement, review,
  qa, ship, spec-infer, etc.)
- Add speckit, improvement-loop, and kb commands
- Add harness.json with project metadata (ocaml/miaou/dune/eio stack)
- Add ocaml and typescript pattern files
- Update .gitignore: exclude kb/.index/, skills-meta/, memory/

Co-Authored-By: Claude <noreply@anthropic.com>
- TC-1: abort result shape — verify on_progress fires for all 4
  delegators including aborted ones (success=false)
- TC-2a: execute_merged happy path — basic Ok + success=true
- TC-2b: execute_merged abort — 4 entries, entry 0 ok, 1-3 failed
- TC-3: Payout_simulator.simulate — sufficient/insufficient/fetch-fail
  balance paths (uses both Cmd_runner hooks)
- TC-4: build_batch_cmd burn cap formula (batch_len×0.28) and
  --dry-run flag presence

Also exposes build_batch_cmd via Internal_for_tests in .ml/.mli.

Co-Authored-By: Claude <noreply@anthropic.com>
validate_binary_access was defined in systemd_unit_template.ml and
re-exported via systemd.ml but had no call sites in the install flow.
The 25-binary-access-validation integration test was failing because
install-node accepted app-bin-dir paths inaccessible to the service
user without any error.

Wire the check immediately after resolve_app_bin_dir so the CLI rejects
binaries the service user cannot execute before any other installation
step runs.

Closes #958
Co-Authored-By: Claude <noreply@anthropic.com>
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