Repository navigation
feat(opa): turn the OPA target on by default (SP2b Task 26) - #844
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extends the T7 M1 rebuild-timing harness with opa_shared_tag_service_refresh_latency: N compiled profiles on one tag service, the tag version moved on all of them, the time until the last is served a snapshot at its new key, plus the pieces of one build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stored_overlaps_of_via loaded one unit per profile sharing the tag service, then dropped every pair but the profile's own. A tag-version bump over N such profiles loaded N^2 units. The unit ids are now filtered by the same predicate before any unit is loaded; the pairs reported are unchanged. Last profile current at N = 10: 4291 ms to 1041 ms p50. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pair-equality check of the shared-tag-service re-check test compared two empty lists. A and B now each store one overlapping pair, the check asserts both are non-empty and runs first, and the filter-removed mutant fails it. The report states that the load-failure narrowing is untested and why it is safe, that N also measures installation size, and that the stale-window formula is approximate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
governance.opa.enabled now defaults to true. The listener collision checks apply only while the Ranger surface is on too, since OPA does not start without it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t on Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OPA counts as running only with the Ranger surface on: the idle state logs at info, the engine URL falls back and the listen and engine_url checks are skipped, and the chart renders no OPA port or rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e effective rule Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is SP2b Task 26. It turns the OPA target on by default:
[governance.opa] enablednow defaults totrue. It also closes the readiness items that were still open after the port-8080 package (#842, #843).The surface only runs when
ranger.enabledis also on, and that key is off by default. With the defaults, the flip therefore changes nothing: no port is bound, no refresher runs, no error is logged, start-up behaves as before, and a switch to OPA is still refused. An installation that already runs the Ranger surface now mounts OPA and binds 8082 with no config change. Every profile stays on Ranger until an operator switches it.The plan is in
docs/en/plans/2026-11-08-gov-sp2b-task26-opa-default-on.md(with adocs/vimirror).Changes
OpaSettings::enableddefaults totrue, through both the serde default andDefault.governance_opa_is_on_by_default, and it asserts thatEGRET_GOVERNANCE__OPA__ENABLED=falseturns OPA off.Config::opa_effective()isopa.enabled && ranger.enabled. It gates the listen collision and format checks and the OPA engine-URL derivation.start_opalogs aninfo!"idle" line instead of an error.opa.enabled: true.EGRET_GOVERNANCE__OPA__ENABLEDis always rendered fromopa.enabled.OPA__LISTENand the NetworkPolicy OPA rule render only when bothopa.enabledandranger.enabledare on.no_tag_service_warningis set on thePATCH …/mechanismanswer (200 and 502) and on every explain profile, on Ranger and on OPA.{p, tag(p)}, not one unit per profile that shares the tag service. It reports exactly the same pairs.docs/en/reports/2026-11-06-gov-sp2b-opa-latency.md./batchthroughopa_router(readiness 5, M4)./batchgets 200 under the default limit and 413 over a configured 4 MiB limit./allowgets 413.Test plan
info!turned back intoerror!, the C8 prefilter removed, and the tag-warning condition inverted.mechanism_switch(22);opa_cache(11),explain_opa, and--lib explain;opa_surface_mounted(15) andhelm_opa_listener(9, including realhelm templaterenders);opa_start;tsc.-D warningsis clean on the touched crates.ranger.enabled=trueandopa.enabled=false.Known follow-ups (not in this PR)
load_ep, which reads every grant and rule on the installation.helmbinary (the guard text tests still run).trino-configscreenshot re-shoot.Documentation
egret-data/docs#71 covers:
KI-352, KI-353 and KI-354 already exist and are unchanged, per the user's decision.
Checklist
🤖 Generated with Claude Code