fix(proof): bound drafts workload preflights - #484
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a drafts live-workload cutoff contract. The network policy generates and classifies its requests. The evidence recorder validates canonical requests, repeatable preflights, occurrence limits, and completion accounting. Tests cover desktop, mobile, identity, binding, and rejection cases. ChangesDrafts live-workload contract
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Browser
participant NetworkPolicy
participant EvidenceRecorder
Browser->>NetworkPolicy: Request drafts live workload
NetworkPolicy->>NetworkPolicy: Match canonical request and CORS preflight
NetworkPolicy->>EvidenceRecorder: Provide classified network events
EvidenceRecorder->>EvidenceRecorder: Validate lifecycle and completion accounting
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/product-proof-network-policy.test.mjs`:
- Around line 1614-1628: Replace the formatting-sensitive source string checks
in the drafts route assertions with stable structural or semantic assertions
that remain valid when JSX formatting changes. Update the checks around
draftsSource, draftsSlaSource, draftsRoute, and draftsOwner while preserving
validation that the hooks, cutoff call, route, and EscalationHub drafts owner
are each present exactly as required.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 9ecabfbd-394d-478b-9c61-898d3ebbc303
📒 Files selected for processing (4)
scripts/product-proof-live-evidence.mjsscripts/product-proof-live-evidence.test.mjsscripts/product-proof-network-policy.mjsscripts/product-proof-network-policy.test.mjs
Purpose
Repair the exact fail-closed blocker from governed proof run
31441924040: tenant-A Drafts on desktop emitted a second canonicallive-workload-cutoff-optionspreflight while the proof policy allowed only one.Included scope
Explicit exclusions
Architecture placement
Current owner / directory: existing product-proof network policy and live-evidence recorder under
scripts/.Dependencies and duplicate-system check: extends the existing exact-contract, managed-preflight, and completed-base debt mechanisms; no new subsystem or shared cross-trust matcher.
Security and tenancy impact
Data impact
Verification
1 !== 2; after repair, focused network/live 364/364, broader cloud/network/live 551/551, complete product-proof cloud suite 1083 pass + 1 expected skip, and application Vitest 871/871.Release safety
394c84dcb30826f7873719fd6e1cbecb27b9bcd9, preview manifest608240475e45172fe29bf8310513e9d104f074fe894b6e29d1b47ed7d1bfce3a; no production action in this PR.Documentation and generated files
Completion check
origin/main.Policy exceptions (leave blank when none apply)
PR-size exception rationale: four files and one coherent fail-closed repair; 862 inserted lines exceed the normal guideline because 722 lines are literal contract and adversarial lifecycle/identity/privacy tests required to prove the exception cannot generalize.
Retained branch reason / owner / review date / maximum retention date:
Summary by CodeRabbit