Fix two Validate execution phase bugs and two false documentation claims - #3
Merged
Conversation
The action crashed with an AttributeError when the execution code assigned result = None, although the documentation calls that the way to hand nothing to the next task, and it passed the constructor's data dict rather than the one the fresh initialization run builds, so data mutations accumulated across clicks. Both are covered by tests which fail without the fix. The dependency caveat claimed a failed installation lets execution continue and fail later at the import. It does not: the deployment answers with 400, cmem-client raises, and the run stops before the execution code. The caveat now says so, and the changelog records the breaking side of the cmempy removal - task code calling cmem.cmempy.* used to inherit process wide credentials from setup_cmempy_user_access and now has to authenticate itself. The README quick start called task plugin:install, which no longer exists since the template update flattened that include. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2PdymJgUZnA8KZKMEiUvm
Coverage Report
|
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.
Fixes the four findings a
maxeffort code review raised against the branch merged as #2, each verified against a live deployment rather than argued from reading.Two bugs in the Validate execution phase action
result = Nonecrashed the action withAttributeError: 'NoneType' object has no attribute 'schema'. The action testedif "result" in scope, but assigningNoneis legitimate -execute()is annotatedEntities | None, and the documentation calls it the way to hand nothing to the next task. Omitting the assignment printed No result provided.; assigningNonecrashed.dataaccumulated across clicks. The action re-ran the initialization code fortest_inputsbut passed the constructor'sself.data, so with initdata['count'] = 0and executiondata['count'] += 1, three clicks gave 1, 2, 3 instead of 1 every time.Both now have regression tests. Stashing the source fix makes both fail, restoring it makes both pass. Neither needs a deployment, so neither carries
needs_cmem.Two false claims
400,cmem-clientraisesRepositoryModificationError, and the run stops before the execution code. Confirmed by installingthis-package-definitely-does-not-exist-zzz999against a real deployment. The caveat now says a misspelled dependency fails the workflow run rather than the import, and that the Install missing dependencies action reports the error instead of its per package output.task clean check plugin:install, which stopped existing when the template update addedflatten: trueto that include. Verified:task --dry clean check plugin:installexits 200,task --dry clean check installexits 0.Breaking change, accepted rather than fixed
setup_cmempy_user_accessalso setOAUTH_GRANT_TYPEandOAUTH_ACCESS_TOKENin the environment of the whole process, which task code callingcmem.cmempy.*could rely on without setting up access itself. Removing it dropped that side effect, so such code now has to authenticate on its own. No code change here - the changelog records it as breaking, and the documented way isget_client(context).Verification
task checkis green: 14 tests, 100% coverage, ruff, mypy, deptry and trivy clean. The reworded caveat was read back throughdiscover_plugins()as a user sees it, not only in the source.Not in this PR
Ten further findings from the same review remain open, the two most notable being that install failures are discarded end to end (a package which installs but fails to register reports clean success with no log line) and that
cmem-client'sPythonPackageis its oneextra="forbid"model, so any new field in the DataIntegration response would crash every package touching code path at once.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q2PdymJgUZnA8KZKMEiUvm