Skip to content

fix(runtime): preserve empty property strings - #2164

Draft
ohdearquant wants to merge 1 commit into
mainfrom
codex/update-empty-property-1995
Draft

fix(runtime): preserve empty property strings#2164
ohdearquant wants to merge 1 commit into
mainfrom
codex/update-empty-property-1995

Conversation

@ohdearquant

Copy link
Copy Markdown
Owner

Summary

  • preserve empty strings nested inside caller-owned properties during Agent presentation
  • retain existing empty-field compaction for response metadata outside properties
  • cover update echo and subsequent get readback with a regression test

Verification

  • cargo fmt --all -- --check
  • cargo clippy -p khive-runtime --all-targets -- -D warnings
  • cargo clippy -p khive-pack-kg --all-targets -- -D warnings
  • cargo test -p khive-pack-kg
  • cargo test -p khive-runtime --lib
  • regression: update_empty_string_property_survives_agent_echo_and_readback

Fixes #1995

@ohdearquant
ohdearquant marked this pull request as ready for review August 24, 2026 18:17

@ohdearquant ohdearquant left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review. Posted by this repository's automated pull-request review pipeline; this is not a human read and does not gate the merge by itself.

Verdict on head 5745213: REQUEST-CHANGES, 1 blocking finding. Finding details are delivered to the review's recipients rather than posted here. Do not merge this head while blocking findings are outstanding; a pipeline comment on a newer head supersedes this one.

@ohdearquant
ohdearquant marked this pull request as draft August 24, 2026 21:53
ohdearquant added a commit that referenced this pull request Aug 25, 2026
…ent-mode empty-drop (#2193)

Amendment 3 to ADR-045: in Agent mode, empty strings nested under a
record's `properties` object are preserved; the empty-string drop
continues to apply everywhere else.

A key under `properties` exists only because a caller wrote it, so an
empty string there is data — it distinguishes "set to empty" from
"absent or deleted". Under the unamended rule, the echo of an update
that sets a property to `""` omits the key entirely and a successful
write reads as a deletion (#1995). The token-economy rationale is
unaffected: nothing machine-generated is reintroduced.

Scope stated explicitly: empty arrays and objects under `properties`
stay dropped; callers distinguishing those cases read `format=json` or
`presentation=verbose`. Extending the carve-out to container values is a
separate decision.

Companion code change: #2164.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kg: update response echo omits property keys set to empty string, reading as deleted

1 participant