Repository navigation
Bound messaging canary routes and retention - #259
Conversation
…ging-bounds # Conflicts: # cops/discovery/cli.py # docs/THREAT_MODEL.md
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddeaa55547
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fixture_evidence = svc_data.get("canary_evidence") | ||
| if not isinstance(fixture_evidence, dict): | ||
| fixture_evidence = {} | ||
| raw_messages = fixture_evidence.get("messages_sent", svc_data.get("messages_sent", 0)) |
There was a problem hiding this comment.
Require the canary count inside its evidence block
When canary_evidence omits messages_sent but the service has the legacy top-level messages_sent, this fallback treats that unrelated count as canary evidence; with matching route and timestamps, the assessment sets canary_validated and can emit a cleanup receipt despite the canary record lacking its own count. Require messages_sent within canary_evidence rather than borrowing the service-level value.
AGENTS.md reference: AGENTS.md:L95-L99
Useful? React with 👍 / 👎.
| created_at = getattr(args, "canary_created_at_utc", None) | ||
| if created_at is not None: | ||
| policy_args["created_at_utc"] = created_at | ||
| policy = CanaryDeliveryPolicy(**policy_args) |
There was a problem hiding this comment.
Require a creation time for pre-recorded fixtures
When a synthetic canary route omits --canary-created-at-utc, the policy defaults its creation time to this invocation, which is later than the delivery timestamp in any normally pre-recorded fixture. The subsequent created_at <= delivered_at check therefore rejects the documented optional/default path and produces neither validation nor a receipt; require the actual policy creation time for synthetic fixtures instead of silently defaulting it to now.
Useful? React with 👍 / 👎.
| "receipt_id": self.receipt_id, | ||
| "target_host": self.target_host, | ||
| "service_type": self.service_type, | ||
| "artifact_type": self.artifact_type, | ||
| "artifact_identifier": self.artifact_identifier, |
There was a problem hiding this comment.
Bind cleanup receipts to the authorized route
When the same canary identifier is reused on one target and service for different allowed destinations or recipients, the receipt payload contains neither the selected route nor a policy digest; with equal timestamps, both runs produce the same receipt ID and hash. Downstream report and cleanup consumers therefore cannot determine which mailbox, queue, or topic the cleanup evidence covers, so include the destination and applicable recipient—or a privacy-preserving policy digest—in the receipt hash.
AGENTS.md reference: AGENTS.md:L95-L99
Useful? React with 👍 / 👎.
Summary
Acceptance evidence
Validation
make checkpassed in the issue worktree.Critique and residual risk
Closes #213