fix(expectations): rename expectation signature field (#294)#293
Conversation
Signed-off-by: Antoine MAZEAS <antoine.mazeas@filigran.io>
Signed-off-by: Antoine MAZEAS <antoine.mazeas@filigran.io>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #293 +/- ##
==========================================
+ Coverage 73.58% 79.81% +6.22%
==========================================
Files 54 57 +3
Lines 2404 2561 +157
==========================================
+ Hits 1769 2044 +275
+ Misses 635 517 -118
📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
|
🤖 [AI-generated] Hey @antoinemzs! 👋 Thanks a lot for opening PR #293 — really appreciate the contribution! 🙏 I just had a quick look and I think the description could be enhanced a little to help reviewers get through it faster. I haven't changed anything in your description — just a gentle, optional suggestion:
No rush at all — thanks again for contributing to the project! 🚀 |
guzmud
left a comment
There was a problem hiding this comment.
LGTM 👍 (we just need to replace the command_execution at some point)
There was a problem hiding this comment.
Pull request overview
This PR aims to realign the “expectation signature(s)” structured output keys and execution metadata to match the expected contract/wire format, and updates the signature transmission and post-execution update tests accordingly.
Changes:
- Renames the structured output JSON key from
signaturestoexpectation_signaturesacross signature building, transmission, envelope chunking, and tests. - Introduces an
ExecutionStatusenum and updates post-execution logic/tests to use enum-driven status strings (e.g.,EXECUTED,ERROR,TIMEOUT). - Updates BDD feature/constraint expectations and related step implementations to reflect the new status/action strings.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/signatures/test_signature_manager_transmission.py | Updates transmission tests to use expectation_signatures and enum execution status. |
| test/signatures/test_signature_manager_post_execution.py | Updates post-execution tests to assert enum-based execution status values. |
| test/signatures/features/signature_manager_post_execution.feature | Updates feature expectations for execution status/action to new values. |
| test/signatures/constraints/signature_manager_post_execution_constraints.feature | Updates constraint scenarios to expect enum-based status strings. |
| pyoaev/signatures/types.py | Adds ExecutionStatus enum values used by execution detail updates and tests. |
| pyoaev/signatures/signature_manager.py | Updates signature output structure creation to emit expectation_signatures. |
| pyoaev/signatures/models.py | Renames output structure field, changes ExecutionDetails.execution_status typing, and updates post-execution status mapping. |
| pyoaev/apis/signature.py | Updates payload parsing/envelope chunking to read/write expectation_signatures. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| def execution_message(self) -> str: | ||
| action = self.execution_action.value if self.execution_action else "unknown" | ||
| return f"Current action: {action} - Current status: {self.execution_status}" | ||
| status = self.execution_action.value if self.execution_action else "unknown" |
| elif tool_output.status == "partial": | ||
| self.execution_status = "partial" | ||
| self.execution_status = ExecutionStatus.ERROR |
| model_config = ConfigDict(populate_by_name=True, extra="forbid") | ||
|
|
||
| signatures: SignaturePayload | ||
| expectation_signatures: SignaturePayload |
| execution_status: ExecutionStatus | None = None | ||
| execution_action: InjectExecutionActions | None = None |
Proposed changes
Testing Instructions
Related issues
Checklist
Further comments