fix(flows): expose platform_user_id in flows_list_connections schema + self-DM review follow-ups#4941
Conversation
The public schema advertised by flow_connection_fields() only listed connection_ref/kind/display/toolkit/scheme, so schema-driven agents/clients discovering flows_list_connections via /schema still saw the self-DM identity as unavailable even though the RPC payload now carries it. Add the field, fix the stale "kind ONLY" description wording, and update the test that locks the field list. addresses @chatgpt-codex-connector on src/openhuman/flows/types.rs:312
"returns ids + display labels + kind ONLY" conflicted with the documented platform_user_id/toolkit/scheme fields the tool actually emits. Replace "ONLY" with an accurate "only non-secret metadata" framing so the agent doesn't read the description as excluding fields it should use. addresses @coderabbitai on src/openhuman/flows/builder_tools.rs:1524
The new identity source was loaded silently, so an empty cache couldn't be distinguished from a matching failure in logs. Add a namespaced tracing::debug! with the loaded count (no identity values logged). addresses @coderabbitai on src/openhuman/flows/ops.rs:2369
The existing checks only asserted the presence of the platform_user_id/DM me keywords, so a regression could drop the actual "pass it as channel" instruction or the null-platform_user_id fallback while the looser keyword checks kept passing. Add focused assertions for both. addresses @coderabbitai nitpick on src/openhuman/flows/agents/workflow_builder/builder_prompt.rs:361-378
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe connection listing schema and documentation now expose optional secret-free ChangesConnection Metadata and Guidance
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
…+ self-DM review follow-ups (tinyhumansai#4941)
Summary
Follow-up to the merged self-DM PR #4933 (
platform_user_idsurfacing). #4933 was merged before its review round landed — this PR carries the 4 valid review findings, one a real contract gap.Fixes
flow_connection_fields()inschemas.rsnever advertisedplatform_user_id, so schema-driven clients hitting/schemacouldn't see the field the RPC actually returns. Added the field + fixed stale "kind ONLY" wording + updated the locking schema test.ListFlowConnectionsTool::description()said "kind ONLY" while documentingplatform_user_id/toolkit— reworded to "only non-secret metadata."flows_list_connectionswas silent — addedtracing::debug!(count = …).channelonSLACK_SEND_MESSAGE" wiring instruction + the null-fallback text.Testing
cargo test --lib openhuman::flows::→ all pass (387 on the source branch);cargo check+cargo fmt --checkclean.Acceptance criteria
/schemanow advertisesplatform_user_id(schema-driven clients see it)Summary by CodeRabbit
New Features
Documentation