test: bind tc run evidence to reported task id#114
Merged
Conversation
Assert that the route_decision and worker_result events from one tc run invocation carry the same task_id, and that it matches the identifier the CLI reported. The test omits --task-id so the value is the one tc run generated for itself, proving the persisted evidence belongs to the run the operator was shown rather than to an id supplied by the test. Test-only; no production behavior changed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
✅ Deploy Preview for poetic-quokka-0fd859 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a focused regression test proving that the
route_decisionandworker_resultledger events from atc runinvocation share the same generatedtask_idreported to the operator. No production code, schemas, routing behavior, or authorization logic changed.Scope
tests/test_tc_run_cli.py, 23 insertions.Why parse the CLI output
The test omits
--task-idso the identifier is the onetc rungenerates for itself, then recovers it from the success line. Passing an id in would only prove the ledger echoes back what the test supplied; reading it back out is what proves the persisted evidence belongs to the run the operator was actually shown.Verification
tests/test_tc_run_cli.py+tests/test_tc_run_plan_cli.py: 36 passedruff check tests/test_tc_run_cli.py: cleangit diff --check origin/main...HEAD: cleanThe lone xfail (
tests/test_authz.py::test_concurrent_consume_race_documented) is pre-existing and unrelated: it documents CR-YK-001's non-atomic receipt consumption, with atomic claiming deferred to CR-YK-002. It isstrict=Trueand untouched by this change.🤖 Generated with Claude Code