UN-3479 [FEAT] Carry per-prompt table/agentic settings in Prompt Studio project transfer#2075
Conversation
…transfer Prompt Studio project-transfer export/import dropped cloud-only per-prompt settings (table/record column schema, agentic-table settings), so transferred or cloned projects landed typed but empty. Enrich each exported prompt with an optional `settings` block materialised via the payload_modifier plugin; pure OSS (no plugin) and old blobs without the key are a no-op. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CsGrHbs5SWmQkKqiimg6CF
|
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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Summary by CodeRabbit
Walkthrough
ChangesPer-prompt plugin settings export/import
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…r export
Hoist get_plugin("payload_modifier") out of the per-prompt loop into
_export_prompts and pass it into _export_single_prompt, matching the import
path which already resolves it once.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CsGrHbs5SWmQkKqiimg6CF
|
Unstract test resultsPer-group results
Critical paths
|



What
Enrich the Prompt Studio project-transfer export/import blob with an optional per-prompt
settingsblock carrying cloud-only table/record/agentic-table settings, materialised via the existingpayload_modifierplugin.Why
Project transfer (export → import, also the path the org-clone tool rides) dropped cloud-only per-prompt settings: table/record column schema and agentic-table settings. Transferred or cloned projects landed with the prompt typed (
table/record/agentic_table) but the settings empty — a silent data-loss on every export/import of such a project.How
_export_single_prompt: after building the prompt dict, callpayload_modifier.export_prompt_settings(prompt); attach the returned block assettingswhen non-empty.import_prompts: capture the createdToolStudioPromptand, when the blob entry carriessettings, callpayload_modifier.import_prompt_settings(created, settings).sync_promptsroutes throughimport_prompts, so adopt-resync is covered by the same hook.settingskey are a complete no-op; a settings error never fails the export/import.Cloud-side hook implementation: Zipstack/unstract-cloud#1567.
Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
No. The new code only runs when the
payload_modifierplugin is installed (cloud builds) and a prompt actually has settings; thesettingsblob key is additive and optional, so existing blobs deserialize unchanged. Both call sites swallow and log errors, so they cannot regress export/import.Database Migrations
None.
Env Config
None.
Relevant Docs
Related Issues or PRs
Dependencies Versions
Notes on Testing
Round-trip a Prompt Studio project containing a
table/recordprompt and (on a cloud build) anagentic_tableprompt: export, import into another org, confirm settings (column schema / agentic config) are restored. AST/lint pass via pre-commit.Screenshots
Checklist
I have read and understood the Contribution Guidelines.