ADR-0003: EDItEUR スキーマの取得方法 (要判断) - #58
Conversation
Both CI jobs currently fail two seconds after starting, before any build
step runs:
##[error]This request has been automatically failed because it uses a
deprecated version of `actions/cache: v2`.
GitHub has closed down actions/cache v1 and v2 and now auto-fails runs
that reference them at action-download time, so the workflow cannot get
as far as `make test` or the bazel e2e target.
Bump actions/cache to v4 to unblock that, and bump the remaining actions
still on the Node 12 runtime at the same time:
- actions/checkout v2 -> v4
- actions/setup-node v2.1.4 -> v4
- haskell/actions/setup v1 -> haskell-actions/setup v2 (repository moved)
Tool versions are left as they are (GHC 8.8.3, stack 2.5.1, Node 12.x) so
this change is limited to action versions. haskell-actions/setup v2 still
exposes the stack-path output the cache step depends on.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z
With the deprecated actions bumped, the Haskell job now reaches `make test` and fails there instead: `make test` depends on the `schema` target, which fetches the EDItEUR archives, and editeur.org now answers bazel's request with `202 Accepted` instead of the zip. The test suite does not need those archives. Everything under test/ reads fixtures/test_*.xsd; the only reader of ./schema is schemaRoot in src/Lib.hs, which is the code-generation path. The dependency was an over-specification that tied the whole feedback loop for the parser to the availability of an external service. Drop it from `test` and keep it on `build`, where generating code really does need the schema. This does not fix the 202 itself: generation and tracking new schema releases still need the download. Also introduce docs/adr/ to record decisions like this one, with a template, an index, and the two decisions made here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z
Code generation is blocked from two directions and neither is fixable by picking a different version number, so write down what was observed and what the options cost before anyone tries again. From CI, editeur.org answers bazel's request with `202 Accepted` instead of the zip, and repeating the run reproduced it, so it is not transient. From the development sandbox the host is refused outright by the egress policy, which also means the sha256 that http_archive requires cannot be computed here. The ADR stays Proposed on purpose: the two durable fixes (vendoring the schemas, or hosting a mirror) both redistribute a third party's files, and that is a licensing call for the maintainer rather than something to settle by committing files. Spoofing a User-Agent to get past the 202 is listed and rejected — it circumvents an access control the publisher put there. As an interim, the ADR documents bazel's --distdir, which reuses a manually downloaded zip while keeping the sha256 check intact. It also notes that a hand-placed schema/ directory is honoured; verified with a scratch Makefile reproducing the `schema/%` pattern rule, which skips a target whose directory already exists, per directory. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z
The previous commit dropped the `schema` prerequisite from `make test` on the claim that nothing under test/ reads schema/. That claim was wrong, and review caught it: fixtures/test_mixed_html.xsd included ../schema/v2/ONIX_XHTML_Subset.xsd directly. Xsd.getSchema follows includes recursively and resolves that relative path with readFile, which throws when the file is absent, and schema/ is gitignored — so on a clean checkout the suite would have failed instead of running. Commit 9352123 confirms the dependency was deliberate: it added `test: schema` in the same change that deleted the vendored 2_1_rev03_schema/ tree and repointed this fixture at ../schema/v2/. Rather than restore the prerequisite, move what the fixture needs into the repository. test_mixed_html_xhtml_subset.xsd declares the 40 element names the fixture refers to, each as a mixed complex type. That is the property the assertions actually rest on: TestModel expects Model.collectElements to come back empty, and that filter keeps only elements with complexMixed = False, so the test means "XHTML elements do not leak into models". Deleting the include instead would have made the assertion vacuous. The stand-in is written here rather than copied from the EDItEUR distribution, so it raises no redistribution question. ADR-0002 is rewritten around what is actually true, including why the dependency was real and why a stand-in is enough. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z
レビュー全体として、この ADR は正確で、推論も妥当です。技術的な主張の中核 — findings1. 【必須】上流バージョンが断定で書かれている
前半 (Issue 36 / Issue 52) は 私のほうで第三者情報源にあたった限り、ONIX 3.1.3 (2026-03) も codelists Issue 73 (2026-04) も実在するようで、内容としては当たっている可能性が高いです。ただし** 書き換え案: - 最新スキーマへの追従 (現在 ONIX 2.1 Issue 36 / 3.0 Issue 52)。
上流の最新版は、二次情報では ONIX 3.1.3 + codelists Issue 73 とされるが、
editeur.org に到達できないため一次情報では未確認。追従の際は、
バージョンだけでなく zip の URL とファイル名を editeur.org 上で確認すること
(現在の WORKSPACE の URL がそのまま使える保証もない)。2. 【必須】「手で用意した場合も動く」が、そのとおりにやると動かない「決定」節:
後半の make の挙動についての主張は完全に正しい (再現して確認済み、末尾参照)。問題は前半の「手で用意した場合も動く」で、必要なレイアウトが書かれていないことです。実際にはフラットに、この名前で置く必要があります。 schemaRoot =
"./schema"
++ ( case version of
V2 -> "/v2/ONIX_BookProduct_Release2.1_reference.xsd"
V3 -> "/v3/ONIX_BookProduct_3.0_reference.xsd"
)一方 EDItEUR の zip は 書き換え案 (該当段落を差し替え): `schema/v2` / `schema/v3` を手で用意することもできる。`schema/%` は prerequisite を持たない
パターンルールなので、ディレクトリが既に存在すれば make はそのターゲットを最新とみなし、
ダウンロードを試みない (`schema/v2` だけ存在する状態なら `schema/v3` だけ取得する)。
ただし zip をそのまま展開しただけでは動かない。zip はトップレベルに
`ONIX_BookProduct_XSD_schema+codes_Issue_52/` のようなディレクトリを含むが、
`src/Lib.hs` が読むのは `./schema/v3/ONIX_BookProduct_3.0_reference.xsd` (v2 は
`./schema/v2/ONIX_BookProduct_Release2.1_reference.xsd`) なので、
BUILD.bazel の genrule と同じく **xsd を平坦に置く**必要がある。
unzip -j ONIX_BookProduct_XSD_schema+codes_Issue_52.zip '*/*.xsd' -d schema/v33. 【推奨】
|
| 主張 | 方法 | 結果 |
|---|---|---|
WORKSPACE の http_archive 引用 |
git show <ref>:WORKSPACE |
一致。sha256 = "8fe93242..." は 8fe932426066538a1d4ef17f41a70432d3eef7bb09c54e9262b24cc883cdb461 の省略で正しい (引用が build_file = "//:org_editeur_v2.bazel" を省いている点だけ、#5 との関係で注意) |
| 現行版が 2.1 Issue 36 / 3.0 Issue 52 | 同上 (URL とファイル名) | 正しい |
test が schema に依存しない / build は依存する |
git show <ref>:Makefile |
正しい (build: schema .stack-work、test: は prerequisite なし) |
schema/% はディレクトリがあれば再取得しない |
自前のスクラッチ Makefile で再現 (リポジトリ外の一時ディレクトリ、GNU Make 4.3)。$(BZL) を @echo に差し替えて実行 |
正しい。 初回は v2/v3 とも実行 → 2 回目は make: Nothing to be done for 'schema'. → rm -rf schema/v3 後は v3 のみ実行。PR 本文の「v2 だけ存在する状態では v3 のみ取得する」も再現した |
--distdir が Bazel 3.7.0 に存在する |
RepositoryOptions.java @ tag 3.7.0 |
存在する。 name = "distdir", oldName = "experimental_distdir", help: "Additional places to search for archives before accessing the network to download them." |
--distdir でも sha256 検証が効く |
DownloadManager.java @ 3.7.0 |
効く。 distdir 探索は if (checksum.isPresent()) の内側にあり、採用条件は RepositoryCache.getChecksum(cacheKeyType, candidate).equals(cacheKey) |
| 置く zip のファイル名 | 同上 (getCandidateFileNames) |
URL の basename と一致が必要。ONIX_BookProduct_XSD_schema+codes_Issue_52.zip で正しい (URL の %20 はディレクトリ部分だけなので basename に影響しない) |
| ディレクトリが無い場合エラーになるか | 同上 | エラーにならない。 eventHandler.handle(Event.info("non-existent distdir " + dir)) を出して、そのままネットワークにフォールバックする → #3 に記載 |
--distdir の相対パス基準 |
BazelRepositoryModule.java @ 3.7.0 |
ワークスペースルート基準 (env.getBlazeWorkspace().getWorkspace().getRelative(path)) |
3.7.0 の http_archive はカスタムヘッダ非対応 |
tools/build_defs/repo/http.bzl @ 3.7.0 |
正しい。 認証系の属性は netrc と auth_patterns のみ、後者のドキュメントは "as the value for the Authorization field of the HTTP request" — User-Agent は設定不可。なお Bazel 自身は User-Agent: Bazel/<version> を固定送信 (HttpConnectorMultiplexer.java) |
| 202 が回復不能エラーになる | HttpConnector.java @ 3.7.0 |
正しい。 200/206 のみ成功、3xx はリダイレクト、それ以外の code < 500 は throw new UnrecoverableHttpException(...) に落ちる。202 はここ。リトライされないので「1 回再実行しても同じ」も整合する |
--override_repository の存在 (#5) |
RepositoryOptions.java @ 3.7.0 |
存在する |
//e2e/go:snapshot_test の依存 |
git show <ref>:e2e/go/BUILD.bazel |
//generated/go/v2:go のみ → #6 |
/schema が gitignore 済み / third_party は未登録 |
git show <ref>:.gitignore |
そのとおり → #4 |
検証できなかったこと
- editeur.org 上の実際の URL・zip 名・レスポンス。この環境からも
www.editeur.org/ns.editeur.orgともcurl: (56) CONNECT tunnel failed, response 403で、ADR の言うとおり到達できません。したがって 202 が今も返るのか、x-amzn-waf-actionが付いているのかは未確認です。 - ONIX 3.1.3 / codelists Issue 73 の一次情報。二次情報 (BookNet Canada の Issue 73 リリース記事 2026-04-13、および ONIX 3.1.3 の変更点をまとめた第三者ミラー) では両方とも実在するようで、ADR の記述はおそらく正しいです。ただし一次情報にあたれていないこと、そして実務上必要な zip の URL とファイル名はまったく不明であることは変わりません。Configure Renovate #1 はこの状況を ADR 側に明記してほしい、という指摘です。
--distdirの実挙動の実地確認。ソース読解のみで、実際に Bazel 3.7.0 を動かしての確認はしていません (アーカイブ取得自体がこの環境から不可能なため)。
Generated by Claude Code
BZL_BIN used `:=`, so `$(shell npx bazel info bazel-bin)` ran while make parsed the file — on every target, `make test` included. The Haskell job runs `make test` without ever installing node_modules, so that expansion just fails there. Measured in this environment: `make -n test` took 18.1s and printed a bazel download error before doing anything, and 0.011s with the assignment deferred to `=`. Nothing outside the schema recipes reads BZL_BIN, so deferring it costs nothing. Also drop the `ls -lah` step that printed the stack tool path; it was debugging output for the cache setup, not a check anything depends on. Both spotted in review of this PR. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z
The two things that would have misled a reader: The ADR asserted "EDItEUR の最新は ONIX 3.1.3 + codelists Issue 73" flatly, eight lines after saying editeur.org is unreachable. Secondary sources do corroborate the version, but the zip URL, filename and sha256 — what WORKSPACE actually needs — are unknown, so say that instead. "schema/v2 / schema/v3 を手で用意した場合も動く" was under-specified enough to be wrong. The archives carry a top-level directory while src/Lib.hs reads flat paths, matching what BUILD.bazel's genrule flattens, so a plain unzip does not work. Spell out `unzip -j`. Also: --distdir does not compose with `make build`, since the Makefile passes no flags through, so point at .bazelrc; note that a missing distdir is only an INFO, which makes a typo look exactly like the original 202; add --override_repository as a distinct option, since it skips the sha256 check and is therefore the one that works when chasing a release whose checksum is not known yet; correct the claim that the e2e snapshot guards the generated output, which holds only for generated/go/v2; and record that the schema version is hardcoded in three more places. .gitignore now covers third_party/distdir, which the ADR tells people to create. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z
|
レビューありがとうございます。必須 2 件と推奨 5 件すべて反映しました (116f35a)。 必須 1: バージョンの断定ご指摘のとおりです。「到達できない」と書いた 8 行後に最新版を断定していては、読む人を騙します。次のように書き直しました。
必須 2: 手動配置の手順が動かないこれも確認しました。決定的だったのは genrule です。
推奨
任意
Generated by Claude Code |
ADR-0003 records that CI gets 202 Accepted instead of the archive, and that this environment cannot reach the host at all to check anything first-hand — not the URLs, not the current release, not the sha256. That leaves the ADR resting partly on secondary sources, and leaves the next step guessing. A CI runner can reach the host, so ask it. This job issues plain GETs and prints the status, headers and first bytes of what comes back, then lists the zip links the download pages advertise. No headers are forged and nothing is worked around; it only observes. Manual trigger only, so it never runs on push. It is deleted again in the next commit once it has produced its output, and the findings go into ADR-0003. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z
workflow_dispatch cannot be dispatched through the API for a workflow that does not exist on the default branch, so the run never started. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z
The probe ran and answered the question the ADR had been guessing at. The
202 is a CAPTCHA challenge:
HTTP/2 202
server: nginx
sg-captcha: challenge
x-robots-tag: noindex
<meta http-equiv="refresh"
content="0;/.well-known/sgcaptcha/?r=%2Ffiles%2F...zip&y=ipc:...">
It is not specific to the archives: the download page itself answers the
same way, and the redirect embeds the requesting runner's IP, so the
decision is made about the caller rather than the file.
That settles three things the ADR previously left open. The URLs are not
stale, so pointing at a newer release changes nothing. Retries and mirror
URLs cannot help. And CI can never fetch these archives without solving
the CAPTCHA — which is precisely the control the publisher put there, so
that route is closed on purpose rather than by accident.
It also makes the User-Agent option moot on its own terms: passing the
challenge needs JavaScript and a cookie, not a header. The reason for
rejecting it is unchanged, but it is no longer only a matter of
principle.
The practical consequence, now recorded: manual acquisition is not a
stopgap until something is fixed upstream. It is permanent unless the
schemas are vendored or mirrored — which is the licensing decision this
ADR is waiting on.
The probe workflow is removed again in the same change; it existed only
to produce that output.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z
202 の正体が判明しました: SiteGround の CAPTCHA推測のまま残すのが嫌だったので、CI ランナーから素の GET を投げて確認しました(一時的なワークフローを追加して 1 回実行し、同じコミットで削除しています。ヘッダの偽装などは一切していません)。 これで確定したことファイル固有の問題ではありません。 同じ応答が返るのは zip だけでなく、ダウンロードページ したがって、
判断への影響これは当面の不便ではなく恒久的な制約です。「そのうち直る」類の問題ではないので、判断を先送りするほど生成系が止まり続けます。ADR の「結果」にもその旨を明記しました。 選択肢は実質 2 つに絞られます。
なお User-Agent 偽装案は、原則の問題である以前に技術的にも成立しません。CAPTCHA の通過には JS の実行とクッキーの保持が要り、ヘッダを 1 つ足して済む話ではありませんでした。却下理由は変えていませんが、単なる建前ではなくなっています。 この PR の状態ADR-0003 を推測ではなく観測事実に基づく内容に書き直しました。プローブ用ワークフローは同じコミットで削除済みなので、この PR の差分は 判断をお願いします(1 / 2 / 3 のいずれか)。決まり次第、ADR を Accepted に更新して最新スキーマへの追従に着手します。 Generated by Claude Code |
Both .gitignore additions are kept: node_modules/ from the npm work on main, /third_party/distdir/ from this branch's ADR. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z
Leaving the blocker at 'this needs a licensing decision' was too vague to act on, so look up the terms instead. EDItEUR describes the specifications and tools as free under a 'highly-permissive licence', no registration and no royalties, which reads as though redistribution were fine. The licence text itself is narrower: it has the user agree not to copy any part of the DTD or XML Schema for use outside strictly internal use in their own organisation, and to notify EDItEUR first for anything beyond that. If that is right, it moves both durable options. Vendoring into a public repository and hosting a mirror are not 'strictly internal', so they likely require notifying EDItEUR rather than merely reading a licence — which is more reason for the maintainer to make this call, not less. The --distdir route is unaffected: the maintainer downloads for their own use and nothing is redistributed. This is secondary-source reading. editeur.org, where the actual licence lives, is unreachable from here, and the ADR says so. Also correct the codelist issue number: newer information puts Issue 74 as the current one for 3.0 and 3.1, not 73. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z
ライセンス条件を調べました(判断が軽くなるどころか、重くなりました)「ライセンスの判断が要る」で止めるのは雑だったので、条件そのものを調べました。期待とは逆の結果です。 EDItEUR は対外的に「仕様・ツールは無料、登録不要、ロイヤリティ不要、highly-permissive licence」と説明しており、ここだけ読むと再配布も問題なさそうに見えます。しかし利用許諾の本文とされる記述は、はるかに限定的でした。要旨は以下です。
これが正しければ、判断の性質が変わります。
つまり前 2 つは「ライセンスを読めば済む」話ではなく、権利者への連絡を伴う行為でした。こちらの一存で進めなくて正解だったと思います。 重要な限定: これは二次情報です。一次情報である editeur.org には到達できません(この PR で実証したとおり CAPTCHA で塞がれています)。ADR にもその旨を明記しました。実際に vendoring / ミラーへ進むなら、まず一次情報の確認を推奨します。 あわせて codelists の号数を訂正しました。当初 Issue 73 と書きましたが、より新しい情報では Issue 74 が 3.0 / 3.1 共通の現行版のようです。 この PR の現状差分は 判断は変わらず vendoring(+通知)/ ミラー(+通知)/ Generated by Claude Code |
Missed on the first pass: commit 9352123 (2021-01-19) deleted 2_1_rev03_schema/, and the full ONIX 2.1 rev03 set is still reachable from its parent. Six XSDs, no network required, so v2 code generation can be unblocked today with git alone. It also sits differently from vendoring and mirroring on the licensing question. Those would start redistributing; these files have been in this repository's public history since 2021 and still are. Restoring them acknowledges a publication that already happened rather than making a new one. The maintainer deleted them deliberately, so it is still their call — but it is a smaller one. It does not reach the goal: only 2.1 is in the history, not 3.0 or 3.1. Reading those recovered files also settles what the ADR could say about the licence. readme.txt, readme2.txt and the XSD headers carry copyright notices and nothing else — no grant of any kind. The licence text exists only on editeur.org, which is unreachable, so the ADR's licensing discussion stays secondary-source and now says so explicitly. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z
見落としがありました: v2 のスキーマはこのリポジトリの履歴に残っています「取得手段が無い」と繰り返し書いていましたが、足元を見ていませんでした。2021-01-19 のコミット 9352123 が mkdir -p schema/v2
for f in ONIX_BookProduct_CodeLists.xsd ONIX_BookProduct_Release2.1_reference.xsd \
ONIX_BookProduct_Release2.1_short.xsd ONIX_XHTML_Subset.xsd \
ONIX_XHTML_Subset_reference.xsd ONIX_XHTML_Subset_short.xsd ; do
git show 9352123^:2_1_rev03_schema/$f > schema/v2/$f
doneこれで v2 のコード生成は今日から動きます( 再配布の観点でも、他の選択肢と質的に違いますvendoring とミラーは「これから配布を始める」行為ですが、これらのファイルは 2021 年から現在まで、このリポジトリの公開履歴に存在し続けています。復元は新たな公開ではなく、既に起きている公開の追認です。判断は依然必要ですが、ずっと軽い判断です(意図的に削除された経緯があるため、そこは尊重します)。 ただし履歴にあるのは 2.1 だけで、3.0 / 3.1 はありません。 最新スキーマ対応には依然として取得手段が要ります。 ライセンス一次情報についての結論復元したファイルで EDItEUR の配布物そのもの( 許諾の本文は editeur.org 上にしかなく、到達できない以上、この ADR のライセンス記述は二次情報のままです。ADR にもその限界を明記しました。 選択肢は 4 つになりました
3.0 / 3.1 に到達するには 2〜4 のいずれかが要ります。 Generated by Claude Code |
kogai approved the proposal on #58, so the ADR moves to Accepted and the interim it recommends stops being advice and becomes wiring: .bazelrc gains build --distdir=third_party/distdir, and that directory gets a README with the procedure. Archives stay gitignored, so nothing from EDItEUR is committed and the sha256 check is untouched — a wrong download still fails loudly. What the approval covers is written into the ADR explicitly, because a two-word approval on a document offering several options should not be read broadly: --distdir is adopted, and the choice between vendoring and a mirror stays open. Both of those likely require notifying EDItEUR, and this ADR defers them by design; approving the document is not the same as making that call. Note the review landed on 1ba635d, before the two commits that added the licence findings and the git-history recovery route. Both are material to the deferred choice, so they are worth a second look. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z
|
承認ありがとうございます。狭く解釈して反映しました (8ccf915)。 何を承認されたものとして扱ったか「提案を承認」だけでは 4 択のどれを指すか判断できないため、ADR が「決定」として書いていた内容、つまり以下を承認されたものとしました。
後者を含めなかったのは、この ADR 自身がその判断を保留しており、かつ両者とも EDItEUR への通知を伴う可能性が高いためです。複数の選択肢を提示した文書への短い承認を、その中で最も踏み込んだ選択肢の承認として読むべきではないと判断しました。もし vendoring まで含むご意図だった場合は、その旨お知らせください。 すぐ実施します。 実装したこと
ADR-0003 は Accepted に更新し、「何が承認され、何が保留か」を本文に明記しました。 ご確認いただきたい点承認は 1ba635d に対するもので、その後の 2 コミットが入る前の状態です。 以下は保留中の判断に直接効く材料なので、目を通していただく価値があります。
3.1 について
Generated by Claude Code |
この PR にはメンテナの判断が必要です。 実装は含まず、制約の記録と選択肢の提示だけを行います。
base は #56 (
claude/bump-deprecated-github-actions) です。docs/adr/が #56 で追加されるため。なぜ書いたか
コード生成が 2 方向から塞がっていて、どちらもバージョンを変えれば直る類のものではありません。次に誰かが着手する前に、観測した事実と各選択肢のコストを残します。
1. CI から:
202 Acceptedが返るzip の代わりに 202 が返り、Bazel は回復不能なエラーとして扱います。1 回再実行して同じ結果だったので、一時的な不調ではありません。
2. 開発環境から: そもそも到達できない
egress ポリシーで
www.editeur.org:443への CONNECT が 403 拒否されます。URL の確認も、http_archiveが要求するsha256の計算もできません。この結果、コード生成と最新スキーマへの追従 (現在 2.1 Issue 36 / 3.0 Issue 52、EDItEUR の最新は 3.1.3 + codelists Issue 73) が止まっています。ユニットテストは #56 で切り離したので影響を受けません。
なぜ Proposed のままか
恒久的な解決策の有力な 2 つ (vendoring / ミラー) は、いずれも第三者の配布物の再配布にあたります。これは技術的な選択ではなくライセンスの判断で、メンテナが行うべきものです。ここで勝手にファイルをコミットすると、判断を経ずに既成事実にしてしまいます。
なお User-Agent を偽装して 202 を回避する案は、明示的に却下しました。配布元が設けたアクセス制御を、権利者の意図を確認せずに迂回する行為だからです。
暫定運用
--distdirを推奨します。EDItEUR が意図する配布経路 (ブラウザでのダウンロード) をそのまま使い、何も回避せず、リポジトリに再配布物も置かず、sha256による検証も効いたままです。mkdir -p third_party/distdir mv ~/Downloads/ONIX_BookProduct_XSD_schema+codes_Issue_52.zip third_party/distdir/ npx bazelisk build --distdir=third_party/distdir onix_v3schema/v2/schema/v3を手で置いた場合も動きます。確認したこと
schema/%パターンルールを再現したスクラッチ Makefile で実際に検証しました。v2 だけ存在する状態では v3 のみ取得する、という粒度でも期待どおりでした。判断していただきたいこと
--distdir運用のままにするいずれかが決まれば ADR を Accepted に更新し、最新スキーマへの追従に着手できます。
🤖 Generated with Claude Code
https://claude.ai/code/session_01P8rZakwAiz1jpViUX34x1Z
Generated by Claude Code