If-Overwritten-Version header not enforced when accessed via TinyNode
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
調査の方向性
controllers/overwrite.js から始めて /overwrite リクエストの経路をたどり、その後、TinyNode の /overwrite 処理および関連する TinyNode issue 106 と比較してください。If-Overwritten-Version が RERUM サーバーに到達するか、また値が一致しない場合に 200 OK ではなく 409 Conflict が返されるかを確認してください。文書化された optimistic-locking の動作が適用されているか、統合/設定のギャップが明確に特定されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
The If-Overwritten-Version header for optimistic locking is documented in the RERUM API but does not appear to be enforced when /overwrite requests come through TinyNode (tiny.rerum.io).
Background
According to the RERUM API documentation and the server code in controllers/overwrite.js, the If-Overwritten-Version header should be checked against __rerum.isOverwritten to detect concurrent edit conflicts.
The server code shows this logic:
const expectedVersion = req.get('If-Overwritten-Version') ?? req.body.__rerum?.isOverwritten
const currentVersionTS = originalObject.__rerum?.isOverwritten ?? ""
if (expectedVersion !== undefined && expectedVersion !== currentVersionTS) {
// Should return 409 Conflict
}
The Problem
When accessing RERUM through TinyNode (tiny.rerum.io/overwrite), the If-Overwritten-Version header is sent correctly but the version check is not enforced - requests succeed even with version mismatches.
Steps to Reproduce
- Load an object via
store.rerum.io/v1/id/{id}- note__rerum.isOverwritten(e.g.,2025-11-30T20:31:57.853) - Send
/overwritetotiny.rerum.io- this updatesisOverwrittento new value - Send another
/overwritetotiny.rerum.iowith headerIf-Overwritten-Version: 2025-11-30T20:31:57.853(old value) - Expected: 409 Conflict
- Actual: 200 OK, silent overwrite
Questions
- Does TinyNode pass through the
If-Overwritten-Versionheader to RERUM? - Is the optimistic locking check implemented in TinyNode or expected to be handled by RERUM?
- Is there a configuration needed to enable this feature?
Related
- TinyNode issue: https://github.com/CenterForDigitalHumanities/TinyNode/issues/106
- RERUM API docs: https://store.rerum.io/v1/API.html#overwrite
- 主要言語
- JavaScript
- スター
- 3
- フォーク
- 6
- 平均マージ
- 4日 9時間
- マージ済み PR(30日)
- 5
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CenterForDigitalHumanities/rerum_server_nodejs のほかの issue
-
bug documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
backend dependencies easy
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
CenterForDigitalHumanities/rerum_server_nodejs#290 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 50/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
CenterForDigitalHumanities/rerum_server_nodejs の issue をすべて見る
似ている issue
-
factory-active factory-automatic harness/codex task-bug-reproduction-success task-identify-harness-labels-done task-identify-issue-type-done
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
ux
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
rr-djk/rr-djuikoo.com#53 ·
メンテナーはふだん 1 日以内に返信
-
new spec review
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
w3c/browser-specs#2666 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
thim81/openapi-format#238 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
decentespresso/dye2#13 ·