Repository navigation
test: fail the bot_name and memory_gist tests on an unmatched agent step, and cover the mention filter - #1256
Conversation
test_init_bot_name_in_workflow_content filters each job's steps for a `max-sixty/tend/claude@` `uses:` and asserts bot_name on every match. With no match the loop body never runs and the test passes green, so a change to the action ref or to how bot_name reaches the step would land unnoticed. Count the matches and assert the count is non-zero. The identical filter in test_init_workflows_have_required_permissions already pins its count at 7; that assertion covers the every-workflow-contributes-a-job invariant, so this one only needs to rule out the vacuous pass rather than duplicate the number.
tend-agent
left a comment
There was a problem hiding this comment.
Two gaps of the same class as the one this closes. Pushing both to this branch.
test_generate.py's sibling filter still passes vacuously.
test_memory_gist_is_an_explicit_experimental_claude_only_input's enabled
branch filters on the same max-sixty/tend/claude@ prefix and asserts
memory_gist/memory_gist_id inside the loop; mutating the prefix to a ref no
workflow uses leaves it green, exactly as it left this test green.
without_relay() is already imported there, so it can assert the filter
matched per workflow — stronger than a count, because the invariant is one
agent step in every generated workflow but the relay.
The docstring still claims coverage this test doesn't have. It promises the
bot name "in the tend action's bot_name input and mention filters", and no
assertion reads a filter. The mention filter is the verify job's if: in
tend-mention.yaml, which embeds @<bot_name> through the template's
summoned() macro; asserting "@my-custom-bot" appears in it closes the gap.
Same defect this PR fixes: a claim in the test with nothing behind it.
|
@tend-agent the title and description still describe only the first commit. The head also makes the enabled branch of Please rewrite the title and description to cover the whole PR: both vacuous-pass guards and the new mention-filter assertion (see "Keeping PR titles and descriptions current" in
|
|
Rewritten. The title now names both tests and the unmatched-agent-step condition, and the body covers all three changes: the count guard in I re-ran the mutation check over the current head before rewriting the claim: pointing both filters at a ref no workflow uses fails both tests, |
Two generator tests filtered a generated workflow's job steps for a
uses:starting withmax-sixty/tend/claude@and made their assertions inside that loop. With no match the loop body never runs, so both passed green while asserting nothing — a change to the action ref, or to how those inputs reach the step, would have landed unnoticed. A third gap was a docstring claim with no assertion behind it.test_init_bot_name_in_workflow_content(generator/tests/test_integration.py) now counts the agent steps it checked across the generatedtend-*.yamland asserts the count is non-zero.test_memory_gist_is_an_explicit_experimental_claude_only_input(generator/tests/test_generate.py) has the same filter in itsenabledbranch. Its loop now iterateswithout_relay(generate_all(enabled))and asserts per workflow that the filter matched — stronger than a count, because the invariant is that every generated workflow buttend-mention-relaycarries an agent step, and the relay runs no agent.The bot_name docstring promised more than the test checked. It claims coverage of the name "in the tend action's
bot_nameinput and mention filters", and no assertion read a filter. The mention filter is theverifyjob'sif:intend-mention.yaml, which embeds@<bot_name>through the template'ssummoned()macro; the test now asserts@my-custom-botappears there.Neither vacuous-pass guard pins a count. The identical filter in
test_init_workflows_have_required_permissionspins its at== 7, but that assertion is already carrying the every-workflow-contributes-one-agent-job invariant; repeating the number would give one root cause two failures to update.Verified by mutating the prefix in both files to a ref no workflow uses: before these changes both tests still passed, after them
test_init_bot_name_in_workflow_contentfails withno agent step matched: the action ref or its path movedandtest_memory_gist_is_an_explicit_experimental_claude_only_inputwithtend-review.yaml: no agent step matched.Tests only — no generator or workflow behavior changes.