Skip to content

Add tripwire tests for the RTAS policy merge (stacked on #652) - #18

Closed
mkuchenbecker wants to merge 1 commit into
mkuchenbecker/r2-rtas-policies-mergefrom
mkuchenbecker/r2-policy-tripwire
Closed

Add tripwire tests for the RTAS policy merge (stacked on #652)#18
mkuchenbecker wants to merge 1 commit into
mkuchenbecker/r2-rtas-policies-mergefrom
mkuchenbecker/r2-policy-tripwire

Conversation

@mkuchenbecker

Copy link
Copy Markdown
Owner

Summary

Stacked on linkedin#652. Adds tripwire tests that guard the RTAS policy merge against a future policy plane
being added to Policies without updating mergePolicies to carry it forward (which would
reintroduce the silent policy-drop this PR series fixes).

  • Behavioral: populate every object policy plane on the existing table, merge a request that
    omits them, and reflectively assert each plane survives — a new plane that mergePolicies forgets
    comes back null and fails with a pointed message.
  • Structural: pin the exact set of Policies field names, so any add / remove / rename
    (including a primitive the behavioral test can't observe) trips the test and forces a conscious
    merge update.

Testing Done

  • RtasPolicyMergeTripwireTest (both tests) — pass.
  • Teeth-checked: removing a plane's handling from mergePolicies fails the behavioral test with
    "RTAS policy merge dropped Policies.". Spotless clean.

Note: stacked on top of linkedin#652 — review/merge that first. Base branch will retarget to main once
linkedin#652 merges.

Guard mergePolicies against a new policy plane being added to Policies without
teaching the RTAS merge to carry it forward. A behavioral test populates every
object plane on the existing table, merges a request that omits them, and
reflectively asserts each survives; a structural test pins the exact set of
Policies fields so any add/rename/remove (including a primitive) trips it.

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant