feat: support append mode for Tana field updates - #103
Merged
Conversation
jcfischer
commented
Jun 22, 2026
jcfischer
left a comment
Owner
Author
There was a problem hiding this comment.
Sage code review — changes-requested
1 finding(s): 1 important.
HonestOracle
- [important]
PR description:13— Unverifiable append API claim
The description claims, "The local Tana OpenAPI athttp://localhost:8262/openapi.jsondocumentsmode: \"replace\" | \"append\"on both" and "Option append accepts oneoptionIdper call; callers can append multiple options with repeated calls." The cited source is a localhost runtime URL with no captured schema excerpt, Tana version, or reproducible output, so reviewers cannot verify the option-append contract the docs and tooling now rely on.
Posted by Sage on Codex CLI substrate.
jcfischer
commented
Jun 22, 2026
jcfischer
left a comment
Owner
Author
There was a problem hiding this comment.
Sage code review — changes-requested
1 finding(s): 1 important.
Architecture
- [important]
README.md:196— Placeholder leaks into public CLI
The public examplessupertag set-field <nodeId> <attributeId> _ --option-id <optionId>andsupertag set-field <nodeId> <attributeId> _ --option-id <optionId> --appendcement a meaningless content placeholder into the option-field API surface. Fixing that later would be a breaking CLI shape change for option-field updates.
Fix: Make<value>optional when--option-idis present, or expose an option-specific command before documenting append.
Posted by Sage on Codex CLI substrate.
jcfischer
commented
Jun 22, 2026
jcfischer
left a comment
Owner
Author
There was a problem hiding this comment.
Sage code review — approved
No findings. Sage approves.
Posted by Sage on Codex CLI substrate.
jcfischer
commented
Jun 22, 2026
jcfischer
left a comment
Owner
Author
There was a problem hiding this comment.
Sage code review — approved
No findings. Sage approves.
Posted by Sage on Codex CLI substrate.
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
mode: "append"for text/content field updatesOpenAPI Evidence
Observed locally on 2026-06-22 with:
rtk bun -e "const spec=await fetch('http://localhost:8262/openapi.json').then(r=>r.json()); ..."The OpenAPI document reports:
openapi:3.1.1info.title:Tana Local APIinfo.version:1.0.0Relevant request-body schemas:
{ "path": "/nodes/{nodeId}/fields/{attributeId}/content", "properties": { "content": { "anyOf": [{ "type": "string" }, { "type": "null" }], "description": "The string value to set (null to clear the field)" }, "mode": { "enum": ["replace", "append"], "default": "replace", "description": "Whether to replace the existing value or append to it (for multi-value fields)" } }, "required": ["content"] }{ "path": "/nodes/{nodeId}/fields/{attributeId}/option", "properties": { "optionId": { "type": "string", "description": "The node id of the option value to set" }, "mode": { "enum": ["replace", "append"], "default": "replace", "description": "Whether to replace the existing value or append to it (for multi-value fields)" } }, "required": ["optionId"] }The option endpoint schema is singular (
optionId, notoptionIds), so appending several option values means making one append call per option.Verification
rtk bunx tsc --noEmitrtk bun test tests/integration/local-api-integration.test.ts src/mcp/tools/__tests__/tool-schema.test.ts tests/unit/tool-mode.test.ts tests/unit/mcp-tool-mode-integration.test.ts