fix(sandbox): acknowledge unchanged policy revisions - #2557
Conversation
|
All contributors have signed the DCO ✍️ ✅ |
|
I have read the DCO document and I hereby sign the DCO. |
drew
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
Validation: This concentrated sandbox-policy fix directly addresses confirmed issue #2518 and has no duplicate candidate.
Head SHA: 182ef51768dfa66becb6847e0349170621cbddab
Review findings:
- Warning — missing stateful regression coverage: the added predicate tests do not exercise the poll loop, so they cannot catch duplicate or premature acknowledgements. Please add a scripted-poll test proving
v1/H → v2/Hemits exactly oneLOADED(2)without reloading OPA, a failed required middleware reconciliation emits nothing and retries, and a later success emits exactly one acknowledgement. Include the relevant negative scopes (local override, global source, changed/empty hash, and equal/older version). - See the inline warning about emitting success telemetry before gateway acknowledgement succeeds.
Docs: The architecture invariant is documented. No Fern docs/navigation update is required because this fixes existing --wait semantics without changing a command or user workflow.
Tests: No local tests were run. The author reports pre-commit and two focused predicate tests passing; required CI is still waiting for the copy-PR mirror.
Next state: gator:in-review pending an author update. A test:e2e pipeline run will be required after review feedback is resolved because this changes sandbox policy-enforcement reconciliation.
182ef51 to
c20b6b8
Compare
|
Addressed in The poll loop now accepts a scripted gateway and middleware connector in tests,
I also carried the acknowledgement event kind and policy hash in Validation: I additionally mutation-checked the two critical guards: allowing equal |
drew
left a comment
There was a problem hiding this comment.
gator-agent
Re-check After Author Update
Thanks @NaveCohenMonday. I reviewed current head c20b6b8c365dd5821594673d5fe06bf4cbe2ae93 after your update explaining the new scripted poll-loop coverage and post-RPC acknowledgement telemetry.
Validation: This concentrated sandbox-policy fix directly addresses confirmed issue #2518.
Head SHA: c20b6b8c365dd5821594673d5fe06bf4cbe2ae93
What I checked: the full current-head diff, the same-hash candidate and reconciliation gates, status-reporter delivery path, stateful positive/negative poll tests, and the architecture invariant.
Disposition: the two prior gator findings are resolved. The poll-loop tests now cover same-hash exactly-once acknowledgement, middleware failure/retry, and the requested negative scopes; success OCSF telemetry now follows a successful gateway status RPC. The independent review found no blocking correctness or security issue. It left one non-blocking determinism warning and one optional telemetry-test suggestion inline.
Docs: architecture/sandbox.md accurately documents the invariant. No Fern docs/navigation update is required because this fixes existing semantics without adding a direct UX workflow.
Tests: Code-only review; no local tests were run. A test:e2e pipeline run is required because this changes sandbox policy-enforcement reconciliation.
Next state: gator:watch-pipeline.
|
Label |
|
/ok to test c20b6b8 |
|
@NaveCohenMonday you're hitting some flakey tests which have been turned off as of today. i'd rebase to see if we can get the pipeline green so we can prep to merge |
Author Follow-Up NudgeThis PR has been in @NaveCohenMonday, please rebase onto current |
Signed-off-by: Nave Cohen <nave@monday.com>
Signed-off-by: Nave Cohen <nave@monday.com>
4e6ed1b to
25202b2
Compare
|
Rebased onto current main (4cb77a9) as requested and force-updated the existing fork branch. New head: 25202b2 The two-commit range-diff is patch-identical to the previously reviewed head, and both commits retain the Nave Cohen DCO sign-off. Validation on the rebased head:
This fork head now needs /ok to test 25202b2 so the copy-PR branch checks can rerun. |
|
/ok to test 25202b2 |
Re-check After Author UpdateThanks @NaveCohenMonday. I checked current head Head SHA: What I checked: the durable Gator feedback ledger, current patch identity, prior marked reviews and inline findings, and the current required-check state. The ledger confirms this rebase is patch-equivalent to the last reviewed head, so I did not re-review the unchanged effective patch. Drew's original findings and their later resolutions remain preserved. Disposition: resolved. No blocking review findings remain. Tests: Next state: |
Monitoring CompleteMonitoring is complete because this PR has merged. Head SHA: Final status: Gator preserved Drew's original review and inline findings, their subsequent resolutions, and the patch-equivalent same-SHA disposition. Required branch, Helm, and E2E gates passed, maintainer approval was present, and the PR merged from I removed the active |
Summary
Decouple sandbox policy-revision acknowledgement from OPA policy loading. A
newer sandbox revision whose effective policy hash is already loaded can now be
acknowledged without reloading identical policy content, allowing desired and
current revisions to converge.
Related Issue
Fixes #2518
Changes
policy hash.
effective policy hash.
before acknowledging the revision.
hashes, and different policy content from the shortcut.
loaded-status report.
Testing
CARGO_INCREMENTAL=0 mise run pre-commitpassestest:e2eafter review)Validation:
The scripted poll-loop tests cover
v1/H → v2/Hexactly-once acknowledgementwithout an OPA reload, failed middleware reconciliation with no premature
status followed by retry and one acknowledgement, and the local/global,
changed/empty-hash, equal, and older-version scopes.
Checklist