Skip to content

feat: поддержка RFC 6901 (JSON Pointer) для путей — escaping ~/slash в ключах (Этап 10.2, Issue #206)#223

Merged
netkeep80 merged 4 commits into
netkeep80:mainfrom
konard:issue-206-9d24f61cc2c2
Mar 22, 2026
Merged

feat: поддержка RFC 6901 (JSON Pointer) для путей — escaping ~/slash в ключах (Этап 10.2, Issue #206)#223
netkeep80 merged 4 commits into
netkeep80:mainfrom
konard:issue-206-9d24f61cc2c2

Conversation

@konard
Copy link
Copy Markdown
Contributor

@konard konard commented Mar 22, 2026

Summary

  • Добавлена функция pjson_decode_rfc6901_segment() в pjson_db_helpers.h для декодирования сегментов пути по RFC 6901: ~1/, ~0~
  • _walk_path() в pjson_db_pmm.h декодирует каждый сегмент пути через RFC 6901
  • pjson_split_path() в pjson_db_helpers.h декодирует последний сегмент через RFC 6901
  • Добавлены 17 тестов в tests/test_pjson_rfc6901.cpp
  • Обновлены plan.md и readme.md

Контекст

Это Этап 10.2 (Проблема 7) из plan.md. Ранее ключи объектов, содержащие /, были недоступны через path-адресацию. Теперь поддерживается экранирование по RFC 6901 (JSON Pointer): ~~0, /~1.

Пример:

db.put("/config/a~1b", 42);       // ключ "a/b" в объекте config
db.get("/config/a~1b");           // → 42
db.put("/data/x~0y", "hello");    // ключ "x~y" в объекте data

Fixes

Fixes #206

Test plan

  • Все 676 тестов проходят (659 существующих + 17 новых)
  • 17 новых тестов: декодирование сегментов (8 тестов), put/get с escaped ключами (3), exists (1), erase (1), clone (1), parse_into (1), pjson_split_path (1), обратная совместимость (1)
  • Сборка без ошибок (только предупреждения из deps/pmm/pmm.h)
  • clang-format проверен

🤖 Generated with Claude Code

konard and others added 2 commits March 22, 2026 08:30
Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: netkeep80#206
…в ключах (Этап 10.2, Issue netkeep80#206)

Добавлена функция pjson_decode_rfc6901_segment() для декодирования
сегментов пути по RFC 6901: ~1 → /, ~0 → ~. Декодирование применяется
в _walk_path() и pjson_split_path(). Ключи объектов, содержащие '/' и '~',
теперь доступны через path-адресацию с экранированием.

Добавлены 17 тестов. Все 676 тестов проходят.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@konard konard changed the title [WIP] Сделать следующую задачу в текущей фазе разработки и после обновить README.md и файл фазы разработки feat: поддержка RFC 6901 (JSON Pointer) для путей — escaping ~/slash в ключах (Этап 10.2, Issue #206) Mar 22, 2026
@konard konard marked this pull request as ready for review March 22, 2026 08:41
@konard
Copy link
Copy Markdown
Contributor Author

konard commented Mar 22, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $4.444900
  • Calculated by Anthropic: $2.651180 USD
  • Difference: $-1.793720 (-40.35%)

🤖 Models used:

  • Tool: Claude
  • Requested: opus
  • Model: Claude Opus 4.6 (claude-opus-4-6)

📎 Log file uploaded as Gist (1316KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Contributor Author

konard commented Mar 22, 2026

🔄 Auto-restart triggered (iteration 1)

Reason: CI failures detected

Starting new session to address the issues.


Auto-restart-until-mergeable mode is active. Will continue until PR becomes mergeable.

…ompatibility

On Windows/MSVC, CTest corrupts Unicode characters (em dash '—' becomes
garbled 'ΓÇö') when passing test names to the Catch2 binary, causing all
8 decode segment tests to fail with "No test cases matched". Replace em
dash with ASCII hyphen-minus in TEST_CASE names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@konard
Copy link
Copy Markdown
Contributor Author

konard commented Mar 22, 2026

🔄 Auto-restart-until-mergeable Log (iteration 1)

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $2.828952
  • Calculated by Anthropic: $1.760675 USD
  • Difference: $-1.068277 (-37.76%)

🤖 Models used:

  • Tool: Claude
  • Requested: opus
  • Model: Claude Opus 4.6 (claude-opus-4-6)

📎 Log file uploaded as Gist (2214KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Contributor Author

konard commented Mar 22, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@netkeep80 netkeep80 merged commit 6969a6f into netkeep80:main Mar 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants