# Open Policy Agent (OPA) v1.23.0

2026-11-26 · [元のリリースノート](https://github.com/open-policy-agent/opa/releases/tag/v1.23.0) · [全体のまとめ](https://ratatosk.io/ja/releases/opa/v1.23.0)

セキュリティ 3 · 破壊的変更 15 · 非推奨 1 · 重大な修正 18 · 機能・改善 14 · 依存関係の更新 21 · その他の変更 49

## セキュリティ (3)

### MySQL Compile API による文字列組み込み関数の拒否

- 影響対象: `startswith`、`endswith`、`contains` を使用する、MySQL を対象とした Compile API のポリシー

生成された `LIKE` フィルターでは、MySQL のデフォルトの照合順序が大文字と小文字、アクセントの違いを無視するため、ポリシーで許可されていない行にも一致する可能性がありました。これらのポリシーはフィルターを生成せず、コンパイルに失敗するようになりました。

> ### Compile API: no `startswith`, `endswith` or `contains` for MySQL ([#9624](https://github.com/open-policy-agent/opa/issues/9624))
> Breaking change: the MySQL target rejects `startswith`, `endswith` and `contains`, as the SQLite target
> already did. They were translated to `LIKE`, which is case- and accent-insensitive in MySQL's default
> collations, so `startswith(input.fruits.name, "APP")` also matched `apple`. Policies using them now fail
> to compile for `application/vnd.opa.sql.mysql+json`, and for multitarget requests that include `mysql`.
> Reported by @kianwang0610, authored by @srenatus
> - Hardening of the MySQL Compile API target: use of `startswith`, `endswith` and `contains` built-in functions is rejected

### `units.parse` と `units.parse_bytes` における値の上限の追加

- 影響対象: `units.parse` または `units.parse_bytes` を使用するポリシーやアドホッククエリ

このリリースより前は、非常に大きな値の入力によって、ほかの数値処理経路で使われる上限を大幅に超える数値が生成され、ポリシーやアドホッククエリで処理すると評価が遅くなることがありました。上限を超える入力は、展開前に明確なエラーを返して拒否されるようになりました。

> - topdown: Bound magnitude of units.parse/parse_bytes results ([#9404](https://github.com/open-policy-agent/opa/issues/9404)) reported and authored by @leandrocosta-git

### `net.cidr_merge` の IPv4-mapped CIDR によるパニックの修正

- 影響対象: `net.cidr_merge` を使用するポリシーまたはクエリ

重複を含む2つ以上の IPv4-mapped IPv6 CIDR を受け取ると、`net.cidr_merge` がパニックを起こし、プロセス全体がクラッシュする可能性がありました。現在はこれらの入力を通常の IPv4 CIDR としてマージします。最初に報告された例では、`["10.0.0.0/7"]` が返されます。

> - topdown: Fix net.cidr_merge panic on IPv4-mapped IPv6 CIDRs ([#9528](https://github.com/open-policy-agent/opa/issues/9528)) reported and authored by @nikpivkin

## 破壊的変更 (15)

### `.manifest` の配置を基準とするバンドルルート

- 影響対象: バンドルディレクトリ、ディスクから読み込むバンドルtarball、および旧バージョンのOPAで署名または検証されたバンドル
- 必要な対応: ディスクから読み込むバンドルtarballでは、アーカイブのルートに置く `.manifest`。旧バージョンのOPAで `opa sign <dir>` または `opa build -b <dir>` を使って署名したバンドルの再署名。更新が必要になる場合のある `--exclude-files-verify` パターン
- 削除予定: 不明

以前は、ロードパスの指定方法によってバンドルの内容、データの配置、署名が異なる場合がありました。`.manifest` より上位にあるファイルは除外されるようになり、`opa build` と `opa sign` 以外のコマンドでは、警告なしで除外される場合があります。HTTP経由またはOCIレジストリからバンドルプラグインがダウンロードしたバンドルと、その保存済みコピーは、`.manifest`、`.signatures.json`、`patch.json` の配置が誤っていても、警告を出して引き続き読み込まれます。

根拠: “To avoid breaking existing deployments, bundles that the bundle plugin downloads over HTTP or from an OCI registry (and their persisted copies) are still loaded as before, and OPA logs a warning each time a bundle with a misplaced `.manifest`, `.signatures.json`, or `patch.json` is loaded.” https://github.com/open-policy-agent/opa/releases/tag/v1.23.0

> - Enforcement of bundle structure: now rooted at their `.manifest` file
> and signatures depend on how a path was typed.

### バンドルルートを `.manifest` のあるディレクトリに変更

- 影響対象: 指定されたパスの下位に `.manifest` があるバンドルディレクトリ
- 必要な対応: 旧バージョンの OPA で `opa sign <dir>` または `opa build -b <dir>` を使って署名されたバンドルの再署名必須、`--exclude-files-verify` パターンの更新が必要となる場合あり

以前は、バンドルの内容やデータの配置が、バンドルの読み込みに使用するパスによって変わることがありました。現在は `.manifest` を含むディレクトリがルートとなり、その上位にあるファイルは除外されます。除外されたポリシーファイルとデータファイルについて警告するのは `opa build` と `opa sign` のみです。

> Breaking change: OPA now treats the directory containing a bundle's `.manifest` file as the bundle root, as the
> [bundle documentation](https://www.openpolicyagent.org/docs/management-bundles#bundle-file-format) describes.
> Previously, the root depended on the path a bundle was loaded from, which made bundle contents, data placement,
> - **Bundle directories** (`opa build -b`, `opa run -b`, `opa eval -b`, `opa sign --bundle`, ...) are rooted at
>   the directory containing `.manifest`, even when it is nested below the provided path. Files above it are not
>   part of the bundle. `opa build` and `opa sign` warn about policy and data files they leave out, but other
>   commands do not, so keep other `.manifest` files (e.g., test fixtures) out of directories loaded as bundles.

### plan および wasm ビルドでの持ち込み plan と resolver の置き換え

- 影響対象: `opa build -t plan` または `opa build -t wasm` で使用する、plan または wasm resolver を含む入力バンドル

従来は、持ち込まれた plan と wasm resolver がビルド結果に追加されていましたが、現在は置き換えられます。これらのエントリーポイントをビルド結果に残すには、ビルド時引数として `-e` で指定する必要があります。

> - **`opa build -t plan` and `-t wasm`** replace any plan, or wasm resolvers that were carried in from the input bundles.

### `SlashRooted` と `Passthrough` のマニフェストを拒否するバンドルリーダー

- 影響対象: Go API で `bundle.Reader` と `SlashRooted` または `Passthrough` のディレクトリローダーを使う構成、またはディレクトリローダーの独自ラッパーを使う構成

`Reader.WithBaseDir` を使うと、ディレクトリローダーが `RootOffset() string` で返すマニフェストのディレクトリが、モジュールパスに含まれます。ディレクトリローダーを独自にラップする場合は、`RootOffset` を引き継いでください。

> Go API: the `bundle.Reader` expects bundle-relative descriptor paths, so directory loaders configured with the
> `SlashRooted` or `Passthrough` path formats now have their manifests rejected. When `Reader.WithBaseDir` is used,
> module paths include the manifest's directory, which directory loaders report through a `RootOffset() string`
> method. Custom loaders that wrap a directory loader should forward `RootOffset`.

### インデックス付きオブジェクト内包表記の競合を検索時に `eval_conflict_error` として通知

- 影響対象: インデックス付きオブジェクト内包表記を使用するポリシー

以前は、インデックス付きオブジェクト内包表記で同じキーに異なる値が生成されると、キャッシュされたビルドでは最後の値が保持されていました。競合が `eval_conflict_error` を発生させるのは、そのグループが検索されたときだけです。検索されていない競合グループでは、引き続きエラーは発生しません。

根拠: “The build now returns the groups with a conflict, the cache frame records them, and looking up one of those groups raises the error, so groups that are never looked up still don't.” https://github.com/open-policy-agent/opa/pull/9613

> - topdown: Report key conflicts in indexed object comprehensions ([#9613](https://github.com/open-policy-agent/opa/pull/9613)) authored by @srenatus

### デフォルトルールの位置情報テキストに文全体を含める変更

- 影響対象: 解析済み AST または `opa parse` の JSON におけるデフォルトルールの位置情報テキスト (推定)

以前は、デフォルトルールの位置情報テキストには `default` だけが含まれ、ルールヘッドの内容は含まれていませんでした。

> - ast: Correct default rule location text ([#9516](https://github.com/open-policy-agent/opa/pull/9516)) authored by @charlieegan3

### 負の数値の AST 位置テキストに数値全体を含める変更

- 影響対象: 負の数値項の解析済み AST 位置テキスト (推定)

`x := -1000` のような負の数値項を解析した際、デコード後の位置テキストは `-` だけでした。

> - ast: Fix negative number location text (for issue #9531) ([#9531](https://github.com/open-policy-agent/opa/issues/9531)) authored by @devjoshi2005, reported by @anderseknert

### 関数ルールの AST 位置情報が文全体を対象に

- 影響対象: 本体または値を持たない関数ルールの解析済み AST 位置情報

たとえば `f(1)` のようなルールでは、以前の `Location.Text` にはルール全体ではなく `f` だけが含まれていました。

> - ast: Give a function without a body the location of its whole statement ([#9579](https://github.com/open-policy-agent/opa/pull/9579)) authored by @srenatus

### `types.Unmarshal` によるフィールド名の厳密な一致確認と JSON の最大深度制限

- 影響対象: Go から `types.Unmarshal` でデコードされる型 JSON

入れ子になった型 JSON は各階層で再デコードされていたため、入れ子の深さに対してデコード処理が二次的に増加し、深く入れ子になった入力では JSON デコーダーの最大深度制限を回避できていました。デコード処理は線形になり、制限を超える入力には最大深度エラーが返されます。エラーメッセージも変わります。

根拠: “Field names now match exactly, where struct decoding matched them case-insensitively; otherwise only inputs past the max depth change outcome. Error messages differ.” https://github.com/open-policy-agent/opa/pull/9473

> - types: Decode type JSON in linear time ([#9473](https://github.com/open-policy-agent/opa/pull/9473)) authored by @srenatus

### ディスク読み込みのバンドル tarball にルート階層の `.manifest` が必須に

- 影響対象: ディスクからバンドル tarball を読み込む構成
- 必要な対応: アーカイブのルートに `.manifest` があり、`opa build` で再ビルドされた、ディスク読み込みのバンドル tarball

以前は、`bundle/.manifest` と `bundle/data.json` を含む tarball が読み込まれ、データは `data.bundle` の下に配置されていました。このリリースでは、その tarball は読み込み時に拒否されます。

> - **Bundle tarballs** loaded from disk must have `.manifest` at the root of the archive. `opa build` always writes
>   it there.
> For example, consider this tarball, built without `opa build`:
> 
> ```console
> $ tar tzf bundle.tar.gz
> bundle/.manifest
> bundle/data.json
> bundle/authz.rego
> ```
> Previously, `opa run -b bundle.tar.gz` loaded it with `bundle/data.json` placed under `data.bundle`. It is now
> rejected because `.manifest` is not at the root of the archive. Running `opa build -b bundle/` on the extracted
> directory produces a bundle rooted at `bundle/`, with `data.json` placed at the root of `data`.

### バンドル署名パスをバンドルルート相対の名前と `/` 区切りに変更

- 影響対象: `.signatures.json`を使用する構成、旧バージョンの OPA で作成された署名、または `--exclude-files-verify` パターンを使用する構成
- 必要な対応: 旧バージョンの OPA の `opa sign <dir>` または `opa build -b <dir>` で署名されたバンドルの再署名必須、および `--exclude-files-verify` パターンの更新が必要となる場合あり

以前の署名パスはこの規約に従っていなかったため、旧バージョンの OPA で作成された署名は、このリリースと互換性がない場合があります。

> - **Signatures**: file names in `.signatures.json` are relative to the bundle root, with `/` separators on every
>   platform. Bundles signed by `opa sign <dir>` or `opa build -b <dir>` with older OPA versions must be re-signed,
>   and `--exclude-files-verify` patterns may need updating.

### 複数バンドルのビルドおよび署名パスの変更

- 影響対象: 複数のバンドルまたはバンドルパスを指定して `opa build` または `opa sign` を使用する構成（バンドルが同じパスに配置されるマージを含む）

複数のバンドルを指定すると、`opa build` は各バンドルのファイルを `-b` で指定したパスの下に配置し、先頭の `..` セグメントを参照先のディレクトリー名に置き換えて、新しいルート `.manifest` を書き込みます。2つのバンドルが同じパスに配置される場合、処理は失敗します。`opa sign` は各バンドルのパスの下にあるファイルを対象とするため、別々のソースバンドルの署名は、マージ後のビルド出力に対して検証できません。

> - **`opa build` with multiple bundles** places each bundle's files under the path it was given with `-b`, with a
>   new `.manifest` at the root. Leading `..` segments are replaced with the name of the directory they refer to.
>   Merging fails when two bundles would be placed under the same path. `opa sign` with multiple bundle paths
>   names files under each bundle's path, like `opa build` does when merging. A merged `opa build` output has its
>   own new `.manifest`, so signatures from multiple separate source bundles cannot be used to verify a merged build.

### バンドルメタデータのルート限定と `.manifest` への命名限定

- 影響対象: メタデータがバンドルルート外にあるバンドル、またはマニフェストのファイル名が `.manifest` 以外のバンドル
- 必要な対応: バンドルメタデータの配置先がバンドルルートであること、およびマニフェスト名が正確に `.manifest` であること

以前は、バンドル内のどのフォルダーにあっても、`.manifest` で終わる単一のファイルがマニフェストとして扱われることがありました。現在は、バンドルルートにある、名前が正確に `.manifest` のファイルのみがマニフェストとして扱われます。

> - `.manifest`, `.signatures.json`, and `patch.json` must be at the bundle root, and only files named exactly

### `--v2-compatible` に代わるバージョン指定式 CLI 互換性フラグ

- 影響対象: 互換性フラグを使用する CLI コマンド、特に v2 の動作を選択するコマンド (推定)

以前は v2 を有効にするために `--v2-compatible` を使用していました。現在は `--compatible=v2` を使用します。`--compatible=v0` と `--compatible=v1` でそれぞれのモードを選択でき、その他の値は拒否されます。既存の `--v0-compatible` と `--v1-compatible` フラグに変更はありません。

根拠: “Adds a single --compatible flag accepting v0, v1 or v2 and rejecting other values, so future versions don't need a flag each. The existing --v0-compatible and --v1-compatible flags are unchanged.” https://github.com/open-policy-agent/opa/pull/9496

> - cmd: Add --v2-compatible flag ([#9251](https://github.com/open-policy-agent/opa/issues/9251)) authored by @sspaink, reported by @johanfylling
> - cmd: Replace --v2-compatible with --compatible=<version> ([#9496](https://github.com/open-policy-agent/opa/pull/9496)) authored by @sspaink

### v2互換モードでの上限超過リクエストに対するHTTP 413返却

- 影響対象: v2互換モードを有効にしたサーバーおよびGo連携

設定されたボディサイズ上限を超えるリクエストは、以前はv2互換モードでもHTTP 400を返していました。現在はHTTP 413を返します。デフォルトモードでは引き続きHTTP 400を返し、エラーレスポンスの本文に変更はありません。

根拠: “This change makes the server return HTTP 413 (Content Too Large) in v2-compatible mode, while keeping the existing HTTP 400 behavior in default mode. The error response body remains unchanged.” https://github.com/open-policy-agent/opa/pull/9497

> - server: Fix oversized request body status in v2-compatible mode ([#9497](https://github.com/open-policy-agent/opa/pull/9497)) authored by @darshpatel1052

## 非推奨 (1)

### 配置場所の誤ったバンドルファイルの読み込み警告

- 影響対象: バンドルプラグインが HTTP 経由または OCI レジストリからダウンロードしたバンドルと、その永続化されたコピーのうち、`.manifest`、`.signatures.json`、または `patch.json` ファイルの配置場所が誤っているもの
- 削除予定: 不明

これらのバンドルは v1.23.0 では引き続き読み込まれますが、そのたびに警告が出ます。今後の OPA リリースでは読み込みに失敗するようになります。

> To avoid breaking existing deployments, bundles that the bundle plugin downloads over HTTP or from an OCI registry
> (and their persisted copies) are still loaded as before, and OPA logs a warning each time a bundle with a misplaced `.manifest`, `.signatures.json`,
> or `patch.json` is loaded. **These bundles will fail to load in a future OPA release.** Rebuild them with
> `opa build` to place the manifest at the root.

## 重大な修正 (18)

### [表面化しなかった不具合] 定数と参照・変数が混在する `in` リテラルのルールインデックス修正

- 影響対象: 定数と参照または変数が混在するリテラルで `in` を使用するポリシー

照合対象のメンバーが参照または変数の場合、ルールインデクサーがルールを除外し、そのルール本体が実行されないことがありました。`default` がある場合は、気づかれないままデフォルト値が返されていました。

> - ast: Keep a rule indexed as "anything" for `in` with a var member ([#9506](https://github.com/open-policy-agent/opa/issues/9506)) authored by @srenatus, reported by @kholia

### `opa fmt --drop-v0-imports` の標準入力処理におけるインポート削除の修正

- 影響対象: `opa fmt --drop-v0-imports` で標準入力から整形するポリシー (推定)

ポリシーを標準入力から読み込んだ場合、`opa fmt --drop-v0-imports` はフラグを無視し、削除対象のインポートを残していました。現在は、ファイルを整形する場合と同様に、このオプションの対象となるインポートを削除します。

> - cmd(fmt): Honor `--drop-v0-imports` when formatting stdin ([#9619](https://github.com/open-policy-agent/opa/pull/9619)) authored by @FayezBast

### `opa inspect -a` のラベルメタデータ表示の修正

- 影響対象: ラベルメタデータの注釈が付いたルールを含むポリシー (推定)

以前は、該当するポリシーに対して `opa inspect -a` を実行しても、結果にラベルが含まれていませんでした。現在は、注釈付きルールのラベルメタデータが結果に含まれます。

> - cmd/inspect: Show labels metadata with -a ([#9504](https://github.com/open-policy-agent/opa/issues/9504)) authored by @srenatus, reported by @humbertoc-silva

### [表面化しなかった不具合] `opa fmt` による入れ子の比較式の括弧の保持

- 影響対象: 括弧がグループ化や解析に影響する、入れ子になった比較式を含むポリシー

`opa fmt` でこれらの比較式を整形すると、括弧が取り除かれ、ポリシーの意味が変わったり、コンパイルに失敗したりすることがありました。場合によっては、結果が `true` から `false` に変わっても気づけませんでした。現在は必要な括弧が保持されるため、整形後のポリシーは元のポリシーと同じ結果になります。

> - format: Preserve nested comparison grouping ([#9407](https://github.com/open-policy-agent/opa/issues/9407)) authored by @rudraa2005, reported by @alecthomas

### Wasm の `with` による upsert で非オブジェクト値を置き換え

- 影響対象: Wasm 評価で非オブジェクト値を upsert する `with` 式 (推定)

入力が `123` の場合、Wasm 評価では `input.foo with input.foo as input` が `undefined` を返していましたが、Rego 評価では `123` を返していました。

> - wasm: Replace non-object values when upserting for with ([#6304](https://github.com/open-policy-agent/opa/issues/6304)) authored by @sspaink, reported by @srenatus

### OPA の高精度十進数比較の修正

- 影響対象: `float64` の精度を超える値を含む十進数の比較 (推定)

有効数字が15桁を超え、末尾にゼロがある異なる十進数が、同じ `float64` に丸められて等しいと比較され、推移的でない順序付けが生じることがありました。現在は順序付けも含めて正確に比較されます。

> - ast: Compare numbers beyond float64 precision exactly ([#9508](https://github.com/open-policy-agent/opa/pull/9508)) authored by @srenatus

### [表面化しなかった不具合] Rego v2 におけるインデックス付き集合リテラルへの `not` の解析修正

- 影響対象: Rego v2 でインデックス付き集合リテラルに `not` を使用するポリシー

以前は、`not {"foo"}["bar"]` の結果がクエリとルール本文で異なったり、解析エラーになったりすることがありました。Rego v2 では、この構文は集合リテラルへの参照として解析されるようになりました。

> - ast: Parse not {..}[..] as a ref on a set literal under v2 ([#9540](https://github.com/open-policy-agent/opa/issues/9540)) authored by @sspaink, reported by @anderseknert

### [表面化しなかった不具合] 負の小数に対する `ceil` と `floor` の戻り値の修正

- 影響対象: -1より大きく0未満の負の小数に対して `ceil` または `floor` を呼び出すポリシーまたはクエリ

従来、`ceil(-0.5)` は `0` ではなく `1` を返し、`floor(-0.5)` は `-1` ではなく `0` を返していました。現在は、それぞれ `0` と `-1` を返します。

> - topdown: Fix ceil and floor of negative fractions above -1 ([#9562](https://github.com/open-policy-agent/opa/issues/9562)) reported by @kroekle

### 置き換えられた Wasm リゾルバーをプラグインマネージャーがクローズ

- 影響対象: バンドル更新で Wasm リゾルバーが置き換わる、プラグインマネージャーを使用する構成

この変更以前は、置き換えられたリゾルバーが開いたままになり、使用に伴ってメモリー使用量が増加していました。バンドル更新後は、新しいリゾルバーセットに保持されていない古いリゾルバーが閉じられます。

> - plugins: Close the Wasm resolvers a bundle update replaces ([#9513](https://github.com/open-policy-agent/opa/pull/9513)) authored by @jbpros

### `Rego.Eval`の評価後におけるWasmエンジンのクローズ

- 影響対象: Go APIでWasmターゲットを使用する`Rego.Eval`

以前は、評価中に作成されたエンジンがクローズされず、使用に伴ってメモリが増加していました。

> - rego: Close the Wasm engine after Rego.Eval ([#9513](https://github.com/open-policy-agent/opa/pull/9513)) authored by @jbpros

### 読み込み済み Wasm リソースを閉じられる準備済みクエリ

- 影響対象: Wasm を使う準備済み評価クエリを利用する Go インテグレーション (推定)

準備済みクエリが Wasm リゾルバーを読み込んだまま閉じずにいると、使用に伴ってメモリが増加していました。準備済みクエリを閉じると、Wasm エンジンも閉じられます。

> - rego: Close the Wasm resolvers a prepared query loaded ([#9513](https://github.com/open-policy-agent/opa/pull/9513)) authored by @jbpros

### `opa test` に厳密な組み込み関数エラー報告を追加

- 影響対象: `--strict-builtin-errors` を指定して実行する `opa test` (推定)

組み込み関数のエラーが発生したテストは、ドキュメント上の結果が `ERROR` であるにもかかわらず、通常の失敗として報告されていました。

> - tester: Add --strict-builtin-errors to opa test ([#6816](https://github.com/open-policy-agent/opa/issues/6816)) authored by @oleksii-udovychenko, reported by @selaux

### `opa test` の評価後に Wasm エンジンをクローズ

- 影響対象: Wasm ターゲットを使用する `opa test` の実行

従来は、テストで作成された Wasm エンジンが開いたまま残り、使用に伴ってメモリーが増加していました。

> - tester: Close the Wasm engine after each test ([#9513](https://github.com/open-policy-agent/opa/pull/9513)) authored by @jbpros

### `opa test` ベンチマークへの Wasm エンジンのクリーンアップ追加

- 影響対象: Wasm ターゲットを使用する `opa test` ベンチマーク

以前はエンジンが開いたままになり、使用に伴ってメモリーが増加していました。ベンチマークランナーは、準備済みクエリとその Wasm エンジンを閉じる処理を遅延実行するようになりました。

> - tester: Close the Wasm engine of a benchmark ([#9513](https://github.com/open-policy-agent/opa/pull/9513)) authored by @jbpros

### Wasm リゾルバーの `result` キー欠落時のパニック修正

- 影響対象: Wasm リゾルバーを使用する構成

`result` 以外の名前のキーがちょうど1つだけある結果オブジェクトを受け取ると、リゾルバーは形式チェックを通過させた後、存在しないキーを読み取ろうとしてパニックしていました。現在は、不正な結果に対して使われる `illegal result type` エラーを返します。

> - wasm: Return an error when the result has no "result" key ([#9541](https://github.com/open-policy-agent/opa/pull/9541)) authored by @jbpros

### OPAの型チェッカーで空コレクションの反復が再び可能に

- 影響対象: 空の配列リテラルまたはオブジェクトリテラルを、直接または変数経由で反復するポリシー

v1.21.0からv1.22.1までは、これらのポリシーは型エラーで拒否されていましたが、v1.20.2以前ではコンパイルと評価が可能でした。現在は型チェックを通過し、空のコレクションから結果を返さずに評価されます。

> - ast: Allow iterating empty collections in the type checker ([#9517](https://github.com/open-policy-agent/opa/issues/9517)) authored by @sspaink, reported by @kholia

### 位置情報なしのモジュール解析におけるメタデータ処理の修正

- 影響対象: `ParserOptions.SkipLocations` で解析したモジュール

位置情報を省略すると、コンパイラーはメタデータブロックやルール注釈を文に対応付けるために行番号に依存していましたが、その行番号を利用できませんでした。現在は位置情報なしでメタデータを処理できます。ただし、元の位置を復元できないため、整形時と `opa build` ではコメントが省略されます。

> - ast: Parse modules without locations ([#9485](https://github.com/open-policy-agent/opa/pull/9485)) authored by @srenatus

### バンドルリーダーのモジュール解析並列数を `GOMAXPROCS` に制限

- 影響対象: OPA のバンドルリーダーでバンドルを読み込むセットアップ (推定)

複数のモジュールを含むバンドルを読み込む際、従来はモジュールごとにゴルーチンを起動していました。そのため、処理を進められるのは `GOMAXPROCS` 個のモジュールだけにもかかわらず、ほぼすべてのモジュールの割り当てメモリが保持される可能性がありました。`ReadManyModules-16` ベンチマークでは、ピークヒープ使用量が3.98%減少し、`sec/op` に測定上の変化はありませんでした。

> - bundle: Parse at most GOMAXPROCS modules at once ([#9484](https://github.com/open-policy-agent/opa/pull/9484)) authored by @srenatus

## 機能・改善 (14)

- Compile API に Solr 向け Lucene クエリを追加 (利用条件: `Accept: application/vnd.opa.lucene.solr+json` でターゲットをリクエストしてください。他のターゲットとのマルチターゲットリクエストでは併用できません。)
- 新しい `json.pointer_escape` 組み込み関数
- Compile API における Solr 向け Lucene クエリ生成 (利用条件: `Accept: application/vnd.opa.lucene.solr+json` を指定した Compile API リクエスト)
- ソース位置情報なしでの生成バンドルポリシーの解析 (利用条件: バンドルマニフェストで `generated` を `true` に設定)
- より多くのポリシー形式で候補を絞り込むルールインデックス
- JSON Pointer トークン用の `json.pointer_escape` の追加
- 生成バンドルの段階的な有効化 (利用条件: バンドルマニフェストで、`"generated": true` として生成バンドルであることを示す必要があります。)
- OPA REPLでの関数本体の暗黙記述への対応
- `with` を使った空コレクションルールへの定数キー参照
- 参照ヘッドが異なる部分木での異種ルールのコンパイル
- AST の JSON アンマーシャリングでの `every` 式のサポート
- AST の JSON アンマーシャリングでの `some` 宣言のサポート
- ソース位置情報なしで解析される生成バンドルポリシー (利用条件: バンドルマニフェストでバンドルのポリシーに `generated: true` を指定)
- `types.Unmarshal` における `of` を含まない set 型のサポート

## 依存関係の更新 (21)

ほか21件（いずれもセキュリティへの言及なし）

- `- build(go): Bump to 1.27.4 ([#9543](https://github.com/open-policy-agent/opa/pull/9543)) authored by @srenatus`
- `- build(deps): Bump github.com/agnivade/levenshtein from 1.2.1 to 1.2.2`
- `- build(deps): Bump github.com/foxcpp/go-mockdns from 1.2.0 to 1.3.0`
- `- build(deps): Bump github.com/gobwas/glob from 1.0.0 to 1.1.0`
- `- build(deps): Bump github.com/huandu/go-sqlbuilder from 1.43.0 to 1.44.1`
- `- build(deps): Bump github.com/klauspost/compress from 1.20.0 to 1.20.4`
- `- build(deps): Bump github.com/lestrrat-go/jwx/v3 from 3.3.0 to 3.4.0`
- `- build(deps): Bump github.com/prometheus/client_golang from 1.24.1 to 1.25.0`
- `- build(deps): Bump github.com/sergi/go-diff from 1.4.0 to 1.4.5`
- `- build(deps): Bump github.com/spf13/pflag from 1.0.10 to 1.1.0`
- `- build(deps): Bump github.com/vektah/gqlparser/v2 from 2.5.58 to 2.5.64`
- `- build(deps): bump go.opentelemetry.io deps from 1.46.0/0.71.0 to 1.47.0/0.72.0`
- `- build(deps): Bump go.opentelemetry.io/proto/otlp from 1.11.0 to 1.11.1`
- `- build(deps): Bump go.yaml.in/yaml/v3 from 3.0.5 to 3.0.6`
- `- build(deps): Bump golang.org/x/sync from 0.23.0 to 0.25.0`
- `- build(deps): Bump golang.org/x/term from 0.46.0 to 0.48.0`
- `- build(deps): Bump golang.org/x/text from 0.42.0 to 0.44.0`
- `- build(deps): Bump golang.org/x/net from v0.60.0 to v0.62.0 ([#9555](https://github.com/open-policy-agent/opa/pull/9555)) authored by @anderseknert`
- `- build(deps): Bump google.golang.org/grpc from 1.84.0 to 1.85.0`
- `- build(deps): Bump gopkg.in/ini.v1 from 1.67.3 to 1.68.0`
- `- build(deps): Bump oras.land/oras-go/v2 from 2.6.2 to 2.7.0`

## その他の変更 (49)

- ルールインデックスによる絞り込み対象の拡大
- ベースデータのコレクション検索でストアデータの変換を繰り返さない
- ルートの `.manifest` ファイルに限定されたバンドルマニフェストの認識
- base dataのコレクション検索におけるデータ変換の重複排除
- インデックス条件全般にわたるインデックス付き評価とインデックスなし評価の比較テスト
- 部分評価でのインデックスによるルール候補の検査
- `opa build` で不要なルールインデックスと内包表記インデックスをスキップ
- `rego-target` ビルド後のチェック用コンパイラーの解放
- コンソール決定ロガーによる JSON 形式の値のネイティブコピー
- Logs プラグインによるリクエスト処理中のサイズ超過チャンクのデコード回避
- デフォルトターゲットでの `Close` テストの削除
- コンテキストタイムアウトテストにおけるWasmコンパイル時間の除外
- Wasm リゾルバーの結果に `result` 以外のキーが含まれる場合のテスト追加
- インメモリでの `NonEmpty` 競合チェックの高速化
- クローズドクエリの評価で発生するエラーのテストカバレッジ
- パーサーのterm-cacheエントリーの割り当て数削減
- 子ノードを必要に応じて割り当てるコンパイラーの型ツリー
- Rego コンパイラーの処理量とメモリー割り当ての削減
- `lazyObj.Find` のキャッシュヒット時の性能低下の修正
- ベースデータのインデックス参照で遅延オブジェクトの変換を回避
- OPA AST の `Head` 構造体を96バイトに縮小
- テンプレート文字列パーサーで各問題を1回だけ報告
- 提案されていたコンパイル済みルール再利用機能と関連 API の削除
- エラーで静的配列の範囲外インデックスを特定
- スキャナーによるトークンごとの `ScanOptions` 構築の回避
- グラフのソート成功後にルールごとの再帰探索を省略
- 参照解決時における重複ルールグローバルマッピングの追加抑制
- 組み込み型環境で関数ごとの `Ref` 割り当てを回避
- コンパイラーの書き換え処理で式のコピーを回避
- `every` と `evalTree` の評価におけるメモリー割り当ての削減
- OPA の評価における呼び出しオペランドのプーリング
- OPA評価処理のプール化と衝突チェックの最適化
- OPA の衝突チェックで名前空間付き項を使用
- オブジェクトキーイテレーターのプール化
- キャンセル対応 sink writer のパフォーマンス改善とプーリング
- `array.slice` の空結果を割り当てなしで返却
- OPA `walk` のパス構築における割り当て削減
- 空および未定義の入力に対する適合性テストの追加
- `replace` と `replace_n` のメモリー割り当て削減
- `regex.template_match` で未使用の正規表現コンパイルを回避
- コーパスの追加ケース
- 異なる型の値の順序付けテスト
- 時刻関数における小さいタイムスタンプのテストカバレッジ
- 内包表記キャッシュの子要素の遅延割り当て
- 部分オブジェクトの衝突チェックの線形化
- 古くなった `sync.Pool` コメントの削除
- 裸の項におけるプール済みステップ継続の再利用
- `replace` のテストで YAML ケースを使用
- `MakeTempFS` のファイル作成失敗後のクリーンアップ

---

整理した内容は AI が作成するため誤っている可能性があり、無保証で提供されます。
